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 resource assigning the Primary IP to. */ export type AssignPrimaryIpRequestAssigneeType = "server"; export interface AssignPrimaryIpRequest { /** ID of the Primary IP. */ id: number; /** Type of resource assigning the Primary IP to. */ assignee_type: AssignPrimaryIpRequestAssigneeType | (string & {}); /** ID of a resource of type `assignee_type`. */ assignee_id: number; } /** Status of the Action. */ export type AssignPrimaryIpResponseActionStatus = "running" | "success" | "error"; export interface AssignPrimaryIpResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type AssignPrimaryIpResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface AssignPrimaryIpResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface AssignPrimaryIpResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AssignPrimaryIpResponseActionStatus; /** 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: AssignPrimaryIpResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface AssignPrimaryIpResponse { action: AssignPrimaryIpResponseAction; } export interface ChangePrimaryIpDnsPtrRequest { /** ID of the Primary IP. */ id: number; /** Single IPv4 or IPv6 address to create pointer for. */ ip: string; /** Domain Name to point to. PTR record content used for reverse DNS. Set to null to reset (IPv4) to the default value or remove (IPv6) the record. */ dns_ptr: string | null; } /** Status of the Action. */ export type ChangePrimaryIpDnsPtrResponseActionStatus = "running" | "success" | "error"; export type ChangePrimaryIpDnsPtrResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangePrimaryIpDnsPtrResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangePrimaryIpDnsPtrResponseActionError = AssignPrimaryIpResponseActionError; export interface ChangePrimaryIpDnsPtrResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangePrimaryIpDnsPtrResponseActionStatus; /** 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: ChangePrimaryIpDnsPtrResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface ChangePrimaryIpDnsPtrResponse { action: ChangePrimaryIpDnsPtrResponseAction; } export interface ChangePrimaryIpProtectionRequest { /** ID of the Primary IP. */ id: number; /** Prevent the Resource from being deleted. */ delete: boolean; } /** Status of the Action. */ export type ChangePrimaryIpProtectionResponseActionStatus = "running" | "success" | "error"; export type ChangePrimaryIpProtectionResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangePrimaryIpProtectionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangePrimaryIpProtectionResponseActionError = AssignPrimaryIpResponseActionError; export interface ChangePrimaryIpProtectionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangePrimaryIpProtectionResponseActionStatus; /** 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: ChangePrimaryIpProtectionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface ChangePrimaryIpProtectionResponse { action: ChangePrimaryIpProtectionResponseAction; } export interface GetPrimaryIpsActionRequest { /** ID of the Action. */ id: number; } /** Status of the Action. */ export type GetPrimaryIpsActionResponseActionStatus = "running" | "success" | "error"; export type GetPrimaryIpsActionResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type GetPrimaryIpsActionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type GetPrimaryIpsActionResponseActionError = AssignPrimaryIpResponseActionError; export interface GetPrimaryIpsActionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: GetPrimaryIpsActionResponseActionStatus; /** 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: GetPrimaryIpsActionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface GetPrimaryIpsActionResponse { action: GetPrimaryIpsActionResponseAction; } export type ListPrimaryIpActionsRequestSortItem = | "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListPrimaryIpActionsRequestSortList = Array< ListPrimaryIpActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListPrimaryIpActionsRequestStatusItem = "running" | "success" | "error"; export type ListPrimaryIpActionsRequestStatusList = Array< ListPrimaryIpActionsRequestStatusItem | (string & {}) >; export interface ListPrimaryIpActionsRequest { /** ID of the Primary IP. */ id: number; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListPrimaryIpActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListPrimaryIpActionsRequestStatusList; /** 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; } /** Status of the Action. */ export type ListPrimaryIpActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListPrimaryIpActionsResponseActionsItemResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListPrimaryIpActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListPrimaryIpActionsResponseActionsItemError = AssignPrimaryIpResponseActionError; export interface ListPrimaryIpActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListPrimaryIpActionsResponseActionsItemStatus; /** 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: ListPrimaryIpActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export type ListPrimaryIpActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListPrimaryIpActionsResponseMetaPagination { /** 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 ListPrimaryIpActionsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListPrimaryIpActionsResponseMetaPagination; } export interface ListPrimaryIpActionsResponse { actions: ListPrimaryIpActionsResponseActionsList; meta: ListPrimaryIpActionsResponseMeta; } export type ListPrimaryIpsActionsRequestIdList = Array; export type ListPrimaryIpsActionsRequestSortItem = | "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListPrimaryIpsActionsRequestSortList = Array< ListPrimaryIpsActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListPrimaryIpsActionsRequestStatusItem = "running" | "success" | "error"; export type ListPrimaryIpsActionsRequestStatusList = Array< ListPrimaryIpsActionsRequestStatusItem | (string & {}) >; export interface ListPrimaryIpsActionsRequest { /** Filter the actions by ID. May be used multiple times. The response will only contain actions matching the specified IDs. */ id?: ListPrimaryIpsActionsRequestIdList; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListPrimaryIpsActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListPrimaryIpsActionsRequestStatusList; /** 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; } /** Status of the Action. */ export type ListPrimaryIpsActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListPrimaryIpsActionsResponseActionsItemResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListPrimaryIpsActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListPrimaryIpsActionsResponseActionsItemError = AssignPrimaryIpResponseActionError; export interface ListPrimaryIpsActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListPrimaryIpsActionsResponseActionsItemStatus; /** 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: ListPrimaryIpsActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export type ListPrimaryIpsActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export type ListPrimaryIpsActionsResponseMetaPagination = ListPrimaryIpActionsResponseMetaPagination; export type ListPrimaryIpsActionsResponseMeta = ListPrimaryIpActionsResponseMeta; export interface ListPrimaryIpsActionsResponse { actions: ListPrimaryIpsActionsResponseActionsList; meta: ListPrimaryIpActionsResponseMeta; } export interface UnassignPrimaryIpRequest { /** ID of the Primary IP. */ id: number; } /** Status of the Action. */ export type UnassignPrimaryIpResponseActionStatus = "running" | "success" | "error"; export type UnassignPrimaryIpResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type UnassignPrimaryIpResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type UnassignPrimaryIpResponseActionError = AssignPrimaryIpResponseActionError; export interface UnassignPrimaryIpResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: UnassignPrimaryIpResponseActionStatus; /** 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: UnassignPrimaryIpResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface UnassignPrimaryIpResponse { action: UnassignPrimaryIpResponseAction; } export type AssignPrimaryIpError = HetznerOpError; /** Assign a Primary IP to a resource Assign a [Primary IP](#tag/primary-ips) to a resource. A [Server](#tag/servers) can only have one [Primary IP](#tag/primary-ips) of type `ipv4` and one of type `ipv6` assigned. If you need more IPs use [Floating IPs](#tag/floating-ips). A [Server](#tag/servers) must be powered off (status `off`) in order for this operation to succeed. #### Operation specific errors */ export const assignPrimaryIp: API.OperationMethod< AssignPrimaryIpRequest, AssignPrimaryIpResponse, AssignPrimaryIpError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(0, __c0, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangePrimaryIpDnsPtrError = HetznerOpError; /** Change reverse DNS records for a Primary IP Change the reverse DNS records for this [Primary IP](#tag/primary-ips). Allows to modify the PTR records set for the IP address. */ export const changePrimaryIpDnsPtr: API.OperationMethod< ChangePrimaryIpDnsPtrRequest, ChangePrimaryIpDnsPtrResponse, ChangePrimaryIpDnsPtrError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c3, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangePrimaryIpProtectionError = HetznerOpError; /** Change Primary IP Protection Changes the protection configuration of a [Primary IP](#tag/primary-ips). A [Primary IPs](#tag/primary-ips) deletion protection can only be enabled if its `auto_delete` property is set to `false`. */ export const changePrimaryIpProtection: API.OperationMethod< ChangePrimaryIpProtectionRequest, ChangePrimaryIpProtectionResponse, ChangePrimaryIpProtectionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c4, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type GetPrimaryIpsActionError = HetznerOpError; /** Get an Action Returns a single [Action](#tag/actions). */ export const getPrimaryIpsAction: API.OperationMethod< GetPrimaryIpsActionRequest, GetPrimaryIpsActionResponse, GetPrimaryIpsActionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c5, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ListPrimaryIpActionsError = HetznerOpError; /** List Actions for a Primary IP Returns all [Actions](#tag/actions) for a [Primary IP](#tag/primary-ips). Use the provided URI parameters to modify the result. */ export const listPrimaryIpActions: API.PaginatedOperationMethod< ListPrimaryIpActionsRequest, ListPrimaryIpActionsResponse, ListPrimaryIpActionsError, HetznerOpContext, ListPrimaryIpActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(48, __c6, 0) as any as S.Schema, output: __S(60, __c7, 4) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "actions", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type ListPrimaryIpsActionsError = HetznerOpError; /** List Actions Lists multiple [Actions](#tag/actions). Use the provided URI parameters to modify the result. */ export const listPrimaryIpsActions: API.PaginatedOperationMethod< ListPrimaryIpsActionsRequest, ListPrimaryIpsActionsResponse, ListPrimaryIpsActionsError, HetznerOpContext, ListPrimaryIpsActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(65, __c8, 1) as any as S.Schema, output: __S(60, __c7, 4) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "actions", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type UnassignPrimaryIpError = HetznerOpError; /** Unassign a Primary IP from a resource Unassign a [Primary IP](#tag/primary-ips) from a resource. A [Server](#tag/servers) must be powered off (status `off`) in order for this operation to succeed. A [Server](#tag/servers) requires at least one network interface (public or private) to be powered on. #### Operation specific errors */ export const unassignPrimaryIp: API.OperationMethod< UnassignPrimaryIpRequest, UnassignPrimaryIpResponse, UnassignPrimaryIpError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(72, __c9, 0) as any as S.Schema, output: __S(16, __c2, 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: S.Number.pipe(T.Label()), assignee_type: S.String, assignee_id: S.Number, }).pipe(T.Http({ method: "POST", uri: "/primary_ips/{id}/actions/assign", code: 200 })), ).annotate({ identifier: "AssignPrimaryIpRequest" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, }), ).annotate({ identifier: "AssignPrimaryIpResponseActionResourcesItem" }); case 1: return S.Array(__S(8, __c1, 0)); case 2: return S.suspend(() => S.Struct({ code: S.String, message: S.String, }), ).annotate({ identifier: "AssignPrimaryIpResponseActionError" }); 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: "AssignPrimaryIpResponseAction" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ action: __S(11, __c1, 3), }), ).annotate({ identifier: "AssignPrimaryIpResponse" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), ip: S.String, dns_ptr: S.NullOr(S.String), }).pipe( T.Http({ method: "POST", uri: "/primary_ips/{id}/actions/change_dns_ptr", code: 200 }), ), ).annotate({ identifier: "ChangePrimaryIpDnsPtrRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), delete: S.Boolean, }).pipe( T.Http({ method: "POST", uri: "/primary_ips/{id}/actions/change_protection", code: 200 }), ), ).annotate({ identifier: "ChangePrimaryIpProtectionRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "GET", uri: "/primary_ips/actions/{id}", code: 200 })), ).annotate({ identifier: "GetPrimaryIpsActionRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), sort: S.optional(__S(56, __c7, 0).pipe(T.Query())), status: S.optional(__S(56, __c7, 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: "/primary_ips/{id}/actions", code: 200 })), ).annotate({ identifier: "ListPrimaryIpActionsRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.Array(__S(11, __c1, 3)); case 2: 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: "ListPrimaryIpActionsResponseMetaPagination" }); case 3: return S.suspend(() => S.Struct({ pagination: __S(58, __c7, 2), }), ).annotate({ identifier: "ListPrimaryIpActionsResponseMeta" }); case 4: return S.suspend(() => S.Struct({ actions: __S(57, __c7, 1), meta: __S(59, __c7, 3), }), ).annotate({ identifier: "ListPrimaryIpActionsResponse" }); } } function __c8(j: number): any { switch (j) { case 0: return S.Array(S.Number); case 1: return S.suspend(() => S.Struct({ id: S.optional(__S(64, __c8, 0).pipe(T.Query())), sort: S.optional(__S(56, __c7, 0).pipe(T.Query())), status: S.optional(__S(56, __c7, 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: "/primary_ips/actions", code: 200 })), ).annotate({ identifier: "ListPrimaryIpsActionsRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/primary_ips/{id}/actions/unassign", code: 200 })), ).annotate({ identifier: "UnassignPrimaryIpRequest" }); } } // 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)); }