/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 038b7ba72752 */ import * as z from "zod/v4"; import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { SetupFingerprintInfo, SetupFingerprintInfo$inboundSchema, } from "./setupfingerprintinfo.js"; export const PreparedDeploymentStackPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", } as const; export type PreparedDeploymentStackPlatform = ClosedEnum< typeof PreparedDeploymentStackPlatform >; export const PreparedDeploymentStackTypeStringList = { StringList: "stringList", } as const; export type PreparedDeploymentStackTypeStringList = ClosedEnum< typeof PreparedDeploymentStackTypeStringList >; export type PreparedDeploymentStackDefaultStringList = { type: PreparedDeploymentStackTypeStringList; /** * String list default. */ value: Array; }; export const PreparedDeploymentStackTypeBoolean = { Boolean: "boolean", } as const; export type PreparedDeploymentStackTypeBoolean = ClosedEnum< typeof PreparedDeploymentStackTypeBoolean >; export type PreparedDeploymentStackDefaultBoolean = { type: PreparedDeploymentStackTypeBoolean; /** * Boolean default. */ value: boolean; }; export const PreparedDeploymentStackTypeNumber = { Number: "number", } as const; export type PreparedDeploymentStackTypeNumber = ClosedEnum< typeof PreparedDeploymentStackTypeNumber >; export type PreparedDeploymentStackDefaultNumber = { type: PreparedDeploymentStackTypeNumber; /** * Number default. */ value: string; }; export const PreparedDeploymentStackTypeString = { String: "string", } as const; export type PreparedDeploymentStackTypeString = ClosedEnum< typeof PreparedDeploymentStackTypeString >; export type PreparedDeploymentStackDefaultString = { type: PreparedDeploymentStackTypeString; /** * String default. */ value: string; }; export type PreparedDeploymentStackDefaultUnion = | PreparedDeploymentStackDefaultString | PreparedDeploymentStackDefaultNumber | PreparedDeploymentStackDefaultBoolean | PreparedDeploymentStackDefaultStringList | any; /** * Environment variable handling for a stack input mapping. */ export const PreparedDeploymentStackTypeEnvEnum = { Plain: "plain", Secret: "secret", } as const; /** * Environment variable handling for a stack input mapping. */ export type PreparedDeploymentStackTypeEnvEnum = ClosedEnum< typeof PreparedDeploymentStackTypeEnvEnum >; export type PreparedDeploymentStackTypeUnion = | PreparedDeploymentStackTypeEnvEnum | any; /** * How a resolved stack input is injected into runtime environment variables. */ export type PreparedDeploymentStackEnv = { /** * Environment variable name. */ name: string; /** * Target resource IDs or patterns. None means every env-capable resource. */ targetResources?: Array | null | undefined; type?: PreparedDeploymentStackTypeEnvEnum | any | null | undefined; }; /** * Primitive stack input kind. */ export const PreparedDeploymentStackKind = { String: "string", Secret: "secret", Number: "number", Integer: "integer", Boolean: "boolean", Enum: "enum", StringList: "stringList", } as const; /** * Primitive stack input kind. */ export type PreparedDeploymentStackKind = ClosedEnum< typeof PreparedDeploymentStackKind >; /** * Represents the target cloud platform. */ export const PreparedDeploymentStackStackPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type PreparedDeploymentStackStackPlatform = ClosedEnum< typeof PreparedDeploymentStackStackPlatform >; /** * Who can provide a stack input value. */ export const PreparedDeploymentStackProvidedBy = { Developer: "developer", Deployer: "deployer", } as const; /** * Who can provide a stack input value. */ export type PreparedDeploymentStackProvidedBy = ClosedEnum< typeof PreparedDeploymentStackProvidedBy >; /** * Portable stack input validation constraints. */ export type PreparedDeploymentStackValidation = { /** * Semantic format hint such as url. */ format?: string | null | undefined; /** * Maximum number. */ max?: string | null | undefined; /** * Maximum string-list items. */ maxItems?: number | null | undefined; /** * Maximum string length. */ maxLength?: number | null | undefined; /** * Minimum number. */ min?: string | null | undefined; /** * Minimum string-list items. */ minItems?: number | null | undefined; /** * Minimum string length. */ minLength?: number | null | undefined; /** * Portable whole-value regex pattern. */ pattern?: string | null | undefined; /** * Allowed string enum values. */ values?: Array | null | undefined; }; export type PreparedDeploymentStackValidationUnion = | PreparedDeploymentStackValidation | any; /** * Stack input definition serialized into a release stack. */ export type PreparedDeploymentStackInput = { default?: | PreparedDeploymentStackDefaultString | PreparedDeploymentStackDefaultNumber | PreparedDeploymentStackDefaultBoolean | PreparedDeploymentStackDefaultStringList | any | null | undefined; /** * Human-facing helper text. */ description: string; /** * Runtime env-var mappings for v1 input resolution. */ env?: Array | undefined; /** * Stable input ID used by CLI/API calls. */ id: string; /** * Primitive stack input kind. */ kind: PreparedDeploymentStackKind; /** * Human-facing field label. */ label: string; /** * Example placeholder shown in UI. */ placeholder?: string | null | undefined; /** * Platforms where this input applies. */ platforms?: Array | null | undefined; /** * Who can provide this value. */ providedBy: Array; /** * Whether a resolved value is required before deployment can proceed. */ required: boolean; validation?: PreparedDeploymentStackValidation | any | null | undefined; }; export const PreparedDeploymentStackManagementEnum = { Auto: "auto", } as const; export type PreparedDeploymentStackManagementEnum = ClosedEnum< typeof PreparedDeploymentStackManagementEnum >; /** * AWS-specific binding specification */ export type PreparedDeploymentStackOverrideAwResource = { /** * Optional condition for additional filtering (rare) */ condition?: { [k: string]: { [k: string]: string } } | null | undefined; /** * Resource ARNs to bind to */ resources: Array; }; /** * AWS-specific binding specification */ export type PreparedDeploymentStackOverrideAwStack = { /** * Optional condition for additional filtering (rare) */ condition?: { [k: string]: { [k: string]: string } } | null | undefined; /** * Resource ARNs to bind to */ resources: Array; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackOverrideAwBinding = { /** * AWS-specific binding specification */ resource?: PreparedDeploymentStackOverrideAwResource | undefined; /** * AWS-specific binding specification */ stack?: PreparedDeploymentStackOverrideAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const PreparedDeploymentStackOverrideEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type PreparedDeploymentStackOverrideEffect = ClosedEnum< typeof PreparedDeploymentStackOverrideEffect >; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackOverrideAwGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * AWS-specific platform permission configuration */ export type PreparedDeploymentStackOverrideAw = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackOverrideAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: PreparedDeploymentStackOverrideEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackOverrideAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type PreparedDeploymentStackOverrideAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type PreparedDeploymentStackOverrideAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackOverrideAzureBinding = { /** * Azure-specific binding specification */ resource?: PreparedDeploymentStackOverrideAzureResource | undefined; /** * Azure-specific binding specification */ stack?: PreparedDeploymentStackOverrideAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackOverrideAzureGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * Azure-specific platform permission configuration */ export type PreparedDeploymentStackOverrideAzure = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackOverrideAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackOverrideAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type PreparedDeploymentStackOverrideConditionResource = { expression: string; title: string; }; export type PreparedDeploymentStackOverrideResourceConditionUnion = | PreparedDeploymentStackOverrideConditionResource | any; /** * GCP-specific binding specification */ export type PreparedDeploymentStackOverrideGcpResource = { condition?: | PreparedDeploymentStackOverrideConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type PreparedDeploymentStackOverrideCondition = { expression: string; title: string; }; export type PreparedDeploymentStackOverrideConditionUnion = | PreparedDeploymentStackOverrideCondition | any; /** * GCP-specific binding specification */ export type PreparedDeploymentStackOverrideGcpStack = { condition?: PreparedDeploymentStackOverrideCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackOverrideGcpBinding = { /** * GCP-specific binding specification */ resource?: PreparedDeploymentStackOverrideGcpResource | undefined; /** * GCP-specific binding specification */ stack?: PreparedDeploymentStackOverrideGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackOverrideGcpGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * GCP-specific platform permission configuration */ export type PreparedDeploymentStackOverrideGcp = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackOverrideGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackOverrideGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type PreparedDeploymentStackOverridePlatforms = { /** * AWS permission configurations */ aws?: Array | null | undefined; /** * Azure permission configurations */ azure?: Array | null | undefined; /** * GCP permission configurations */ gcp?: Array | null | undefined; }; /** * A permission set that can be applied across different cloud platforms */ export type PreparedDeploymentStackOverride = { /** * Human-readable description of what this permission set allows */ description: string; /** * Unique identifier for the permission set (e.g., "storage/data-read") */ id: string; /** * Platform-specific permission configurations */ platforms: PreparedDeploymentStackOverridePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type PreparedDeploymentStackOverrideUnion = | PreparedDeploymentStackOverride | string; export type PreparedDeploymentStackManagement2 = { /** * Permission profile that maps resources to permission sets * * @remarks * Key can be "*" for all resources or resource name for specific resource */ override: { [k: string]: Array }; }; /** * AWS-specific binding specification */ export type PreparedDeploymentStackExtendAwResource = { /** * Optional condition for additional filtering (rare) */ condition?: { [k: string]: { [k: string]: string } } | null | undefined; /** * Resource ARNs to bind to */ resources: Array; }; /** * AWS-specific binding specification */ export type PreparedDeploymentStackExtendAwStack = { /** * Optional condition for additional filtering (rare) */ condition?: { [k: string]: { [k: string]: string } } | null | undefined; /** * Resource ARNs to bind to */ resources: Array; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackExtendAwBinding = { /** * AWS-specific binding specification */ resource?: PreparedDeploymentStackExtendAwResource | undefined; /** * AWS-specific binding specification */ stack?: PreparedDeploymentStackExtendAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const PreparedDeploymentStackExtendEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type PreparedDeploymentStackExtendEffect = ClosedEnum< typeof PreparedDeploymentStackExtendEffect >; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackExtendAwGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * AWS-specific platform permission configuration */ export type PreparedDeploymentStackExtendAw = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackExtendAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: PreparedDeploymentStackExtendEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackExtendAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type PreparedDeploymentStackExtendAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type PreparedDeploymentStackExtendAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackExtendAzureBinding = { /** * Azure-specific binding specification */ resource?: PreparedDeploymentStackExtendAzureResource | undefined; /** * Azure-specific binding specification */ stack?: PreparedDeploymentStackExtendAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackExtendAzureGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * Azure-specific platform permission configuration */ export type PreparedDeploymentStackExtendAzure = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackExtendAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackExtendAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type PreparedDeploymentStackExtendConditionResource = { expression: string; title: string; }; export type PreparedDeploymentStackExtendResourceConditionUnion = | PreparedDeploymentStackExtendConditionResource | any; /** * GCP-specific binding specification */ export type PreparedDeploymentStackExtendGcpResource = { condition?: | PreparedDeploymentStackExtendConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type PreparedDeploymentStackExtendCondition = { expression: string; title: string; }; export type PreparedDeploymentStackExtendConditionUnion = | PreparedDeploymentStackExtendCondition | any; /** * GCP-specific binding specification */ export type PreparedDeploymentStackExtendGcpStack = { condition?: PreparedDeploymentStackExtendCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackExtendGcpBinding = { /** * GCP-specific binding specification */ resource?: PreparedDeploymentStackExtendGcpResource | undefined; /** * GCP-specific binding specification */ stack?: PreparedDeploymentStackExtendGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackExtendGcpGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * GCP-specific platform permission configuration */ export type PreparedDeploymentStackExtendGcp = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackExtendGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackExtendGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type PreparedDeploymentStackExtendPlatforms = { /** * AWS permission configurations */ aws?: Array | null | undefined; /** * Azure permission configurations */ azure?: Array | null | undefined; /** * GCP permission configurations */ gcp?: Array | null | undefined; }; /** * A permission set that can be applied across different cloud platforms */ export type PreparedDeploymentStackExtend = { /** * Human-readable description of what this permission set allows */ description: string; /** * Unique identifier for the permission set (e.g., "storage/data-read") */ id: string; /** * Platform-specific permission configurations */ platforms: PreparedDeploymentStackExtendPlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type PreparedDeploymentStackExtendUnion = | PreparedDeploymentStackExtend | string; export type PreparedDeploymentStackManagement1 = { /** * Permission profile that maps resources to permission sets * * @remarks * Key can be "*" for all resources or resource name for specific resource */ extend: { [k: string]: Array }; }; /** * Management permissions configuration for stack management access */ export type PreparedDeploymentStackManagementUnion = | PreparedDeploymentStackManagement1 | PreparedDeploymentStackManagement2 | PreparedDeploymentStackManagementEnum; /** * AWS-specific binding specification */ export type PreparedDeploymentStackProfileAwResource = { /** * Optional condition for additional filtering (rare) */ condition?: { [k: string]: { [k: string]: string } } | null | undefined; /** * Resource ARNs to bind to */ resources: Array; }; /** * AWS-specific binding specification */ export type PreparedDeploymentStackProfileAwStack = { /** * Optional condition for additional filtering (rare) */ condition?: { [k: string]: { [k: string]: string } } | null | undefined; /** * Resource ARNs to bind to */ resources: Array; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackProfileAwBinding = { /** * AWS-specific binding specification */ resource?: PreparedDeploymentStackProfileAwResource | undefined; /** * AWS-specific binding specification */ stack?: PreparedDeploymentStackProfileAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const PreparedDeploymentStackProfileEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type PreparedDeploymentStackProfileEffect = ClosedEnum< typeof PreparedDeploymentStackProfileEffect >; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackProfileAwGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * AWS-specific platform permission configuration */ export type PreparedDeploymentStackProfileAw = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackProfileAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: PreparedDeploymentStackProfileEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackProfileAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type PreparedDeploymentStackProfileAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type PreparedDeploymentStackProfileAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackProfileAzureBinding = { /** * Azure-specific binding specification */ resource?: PreparedDeploymentStackProfileAzureResource | undefined; /** * Azure-specific binding specification */ stack?: PreparedDeploymentStackProfileAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackProfileAzureGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * Azure-specific platform permission configuration */ export type PreparedDeploymentStackProfileAzure = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackProfileAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackProfileAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type PreparedDeploymentStackProfileConditionResource = { expression: string; title: string; }; export type PreparedDeploymentStackProfileResourceConditionUnion = | PreparedDeploymentStackProfileConditionResource | any; /** * GCP-specific binding specification */ export type PreparedDeploymentStackProfileGcpResource = { condition?: | PreparedDeploymentStackProfileConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type PreparedDeploymentStackProfileCondition = { expression: string; title: string; }; export type PreparedDeploymentStackProfileConditionUnion = | PreparedDeploymentStackProfileCondition | any; /** * GCP-specific binding specification */ export type PreparedDeploymentStackProfileGcpStack = { condition?: PreparedDeploymentStackProfileCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type PreparedDeploymentStackProfileGcpBinding = { /** * GCP-specific binding specification */ resource?: PreparedDeploymentStackProfileGcpResource | undefined; /** * GCP-specific binding specification */ stack?: PreparedDeploymentStackProfileGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type PreparedDeploymentStackProfileGcpGrant = { /** * AWS IAM actions (only for AWS) */ actions?: Array | null | undefined; /** * Azure actions (only for Azure) */ dataActions?: Array | null | undefined; /** * GCP permissions that require an exact residual custom role. */ permissions?: Array | null | undefined; /** * Provider predefined roles to bind directly. */ predefinedRoles?: Array | null | undefined; /** * GCP residual custom permissions to pair with predefined roles. */ residualPermissions?: Array | null | undefined; }; /** * GCP-specific platform permission configuration */ export type PreparedDeploymentStackProfileGcp = { /** * Generic binding configuration for permissions */ binding: PreparedDeploymentStackProfileGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: PreparedDeploymentStackProfileGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type PreparedDeploymentStackProfilePlatforms = { /** * AWS permission configurations */ aws?: Array | null | undefined; /** * Azure permission configurations */ azure?: Array | null | undefined; /** * GCP permission configurations */ gcp?: Array | null | undefined; }; /** * A permission set that can be applied across different cloud platforms */ export type PreparedDeploymentStackProfile = { /** * Human-readable description of what this permission set allows */ description: string; /** * Unique identifier for the permission set (e.g., "storage/data-read") */ id: string; /** * Platform-specific permission configurations */ platforms: PreparedDeploymentStackProfilePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type PreparedDeploymentStackProfileUnion = | PreparedDeploymentStackProfile | string; /** * Combined permissions configuration that contains both profiles and management */ export type PreparedDeploymentStackPermissions = { /** * Management permissions configuration for stack management access */ management?: | PreparedDeploymentStackManagement1 | PreparedDeploymentStackManagement2 | PreparedDeploymentStackManagementEnum | undefined; /** * Permission profiles that define access control for compute services * * @remarks * Key is the profile name, value is the permission configuration */ profiles: { [k: string]: { [k: string]: Array; }; }; }; /** * Resource that can hold any resource type in the Alien system. All resources share common 'type' and 'id' fields with additional type-specific properties. */ export type PreparedDeploymentStackConfig = { /** * The unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters. */ id: string; /** * Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior. */ type: string; additionalProperties?: { [k: string]: any | null } | undefined; }; /** * Reference to a resource by its stable id and resource type. */ export type PreparedDeploymentStackDependency = { id: string; /** * Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior. */ type: string; }; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export const PreparedDeploymentStackLifecycle = { Frozen: "frozen", Live: "live", } as const; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export type PreparedDeploymentStackLifecycle = ClosedEnum< typeof PreparedDeploymentStackLifecycle >; export type PreparedDeploymentStackResources = { /** * Resource that can hold any resource type in the Alien system. All resources share common 'type' and 'id' fields with additional type-specific properties. */ config: PreparedDeploymentStackConfig; /** * Additional dependencies for this resource beyond those defined in the resource itself. * * @remarks * The total dependencies are: resource.get_dependencies() + this list */ dependencies: Array; /** * Id of the boolean stack input that decides whether this resource is * * @remarks * created at all. `None` means always create it. * * Set by `.enabled(input)` in the SDK. Setup emitters render the resource * conditionally on the matching template variable, so a deployer who says no * never gets the resource, its outputs, or anything derived from it. */ enabledWhen?: string | null | undefined; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ lifecycle: PreparedDeploymentStackLifecycle; /** * Enable remote bindings for this resource (BYOB use case). * * @remarks * When true, binding params are synced to StackState's `remote_binding_params`. * Default: false (prevents sensitive data in synced state). */ remoteAccess?: boolean | undefined; }; /** * Represents the target cloud platform. */ export const PreparedDeploymentStackSupportedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type PreparedDeploymentStackSupportedPlatform = ClosedEnum< typeof PreparedDeploymentStackSupportedPlatform >; /** * A bag of resources, unaware of any cloud. */ export type PreparedDeploymentStackStack = { /** * Unique identifier for the stack */ id: string; /** * Input definitions required before setup or deployment can proceed. */ inputs?: Array | undefined; /** * Combined permissions configuration that contains both profiles and management */ permissions?: PreparedDeploymentStackPermissions | undefined; /** * Map of resource IDs to their configurations and lifecycle settings */ resources: { [k: string]: PreparedDeploymentStackResources }; /** * Which platforms this stack supports. When None, all platforms are supported. */ supportedPlatforms?: | Array | null | undefined; }; export type PreparedDeploymentStack = { updateOperationId?: string | undefined; platform: PreparedDeploymentStackPlatform; /** * A bag of resources, unaware of any cloud. */ stack: PreparedDeploymentStackStack; setup: SetupFingerprintInfo; }; /** @internal */ export const PreparedDeploymentStackPlatform$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackPlatform > = z.enum(PreparedDeploymentStackPlatform); /** @internal */ export const PreparedDeploymentStackTypeStringList$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackTypeStringList > = z.enum(PreparedDeploymentStackTypeStringList); /** @internal */ export const PreparedDeploymentStackDefaultStringList$inboundSchema: z.ZodType< PreparedDeploymentStackDefaultStringList, unknown > = z.object({ type: PreparedDeploymentStackTypeStringList$inboundSchema, value: z.array(z.string()), }); export function preparedDeploymentStackDefaultStringListFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackDefaultStringList, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackDefaultStringList$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackDefaultStringList' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackTypeBoolean$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackTypeBoolean > = z.enum(PreparedDeploymentStackTypeBoolean); /** @internal */ export const PreparedDeploymentStackDefaultBoolean$inboundSchema: z.ZodType< PreparedDeploymentStackDefaultBoolean, unknown > = z.object({ type: PreparedDeploymentStackTypeBoolean$inboundSchema, value: z.boolean(), }); export function preparedDeploymentStackDefaultBooleanFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackDefaultBoolean$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackDefaultBoolean' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackTypeNumber$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackTypeNumber > = z.enum(PreparedDeploymentStackTypeNumber); /** @internal */ export const PreparedDeploymentStackDefaultNumber$inboundSchema: z.ZodType< PreparedDeploymentStackDefaultNumber, unknown > = z.object({ type: PreparedDeploymentStackTypeNumber$inboundSchema, value: z.string(), }); export function preparedDeploymentStackDefaultNumberFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackDefaultNumber$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackDefaultNumber' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackTypeString$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackTypeString > = z.enum(PreparedDeploymentStackTypeString); /** @internal */ export const PreparedDeploymentStackDefaultString$inboundSchema: z.ZodType< PreparedDeploymentStackDefaultString, unknown > = z.object({ type: PreparedDeploymentStackTypeString$inboundSchema, value: z.string(), }); export function preparedDeploymentStackDefaultStringFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackDefaultString$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackDefaultString' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackDefaultUnion$inboundSchema: z.ZodType< PreparedDeploymentStackDefaultUnion, unknown > = z.union([ z.lazy(() => PreparedDeploymentStackDefaultString$inboundSchema), z.lazy(() => PreparedDeploymentStackDefaultNumber$inboundSchema), z.lazy(() => PreparedDeploymentStackDefaultBoolean$inboundSchema), z.lazy(() => PreparedDeploymentStackDefaultStringList$inboundSchema), z.any(), ]); export function preparedDeploymentStackDefaultUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackDefaultUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackDefaultUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackTypeEnvEnum$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackTypeEnvEnum > = z.enum(PreparedDeploymentStackTypeEnvEnum); /** @internal */ export const PreparedDeploymentStackTypeUnion$inboundSchema: z.ZodType< PreparedDeploymentStackTypeUnion, unknown > = z.union([PreparedDeploymentStackTypeEnvEnum$inboundSchema, z.any()]); export function preparedDeploymentStackTypeUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackTypeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackTypeUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackEnv$inboundSchema: z.ZodType< PreparedDeploymentStackEnv, unknown > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable( z.union([PreparedDeploymentStackTypeEnvEnum$inboundSchema, z.any()]), ).optional(), }); export function preparedDeploymentStackEnvFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackEnv$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackEnv' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackKind$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackKind > = z.enum(PreparedDeploymentStackKind); /** @internal */ export const PreparedDeploymentStackStackPlatform$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackStackPlatform > = z.enum(PreparedDeploymentStackStackPlatform); /** @internal */ export const PreparedDeploymentStackProvidedBy$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackProvidedBy > = z.enum(PreparedDeploymentStackProvidedBy); /** @internal */ export const PreparedDeploymentStackValidation$inboundSchema: z.ZodType< PreparedDeploymentStackValidation, unknown > = z.object({ format: z.nullable(z.string()).optional(), max: z.nullable(z.string()).optional(), maxItems: z.nullable(z.int()).optional(), maxLength: z.nullable(z.int()).optional(), min: z.nullable(z.string()).optional(), minItems: z.nullable(z.int()).optional(), minLength: z.nullable(z.int()).optional(), pattern: z.nullable(z.string()).optional(), values: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackValidationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackValidation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackValidation' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackValidationUnion$inboundSchema: z.ZodType< PreparedDeploymentStackValidationUnion, unknown > = z.union([ z.lazy(() => PreparedDeploymentStackValidation$inboundSchema), z.any(), ]); export function preparedDeploymentStackValidationUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackValidationUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackValidationUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackInput$inboundSchema: z.ZodType< PreparedDeploymentStackInput, unknown > = z.object({ default: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackDefaultString$inboundSchema), z.lazy(() => PreparedDeploymentStackDefaultNumber$inboundSchema), z.lazy(() => PreparedDeploymentStackDefaultBoolean$inboundSchema), z.lazy(() => PreparedDeploymentStackDefaultStringList$inboundSchema), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => PreparedDeploymentStackEnv$inboundSchema)) .optional(), id: z.string(), kind: PreparedDeploymentStackKind$inboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable( z.array(PreparedDeploymentStackStackPlatform$inboundSchema), ).optional(), providedBy: z.array(PreparedDeploymentStackProvidedBy$inboundSchema), required: z.boolean(), validation: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackValidation$inboundSchema), z.any(), ]), ).optional(), }); export function preparedDeploymentStackInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackInput' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackManagementEnum$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackManagementEnum > = z.enum(PreparedDeploymentStackManagementEnum); /** @internal */ export const PreparedDeploymentStackOverrideAwResource$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function preparedDeploymentStackOverrideAwResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideAwResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideAwResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAwStack$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function preparedDeploymentStackOverrideAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverrideAwStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAwBinding$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAwBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackOverrideAwResource$inboundSchema ).optional(), stack: z.lazy(() => PreparedDeploymentStackOverrideAwStack$inboundSchema) .optional(), }); export function preparedDeploymentStackOverrideAwBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideAwBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideEffect$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackOverrideEffect > = z.enum(PreparedDeploymentStackOverrideEffect); /** @internal */ export const PreparedDeploymentStackOverrideAwGrant$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAwGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackOverrideAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverrideAwGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAw$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAw, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackOverrideAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: PreparedDeploymentStackOverrideEffect$inboundSchema.optional(), grant: z.lazy(() => PreparedDeploymentStackOverrideAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackOverrideAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverrideAw' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAzureResource$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); export function preparedDeploymentStackOverrideAzureResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAzureResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideAzureResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAzureStack$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAzureStack, unknown > = z.object({ scope: z.string(), }); export function preparedDeploymentStackOverrideAzureStackFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideAzureStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAzureBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => PreparedDeploymentStackOverrideAzureResource$inboundSchema ).optional(), stack: z.lazy(() => PreparedDeploymentStackOverrideAzureStack$inboundSchema) .optional(), }); export function preparedDeploymentStackOverrideAzureBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideAzureBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAzureGrant$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAzureGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackOverrideAzureGrantFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideAzureGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideAzure$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideAzure, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackOverrideAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => PreparedDeploymentStackOverrideAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackOverrideAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverrideAzure' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideConditionResource$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); export function preparedDeploymentStackOverrideConditionResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideConditionResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideResourceConditionUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => PreparedDeploymentStackOverrideConditionResource$inboundSchema ), z.any(), ]); export function preparedDeploymentStackOverrideResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideResourceConditionUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideGcpResource$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackOverrideConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function preparedDeploymentStackOverrideGcpResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideGcpResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideCondition$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); export function preparedDeploymentStackOverrideConditionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideCondition, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideCondition$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideCondition' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => PreparedDeploymentStackOverrideCondition$inboundSchema), z.any(), ]); export function preparedDeploymentStackOverrideConditionUnionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideConditionUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideGcpStack$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackOverrideCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function preparedDeploymentStackOverrideGcpStackFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideGcpStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideGcpBinding$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideGcpBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackOverrideGcpResource$inboundSchema ).optional(), stack: z.lazy(() => PreparedDeploymentStackOverrideGcpStack$inboundSchema) .optional(), }); export function preparedDeploymentStackOverrideGcpBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideGcpBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideGcpGrant$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideGcpGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackOverrideGcpGrantFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverrideGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverrideGcpGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideGcp$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideGcp, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackOverrideGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => PreparedDeploymentStackOverrideGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackOverrideGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverrideGcp' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverridePlatforms$inboundSchema: z.ZodType< PreparedDeploymentStackOverridePlatforms, unknown > = z.object({ aws: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackOverrideAw$inboundSchema)), ).optional(), azure: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackOverrideAzure$inboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackOverrideGcp$inboundSchema)), ).optional(), }); export function preparedDeploymentStackOverridePlatformsFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackOverridePlatforms, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackOverridePlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackOverridePlatforms' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverride$inboundSchema: z.ZodType< PreparedDeploymentStackOverride, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => PreparedDeploymentStackOverridePlatforms$inboundSchema ), }); export function preparedDeploymentStackOverrideFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverride$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverride' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackOverrideUnion$inboundSchema: z.ZodType< PreparedDeploymentStackOverrideUnion, unknown > = z.union([ z.lazy(() => PreparedDeploymentStackOverride$inboundSchema), z.string(), ]); export function preparedDeploymentStackOverrideUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackOverrideUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackOverrideUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackManagement2$inboundSchema: z.ZodType< PreparedDeploymentStackManagement2, unknown > = z.object({ override: z.record( z.string(), z.array(z.union([ z.lazy(() => PreparedDeploymentStackOverride$inboundSchema), z.string(), ])), ), }); export function preparedDeploymentStackManagement2FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackManagement2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackManagement2' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAwResource$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function preparedDeploymentStackExtendAwResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendAwResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendAwResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAwStack$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function preparedDeploymentStackExtendAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendAwStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAwBinding$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAwBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackExtendAwResource$inboundSchema) .optional(), stack: z.lazy(() => PreparedDeploymentStackExtendAwStack$inboundSchema) .optional(), }); export function preparedDeploymentStackExtendAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendAwBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendEffect$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackExtendEffect > = z.enum(PreparedDeploymentStackExtendEffect); /** @internal */ export const PreparedDeploymentStackExtendAwGrant$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAwGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackExtendAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendAwGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAw$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAw, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackExtendAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: PreparedDeploymentStackExtendEffect$inboundSchema.optional(), grant: z.lazy(() => PreparedDeploymentStackExtendAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackExtendAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendAw' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAzureResource$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); export function preparedDeploymentStackExtendAzureResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAzureResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendAzureResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAzureStack$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAzureStack, unknown > = z.object({ scope: z.string(), }); export function preparedDeploymentStackExtendAzureStackFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendAzureStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAzureBinding$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAzureBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackExtendAzureResource$inboundSchema ).optional(), stack: z.lazy(() => PreparedDeploymentStackExtendAzureStack$inboundSchema) .optional(), }); export function preparedDeploymentStackExtendAzureBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendAzureBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAzureGrant$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAzureGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackExtendAzureGrantFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendAzureGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendAzure$inboundSchema: z.ZodType< PreparedDeploymentStackExtendAzure, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackExtendAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => PreparedDeploymentStackExtendAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackExtendAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendAzure' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendConditionResource$inboundSchema: z.ZodType = z.object( { expression: z.string(), title: z.string(), }, ); export function preparedDeploymentStackExtendConditionResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendConditionResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendResourceConditionUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => PreparedDeploymentStackExtendConditionResource$inboundSchema ), z.any(), ]); export function preparedDeploymentStackExtendResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendResourceConditionUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendGcpResource$inboundSchema: z.ZodType< PreparedDeploymentStackExtendGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackExtendConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function preparedDeploymentStackExtendGcpResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendGcpResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendCondition$inboundSchema: z.ZodType< PreparedDeploymentStackExtendCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); export function preparedDeploymentStackExtendConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendCondition' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => PreparedDeploymentStackExtendCondition$inboundSchema), z.any(), ]); export function preparedDeploymentStackExtendConditionUnionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendConditionUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendGcpStack$inboundSchema: z.ZodType< PreparedDeploymentStackExtendGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackExtendCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function preparedDeploymentStackExtendGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendGcpStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendGcpBinding$inboundSchema: z.ZodType< PreparedDeploymentStackExtendGcpBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackExtendGcpResource$inboundSchema) .optional(), stack: z.lazy(() => PreparedDeploymentStackExtendGcpStack$inboundSchema) .optional(), }); export function preparedDeploymentStackExtendGcpBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackExtendGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackExtendGcpBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendGcpGrant$inboundSchema: z.ZodType< PreparedDeploymentStackExtendGcpGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackExtendGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendGcpGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendGcp$inboundSchema: z.ZodType< PreparedDeploymentStackExtendGcp, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackExtendGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => PreparedDeploymentStackExtendGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackExtendGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendGcp' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendPlatforms$inboundSchema: z.ZodType< PreparedDeploymentStackExtendPlatforms, unknown > = z.object({ aws: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackExtendAw$inboundSchema)), ).optional(), azure: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackExtendAzure$inboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackExtendGcp$inboundSchema)), ).optional(), }); export function preparedDeploymentStackExtendPlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendPlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendPlatforms' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtend$inboundSchema: z.ZodType< PreparedDeploymentStackExtend, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => PreparedDeploymentStackExtendPlatforms$inboundSchema), }); export function preparedDeploymentStackExtendFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtend$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtend' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackExtendUnion$inboundSchema: z.ZodType< PreparedDeploymentStackExtendUnion, unknown > = z.union([ z.lazy(() => PreparedDeploymentStackExtend$inboundSchema), z.string(), ]); export function preparedDeploymentStackExtendUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackExtendUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackExtendUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackManagement1$inboundSchema: z.ZodType< PreparedDeploymentStackManagement1, unknown > = z.object({ extend: z.record( z.string(), z.array(z.union([ z.lazy(() => PreparedDeploymentStackExtend$inboundSchema), z.string(), ])), ), }); export function preparedDeploymentStackManagement1FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackManagement1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackManagement1' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackManagementUnion$inboundSchema: z.ZodType< PreparedDeploymentStackManagementUnion, unknown > = z.union([ z.lazy(() => PreparedDeploymentStackManagement1$inboundSchema), z.lazy(() => PreparedDeploymentStackManagement2$inboundSchema), PreparedDeploymentStackManagementEnum$inboundSchema, ]); export function preparedDeploymentStackManagementUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackManagementUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackManagementUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAwResource$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function preparedDeploymentStackProfileAwResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileAwResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileAwResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAwStack$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function preparedDeploymentStackProfileAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileAwStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAwBinding$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAwBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackProfileAwResource$inboundSchema) .optional(), stack: z.lazy(() => PreparedDeploymentStackProfileAwStack$inboundSchema) .optional(), }); export function preparedDeploymentStackProfileAwBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileAwBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileEffect$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackProfileEffect > = z.enum(PreparedDeploymentStackProfileEffect); /** @internal */ export const PreparedDeploymentStackProfileAwGrant$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAwGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackProfileAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileAwGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAw$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAw, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackProfileAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: PreparedDeploymentStackProfileEffect$inboundSchema.optional(), grant: z.lazy(() => PreparedDeploymentStackProfileAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackProfileAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileAw' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAzureResource$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); export function preparedDeploymentStackProfileAzureResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAzureResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileAzureResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAzureStack$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAzureStack, unknown > = z.object({ scope: z.string(), }); export function preparedDeploymentStackProfileAzureStackFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileAzureStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAzureBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => PreparedDeploymentStackProfileAzureResource$inboundSchema ).optional(), stack: z.lazy(() => PreparedDeploymentStackProfileAzureStack$inboundSchema) .optional(), }); export function preparedDeploymentStackProfileAzureBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileAzureBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAzureGrant$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAzureGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackProfileAzureGrantFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileAzureGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileAzure$inboundSchema: z.ZodType< PreparedDeploymentStackProfileAzure, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackProfileAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => PreparedDeploymentStackProfileAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackProfileAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileAzure' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileConditionResource$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); export function preparedDeploymentStackProfileConditionResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileConditionResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileResourceConditionUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => PreparedDeploymentStackProfileConditionResource$inboundSchema ), z.any(), ]); export function preparedDeploymentStackProfileResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileResourceConditionUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileGcpResource$inboundSchema: z.ZodType< PreparedDeploymentStackProfileGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackProfileConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function preparedDeploymentStackProfileGcpResourceFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileGcpResource' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileCondition$inboundSchema: z.ZodType< PreparedDeploymentStackProfileCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); export function preparedDeploymentStackProfileConditionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileCondition, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileCondition$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileCondition' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => PreparedDeploymentStackProfileCondition$inboundSchema), z.any(), ]); export function preparedDeploymentStackProfileConditionUnionFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileConditionUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileGcpStack$inboundSchema: z.ZodType< PreparedDeploymentStackProfileGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => PreparedDeploymentStackProfileCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function preparedDeploymentStackProfileGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileGcpStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileGcpBinding$inboundSchema: z.ZodType< PreparedDeploymentStackProfileGcpBinding, unknown > = z.object({ resource: z.lazy(() => PreparedDeploymentStackProfileGcpResource$inboundSchema ).optional(), stack: z.lazy(() => PreparedDeploymentStackProfileGcpStack$inboundSchema) .optional(), }); export function preparedDeploymentStackProfileGcpBindingFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfileGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfileGcpBinding' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileGcpGrant$inboundSchema: z.ZodType< PreparedDeploymentStackProfileGcpGrant, unknown > = z.object({ actions: z.nullable(z.array(z.string())).optional(), dataActions: z.nullable(z.array(z.string())).optional(), permissions: z.nullable(z.array(z.string())).optional(), predefinedRoles: z.nullable(z.array(z.string())).optional(), residualPermissions: z.nullable(z.array(z.string())).optional(), }); export function preparedDeploymentStackProfileGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileGcpGrant' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileGcp$inboundSchema: z.ZodType< PreparedDeploymentStackProfileGcp, unknown > = z.object({ binding: z.lazy(() => PreparedDeploymentStackProfileGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => PreparedDeploymentStackProfileGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); export function preparedDeploymentStackProfileGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileGcp' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfilePlatforms$inboundSchema: z.ZodType< PreparedDeploymentStackProfilePlatforms, unknown > = z.object({ aws: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackProfileAw$inboundSchema)), ).optional(), azure: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackProfileAzure$inboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => PreparedDeploymentStackProfileGcp$inboundSchema)), ).optional(), }); export function preparedDeploymentStackProfilePlatformsFromJSON( jsonString: string, ): SafeParseResult< PreparedDeploymentStackProfilePlatforms, SDKValidationError > { return safeParse( jsonString, (x) => PreparedDeploymentStackProfilePlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PreparedDeploymentStackProfilePlatforms' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfile$inboundSchema: z.ZodType< PreparedDeploymentStackProfile, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => PreparedDeploymentStackProfilePlatforms$inboundSchema ), }); export function preparedDeploymentStackProfileFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfile' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackProfileUnion$inboundSchema: z.ZodType< PreparedDeploymentStackProfileUnion, unknown > = z.union([ z.lazy(() => PreparedDeploymentStackProfile$inboundSchema), z.string(), ]); export function preparedDeploymentStackProfileUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackProfileUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackProfileUnion' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackPermissions$inboundSchema: z.ZodType< PreparedDeploymentStackPermissions, unknown > = z.object({ management: z.union([ z.lazy(() => PreparedDeploymentStackManagement1$inboundSchema), z.lazy(() => PreparedDeploymentStackManagement2$inboundSchema), PreparedDeploymentStackManagementEnum$inboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => PreparedDeploymentStackProfile$inboundSchema), z.string(), ]), ), ), ), }); export function preparedDeploymentStackPermissionsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackPermissions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackPermissions' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackConfig$inboundSchema: z.ZodType< PreparedDeploymentStackConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); export function preparedDeploymentStackConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackConfig' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackDependency$inboundSchema: z.ZodType< PreparedDeploymentStackDependency, unknown > = z.object({ id: z.string(), type: z.string(), }); export function preparedDeploymentStackDependencyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackDependency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackDependency' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackLifecycle$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackLifecycle > = z.enum(PreparedDeploymentStackLifecycle); /** @internal */ export const PreparedDeploymentStackResources$inboundSchema: z.ZodType< PreparedDeploymentStackResources, unknown > = z.object({ config: z.lazy(() => PreparedDeploymentStackConfig$inboundSchema), dependencies: z.array( z.lazy(() => PreparedDeploymentStackDependency$inboundSchema), ), enabledWhen: z.nullable(z.string()).optional(), lifecycle: PreparedDeploymentStackLifecycle$inboundSchema, remoteAccess: z.boolean().optional(), }); export function preparedDeploymentStackResourcesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackResources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackResources' from JSON`, ); } /** @internal */ export const PreparedDeploymentStackSupportedPlatform$inboundSchema: z.ZodEnum< typeof PreparedDeploymentStackSupportedPlatform > = z.enum(PreparedDeploymentStackSupportedPlatform); /** @internal */ export const PreparedDeploymentStackStack$inboundSchema: z.ZodType< PreparedDeploymentStackStack, unknown > = z.object({ id: z.string(), inputs: z.array(z.lazy(() => PreparedDeploymentStackInput$inboundSchema)) .optional(), permissions: z.lazy(() => PreparedDeploymentStackPermissions$inboundSchema) .optional(), resources: z.record( z.string(), z.lazy(() => PreparedDeploymentStackResources$inboundSchema), ), supportedPlatforms: z.nullable( z.array(PreparedDeploymentStackSupportedPlatform$inboundSchema), ).optional(), }); export function preparedDeploymentStackStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStackStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStackStack' from JSON`, ); } /** @internal */ export const PreparedDeploymentStack$inboundSchema: z.ZodType< PreparedDeploymentStack, unknown > = z.object({ updateOperationId: z.string().optional(), platform: PreparedDeploymentStackPlatform$inboundSchema, stack: z.lazy(() => PreparedDeploymentStackStack$inboundSchema), setup: SetupFingerprintInfo$inboundSchema, }); export function preparedDeploymentStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreparedDeploymentStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreparedDeploymentStack' from JSON`, ); }