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 }; /** The Floating IP type. */ export type CreateFloatingIpRequestType = "ipv4" | "ipv6"; /** Home [Location](#tag/locations) for the [Floating IP](#tag/floating-ips). Either the ID or the name of the [Location](#tag/locations). Only optional if no [Server](#tag/servers) is provided. Routing is optimized for this [Locations](#tag/locations). */ export type CreateFloatingIpRequestHomeLocation = string | number; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreateFloatingIpRequestLabelsMap = { [key: string]: string | undefined }; export interface CreateFloatingIpRequest { /** The Floating IP type. */ type: CreateFloatingIpRequestType | (string & {}); /** [Server](#tag/servers) the [Floating IP](#tag/floating-ips) is assigned to. `null` if not assigned. */ server?: number | null; /** Home [Location](#tag/locations) for the [Floating IP](#tag/floating-ips). Either the ID or the name of the [Location](#tag/locations). Only optional if no [Server](#tag/servers) is provided. Routing is optimized for this [Locations](#tag/locations). */ home_location?: CreateFloatingIpRequestHomeLocation; /** Description of the Resource. */ description?: string | null; /** Name of the Resource. Must be unique per Project. A name will be generated if none is given. */ name?: string; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels?: CreateFloatingIpRequestLabelsMap; } /** The Floating IP type. */ export type CreateFloatingIpResponseFloatingIpType = "ipv4" | "ipv6"; export interface CreateFloatingIpResponseFloatingIpDnsPtrItem { /** Single IPv4 or IPv6 address of the record. */ ip: string; /** Domain Name to point to. PTR record content used for reverse DNS. */ dns_ptr: string; } /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ export type CreateFloatingIpResponseFloatingIpDnsPtrList = Array; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ export interface CreateFloatingIpResponseFloatingIpHomeLocation { /** ID of the [Location](#tag/locations). */ id: number; /** Unique identifier of the [Location](#tag/locations). */ name: string; /** Human readable description of the [Location](#tag/locations). */ description: string; /** Country the [Location](#tag/locations) resides in. ISO 3166-1 alpha-2 code of the country. */ country: string; /** Name of the closest city to the [Location](#tag/locations). City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. */ city: string; /** Latitude of the city closest to the [Location](#tag/locations). */ latitude: number; /** Longitude of the city closest to the [Location](#tag/locations). */ longitude: number; /** Name of the Network Zone this [Location](#tag/locations) resides in. */ network_zone: string; } /** Protection configuration for the Resource. */ export interface CreateFloatingIpResponseFloatingIpProtection { /** Prevent the Resource from being deleted. */ delete: boolean; } /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreateFloatingIpResponseFloatingIpLabelsMap = { [key: string]: string | undefined }; export interface CreateFloatingIpResponseFloatingIp { /** ID of the [Floating IP](#tag/floating-ips). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** Description of the Resource. */ description: string | null; /** IP address. */ ip: string; /** The Floating IP type. */ type: CreateFloatingIpResponseFloatingIpType; /** [Server](#tag/servers) the [Floating IP](#tag/floating-ips) is assigned to. `null` if not assigned. */ server: number | null; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ dns_ptr: CreateFloatingIpResponseFloatingIpDnsPtrList; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ home_location: CreateFloatingIpResponseFloatingIpHomeLocation; /** Indicates whether the [Floating IP](#tag/floating-ips) is blocked. */ blocked: boolean; /** Protection configuration for the Resource. */ protection: CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: CreateFloatingIpResponseFloatingIpLabelsMap; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; } /** Status of the Action. */ export type CreateFloatingIpResponseActionStatus = "running" | "success" | "error"; export interface CreateFloatingIpResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type CreateFloatingIpResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface CreateFloatingIpResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } /** Action will only be returned if the [Floating IP](#tag/floating-ips) is getting assigned. */ export interface CreateFloatingIpResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: CreateFloatingIpResponseActionStatus; /** 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: CreateFloatingIpResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: CreateFloatingIpResponseActionError | null; } export interface CreateFloatingIpResponse { floating_ip: CreateFloatingIpResponseFloatingIp; /** Action will only be returned if the [Floating IP](#tag/floating-ips) is getting assigned. */ action?: CreateFloatingIpResponseAction | null; } export interface DeleteFloatingIpRequest { /** ID of the Floating IP. */ id: number; } export interface DeleteFloatingIpResponse {} export interface GetFloatingIpRequest { /** ID of the Floating IP. */ id: number; } /** The Floating IP type. */ export type GetFloatingIpResponseFloatingIpType = "ipv4" | "ipv6"; export type GetFloatingIpResponseFloatingIpDnsPtrItem = CreateFloatingIpResponseFloatingIpDnsPtrItem; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ export type GetFloatingIpResponseFloatingIpDnsPtrList = Array; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ export type GetFloatingIpResponseFloatingIpHomeLocation = CreateFloatingIpResponseFloatingIpHomeLocation; /** Protection configuration for the Resource. */ export type GetFloatingIpResponseFloatingIpProtection = CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type GetFloatingIpResponseFloatingIpLabelsMap = { [key: string]: string | undefined }; export interface GetFloatingIpResponseFloatingIp { /** ID of the [Floating IP](#tag/floating-ips). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** Description of the Resource. */ description: string | null; /** IP address. */ ip: string; /** The Floating IP type. */ type: GetFloatingIpResponseFloatingIpType; /** [Server](#tag/servers) the [Floating IP](#tag/floating-ips) is assigned to. `null` if not assigned. */ server: number | null; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ dns_ptr: GetFloatingIpResponseFloatingIpDnsPtrList; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ home_location: CreateFloatingIpResponseFloatingIpHomeLocation; /** Indicates whether the [Floating IP](#tag/floating-ips) is blocked. */ blocked: boolean; /** Protection configuration for the Resource. */ protection: CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: GetFloatingIpResponseFloatingIpLabelsMap; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; } export interface GetFloatingIpResponse { floating_ip: GetFloatingIpResponseFloatingIp; } export type ListFloatingIpsRequestSortItem = | "id" | "id:asc" | "id:desc" | "created" | "created:asc" | "created:desc"; export type ListFloatingIpsRequestSortList = Array; export interface ListFloatingIpsRequest { /** Filter resources by their name. The response will only contain the resources matching exactly the specified name. */ name?: string; /** 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?: ListFloatingIpsRequestSortList; /** 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; } /** The Floating IP type. */ export type ListFloatingIpsResponseFloatingIpsItemType = "ipv4" | "ipv6"; export type ListFloatingIpsResponseFloatingIpsItemDnsPtrItem = CreateFloatingIpResponseFloatingIpDnsPtrItem; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ export type ListFloatingIpsResponseFloatingIpsItemDnsPtrList = Array; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ export type ListFloatingIpsResponseFloatingIpsItemHomeLocation = CreateFloatingIpResponseFloatingIpHomeLocation; /** Protection configuration for the Resource. */ export type ListFloatingIpsResponseFloatingIpsItemProtection = CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type ListFloatingIpsResponseFloatingIpsItemLabelsMap = { [key: string]: string | undefined }; export interface ListFloatingIpsResponseFloatingIpsItem { /** ID of the [Floating IP](#tag/floating-ips). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** Description of the Resource. */ description: string | null; /** IP address. */ ip: string; /** The Floating IP type. */ type: ListFloatingIpsResponseFloatingIpsItemType; /** [Server](#tag/servers) the [Floating IP](#tag/floating-ips) is assigned to. `null` if not assigned. */ server: number | null; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ dns_ptr: ListFloatingIpsResponseFloatingIpsItemDnsPtrList; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ home_location: CreateFloatingIpResponseFloatingIpHomeLocation; /** Indicates whether the [Floating IP](#tag/floating-ips) is blocked. */ blocked: boolean; /** Protection configuration for the Resource. */ protection: CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: ListFloatingIpsResponseFloatingIpsItemLabelsMap; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; } export type ListFloatingIpsResponseFloatingIpsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListFloatingIpsResponseMetaPagination { /** 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 ListFloatingIpsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListFloatingIpsResponseMetaPagination; } export interface ListFloatingIpsResponse { floating_ips: ListFloatingIpsResponseFloatingIpsList; meta: ListFloatingIpsResponseMeta; } /** 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 UpdateFloatingIpRequestLabelsMap = { [key: string]: string | undefined }; export interface UpdateFloatingIpRequest { /** ID of the Floating IP. */ id: number; /** Description of the Resource. */ description?: string | null; /** Name of the Resource. Must be unique per Project. */ name?: 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?: UpdateFloatingIpRequestLabelsMap; } /** The Floating IP type. */ export type UpdateFloatingIpResponseFloatingIpType = "ipv4" | "ipv6"; export type UpdateFloatingIpResponseFloatingIpDnsPtrItem = CreateFloatingIpResponseFloatingIpDnsPtrItem; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ export type UpdateFloatingIpResponseFloatingIpDnsPtrList = Array; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ export type UpdateFloatingIpResponseFloatingIpHomeLocation = CreateFloatingIpResponseFloatingIpHomeLocation; /** Protection configuration for the Resource. */ export type UpdateFloatingIpResponseFloatingIpProtection = CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type UpdateFloatingIpResponseFloatingIpLabelsMap = { [key: string]: string | undefined }; export interface UpdateFloatingIpResponseFloatingIp { /** ID of the [Floating IP](#tag/floating-ips). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** Description of the Resource. */ description: string | null; /** IP address. */ ip: string; /** The Floating IP type. */ type: UpdateFloatingIpResponseFloatingIpType; /** [Server](#tag/servers) the [Floating IP](#tag/floating-ips) is assigned to. `null` if not assigned. */ server: number | null; /** List of reverse DNS entries for the [Floating IP](#tag/floating-ips). */ dns_ptr: UpdateFloatingIpResponseFloatingIpDnsPtrList; /** [Location](#tag/locations) the for the [Floating IP](#tag/floating-ips) is located at. Routing is optimized for this [Location](#tag/locations). */ home_location: CreateFloatingIpResponseFloatingIpHomeLocation; /** Indicates whether the [Floating IP](#tag/floating-ips) is blocked. */ blocked: boolean; /** Protection configuration for the Resource. */ protection: CreateFloatingIpResponseFloatingIpProtection; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: UpdateFloatingIpResponseFloatingIpLabelsMap; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; } export interface UpdateFloatingIpResponse { floating_ip: UpdateFloatingIpResponseFloatingIp; } export type CreateFloatingIpError = HetznerOpError; /** Create a Floating IP Create a [Floating IP](#tag/floating-ips). Provide the `server` attribute to assign the [Floating IP](#tag/floating-ips) to that server or provide a `home_location` to locate the [Floating IP](#tag/floating-ips) at. Note that the [Floating IP](#tag/floating-ips) can be assigned to a [Server](#tag/servers) in any [Location](#tag/locations) later on. For optimal routing it is advised to use the [Floating IP](#tag/floating-ips) in the same [Location](#tag/locations) it was created in. */ export const createFloatingIp: API.OperationMethod< CreateFloatingIpRequest, CreateFloatingIpResponse, CreateFloatingIpError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(0, __c0, 0) as any as S.Schema, output: __S(5, __c0, 5) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type DeleteFloatingIpError = HetznerOpError; /** Delete a Floating IP Deletes a [Floating IP](#tag/floating-ips). If assigned to a [Server](#tag/servers) the [Floating IP](#tag/floating-ips) will be unassigned automatically until 1 May 2026. After this date, the [Floating IP](#tag/floating-ips) needs to be unassigned before it can be deleted. #### Operation specific errors */ export const deleteFloatingIp: API.OperationMethod< DeleteFloatingIpRequest, DeleteFloatingIpResponse, DeleteFloatingIpError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(16, __c2, 0) as any as S.Schema, output: __S(17, __c2, 1) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type GetFloatingIpError = HetznerOpError; /** Get a Floating IP Returns a single [Floating IP](#tag/floating-ips). */ export const getFloatingIp: API.OperationMethod< GetFloatingIpRequest, GetFloatingIpResponse, GetFloatingIpError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c3, 0) as any as S.Schema, output: __S(32, __c4, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ListFloatingIpsError = HetznerOpError; /** List Floating IPs List multiple [Floating IPs](#tag/floating-ips). Use the provided URI parameters to modify the result. */ export const listFloatingIps: API.PaginatedOperationMethod< ListFloatingIpsRequest, ListFloatingIpsResponse, ListFloatingIpsError, HetznerOpContext, ListFloatingIpsResponseFloatingIpsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(41, __c5, 1) as any as S.Schema, output: __S(45, __c5, 5) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "floating_ips", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type UpdateFloatingIpError = HetznerOpError; /** Update a Floating IP Update a [Floating IP](#tag/floating-ips). */ export const updateFloatingIp: API.OperationMethod< UpdateFloatingIpRequest, UpdateFloatingIpResponse, UpdateFloatingIpError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c6, 0) as any as S.Schema, output: __S(32, __c4, 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({ type: S.String, server: S.optional(S.NullOr(S.Number)), home_location: S.optional(S.Unknown), description: S.optional(S.NullOr(S.String)), name: S.optional(S.String), labels: S.optional(__S(8, __c1, 0)), }).pipe(T.Http({ method: "POST", uri: "/floating_ips", code: 200 })), ).annotate({ identifier: "CreateFloatingIpRequest" }); case 1: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, }), ).annotate({ identifier: "CreateFloatingIpResponseActionResourcesItem" }); case 2: return S.Array(__S(1, __c0, 1)); case 3: return S.suspend(() => S.Struct({ code: S.String, message: S.String, }), ).annotate({ identifier: "CreateFloatingIpResponseActionError" }); case 4: 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(2, __c0, 2), error: S.NullOr(__S(3, __c0, 3)), }), ).annotate({ identifier: "CreateFloatingIpResponseAction" }); case 5: return S.suspend(() => S.Struct({ floating_ip: __S(13, __c1, 5), action: S.optional(S.NullOr(__S(4, __c0, 4))), }), ).annotate({ identifier: "CreateFloatingIpResponse" }); } } function __c1(j: number): any { switch (j) { case 0: return S.Record(S.String, S.String); case 1: return S.suspend(() => S.Struct({ ip: S.String, dns_ptr: S.String, }), ).annotate({ identifier: "CreateFloatingIpResponseFloatingIpDnsPtrItem" }); case 2: return S.Array(__S(9, __c1, 1)); case 3: return S.suspend(() => S.Struct({ id: S.Number, name: S.String, description: S.String, country: S.String, city: S.String, latitude: S.Number, longitude: S.Number, network_zone: S.String, }), ).annotate({ identifier: "CreateFloatingIpResponseFloatingIpHomeLocation" }); case 4: return S.suspend(() => S.Struct({ delete: S.Boolean, }), ).annotate({ identifier: "CreateFloatingIpResponseFloatingIpProtection" }); case 5: return S.suspend(() => S.Struct({ id: S.Number, name: S.String, description: S.NullOr(S.String), ip: S.String, type: S.String, server: S.NullOr(S.Number), dns_ptr: __S(10, __c1, 2), home_location: __S(11, __c1, 3), blocked: S.Boolean, protection: __S(12, __c1, 4), labels: __S(8, __c1, 0), created: S.String, }), ).annotate({ identifier: "CreateFloatingIpResponseFloatingIp" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "DELETE", uri: "/floating_ips/{id}", code: 200 })), ).annotate({ identifier: "DeleteFloatingIpRequest" }); case 1: return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteFloatingIpResponse" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "GET", uri: "/floating_ips/{id}", code: 200 })), ).annotate({ identifier: "GetFloatingIpRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ floating_ip: __S(13, __c1, 5), }), ).annotate({ identifier: "GetFloatingIpResponse" }); } } function __c5(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.suspend(() => S.Struct({ name: S.optional(S.String.pipe(T.Query())), label_selector: S.optional(S.String.pipe(T.Query())), sort: S.optional(__S(40, __c5, 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: "/floating_ips", code: 200 })), ).annotate({ identifier: "ListFloatingIpsRequest" }); case 2: return S.Array(__S(13, __c1, 5)); 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: "ListFloatingIpsResponseMetaPagination" }); case 4: return S.suspend(() => S.Struct({ pagination: __S(43, __c5, 3), }), ).annotate({ identifier: "ListFloatingIpsResponseMeta" }); case 5: return S.suspend(() => S.Struct({ floating_ips: __S(42, __c5, 2), meta: __S(44, __c5, 4), }), ).annotate({ identifier: "ListFloatingIpsResponse" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), description: S.optional(S.NullOr(S.String)), name: S.optional(S.String), labels: S.optional(__S(8, __c1, 0)), }).pipe(T.Http({ method: "PUT", uri: "/floating_ips/{id}", code: 200 })), ).annotate({ identifier: "UpdateFloatingIpRequest" }); } } // 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)); }