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: "Kms", 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(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 400 }], ) { declare readonly body?: HttpError | 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(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withConflictError), [{ status: 409 }], ) { declare readonly body?: HttpError | string; } export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withAuthError), [{ status: 403 }], ) { declare readonly body?: HttpError | string; } export class NotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NotFound", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 404 }], ) { declare readonly body?: HttpError | string; } export type CreateKeyRequestRegionId = "eu01"; /** The access scope of the key. */ export type AccessScope = "PUBLIC" | "SNA"; /** The algorithm the key material uses. */ export type Algorithm = | "aes_256_gcm" | "rsa_2048_oaep_sha256" | "rsa_3072_oaep_sha256" | "rsa_4096_oaep_sha256" | "rsa_4096_oaep_sha512" | "hmac_sha256" | "hmac_sha384" | "hmac_sha512" | "ecdsa_p256_sha256" | "ecdsa_p384_sha384" | "ecdsa_p521_sha512"; /** The purpose of the key. */ export type Purpose = | "symmetric_encrypt_decrypt" | "asymmetric_encrypt_decrypt" | "message_authentication_code" | "asymmetric_sign_verify"; export interface CreateKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: CreateKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; access_scope?: AccessScope | (string & {}) | undefined; algorithm: Algorithm | (string & {}); /** A user chosen description to distinguish multiple keys. */ description?: string | undefined; /** The display name to distinguish multiple keys. Valid characters: letters, digits, underscores and hyphens. */ displayName: string; /** States whether versions can be created or only imported. */ importOnly?: boolean | undefined; protection: string; purpose: Purpose | (string & {}); } /** The current state of the key. */ export type KeyState = | "active" | "deleted" | "not_available" | "errors_exist" | "creating" | "no_version"; export interface Key { access_scope: AccessScope; algorithm: Algorithm; /** The date and time the creation of the key was triggered. */ createdAt: string; /** This date is set when a key is pending deletion and refers to the scheduled date of deletion */ deletionDate?: string | undefined; /** A user chosen description to distinguish multiple keys. */ description?: string | undefined; /** The display name to distinguish multiple keys. */ displayName: string; /** A auto generated unique id which identifies the keys. */ id: string; /** States whether versions can be created or only imported. */ importOnly: boolean; /** The unique id of the key ring this key is assigned to. */ keyRingId: string; protection: string; purpose: Purpose; /** The current state of the key. */ state: KeyState; } export type CreateKeyRingRequestRegionId = "eu01"; export interface CreateKeyRingRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: CreateKeyRingRequestRegionId | (string & {}); /** A user chosen description to distinguish multiple key rings. */ description?: string | undefined; /** The display name to distinguish multiple key rings. Valid characters: letters, digits, underscores and hyphens. */ displayName: string; } /** The current state of the key ring. */ export type KeyRingState = "creating" | "active" | "deleted"; export interface KeyRing { /** The date and time the creation of the key ring was triggered. */ createdAt: string; /** A user chosen description to distinguish multiple key rings. */ description?: string | undefined; /** The display name to distinguish multiple key rings. */ displayName: string; /** A auto generated unique id which identifies the key ring. */ id: string; /** The current state of the key ring. */ state: KeyRingState; } export type CreateWrappingKeyRequestRegionId = "eu01"; /** The wrapping algorithm used to wrap the key to import. */ export type WrappingAlgorithm = | "rsa_2048_oaep_sha256" | "rsa_3072_oaep_sha256" | "rsa_4096_oaep_sha256" | "rsa_4096_oaep_sha512" | "rsa_2048_oaep_sha256_aes_256_key_wrap" | "rsa_3072_oaep_sha256_aes_256_key_wrap" | "rsa_4096_oaep_sha256_aes_256_key_wrap" | "rsa_4096_oaep_sha512_aes_256_key_wrap"; /** The wrapping purpose for the wrapping key. */ export type WrappingPurpose = "wrap_symmetric_key" | "wrap_asymmetric_key"; export interface CreateWrappingKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: CreateWrappingKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; access_scope?: AccessScope | (string & {}) | undefined; algorithm: WrappingAlgorithm | (string & {}); /** A user chosen description to distinguish multiple wrapping keys. */ description?: string | undefined; /** The display name to distinguish multiple wrapping keys. Valid characters: letters, digits, underscores and hyphens. */ displayName: string; protection: string; purpose: WrappingPurpose | (string & {}); } /** The current state of the wrapping key. */ export type WrappingKeyState = | "active" | "creating" | "expired" | "deleted" | "key_material_unavailable"; export interface WrappingKey { access_scope: AccessScope; algorithm: WrappingAlgorithm; /** The date and time the creation of the wrapping key was triggered. */ createdAt: string; /** A user chosen description to distinguish multiple wrapping keys. */ description?: string | undefined; /** The display name to distinguish multiple wrapping keys. */ displayName: string; /** The date and time the wrapping key will expire. */ expiresAt: string; /** A auto generated unique id which identifies the wrapping keys. */ id: string; /** The unique id of the key ring this wrapping key is assigned to. */ keyRingId: string; protection: string; /** The public key of the wrapping key. */ publicKey?: string | undefined; purpose: WrappingPurpose; /** The current state of the wrapping key. */ state: WrappingKeyState; } export type DecryptRequestRegionId = "eu01"; export interface DecryptRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: DecryptRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; /** The data that has to be decrypted. Encoded in base64. */ data: string; } export interface DecryptedData { /** The decrypted data. Encoded in base64. */ data: string; } export type DeleteKeyRequestRegionId = "eu01"; export interface DeleteKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: DeleteKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; } export interface DeleteKeyResponse {} export type DeleteKeyRingRequestRegionId = "eu01"; export interface DeleteKeyRingRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: DeleteKeyRingRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; } export interface DeleteKeyRingResponse {} export type DeleteWrappingKeyRequestRegionId = "eu01"; export interface DeleteWrappingKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: DeleteWrappingKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The wrapping key UUID. */ wrappingKeyId: string; } export interface DeleteWrappingKeyResponse {} export type DestroyVersionRequestRegionId = "eu01"; export interface DestroyVersionRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: DestroyVersionRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; } export interface DestroyVersionResponse {} export type DisableVersionRequestRegionId = "eu01"; export interface DisableVersionRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: DisableVersionRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; } export interface DisableVersionResponse {} export type EnableVersionRequestRegionId = "eu01"; export interface EnableVersionRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: EnableVersionRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; } export interface EnableVersionResponse {} export type EncryptRequestRegionId = "eu01"; export interface EncryptRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: EncryptRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; /** The data that has to be encrypted. Encoded in base64. */ data: string; } export interface EncryptedData { /** The encrypted data. Encoded in base64. */ data: string; } export type GetKeyRequestRegionId = "eu01"; export interface GetKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: GetKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; } export type GetKeyRingRequestRegionId = "eu01"; export interface GetKeyRingRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: GetKeyRingRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; } export type GetVersionRequestRegionId = "eu01"; export interface GetVersionRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: GetVersionRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; } /** The current state of the key. */ export type VersionState = | "active" | "creating" | "key_material_invalid" | "key_material_unavailable" | "disabled" | "destroyed"; export interface Version { /** The date and time the creation of the key was triggered. */ createdAt: string; /** The scheduled date when a version's key material will be erased completely from the backend */ destroyDate?: string | undefined; /** States whether versions is enabled or disabled. */ disabled: boolean; /** The unique id of the key this version is assigned to. */ keyId: string; /** The unique id of the key ring the key of this version is assigned to. */ keyRingId: string; /** A sequential number which identifies the key versions. */ number: number; /** The public key of the key version. Only present in asymmetric keys. */ publicKey?: string | undefined; /** The current state of the key. */ state: VersionState; } export type GetWrappingKeyRequestRegionId = "eu01"; export interface GetWrappingKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: GetWrappingKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The wrapping key UUID. */ wrappingKeyId: string; } export type ImportKeyRequestRegionId = "eu01"; export interface ImportKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: ImportKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The wrapped key material that has to be imported. Encoded in base64. */ wrappedKey: string; /** The unique id of the wrapping key the key material has been wrapped with. */ wrappingKeyId: string; } export type ListKeyRingsRequestRegionId = "eu01"; export interface ListKeyRingsRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: ListKeyRingsRequestRegionId | (string & {}); } export type KeyRingListKeyRingsList = Array; export interface KeyRingList { keyRings: KeyRingListKeyRingsList; } export type ListKeysRequestRegionId = "eu01"; export interface ListKeysRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: ListKeysRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; } export type KeyListKeysList = Array; export interface KeyList { keys: KeyListKeysList; } export type ListVersionsRequestRegionId = "eu01"; export interface ListVersionsRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: ListVersionsRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; } export type VersionListVersionsList = Array; export interface VersionList { versions: VersionListVersionsList; } export type ListWrappingKeysRequestRegionId = "eu01"; export interface ListWrappingKeysRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: ListWrappingKeysRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; } export type WrappingKeyListWrappingKeysList = Array; export interface WrappingKeyList { wrappingKeys: WrappingKeyListWrappingKeysList; } export type RestoreKeyRequestRegionId = "eu01"; export interface RestoreKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: RestoreKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; } export interface RestoreKeyResponse {} export type RestoreVersionRequestRegionId = "eu01"; export interface RestoreVersionRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: RestoreVersionRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; } export interface RestoreVersionResponse {} export type RotateKeyRequestRegionId = "eu01"; export interface RotateKeyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: RotateKeyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; } export type SignRequestRegionId = "eu01"; export interface SignRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: SignRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; /** The data that has to be signed. Encoded in base64. */ data: string; } export interface SignedData { /** The data that was signed. Encoded in base64. */ data: string; /** The signature of the data. Encoded in base64. */ signature: string; } export type VerifyRequestRegionId = "eu01"; export interface VerifyRequest { /** The STACKIT portal project UUID the key ring is part of. */ projectId: string; /** The STACKIT region name the key ring is located in. */ regionId: VerifyRequestRegionId | (string & {}); /** The key ring UUID. */ keyRingId: string; /** The key UUID. */ keyId: string; /** The version number. */ versionNumber: number; /** The data to be verified. Encoded in base64. */ data: string; /** The signature of the data. Encoded in base64. */ signature: string; } export interface VerifiedData { /** Whether or not the data has a valid signature. */ valid: boolean; } export interface HttpError { /** A string that gives a short information about what went wrong. */ message: string; } export type CreateKeyError = BadRequest | NotFound | StackitOpError; /** Create key Creates a new key for the given key ring. */ export const createKey: API.OperationMethod< CreateKeyRequest, Key, CreateKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(84, __c21, 0) as any as S.Schema, output: __S(88, __c22, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateKey", })); export type CreateKeyRingError = BadRequest | StackitOpError; /** Create key ring Creates a new key ring within the project. */ export const createKeyRing: API.OperationMethod< CreateKeyRingRequest, KeyRing, CreateKeyRingError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(92, __c23, 0) as any as S.Schema, output: __S(96, __c24, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateKeyRing", })); export type CreateWrappingKeyError = BadRequest | NotFound | StackitOpError; /** Create wrapping key Creates a new wrapping key for the given key ring. */ export const createWrappingKey: API.OperationMethod< CreateWrappingKeyRequest, WrappingKey, CreateWrappingKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(100, __c25, 0) as any as S.Schema, output: __S(104, __c26, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateWrappingKey", })); export type DecryptError = BadRequest | NotFound | Conflict | StackitOpError; /** Decrypt Decrypts data using the given key version. */ export const decrypt: API.OperationMethod< DecryptRequest, DecryptedData, DecryptError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(108, __c27, 0) as any as S.Schema, output: __S(112, __c28, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "Decrypt", })); export type DeleteKeyError = BadRequest | NotFound | Conflict | StackitOpError; /** Delete key Schedules the deletion of the given key */ export const deleteKey: API.OperationMethod< DeleteKeyRequest, DeleteKeyResponse, DeleteKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(116, __c29, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteKey", })); export type DeleteKeyRingError = BadRequest | NotFound | Conflict | StackitOpError; /** Delete keyring Deletes the given key ring if it is empty */ export const deleteKeyRing: API.OperationMethod< DeleteKeyRingRequest, DeleteKeyRingResponse, DeleteKeyRingError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(124, __c31, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteKeyRing", })); export type DeleteWrappingKeyError = BadRequest | NotFound | Conflict | StackitOpError; /** Delete wrapping key Deletes the given wrapping key */ export const deleteWrappingKey: API.OperationMethod< DeleteWrappingKeyRequest, DeleteWrappingKeyResponse, DeleteWrappingKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(4, __c1, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteWrappingKey", })); export type DestroyVersionError = BadRequest | NotFound | Conflict | StackitOpError; /** Destroy version Removes the key material of a version permanently. */ export const destroyVersion: API.OperationMethod< DestroyVersionRequest, DestroyVersionResponse, DestroyVersionError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(8, __c2, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DestroyVersion", })); export type DisableVersionError = BadRequest | NotFound | Conflict | StackitOpError; /** Disable version Disables the given version. */ export const disableVersion: API.OperationMethod< DisableVersionRequest, DisableVersionResponse, DisableVersionError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(12, __c3, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DisableVersion", })); export type EnableVersionError = BadRequest | NotFound | Conflict | StackitOpError; /** Enable version Enables the given version. */ export const enableVersion: API.OperationMethod< EnableVersionRequest, EnableVersionResponse, EnableVersionError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(16, __c4, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "EnableVersion", })); export type EncryptError = BadRequest | NotFound | Conflict | StackitOpError; /** Encrypt Encrypts data using the given key version. */ export const encrypt: API.OperationMethod< EncryptRequest, EncryptedData, EncryptError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(20, __c5, 0) as any as S.Schema, output: __S(112, __c28, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "Encrypt", })); export type GetKeyError = BadRequest | NotFound | StackitOpError; /** Get key Returns the details for the given key. */ export const getKey: API.OperationMethod = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c6, 0) as any as S.Schema, output: __S(88, __c22, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetKey", })); export type GetKeyRingError = BadRequest | NotFound | StackitOpError; /** Get key ring Returns the details for the given key ring. */ export const getKeyRing: API.OperationMethod< GetKeyRingRequest, KeyRing, GetKeyRingError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(28, __c7, 0) as any as S.Schema, output: __S(96, __c24, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetKeyRing", })); export type GetVersionError = BadRequest | NotFound | StackitOpError; /** Get version Returns the details for the given version. */ export const getVersion: API.OperationMethod< GetVersionRequest, Version, GetVersionError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c8, 0) as any as S.Schema, output: __S(36, __c9, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetVersion", })); export type GetWrappingKeyError = BadRequest | NotFound | StackitOpError; /** Get wrapping key Returns the details for the given wrapping key. */ export const getWrappingKey: API.OperationMethod< GetWrappingKeyRequest, WrappingKey, GetWrappingKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c10, 0) as any as S.Schema, output: __S(104, __c26, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetWrappingKey", })); export type ImportKeyError = BadRequest | NotFound | Conflict | StackitOpError; /** Import key Imports a new version to the given key. */ export const importKey: API.OperationMethod< ImportKeyRequest, Version, ImportKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(44, __c11, 0) as any as S.Schema, output: __S(36, __c9, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ImportKey", })); export type ListKeyRingsError = BadRequest | StackitOpError; /** List key rings Returns a list of all key rings within the project. */ export const listKeyRings: API.OperationMethod< ListKeyRingsRequest, KeyRingList, ListKeyRingsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c12, 0) as any as S.Schema, output: __S(50, __c12, 2) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListKeyRings", })); export type ListKeysError = BadRequest | NotFound | StackitOpError; /** List keys Returns the keys for the given key ring. */ export const listKeys: API.OperationMethod< ListKeysRequest, KeyList, ListKeysError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(52, __c13, 0) as any as S.Schema, output: __S(54, __c13, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListKeys", })); export type ListVersionsError = BadRequest | NotFound | StackitOpError; /** List versions Returns a list of all versions of a given key. */ export const listVersions: API.OperationMethod< ListVersionsRequest, VersionList, ListVersionsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(56, __c14, 0) as any as S.Schema, output: __S(58, __c14, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListVersions", })); export type ListWrappingKeysError = BadRequest | NotFound | StackitOpError; /** List wrapping keys Returns the wrapping keys for the given key ring. */ export const listWrappingKeys: API.OperationMethod< ListWrappingKeysRequest, WrappingKeyList, ListWrappingKeysError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(60, __c15, 0) as any as S.Schema, output: __S(62, __c15, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListWrappingKeys", })); export type RestoreKeyError = BadRequest | NotFound | Conflict | StackitOpError; /** Restore deleted key Restores the given key from being deleted. */ export const restoreKey: API.OperationMethod< RestoreKeyRequest, RestoreKeyResponse, RestoreKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(64, __c16, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "RestoreKey", })); export type RestoreVersionError = BadRequest | NotFound | Conflict | StackitOpError; /** Restore version Restores the given version from being destroyed */ export const restoreVersion: API.OperationMethod< RestoreVersionRequest, RestoreVersionResponse, RestoreVersionError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(68, __c17, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "RestoreVersion", })); export type RotateKeyError = BadRequest | Forbidden | NotFound | Conflict | StackitOpError; /** Rotate key Rotates the given key. */ export const rotateKey: API.OperationMethod< RotateKeyRequest, Version, RotateKeyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(72, __c18, 0) as any as S.Schema, output: __S(36, __c9, 0) as any as S.Schema, errors: [BadRequest, Forbidden, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "RotateKey", })); export type SignError = BadRequest | NotFound | Conflict | StackitOpError; /** Sign Sign data using the given key version as secret. */ export const sign: API.OperationMethod = /*@__PURE__*/ API.make(() => ({ input: __S(76, __c19, 0) as any as S.Schema, output: __S(77, __c19, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "Sign", })); export type VerifyError = BadRequest | NotFound | Conflict | StackitOpError; /** Verify Verify data using the given key version as secret. */ export const verify: API.OperationMethod< VerifyRequest, VerifiedData, VerifyError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(80, __c20, 0) as any as S.Schema, output: __S(81, __c20, 1) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "Verify", })); // 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({ message: S.String, }), ).annotate({ identifier: "HttpError" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), wrappingKeyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/wrappingkeys/{wrappingKeyId}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteWrappingKeyRequest" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/destroy", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "DestroyVersionRequest" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/disable", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "DisableVersionRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/enable", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "EnableVersionRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), data: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/encrypt", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "EncryptRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "GetKeyRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "GetKeyRingRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "GetVersionRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ createdAt: S.String, destroyDate: S.optional(S.String), disabled: S.Boolean, keyId: S.String, keyRingId: S.String, number: S.Number, publicKey: S.optional(S.String), state: S.String, }), ).annotate({ identifier: "Version" }); } } function __c10(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), wrappingKeyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/wrappingkeys/{wrappingKeyId}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "GetWrappingKeyRequest" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), wrappedKey: S.String, wrappingKeyId: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/import", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "ImportKeyRequest" }); } } function __c12(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "ListKeyRingsRequest" }); case 1: return S.Array(__S(96, __c24, 0)); case 2: return S.suspend(() => S.Struct({ keyRings: __S(49, __c12, 1), }), ).annotate({ identifier: "KeyRingList" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "ListKeysRequest" }); case 1: return S.Array(__S(88, __c22, 0)); case 2: return S.suspend(() => S.Struct({ keys: __S(53, __c13, 1), }), ).annotate({ identifier: "KeyList" }); } } function __c14(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "ListVersionsRequest" }); case 1: return S.Array(__S(36, __c9, 0)); case 2: return S.suspend(() => S.Struct({ versions: __S(57, __c14, 1), }), ).annotate({ identifier: "VersionList" }); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/wrappingkeys", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "ListWrappingKeysRequest" }); case 1: return S.Array(__S(104, __c26, 0)); case 2: return S.suspend(() => S.Struct({ wrappingKeys: __S(61, __c15, 1), }), ).annotate({ identifier: "WrappingKeyList" }); } } function __c16(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/restore", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "RestoreKeyRequest" }); } } function __c17(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/restore", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "RestoreVersionRequest" }); } } function __c18(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/rotate", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "RotateKeyRequest" }); } } function __c19(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), data: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/sign", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "SignRequest" }); case 1: return S.suspend(() => S.Struct({ data: S.String, signature: S.String, }), ).annotate({ identifier: "SignedData" }); } } function __c20(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), data: S.String, signature: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/verify", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "VerifyRequest" }); case 1: return S.suspend(() => S.Struct({ valid: S.Boolean, }), ).annotate({ identifier: "VerifiedData" }); } } function __c21(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), access_scope: S.optional(S.String), algorithm: S.String, description: S.optional(S.String), displayName: S.String, importOnly: S.optional(S.Boolean), protection: S.String, purpose: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateKeyRequest" }); } } function __c22(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ access_scope: S.String, algorithm: S.String, createdAt: S.String, deletionDate: S.optional(S.String), description: S.optional(S.String), displayName: S.String, id: S.String, importOnly: S.Boolean, keyRingId: S.String, protection: S.String, purpose: S.String, state: S.String, }), ).annotate({ identifier: "Key" }); } } function __c23(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), description: S.optional(S.String), displayName: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateKeyRingRequest" }); } } function __c24(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ createdAt: S.String, description: S.optional(S.String), displayName: S.String, id: S.String, state: S.String, }), ).annotate({ identifier: "KeyRing" }); } } function __c25(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), access_scope: S.optional(S.String), algorithm: S.String, description: S.optional(S.String), displayName: S.String, protection: S.String, purpose: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/wrappingkeys", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "CreateWrappingKeyRequest" }); } } function __c26(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ access_scope: S.String, algorithm: S.String, createdAt: S.String, description: S.optional(S.String), displayName: S.String, expiresAt: S.String, id: S.String, keyRingId: S.String, protection: S.String, publicKey: S.optional(S.String), purpose: S.String, state: S.String, }), ).annotate({ identifier: "WrappingKey" }); } } function __c27(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), versionNumber: S.Number.pipe(T.Label()), data: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}/versions/{versionNumber}/decrypt", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "DecryptRequest" }); } } function __c28(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ data: S.String, }), ).annotate({ identifier: "DecryptedData" }); } } function __c29(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), keyId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/keys/{keyId}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteKeyRequest" }); } } function __c30(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteKeyResponse" }); } } function __c31(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), regionId: S.String.pipe(T.Label()), keyRingId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}", code: 200, baseUrl: "https://kms.api.stackit.cloud", }), ), ).annotate({ identifier: "DeleteKeyRingRequest" }); } } // 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)); }