import * as API from "@distilled.cloud/core/api"; import * as C from "@distilled.cloud/core/category"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import { StackitServiceErrors } from "../errors.ts"; import { StackitProtocol, type StackitOpError, type StackitOpContext } 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 { StackitOpError, StackitOpContext }; /** Span facts shared by every operation (com.distilled.telemetry#service). */ const TELEMETRY = { system: "stackit-api", responseHeaders: [ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" }, { header: "request-id", name: "http.response.header.request-id", transform: "list" }, ], prefix: "STACKIT", service: "Sfs", labels: "stackit", propagate: "w3c", } as const; export class BadRequest extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BadRequest", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 400 }], ) { declare readonly body?: ValidationError | string; } export class Conflict extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Conflict", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(8, __c1, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withConflictError), [{ status: 409 }], ) { declare readonly body?: ConflictError | string; } /** List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) */ export type CreateResourcePoolRequestIpAclList = Array; /** An optional object that represents the labels associated with the resource pool. */ export type CreateResourcePoolRequestLabelsMap = { [key: string]: string | undefined }; export interface CreateResourcePoolRequest { projectId: string; region: string; /** Availability zone */ availabilityZone: string; /** List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) */ ipAcl: CreateResourcePoolRequestIpAclList; /** An optional object that represents the labels associated with the resource pool. */ labels?: CreateResourcePoolRequestLabelsMap | undefined; /** Name of the Resource Pool */ name: string; /** Name of the performance class */ performanceClass: string; /** Size of the Resource Pool (unit: gibibytes) */ sizeGigabytes: number; /** (optional) Id of the Snapshot Policy to use */ snapshotPolicyId?: string | undefined; /** Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares. */ snapshotsAreVisible?: boolean | undefined; } /** List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) */ export type ResourcePoolIpAclList = Array; export type ResourcePoolLabelsMap = { [key: string]: string | undefined }; export interface ResourcePoolPerformanceClass { /** Name of the performance class */ name?: string | undefined; /** Max. IOPS of the Resource Pool. This is shared between every Share in the Resource Pool. */ peakIops?: number | undefined; /** Throughput of the Resource Pool. */ throughput?: number | undefined; } export interface ResourcePoolSnapshotPolicy { /** ID of the Snapshot Policy */ id?: string | undefined; /** Name of the Snapshot Policy */ name?: string | undefined; } export interface ResourcePoolSpace { /** Available space of the Resource Pool (only available when retrieving a single Resource Pool by ID) */ availableGigabytes?: number | null | undefined; /** Size of the Resource Pool in Gibibytes. */ sizeGigabytes?: number | undefined; /** Used space by snapshots (only available when retrieving a single Resource Pool by ID) */ usedBySnapshotsGigabytes?: number | null | undefined; /** Used space of the Resource Pool (only available when retrieving a single Resource Pool by ID) */ usedGigabytes?: number | null | undefined; } export interface ResourcePool { /** Name of the respective availability zone */ availabilityZone?: string | undefined; /** Number of Shares in the Resource Pool */ countShares?: number | undefined; createdAt?: string | undefined; /** ID of the Resource Pool */ id?: string | undefined; /** List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) */ ipAcl?: ResourcePoolIpAclList | undefined; labels?: ResourcePoolLabelsMap | undefined; /** Mount path of the Resource Pool, used to mount the Resource Pool Note that a Resource Pool can only be mounted in read-only */ mountPath?: string | undefined; /** Name of the Resource Pool */ name?: string | undefined; /** Information about the performance class */ performanceClass?: ResourcePoolPerformanceClass | undefined; /** Time when the performance class can be downgraded again. */ performanceClassDowngradableAt?: string | undefined; /** Time when the size can be reduced again. */ sizeReducibleAt?: string | undefined; /** (optional) Snapshot Policy */ snapshotPolicy?: ResourcePoolSnapshotPolicy | null | undefined; /** Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares. */ snapshotsAreVisible?: boolean | undefined; /** Space information */ space?: ResourcePoolSpace | undefined; /** State of the Resource Pool (possible values: ["pending", "creating", "created", "updating", "error", "deleting"]) */ state?: string | undefined; } export interface CreateResourcePoolResponse { /** Created Resource Pool */ resourcePool?: ResourcePool | undefined; } export interface CreateResourcePoolSnapshotRequest { projectId: string; region: string; resourcePoolId: string; /** (optional) A comment to add more information about a snapshot */ comment?: string | null | undefined; /** Name of the Resource Pool Snapshot */ name?: string | undefined; /** (optional) Time in hours after which snaplock on the snapshot expires */ snaplockRetentionHours?: number | null | undefined; } export interface ResourcePoolSnapshot { /** (optional) A comment to add more information about a snapshot */ comment?: string | null | undefined; createdAt?: string | undefined; /** Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. what's in the snapshot) */ logicalSizeGigabytes?: number | undefined; /** ID of the Resource Pool of the Snapshot */ resourcePoolId?: string | undefined; /** Reflects the actual storage footprint in the backend at snapshot time in Gibibytes (e.g. how much storage from the Resource Pool does it use). */ sizeGigabytes?: number | undefined; /** Represents the snaplock expiry time if snaplock is enabled for the resource pool */ snaplockExpiryTime?: string | null | undefined; /** Name of the Resource Pool Snapshot */ snapshotName?: string | undefined; } export interface CreateResourcePoolSnapshotResponse { /** Created Resource Pool Snapshot */ resourcePoolSnapshot?: ResourcePoolSnapshot | undefined; } /** An optional object that represents the labels associated with the share. */ export type CreateShareRequestLabelsMap = { [key: string]: string | undefined }; export interface CreateShareRequest { projectId: string; region: string; resourcePoolId: string; /** Name of the Share Export Policy to use in the Share. Note that if this is not set, the Share can only be mounted in read only by clients with IPs matching the IP ACL of the Resource Pool hosting this Share. You can also assign a Share Export Policy after creating the Share */ exportPolicyName?: string | null | undefined; /** An optional object that represents the labels associated with the share. */ labels?: CreateShareRequestLabelsMap | undefined; /** Name of the Share */ name: string; /** Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes) */ spaceHardLimitGigabytes: number; } /** An optional object that represents the labels associated with the share export policy. */ export type ShareExportPolicyLabelsMap = { [key: string]: string | undefined }; /** IP access control list, where IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.251/32" for a specific IP) This array cannot be empty */ export type ShareExportPolicyRuleIpAclList = Array; export interface ShareExportPolicyRule { createdAt?: string | undefined; /** Description of the Rule (optional) */ description?: string | null | undefined; /** ID of the Share Export Policy Rule */ id?: string | undefined; /** IP access control list, where IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.251/32" for a specific IP) This array cannot be empty */ ipAcl?: ShareExportPolicyRuleIpAclList | undefined; /** Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied This field must be set */ order?: number | undefined; /** Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false */ readOnly?: boolean | undefined; /** Flag to honor set UUID Default: false */ setUuid?: boolean | undefined; /** Flag to indicate if client IPs matching this rule have root access on the Share Default: true */ superUser?: boolean | undefined; } /** List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field "order" within each rule */ export type ShareExportPolicyRulesList = Array; export interface ShareExportPolicy { createdAt?: string | undefined; /** ID of the Share Export Policy */ id?: string | undefined; /** An optional object that represents the labels associated with the share export policy. */ labels?: ShareExportPolicyLabelsMap | undefined; /** Name of the Share Export Policy */ name?: string | undefined; /** List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field "order" within each rule */ rules?: ShareExportPolicyRulesList | undefined; /** Number of Shares using this Share Export Policy */ sharesUsingExportPolicy?: number | undefined; } /** An optional object that represents the labels associated with the share. */ export type ShareLabelsMap = { [key: string]: string | undefined }; export interface Share { createdAt?: string | undefined; /** Details of the Share Export Policy to use in the Share. Note that if this is not set, the Share can only be mounted in read only by clients with IPs matching the IP ACL of the Resource Pool hosting this Share */ exportPolicy?: ShareExportPolicy | null | undefined; /** ID of the Share */ id?: string | undefined; /** An optional object that represents the labels associated with the share. */ labels?: ShareLabelsMap | undefined; /** Mount path of the Share, used to mount the Share */ mountPath?: string | undefined; /** Name of the Share */ name?: string | undefined; /** Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes) */ spaceHardLimitGigabytes?: number | undefined; /** State of the Resource Pool Snapshot (possible values: ["pending", "creating", "created", "error", "deleting"]) */ state?: string | undefined; } export interface CreateShareResponse { /** Created Share */ share?: Share | undefined; } /** An optional object that represents the labels associated with the share export policy. */ export type CreateShareExportPolicyRequestLabelsMap = { [key: string]: string | undefined }; /** IP access control list, where IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) This array cannot be empty */ export type CreateShareExportPolicyRequestRuleIpAclList = Array; export interface CreateShareExportPolicyRequestRule { /** Description of the Rule (optional) */ description?: string | null | undefined; /** IP access control list, where IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) This array cannot be empty */ ipAcl?: CreateShareExportPolicyRequestRuleIpAclList | undefined; /** Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied This field must be set */ order?: number | undefined; /** Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false */ readOnly?: boolean | undefined; /** Flag to honor set UUID Default: false */ setUuid?: boolean | undefined; /** Flag to indicate if client IPs matching this rule have root access on the Share Default: true */ superUser?: boolean | undefined; } /** List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field "order" within each rule */ export type CreateShareExportPolicyRequestRulesList = Array; export interface CreateShareExportPolicyRequest { projectId: string; region: string; /** An optional object that represents the labels associated with the share export policy. */ labels?: CreateShareExportPolicyRequestLabelsMap | undefined; /** Name of the Share Export Policy */ name: string; /** List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field "order" within each rule */ rules?: CreateShareExportPolicyRequestRulesList | undefined; } export interface CreateShareExportPolicyResponse { /** Created Share Export Policy */ shareExportPolicy?: ShareExportPolicy | undefined; } export interface DeleteResourcePoolRequest { projectId: string; region: string; resourcePoolId: string; } export type DeleteResourcePoolResponse2 = unknown; export interface DeleteResourcePoolSnapshotRequest { projectId: string; region: string; resourcePoolId: string; snapshotName: string; } export type DeleteResourcePoolSnapshotResponse2 = unknown; export interface DeleteShareRequest { projectId: string; region: string; resourcePoolId: string; shareId: string; } export type DeleteShareResponse2 = unknown; export interface DeleteShareExportPolicyRequest { projectId: string; region: string; policyId: string; } export type DeleteShareExportPolicyResponse2 = unknown; export interface DisableLockRequest { region: string; projectId: string; } export type DisableLockResponse2 = unknown; export interface EnableLockRequest { region: string; projectId: string; } export interface EnableLockResponse { lockId?: string | undefined; } export interface GetLockRequest { region: string; projectId: string; } export interface GetLockResponse { lockId?: string | undefined; } export interface GetResourcePoolRequest { projectId: string; region: string; resourcePoolId: string; } export interface GetResourcePoolResponse { /** Resource Pool */ resourcePool?: ResourcePool | undefined; } export interface GetResourcePoolSnapshotRequest { projectId: string; region: string; resourcePoolId: string; snapshotName: string; } export interface GetResourcePoolSnapshotResponse { /** Resource Pool Snapshot */ resourcePoolSnapshot?: ResourcePoolSnapshot | undefined; } export interface GetShareRequest { projectId: string; region: string; resourcePoolId: string; shareId: string; } export interface GetShareResponse { /** Share */ share?: Share | undefined; } export interface GetShareExportPolicyRequest { projectId: string; region: string; policyId: string; } export interface GetShareExportPolicyResponse { /** Share Export Policies */ shareExportPolicy?: ShareExportPolicy | undefined; } export interface GetSnapshotPolicyRequest { projectId: string; id: string; } export interface SnapshotPolicySchedule { /** Retention Count */ count?: number | undefined; /** Interval of the Schedule (follows the cron schedule expression in Unix-like systems) */ interval?: string | undefined; /** Prefix used for the snapshots created by this policy */ prefix?: string | undefined; /** Retention Period (ISO 8601 format or "infinite") */ retentionPeriod?: string | undefined; /** ID of the Schedule */ scheduleId?: string | undefined; } /** (deprecated) associated schedules */ export type SnapshotPolicySchedulesList = Array; export interface SnapshotPolicySnapshotPolicySchedule { createdAt?: string | undefined; /** ID of the Schedule */ id?: string | undefined; /** Interval of the Schedule (follows the cron schedule expression in Unix-like systems) */ interval?: string | undefined; /** Name of the Schedule */ name?: string | undefined; /** Prefix used for the snapshots created by this policy */ prefix?: string | undefined; /** Retention Count */ retentionCount?: number | undefined; /** Retention Period (ISO 8601 format or "infinite") */ retentionPeriod?: string | undefined; } /** associated schedules */ export type SnapshotPolicySnapshotSchedulesList = Array; export interface SnapshotPolicy { /** Comment of the Snapshot Policy */ comment?: string | undefined; /** created at timestamp */ createdAt?: string | undefined; /** Wether the Snapshot Policy is enabled */ enabled?: boolean | undefined; /** ID of the Snapshot Policy */ id?: string | undefined; /** Name of the Snapshot Policy */ name?: string | undefined; /** (deprecated) associated schedules */ schedules?: SnapshotPolicySchedulesList | undefined; /** associated schedules */ snapshotSchedules?: SnapshotPolicySnapshotSchedulesList | undefined; } export interface GetSnapshotPolicyResponse { /** Snapshot Policy */ snapshotPolicy?: SnapshotPolicy | undefined; } export interface ListPerformanceClassesRequest {} export interface PerformanceClass { /** IOPS of the Performance Class */ iops?: number | undefined; /** Name of the Performance Class */ name?: string | undefined; /** Throughput of the Performance Class */ throughput?: number | undefined; } /** List of Performance Classes */ export type ListPerformanceClassesResponsePerformanceClassesList = Array; export interface ListPerformanceClassesResponse { /** List of Performance Classes */ performanceClasses?: ListPerformanceClassesResponsePerformanceClassesList | undefined; } export interface ListResourcePoolsRequest { projectId: string; region: string; } /** List of Resource Pools */ export type ListResourcePoolsResponseResourcePoolsList = Array; export interface ListResourcePoolsResponse { /** List of Resource Pools */ resourcePools?: ListResourcePoolsResponseResourcePoolsList | undefined; } export interface ListResourcePoolSnapshotsRequest { projectId: string; region: string; resourcePoolId: string; } /** List of Resource Pool Snapshots */ export type ListResourcePoolSnapshotsResponseResourcePoolSnapshotsList = Array; export interface ListResourcePoolSnapshotsResponse { /** List of Resource Pool Snapshots */ resourcePoolSnapshots?: ListResourcePoolSnapshotsResponseResourcePoolSnapshotsList | undefined; } export interface ListShareExportPoliciesRequest { projectId: string; region: string; } /** List of Share Export Policies */ export type ListShareExportPoliciesResponseShareExportPoliciesList = Array; export interface ListShareExportPoliciesResponse { /** List of Share Export Policies */ shareExportPolicies?: ListShareExportPoliciesResponseShareExportPoliciesList | undefined; } export interface ListSharesRequest { projectId: string; region: string; resourcePoolId: string; } /** List of Shares */ export type ListSharesResponseSharesList = Array; export interface ListSharesResponse { /** List of Shares */ shares?: ListSharesResponseSharesList | undefined; } export interface ListSnapshotPoliciesRequest { projectId: string; immutable?: boolean | undefined; } /** List of Snapshot Policies */ export type ListSnapshotPoliciesResponseSnapshotPoliciesList = Array; export interface ListSnapshotPoliciesResponse { /** List of Snapshot Policies */ snapshotPolicies?: ListSnapshotPoliciesResponseSnapshotPoliciesList | undefined; } /** (optional) List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) */ export type UpdateResourcePoolRequestIpAclList = Array; /** An optional object that represents the labels associated with the resource pool. */ export type UpdateResourcePoolRequestLabelsMap = { [key: string]: string | undefined }; export interface UpdateResourcePoolRequest { projectId: string; region: string; resourcePoolId: string; /** (optional) List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) */ ipAcl?: UpdateResourcePoolRequestIpAclList | undefined; /** An optional object that represents the labels associated with the resource pool. */ labels?: UpdateResourcePoolRequestLabelsMap | undefined; /** (optional) Name of the performance class */ performanceClass?: string | undefined; /** (optional) Size of the Resource Pool (unit: gigabytes) */ sizeGigabytes?: number | null | undefined; /** (optional) Id of the Snapshot Policy to use If not set, the Snapshot Policy is not updated If set to an empty string, the Snapshot Policy is removed */ snapshotPolicyId?: string | null | undefined; /** Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares. */ snapshotsAreVisible?: boolean | undefined; } export interface UpdateResourcePoolResponse { /** Updated Resource Pool */ resourcePool?: ResourcePool | undefined; } export interface UpdateResourcePoolSnapshotRequest { projectId: string; region: string; resourcePoolId: string; snapshotName: string; /** (optional) A comment to add more information about a snapshot */ comment?: string | null | undefined; /** (optional) name of the Resource Pool Snapshot */ name?: string | null | undefined; } export interface UpdateResourcePoolSnapshotResponse { /** Updated Resource Pool Snapshot */ resourcePoolSnapshot?: ResourcePoolSnapshot | undefined; } /** An optional object that represents the labels associated with the share. */ export type UpdateShareRequestLabelsMap = { [key: string]: string | undefined }; export interface UpdateShareRequest { projectId: string; region: string; resourcePoolId: string; shareId: string; /** Name of the Share Export Policy to use in the Share. The behavior depends on the value: - If not set (null): Keep the existing export policy (if any) - If set to empty string (""): Remove the existing export policy - If set to a policy name: Update to use the specified policy, creating a new association if none exists */ exportPolicyName?: string | null | undefined; /** An optional object that represents the labels associated with the share. */ labels?: UpdateShareRequestLabelsMap | undefined; /** Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes) */ spaceHardLimitGigabytes?: number | null | undefined; } export interface UpdateShareResponse { /** Updated Share */ share?: Share | undefined; } /** An optional object that represents the labels associated with the share export policy. */ export type UpdateShareExportPolicyRequestLabelsMap = { [key: string]: string | undefined }; /** IP access control list, where IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) This array cannot be empty */ export type UpdateShareExportPolicyBodyRuleIpAclList = Array; export interface UpdateShareExportPolicyBodyRule { /** Description of the Rule (optional) */ description?: string | null | undefined; /** IP access control list, where IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP) This array cannot be empty */ ipAcl?: UpdateShareExportPolicyBodyRuleIpAclList | undefined; /** Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied This field must be set */ order?: number | undefined; /** Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false */ readOnly?: boolean | undefined; /** Flag to honor set UUID Default: false */ setUuid?: boolean | undefined; /** Flag to indicate if client IPs matching this rule have root access on the Share Default: true */ superUser?: boolean | undefined; } /** List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field "order" within each rule. The whole set of rules needs to be sent in the same request, e.g. if 1 rule is sent, the share export policy will have just that 1 rule, as opposed to extending the existing set of rules with the 1 rule that was sent Important note: the array of rules passed always overwrites the rule array (i.e. sending an empty array removes all rules) */ export type UpdateShareExportPolicyRequestRulesList = Array; export interface UpdateShareExportPolicyRequest { projectId: string; region: string; policyId: string; /** An optional object that represents the labels associated with the share export policy. */ labels?: UpdateShareExportPolicyRequestLabelsMap | undefined; /** List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field "order" within each rule. The whole set of rules needs to be sent in the same request, e.g. if 1 rule is sent, the share export policy will have just that 1 rule, as opposed to extending the existing set of rules with the 1 rule that was sent Important note: the array of rules passed always overwrites the rule array (i.e. sending an empty array removes all rules) */ rules?: UpdateShareExportPolicyRequestRulesList | null | undefined; } export interface UpdateShareExportPolicyResponse { shareExportPolicy?: ShareExportPolicy | undefined; } export interface ValidationErrorField { /** The name of the field in the request that has failed the validation */ field: string; /** The reason why the validation failed */ reason: string; } export type ValidationErrorFieldsList = Array; export interface ValidationError { /** Human-readable string of the error that occured */ error_description?: unknown | undefined; /** Human-readable description of the error that occurred. */ title: string; /** URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/ e.g. storage.stackit.cloud/validation-error */ type: string; fields: ValidationErrorFieldsList; } /** Conflict error response */ export interface ConflictError { /** Human-readable explanation of the specific problem */ detail: string; /** Human-readable string of the error that occurred */ error_description: string; /** The HTTP status code */ status_code: number; /** URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/ e.g. storage.stackit.cloud/conflict */ type: string; } export type CreateResourcePoolError = BadRequest | Conflict | StackitOpError; /** Create Resource Pool Create a Resource Pool in a project. */ export const createResourcePool: API.OperationMethod< CreateResourcePoolRequest, CreateResourcePoolResponse, CreateResourcePoolError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(112, __c14, 0) as any as S.Schema, output: __S(128, __c16, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateResourcePool", })); export type CreateResourcePoolSnapshotError = BadRequest | Conflict | StackitOpError; /** Create Resource Pool Snapshot Creates a Snapshot of a Resource Pool in a project. */ export const createResourcePoolSnapshot: API.OperationMethod< CreateResourcePoolSnapshotRequest, CreateResourcePoolSnapshotResponse, CreateResourcePoolSnapshotError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(208, __c26, 0) as any as S.Schema, output: __S(224, __c28, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateResourcePoolSnapshot", })); export type CreateShareError = BadRequest | Conflict | StackitOpError; /** Create Share Creates a Share in a Resource Pool in a project. */ export const createShare: API.OperationMethod< CreateShareRequest, CreateShareResponse, CreateShareError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(232, __c29, 0) as any as S.Schema, output: __S(248, __c31, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateShare", })); export type CreateShareExportPolicyError = BadRequest | Conflict | StackitOpError; /** Create Share Export Policy Creates a ShareExportPolicy in a Resource Pool in a project. */ export const createShareExportPolicy: API.OperationMethod< CreateShareExportPolicyRequest, CreateShareExportPolicyResponse, CreateShareExportPolicyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(264, __c33, 0) as any as S.Schema, output: __S(272, __c34, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateShareExportPolicy", })); export type DeleteResourcePoolError = BadRequest | Conflict | StackitOpError; /** Delete Resource Pool Deletes a Resource Pool in a project. */ export const deleteResourcePool: API.OperationMethod< DeleteResourcePoolRequest, DeleteResourcePoolResponse2, DeleteResourcePoolError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(288, __c36, 0) as any as S.Schema, output: __S(296, __c37, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteResourcePool", })); export type DeleteResourcePoolSnapshotError = BadRequest | Conflict | StackitOpError; /** Delete Resource Pool Snapshot Deletes a Snapshot from a Resource Pool in a project. */ export const deleteResourcePoolSnapshot: API.OperationMethod< DeleteResourcePoolSnapshotRequest, DeleteResourcePoolSnapshotResponse2, DeleteResourcePoolSnapshotError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(304, __c38, 0) as any as S.Schema, output: __S(296, __c37, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteResourcePoolSnapshot", })); export type DeleteShareError = BadRequest | StackitOpError; /** Delete Share Deletes a Shares in a Resource Pool in a project. */ export const deleteShare: API.OperationMethod< DeleteShareRequest, DeleteShareResponse2, DeleteShareError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(312, __c39, 0) as any as S.Schema, output: __S(296, __c37, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteShare", })); export type DeleteShareExportPolicyError = BadRequest | StackitOpError; /** Delete Share Export Policy Deletes a ShareExportPolicies in a Resource Pool in a project. */ export const deleteShareExportPolicy: API.OperationMethod< DeleteShareExportPolicyRequest, DeleteShareExportPolicyResponse2, DeleteShareExportPolicyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(320, __c40, 0) as any as S.Schema, output: __S(296, __c37, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteShareExportPolicy", })); export type DisableLockError = Conflict | StackitOpError; /** Clean up locks for a project so that it can be deleted successfully. */ export const disableLock: API.OperationMethod< DisableLockRequest, DisableLockResponse2, DisableLockError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(16, __c2, 0) as any as S.Schema, output: __S(296, __c37, 0) as any as S.Schema, errors: [Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DisableLock", })); export type EnableLockError = Conflict | StackitOpError; /** Enable Lock for a project. Necessary for immutable snapshots and to prevent accidental deletion of resources. */ export const enableLock: API.OperationMethod< EnableLockRequest, EnableLockResponse, EnableLockError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c3, 0) as any as S.Schema, output: __S(32, __c4, 0) as any as S.Schema, errors: [Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "EnableLock", })); export type GetLockError = StackitOpError; /** Get lock status for a project. */ export const getLock: API.OperationMethod< GetLockRequest, GetLockResponse, GetLockError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c5, 0) as any as S.Schema, output: __S(32, __c4, 0) as any as S.Schema, errors: [], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetLock", })); export type GetResourcePoolError = BadRequest | StackitOpError; /** Get Resource Pool Retrieves a Resource Pool in a project. */ export const getResourcePool: API.OperationMethod< GetResourcePoolRequest, GetResourcePoolResponse, GetResourcePoolError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c6, 0) as any as S.Schema, output: __S(128, __c16, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetResourcePool", })); export type GetResourcePoolSnapshotError = BadRequest | StackitOpError; /** Get Resource Pool Snapshot Retrieves a Snapshot from a Resource Pool in a project. */ export const getResourcePoolSnapshot: API.OperationMethod< GetResourcePoolSnapshotRequest, GetResourcePoolSnapshotResponse, GetResourcePoolSnapshotError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(56, __c7, 0) as any as S.Schema, output: __S(224, __c28, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetResourcePoolSnapshot", })); export type GetShareError = BadRequest | StackitOpError; /** Get Share Retrieves a Shares in a Resource Pool in a project. */ export const getShare: API.OperationMethod< GetShareRequest, GetShareResponse, GetShareError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(64, __c8, 0) as any as S.Schema, output: __S(248, __c31, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetShare", })); export type GetShareExportPolicyError = BadRequest | StackitOpError; /** Get Share Export Policy Retrieves a ShareExportPolicies in a Resource Pool in a project. */ export const getShareExportPolicy: API.OperationMethod< GetShareExportPolicyRequest, GetShareExportPolicyResponse, GetShareExportPolicyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(72, __c9, 0) as any as S.Schema, output: __S(272, __c34, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetShareExportPolicy", })); export type GetSnapshotPolicyError = StackitOpError; /** Get Snapshot Policy */ export const getSnapshotPolicy: API.OperationMethod< GetSnapshotPolicyRequest, GetSnapshotPolicyResponse, GetSnapshotPolicyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(80, __c10, 0) as any as S.Schema, output: __S(81, __c10, 1) as any as S.Schema, errors: [], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetSnapshotPolicy", })); export type ListPerformanceClassesError = BadRequest | StackitOpError; /** List Resource Performance Classes Lists all performances classes available */ export const listPerformanceClasses: API.OperationMethod< ListPerformanceClassesRequest, ListPerformanceClassesResponse, ListPerformanceClassesError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(96, __c12, 0) as any as S.Schema, output: __S(99, __c12, 3) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListPerformanceClasses", })); export type ListResourcePoolsError = BadRequest | StackitOpError; /** List Resource Pools Lists Resource Pools in a project. */ export const listResourcePools: API.OperationMethod< ListResourcePoolsRequest, ListResourcePoolsResponse, ListResourcePoolsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(104, __c13, 0) as any as S.Schema, output: __S(106, __c13, 2) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListResourcePools", })); export type ListResourcePoolSnapshotsError = BadRequest | StackitOpError; /** List Resource Pool Snapshots Lists the Snapshots of a Resource Pool in a project. */ export const listResourcePoolSnapshots: API.OperationMethod< ListResourcePoolSnapshotsRequest, ListResourcePoolSnapshotsResponse, ListResourcePoolSnapshotsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(144, __c18, 0) as any as S.Schema, output: __S(146, __c18, 2) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListResourcePoolSnapshots", })); export type ListShareExportPoliciesError = BadRequest | StackitOpError; /** List Share Export Policies Lists ShareExportPolicies in a Resource Pool in a project. */ export const listShareExportPolicies: API.OperationMethod< ListShareExportPoliciesRequest, ListShareExportPoliciesResponse, ListShareExportPoliciesError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(152, __c19, 0) as any as S.Schema, output: __S(154, __c19, 2) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListShareExportPolicies", })); export type ListSharesError = BadRequest | StackitOpError; /** List Shares Lists Shares in a Resource Pool in a project. */ export const listShares: API.OperationMethod< ListSharesRequest, ListSharesResponse, ListSharesError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(160, __c20, 0) as any as S.Schema, output: __S(162, __c20, 2) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListShares", })); export type ListSnapshotPoliciesError = StackitOpError; /** List Snapshot Policies */ export const listSnapshotPolicies: API.OperationMethod< ListSnapshotPoliciesRequest, ListSnapshotPoliciesResponse, ListSnapshotPoliciesError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(168, __c21, 0) as any as S.Schema, output: __S(170, __c21, 2) as any as S.Schema, errors: [], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListSnapshotPolicies", })); export type UpdateResourcePoolError = BadRequest | Conflict | StackitOpError; /** Update Resource Pool Updates a Resource Pool in a project. */ export const updateResourcePool: API.OperationMethod< UpdateResourcePoolRequest, UpdateResourcePoolResponse, UpdateResourcePoolError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(176, __c22, 0) as any as S.Schema, output: __S(128, __c16, 0) as any as S.Schema, errors: [BadRequest, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateResourcePool", })); export type UpdateResourcePoolSnapshotError = BadRequest | StackitOpError; /** Update Resource Pool Snapshot Updates a Snapshot from a Resource Pool in a project. */ export const updateResourcePoolSnapshot: API.OperationMethod< UpdateResourcePoolSnapshotRequest, UpdateResourcePoolSnapshotResponse, UpdateResourcePoolSnapshotError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(184, __c23, 0) as any as S.Schema, output: __S(224, __c28, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateResourcePoolSnapshot", })); export type UpdateShareError = BadRequest | StackitOpError; /** Update Share Updates a Shares in a Resource Pool in a project. */ export const updateShare: API.OperationMethod< UpdateShareRequest, UpdateShareResponse, UpdateShareError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(192, __c24, 0) as any as S.Schema, output: __S(248, __c31, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateShare", })); export type UpdateShareExportPolicyError = BadRequest | StackitOpError; /** Update Share Export Policy Updates a ShareExportPolicies in a Resource Pool in a project. */ export const updateShareExportPolicy: API.OperationMethod< UpdateShareExportPolicyRequest, UpdateShareExportPolicyResponse, UpdateShareExportPolicyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(200, __c25, 0) as any as S.Schema, output: __S(272, __c34, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateShareExportPolicy", })); // 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({ field: S.String, reason: S.String, }), ).annotate({ identifier: "ValidationErrorField" }); case 1: return S.Array(__S(0, __c0, 0)); case 2: return S.suspend(() => S.Struct({ error_description: S.optional(S.Unknown), title: S.String, type: S.String, fields: __S(1, __c0, 1), }), ).annotate({ identifier: "ValidationError" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ detail: S.String, error_description: S.String, status_code: S.Number, type: S.String, }), ).annotate({ identifier: "ConflictError" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ region: S.String.pipe(T.Label()), projectId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/regions/{region}/project/{projectId}/locks", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "DisableLockRequest" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ region: S.String.pipe(T.Label()), projectId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/regions/{region}/project/{projectId}/locks", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "EnableLockRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ lockId: S.optional(S.String), }), ).annotate({ identifier: "EnableLockResponse" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ region: S.String.pipe(T.Label()), projectId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/regions/{region}/project/{projectId}/locks", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "GetLockRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "GetResourcePoolRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), snapshotName: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "GetResourcePoolSnapshotRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), shareId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "GetShareRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), policyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "GetShareExportPolicyRequest" }); } } function __c10(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), id: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/snapshotPolicies/{id}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "GetSnapshotPolicyRequest" }); case 1: return S.suspend(() => S.Struct({ snapshotPolicy: S.optional(__S(92, __c11, 4)), }), ).annotate({ identifier: "GetSnapshotPolicyResponse" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ count: S.optional(S.Number), interval: S.optional(S.String), prefix: S.optional(S.String), retentionPeriod: S.optional(S.String), scheduleId: S.optional(S.String), }), ).annotate({ identifier: "SnapshotPolicySchedule" }); case 1: return S.Array(__S(88, __c11, 0)); case 2: return S.suspend(() => S.Struct({ createdAt: S.optional(S.String), id: S.optional(S.String), interval: S.optional(S.String), name: S.optional(S.String), prefix: S.optional(S.String), retentionCount: S.optional(S.Number), retentionPeriod: S.optional(S.String), }), ).annotate({ identifier: "SnapshotPolicySnapshotPolicySchedule" }); case 3: return S.Array(__S(90, __c11, 2)); case 4: return S.suspend(() => S.Struct({ comment: S.optional(S.String), createdAt: S.optional(S.String), enabled: S.optional(S.Boolean), id: S.optional(S.String), name: S.optional(S.String), schedules: S.optional(__S(89, __c11, 1)), snapshotSchedules: S.optional(__S(91, __c11, 3)), }), ).annotate({ identifier: "SnapshotPolicy" }); } } function __c12(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({}).pipe( T.Http({ method: "GET", uri: "/v1/resourcePoolPerformanceClasses", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "ListPerformanceClassesRequest" }); case 1: return S.suspend(() => S.Struct({ iops: S.optional(S.Number), name: S.optional(S.String), throughput: S.optional(S.Number), }), ).annotate({ identifier: "PerformanceClass" }); case 2: return S.Array(__S(97, __c12, 1)); case 3: return S.suspend(() => S.Struct({ performanceClasses: S.optional(__S(98, __c12, 2)), }), ).annotate({ identifier: "ListPerformanceClassesResponse" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "ListResourcePoolsRequest" }); case 1: return S.Array(__S(123, __c15, 3)); case 2: return S.suspend(() => S.Struct({ resourcePools: S.optional(__S(105, __c13, 1)), }), ).annotate({ identifier: "ListResourcePoolsResponse" }); } } function __c14(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), availabilityZone: S.String, ipAcl: __S(136, __c17, 0), labels: S.optional(__S(137, __c17, 1)), name: S.String, performanceClass: S.String, sizeGigabytes: S.Number, snapshotPolicyId: S.optional(S.String), snapshotsAreVisible: S.optional(S.Boolean), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateResourcePoolRequest" }); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ name: S.optional(S.String), peakIops: S.optional(S.Number), throughput: S.optional(S.Number), }), ).annotate({ identifier: "ResourcePoolPerformanceClass" }); case 1: return S.suspend(() => S.Struct({ id: S.optional(S.String), name: S.optional(S.String), }), ).annotate({ identifier: "ResourcePoolSnapshotPolicy" }); case 2: return S.suspend(() => S.Struct({ availableGigabytes: S.optional(S.NullOr(S.Number)), sizeGigabytes: S.optional(S.Number), usedBySnapshotsGigabytes: S.optional(S.NullOr(S.Number)), usedGigabytes: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "ResourcePoolSpace" }); case 3: return S.suspend(() => S.Struct({ availabilityZone: S.optional(S.String), countShares: S.optional(S.Number), createdAt: S.optional(S.String), id: S.optional(S.String), ipAcl: S.optional(__S(136, __c17, 0)), labels: S.optional(__S(137, __c17, 1)), mountPath: S.optional(S.String), name: S.optional(S.String), performanceClass: S.optional(__S(120, __c15, 0)), performanceClassDowngradableAt: S.optional(S.String), sizeReducibleAt: S.optional(S.String), snapshotPolicy: S.optional(S.NullOr(__S(121, __c15, 1))), snapshotsAreVisible: S.optional(S.Boolean), space: S.optional(__S(122, __c15, 2)), state: S.optional(S.String), }), ).annotate({ identifier: "ResourcePool" }); } } function __c16(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ resourcePool: S.optional(__S(123, __c15, 3)), }), ).annotate({ identifier: "CreateResourcePoolResponse" }); } } function __c17(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.Record(S.String, S.String); } } function __c18(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "ListResourcePoolSnapshotsRequest" }); case 1: return S.Array(__S(216, __c27, 0)); case 2: return S.suspend(() => S.Struct({ resourcePoolSnapshots: S.optional(__S(145, __c18, 1)), }), ).annotate({ identifier: "ListResourcePoolSnapshotsResponse" }); } } function __c19(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/shareExportPolicies", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "ListShareExportPoliciesRequest" }); case 1: return S.Array(__S(258, __c32, 2)); case 2: return S.suspend(() => S.Struct({ shareExportPolicies: S.optional(__S(153, __c19, 1)), }), ).annotate({ identifier: "ListShareExportPoliciesResponse" }); } } function __c20(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "ListSharesRequest" }); case 1: return S.Array(__S(240, __c30, 0)); case 2: return S.suspend(() => S.Struct({ shares: S.optional(__S(161, __c20, 1)), }), ).annotate({ identifier: "ListSharesResponse" }); } } function __c21(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), immutable: S.optional(S.Boolean.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/snapshotPolicies", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "ListSnapshotPoliciesRequest" }); case 1: return S.Array(__S(92, __c11, 4)); case 2: return S.suspend(() => S.Struct({ snapshotPolicies: S.optional(__S(169, __c21, 1)), }), ).annotate({ identifier: "ListSnapshotPoliciesResponse" }); } } function __c22(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), ipAcl: S.optional(__S(136, __c17, 0)), labels: S.optional(__S(137, __c17, 1)), performanceClass: S.optional(S.String), sizeGigabytes: S.optional(S.NullOr(S.Number)), snapshotPolicyId: S.optional(S.NullOr(S.String)), snapshotsAreVisible: S.optional(S.Boolean), }).pipe( T.Http({ method: "PATCH", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "UpdateResourcePoolRequest" }); } } function __c23(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), snapshotName: S.String.pipe(T.Label()), comment: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), }).pipe( T.Http({ method: "PATCH", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "UpdateResourcePoolSnapshotRequest" }); } } function __c24(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), shareId: S.String.pipe(T.Label()), exportPolicyName: S.optional(S.NullOr(S.String)), labels: S.optional(__S(137, __c17, 1)), spaceHardLimitGigabytes: S.optional(S.NullOr(S.Number)), }).pipe( T.Http({ method: "PATCH", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "UpdateShareRequest" }); } } function __c25(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), policyId: S.String.pipe(T.Label()), labels: S.optional(__S(137, __c17, 1)), rules: S.optional(S.NullOr(__S(281, __c35, 1))), }).pipe( T.Http({ method: "PATCH", uri: "/v1/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "UpdateShareExportPolicyRequest" }); } } function __c26(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), comment: S.optional(S.NullOr(S.String)), name: S.optional(S.String), snaplockRetentionHours: S.optional(S.NullOr(S.Number)), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateResourcePoolSnapshotRequest" }); } } function __c27(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ comment: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.String), logicalSizeGigabytes: S.optional(S.Number), resourcePoolId: S.optional(S.String), sizeGigabytes: S.optional(S.Number), snaplockExpiryTime: S.optional(S.NullOr(S.String)), snapshotName: S.optional(S.String), }), ).annotate({ identifier: "ResourcePoolSnapshot" }); } } function __c28(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ resourcePoolSnapshot: S.optional(__S(216, __c27, 0)), }), ).annotate({ identifier: "CreateResourcePoolSnapshotResponse" }); } } function __c29(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), exportPolicyName: S.optional(S.NullOr(S.String)), labels: S.optional(__S(137, __c17, 1)), name: S.String, spaceHardLimitGigabytes: S.Number, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateShareRequest" }); } } function __c30(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ createdAt: S.optional(S.String), exportPolicy: S.optional(S.NullOr(__S(258, __c32, 2))), id: S.optional(S.String), labels: S.optional(__S(137, __c17, 1)), mountPath: S.optional(S.String), name: S.optional(S.String), spaceHardLimitGigabytes: S.optional(S.Number), state: S.optional(S.String), }), ).annotate({ identifier: "Share" }); } } function __c31(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ share: S.optional(__S(240, __c30, 0)), }), ).annotate({ identifier: "CreateShareResponse" }); } } function __c32(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ createdAt: S.optional(S.String), description: S.optional(S.NullOr(S.String)), id: S.optional(S.String), ipAcl: S.optional(__S(136, __c17, 0)), order: S.optional(S.Number), readOnly: S.optional(S.Boolean), setUuid: S.optional(S.Boolean), superUser: S.optional(S.Boolean), }), ).annotate({ identifier: "ShareExportPolicyRule" }); case 1: return S.Array(__S(256, __c32, 0)); case 2: return S.suspend(() => S.Struct({ createdAt: S.optional(S.String), id: S.optional(S.String), labels: S.optional(__S(137, __c17, 1)), name: S.optional(S.String), rules: S.optional(__S(257, __c32, 1)), sharesUsingExportPolicy: S.optional(S.Number), }), ).annotate({ identifier: "ShareExportPolicy" }); } } function __c33(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), labels: S.optional(__S(137, __c17, 1)), name: S.String, rules: S.optional(__S(281, __c35, 1)), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{region}/shareExportPolicies", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateShareExportPolicyRequest" }); } } function __c34(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ shareExportPolicy: S.optional(__S(258, __c32, 2)), }), ).annotate({ identifier: "CreateShareExportPolicyResponse" }); } } function __c35(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ description: S.optional(S.NullOr(S.String)), ipAcl: S.optional(__S(136, __c17, 0)), order: S.optional(S.Number), readOnly: S.optional(S.Boolean), setUuid: S.optional(S.Boolean), superUser: S.optional(S.Boolean), }), ).annotate({ identifier: "CreateShareExportPolicyRequestRule" }); case 1: return S.Array(__S(280, __c35, 0)); } } function __c36(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteResourcePoolRequest" }); } } function __c37(j: number): any { switch (j) { case 0: return S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({ identifier: "DeleteResourcePoolResponse2", }); } } function __c38(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), snapshotName: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteResourcePoolSnapshotRequest" }); } } function __c39(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), resourcePoolId: S.String.pipe(T.Label()), shareId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteShareRequest" }); } } function __c40(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), region: S.String.pipe(T.Label()), policyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}", code: 200, baseUrl: "https://sfs.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteShareExportPolicyRequest" }); } } // 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)); }