import * as API from "@distilled.cloud/core/api"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-hetzner/specs/cloud.spec.json). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import { UnknownHetznerError } from "../errors.ts"; import { paginatePageNumber } from "../pagination.ts"; import { HetznerProtocol, type HetznerOpError, type HetznerOpContext } from "../protocol.ts"; import * as Retry from "../retry.ts"; import * as T from "../traits.ts"; // Schema table, filled on first reach (see __S at the end). const __s: any[] = []; export type { HetznerOpError, HetznerOpContext }; /** Type of the [RRSet](#tag/zone-rrsets). */ export type CreateZoneRrsetRequestType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; /** Record of a [RRSet](#tag/zone-rrsets). The `value` is used to identify the record in an [RRSet](#tag/zone-rrsets). */ export interface CreateZoneRrsetRequestRecordsItem { /** Value of the record. For details about accepted values, see the [DNS record types documentation](https://docs.hetzner.com/networking/dns/record-types/overview/). */ value: string; /** Comment of the record. */ comment?: string; } /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ export type CreateZoneRrsetRequestRecordsList = Array; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreateZoneRrsetRequestLabelsMap = { [key: string]: string | undefined }; export interface CreateZoneRrsetRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Name of the [RRSet](#tag/zone-rrsets). The name must be in lower case, and must not end with a dot or the [Zone](#tag/zones) name. Names containing non-ASCII characters must be transcribed to [Punycode](https://wikipedia.org/wiki/Punycode) representation with ACE prefix, e.g. `xn--4bi` (U+2709). For the [Zone](#tag/zones) apex, use `@`. */ name: string; /** Type of the [RRSet](#tag/zone-rrsets). */ type: CreateZoneRrsetRequestType | (string & {}); /** Time To Live (TTL) of the [RRSet](#tag/zone-rrsets). Must be in between 60s and 2147483647s. If not set, the [Zone's](#tag/zones) Default TTL is used. */ ttl?: number | null; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ records: CreateZoneRrsetRequestRecordsList; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels?: CreateZoneRrsetRequestLabelsMap; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type CreateZoneRrsetResponseRrsetType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreateZoneRrsetResponseRrsetLabelsMap = { [key: string]: string | undefined }; /** Protection of the [RRSet](#tag/zone-rrsets). */ export interface CreateZoneRrsetResponseRrsetProtection { /** Prevent the Resource from being changed. */ change: boolean; } /** Record of a [RRSet](#tag/zone-rrsets). The `value` is used to identify the record in an [RRSet](#tag/zone-rrsets). */ export type CreateZoneRrsetResponseRrsetRecordsItem = CreateZoneRrsetRequestRecordsItem; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ export type CreateZoneRrsetResponseRrsetRecordsList = Array; export interface CreateZoneRrsetResponseRrset { /** ID of the RRSet. The ID is composed of the name and type, joined with a slash (e.g. `www/AAAA`). */ id: string; /** Name of the [RRSet](#tag/zone-rrsets). The name must be in lower case, and must not end with a dot or the [Zone](#tag/zones) name. Names containing non-ASCII characters must be transcribed to [Punycode](https://wikipedia.org/wiki/Punycode) representation with ACE prefix, e.g. `xn--4bi` (U+2709). For the [Zone](#tag/zones) apex, use `@`. */ name: string; /** Type of the [RRSet](#tag/zone-rrsets). */ type: CreateZoneRrsetResponseRrsetType; /** Time To Live (TTL) of the [RRSet](#tag/zone-rrsets). Must be in between 60s and 2147483647s. If not set, the [Zone's](#tag/zones) Default TTL is used. */ ttl: number | null; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: CreateZoneRrsetResponseRrsetLabelsMap; /** Protection of the [RRSet](#tag/zone-rrsets). */ protection: CreateZoneRrsetResponseRrsetProtection; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ records: CreateZoneRrsetResponseRrsetRecordsList; /** ID of the [Zone](#tag/zones). */ zone: number; } /** Status of the Action. */ export type CreateZoneRrsetResponseActionStatus = "running" | "success" | "error"; export interface CreateZoneRrsetResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type CreateZoneRrsetResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface CreateZoneRrsetResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface CreateZoneRrsetResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: CreateZoneRrsetResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: CreateZoneRrsetResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: CreateZoneRrsetResponseActionError | null; } export interface CreateZoneRrsetResponse { rrset: CreateZoneRrsetResponseRrset; action: CreateZoneRrsetResponseAction; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type DeleteZoneRrsetRequestRrType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; export interface DeleteZoneRrsetRequest { /** ID or Name of the Zone. */ id_or_name: string; rr_name: string; rr_type: DeleteZoneRrsetRequestRrType | (string & {}); } /** Status of the Action. */ export type DeleteZoneRrsetResponseActionStatus = "running" | "success" | "error"; export type DeleteZoneRrsetResponseActionResourcesItem = CreateZoneRrsetResponseActionResourcesItem; /** Resources the Action relates to. */ export type DeleteZoneRrsetResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DeleteZoneRrsetResponseActionError = CreateZoneRrsetResponseActionError; export interface DeleteZoneRrsetResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DeleteZoneRrsetResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DeleteZoneRrsetResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: CreateZoneRrsetResponseActionError | null; } export interface DeleteZoneRrsetResponse { action: DeleteZoneRrsetResponseAction; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type GetZoneRrsetRequestRrType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; export interface GetZoneRrsetRequest { /** ID or Name of the Zone. */ id_or_name: string; rr_name: string; rr_type: GetZoneRrsetRequestRrType | (string & {}); } /** Type of the [RRSet](#tag/zone-rrsets). */ export type GetZoneRrsetResponseRrsetType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type GetZoneRrsetResponseRrsetLabelsMap = { [key: string]: string | undefined }; /** Protection of the [RRSet](#tag/zone-rrsets). */ export type GetZoneRrsetResponseRrsetProtection = CreateZoneRrsetResponseRrsetProtection; /** Record of a [RRSet](#tag/zone-rrsets). The `value` is used to identify the record in an [RRSet](#tag/zone-rrsets). */ export type GetZoneRrsetResponseRrsetRecordsItem = CreateZoneRrsetRequestRecordsItem; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ export type GetZoneRrsetResponseRrsetRecordsList = Array; export interface GetZoneRrsetResponseRrset { /** ID of the RRSet. The ID is composed of the name and type, joined with a slash (e.g. `www/AAAA`). */ id: string; /** Name of the [RRSet](#tag/zone-rrsets). The name must be in lower case, and must not end with a dot or the [Zone](#tag/zones) name. Names containing non-ASCII characters must be transcribed to [Punycode](https://wikipedia.org/wiki/Punycode) representation with ACE prefix, e.g. `xn--4bi` (U+2709). For the [Zone](#tag/zones) apex, use `@`. */ name: string; /** Type of the [RRSet](#tag/zone-rrsets). */ type: GetZoneRrsetResponseRrsetType; /** Time To Live (TTL) of the [RRSet](#tag/zone-rrsets). Must be in between 60s and 2147483647s. If not set, the [Zone's](#tag/zones) Default TTL is used. */ ttl: number | null; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: GetZoneRrsetResponseRrsetLabelsMap; /** Protection of the [RRSet](#tag/zone-rrsets). */ protection: CreateZoneRrsetResponseRrsetProtection; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ records: GetZoneRrsetResponseRrsetRecordsList; /** ID of the [Zone](#tag/zones). */ zone: number; } export interface GetZoneRrsetResponse { rrset: GetZoneRrsetResponseRrset; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type ListZoneRrsetsRequestTypeItem = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; export type ListZoneRrsetsRequestTypeList = Array; export type ListZoneRrsetsRequestSortItem = | "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; export type ListZoneRrsetsRequestSortList = Array; export interface ListZoneRrsetsRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Filter resources by their name. The response will only contain the resources matching exactly the specified name. */ name?: string; /** Filter resources by their type. May be used multiple times. The response will only contain resources matching the specified types. */ type?: ListZoneRrsetsRequestTypeList; /** Filter resources by labels. The response will only contain resources matching the label selector. For more information, see "[Label Selector](#description/label-selector)". */ label_selector?: string; /** Sort resources by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListZoneRrsetsRequestSortList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type ListZoneRrsetsResponseRrsetsItemType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type ListZoneRrsetsResponseRrsetsItemLabelsMap = { [key: string]: string | undefined }; /** Protection of the [RRSet](#tag/zone-rrsets). */ export type ListZoneRrsetsResponseRrsetsItemProtection = CreateZoneRrsetResponseRrsetProtection; /** Record of a [RRSet](#tag/zone-rrsets). The `value` is used to identify the record in an [RRSet](#tag/zone-rrsets). */ export type ListZoneRrsetsResponseRrsetsItemRecordsItem = CreateZoneRrsetRequestRecordsItem; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ export type ListZoneRrsetsResponseRrsetsItemRecordsList = Array; export interface ListZoneRrsetsResponseRrsetsItem { /** ID of the RRSet. The ID is composed of the name and type, joined with a slash (e.g. `www/AAAA`). */ id: string; /** Name of the [RRSet](#tag/zone-rrsets). The name must be in lower case, and must not end with a dot or the [Zone](#tag/zones) name. Names containing non-ASCII characters must be transcribed to [Punycode](https://wikipedia.org/wiki/Punycode) representation with ACE prefix, e.g. `xn--4bi` (U+2709). For the [Zone](#tag/zones) apex, use `@`. */ name: string; /** Type of the [RRSet](#tag/zone-rrsets). */ type: ListZoneRrsetsResponseRrsetsItemType; /** Time To Live (TTL) of the [RRSet](#tag/zone-rrsets). Must be in between 60s and 2147483647s. If not set, the [Zone's](#tag/zones) Default TTL is used. */ ttl: number | null; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: ListZoneRrsetsResponseRrsetsItemLabelsMap; /** Protection of the [RRSet](#tag/zone-rrsets). */ protection: CreateZoneRrsetResponseRrsetProtection; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ records: ListZoneRrsetsResponseRrsetsItemRecordsList; /** ID of the [Zone](#tag/zones). */ zone: number; } export type ListZoneRrsetsResponseRrsetsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListZoneRrsetsResponseMetaPagination { /** Current page number. */ page: number; /** Maximum number of entries returned per page. */ per_page: number; /** Page number of the previous page. Can be null if the current page is the first one. */ previous_page: number | null; /** Page number of the next page. Can be null if the current page is the last one. */ next_page: number | null; /** Page number of the last page available. Can be null if the current page is the last one. */ last_page: number | null; /** Total number of entries that exist for this query. Can be null if unknown. */ total_entries: number | null; } export interface ListZoneRrsetsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListZoneRrsetsResponseMetaPagination; } export interface ListZoneRrsetsResponse { rrsets: ListZoneRrsetsResponseRrsetsList; meta: ListZoneRrsetsResponseMeta; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type UpdateZoneRrsetRequestRrType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; /** User-defined labels (`key/value` pairs) for the Resource. Note that the set of [Labels](#description/labels) provided in the request will overwrite the existing one. For more information, see "[Labels](#description/labels)". */ export type UpdateZoneRrsetRequestLabelsMap = { [key: string]: string | undefined }; export interface UpdateZoneRrsetRequest { /** ID or Name of the Zone. */ id_or_name: string; rr_name: string; rr_type: UpdateZoneRrsetRequestRrType | (string & {}); /** User-defined labels (`key/value` pairs) for the Resource. Note that the set of [Labels](#description/labels) provided in the request will overwrite the existing one. For more information, see "[Labels](#description/labels)". */ labels?: UpdateZoneRrsetRequestLabelsMap; } /** Type of the [RRSet](#tag/zone-rrsets). */ export type UpdateZoneRrsetResponseRrsetType = | "A" | "AAAA" | "CAA" | "CNAME" | "DS" | "HINFO" | "HTTPS" | "MX" | "NS" | "PTR" | "RP" | "SOA" | "SRV" | "SVCB" | "TLSA" | "TXT"; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type UpdateZoneRrsetResponseRrsetLabelsMap = { [key: string]: string | undefined }; /** Protection of the [RRSet](#tag/zone-rrsets). */ export type UpdateZoneRrsetResponseRrsetProtection = CreateZoneRrsetResponseRrsetProtection; /** Record of a [RRSet](#tag/zone-rrsets). The `value` is used to identify the record in an [RRSet](#tag/zone-rrsets). */ export type UpdateZoneRrsetResponseRrsetRecordsItem = CreateZoneRrsetRequestRecordsItem; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ export type UpdateZoneRrsetResponseRrsetRecordsList = Array; export interface UpdateZoneRrsetResponseRrset { /** ID of the RRSet. The ID is composed of the name and type, joined with a slash (e.g. `www/AAAA`). */ id: string; /** Name of the [RRSet](#tag/zone-rrsets). The name must be in lower case, and must not end with a dot or the [Zone](#tag/zones) name. Names containing non-ASCII characters must be transcribed to [Punycode](https://wikipedia.org/wiki/Punycode) representation with ACE prefix, e.g. `xn--4bi` (U+2709). For the [Zone](#tag/zones) apex, use `@`. */ name: string; /** Type of the [RRSet](#tag/zone-rrsets). */ type: UpdateZoneRrsetResponseRrsetType; /** Time To Live (TTL) of the [RRSet](#tag/zone-rrsets). Must be in between 60s and 2147483647s. If not set, the [Zone's](#tag/zones) Default TTL is used. */ ttl: number | null; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: UpdateZoneRrsetResponseRrsetLabelsMap; /** Protection of the [RRSet](#tag/zone-rrsets). */ protection: CreateZoneRrsetResponseRrsetProtection; /** Records of the [RRSet](#tag/zone-rrsets). Must not be empty and must only contain distinct record values. The order of records returned in responses is not guaranteed to be consistent. */ records: UpdateZoneRrsetResponseRrsetRecordsList; /** ID of the [Zone](#tag/zones). */ zone: number; } export interface UpdateZoneRrsetResponse { rrset: UpdateZoneRrsetResponseRrset; } export type CreateZoneRrsetError = HetznerOpError; /** Create an RRSet Create an [RRSet](#tag/zone-rrsets) in the [Zone](#tag/zones). Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const createZoneRrset: API.OperationMethod< CreateZoneRrsetRequest, CreateZoneRrsetResponse, CreateZoneRrsetError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(0, __c0, 0) as any as S.Schema, output: __S(1, __c0, 1) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type DeleteZoneRrsetError = HetznerOpError; /** Delete an RRSet Deletes an [RRSet](#tag/zone-rrsets) from the [Zone](#tag/zones). Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const deleteZoneRrset: API.OperationMethod< DeleteZoneRrsetRequest, DeleteZoneRrsetResponse, DeleteZoneRrsetError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c3, 0) as any as S.Schema, output: __S(25, __c3, 1) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type GetZoneRrsetError = HetznerOpError; /** Get an RRSet Returns a single [RRSet](#tag/zone-rrsets) from the [Zone](#tag/zones). Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const getZoneRrset: API.OperationMethod< GetZoneRrsetRequest, GetZoneRrsetResponse, GetZoneRrsetError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c4, 0) as any as S.Schema, output: __S(40, __c5, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ListZoneRrsetsError = HetznerOpError; /** List RRSets Returns all [RRSets](#tag/zone-rrsets) in the [Zone](#tag/zones). Use the provided URI parameters to modify the result. The maximum value for `per_page` on this endpoint is `100` instead of `50`. Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const listZoneRrsets: API.PaginatedOperationMethod< ListZoneRrsetsRequest, ListZoneRrsetsResponse, ListZoneRrsetsError, HetznerOpContext, ListZoneRrsetsResponseRrsetsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(49, __c6, 1) as any as S.Schema, output: __S(53, __c6, 5) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "rrsets", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type UpdateZoneRrsetError = HetznerOpError; /** Update an RRSet Updates an [RRSet](#tag/zone-rrsets) in the [Zone](#tag/zones). Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const updateZoneRrset: API.OperationMethod< UpdateZoneRrsetRequest, UpdateZoneRrsetResponse, UpdateZoneRrsetError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(56, __c7, 0) as any as S.Schema, output: __S(40, __c5, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); // Schema builders: each runs one schema initializer, on that schema's first use. function __c0(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), name: S.String, type: S.String, ttl: S.optional(S.NullOr(S.Number)), records: __S(17, __c2, 1), labels: S.optional(__S(18, __c2, 2)), }).pipe(T.Http({ method: "POST", uri: "/zones/{id_or_name}/rrsets", code: 200 })), ).annotate({ identifier: "CreateZoneRrsetRequest" }); case 1: return S.suspend(() => S.Struct({ rrset: __S(20, __c2, 4), action: __S(11, __c1, 3), }), ).annotate({ identifier: "CreateZoneRrsetResponse" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, }), ).annotate({ identifier: "CreateZoneRrsetResponseActionResourcesItem" }); case 1: return S.Array(__S(8, __c1, 0)); case 2: return S.suspend(() => S.Struct({ code: S.String, message: S.String, }), ).annotate({ identifier: "CreateZoneRrsetResponseActionError" }); case 3: return S.suspend(() => S.Struct({ id: S.Number, command: S.String, status: S.String, started: S.String, finished: S.NullOr(S.String), progress: S.Number, resources: __S(9, __c1, 1), error: S.NullOr(__S(10, __c1, 2)), }), ).annotate({ identifier: "CreateZoneRrsetResponseAction" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ value: S.String, comment: S.optional(S.String), }), ).annotate({ identifier: "CreateZoneRrsetRequestRecordsItem" }); case 1: return S.Array(__S(16, __c2, 0)); case 2: return S.Record(S.String, S.String); case 3: return S.suspend(() => S.Struct({ change: S.Boolean, }), ).annotate({ identifier: "CreateZoneRrsetResponseRrsetProtection" }); case 4: return S.suspend(() => S.Struct({ id: S.String, name: S.String, type: S.String, ttl: S.NullOr(S.Number), labels: __S(18, __c2, 2), protection: __S(19, __c2, 3), records: __S(17, __c2, 1), zone: S.Number, }), ).annotate({ identifier: "CreateZoneRrsetResponseRrset" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), rr_name: S.String.pipe(T.Label()), rr_type: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}", code: 200, }), ), ).annotate({ identifier: "DeleteZoneRrsetRequest" }); case 1: return S.suspend(() => S.Struct({ action: __S(11, __c1, 3), }), ).annotate({ identifier: "DeleteZoneRrsetResponse" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), rr_name: S.String.pipe(T.Label()), rr_type: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}", code: 200, }), ), ).annotate({ identifier: "GetZoneRrsetRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ rrset: __S(20, __c2, 4), }), ).annotate({ identifier: "GetZoneRrsetResponse" }); } } function __c6(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), name: S.optional(S.String.pipe(T.Query())), type: S.optional(__S(48, __c6, 0).pipe(T.Query())), label_selector: S.optional(S.String.pipe(T.Query())), sort: S.optional(__S(48, __c6, 0).pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), }).pipe(T.Http({ method: "GET", uri: "/zones/{id_or_name}/rrsets", code: 200 })), ).annotate({ identifier: "ListZoneRrsetsRequest" }); case 2: return S.Array(__S(20, __c2, 4)); case 3: return S.suspend(() => S.Struct({ page: S.Number, per_page: S.Number, previous_page: S.NullOr(S.Number), next_page: S.NullOr(S.Number), last_page: S.NullOr(S.Number), total_entries: S.NullOr(S.Number), }), ).annotate({ identifier: "ListZoneRrsetsResponseMetaPagination" }); case 4: return S.suspend(() => S.Struct({ pagination: __S(51, __c6, 3), }), ).annotate({ identifier: "ListZoneRrsetsResponseMeta" }); case 5: return S.suspend(() => S.Struct({ rrsets: __S(50, __c6, 2), meta: __S(52, __c6, 4), }), ).annotate({ identifier: "ListZoneRrsetsResponse" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), rr_name: S.String.pipe(T.Label()), rr_type: S.String.pipe(T.Label()), labels: S.optional(__S(18, __c2, 2)), }).pipe( T.Http({ method: "PUT", uri: "/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}", code: 200, }), ), ).annotate({ identifier: "UpdateZoneRrsetRequest" }); } } // Schema table: entry i is schema j of builder f, made on first reach. function __S(i: number, f: (j: number) => unknown, j: number): any { return (__s[i] ??= __L.at(f, j)); }