/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 8ea195c22ee9 */ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; 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"; export const CurrentReleaseTypeStringList = { StringList: "stringList", } as const; export type CurrentReleaseTypeStringList = ClosedEnum< typeof CurrentReleaseTypeStringList >; export type CurrentReleaseDefaultStringList = { type: CurrentReleaseTypeStringList; /** * String list default. */ value: Array; }; export const CurrentReleaseTypeBoolean = { Boolean: "boolean", } as const; export type CurrentReleaseTypeBoolean = ClosedEnum< typeof CurrentReleaseTypeBoolean >; export type CurrentReleaseDefaultBoolean = { type: CurrentReleaseTypeBoolean; /** * Boolean default. */ value: boolean; }; export const CurrentReleaseTypeNumber = { Number: "number", } as const; export type CurrentReleaseTypeNumber = ClosedEnum< typeof CurrentReleaseTypeNumber >; export type CurrentReleaseDefaultNumber = { type: CurrentReleaseTypeNumber; /** * Number default. */ value: string; }; export const CurrentReleaseTypeString = { String: "string", } as const; export type CurrentReleaseTypeString = ClosedEnum< typeof CurrentReleaseTypeString >; export type CurrentReleaseDefaultString = { type: CurrentReleaseTypeString; /** * String default. */ value: string; }; export type CurrentReleaseDefaultUnion = | CurrentReleaseDefaultString | CurrentReleaseDefaultNumber | CurrentReleaseDefaultBoolean | CurrentReleaseDefaultStringList | any; /** * Environment variable handling for a stack input mapping. */ export const CurrentReleaseTypeEnvEnum = { Plain: "plain", Secret: "secret", } as const; /** * Environment variable handling for a stack input mapping. */ export type CurrentReleaseTypeEnvEnum = ClosedEnum< typeof CurrentReleaseTypeEnvEnum >; export type CurrentReleaseTypeUnion = CurrentReleaseTypeEnvEnum | any; /** * How a resolved stack input is injected into runtime environment variables. */ export type CurrentReleaseEnv = { /** * Environment variable name. */ name: string; /** * Target resource IDs or patterns. None means every env-capable resource. */ targetResources?: Array | null | undefined; type?: CurrentReleaseTypeEnvEnum | any | null | undefined; }; /** * Primitive stack input kind. */ export const CurrentReleaseKind = { String: "string", Secret: "secret", Number: "number", Integer: "integer", Boolean: "boolean", Enum: "enum", StringList: "stringList", } as const; /** * Primitive stack input kind. */ export type CurrentReleaseKind = ClosedEnum; /** * Represents the target cloud platform. */ export const CurrentReleasePlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type CurrentReleasePlatform = ClosedEnum; /** * Who can provide a stack input value. */ export const CurrentReleaseProvidedBy = { Developer: "developer", Deployer: "deployer", } as const; /** * Who can provide a stack input value. */ export type CurrentReleaseProvidedBy = ClosedEnum< typeof CurrentReleaseProvidedBy >; /** * Portable stack input validation constraints. */ export type CurrentReleaseValidation = { /** * 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 CurrentReleaseValidationUnion = CurrentReleaseValidation | any; /** * Stack input definition serialized into a release stack. */ export type CurrentReleaseInput = { default?: | CurrentReleaseDefaultString | CurrentReleaseDefaultNumber | CurrentReleaseDefaultBoolean | CurrentReleaseDefaultStringList | 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: CurrentReleaseKind; /** * 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?: CurrentReleaseValidation | any | null | undefined; }; export const CurrentReleaseManagementEnum = { Auto: "auto", } as const; export type CurrentReleaseManagementEnum = ClosedEnum< typeof CurrentReleaseManagementEnum >; /** * AWS-specific binding specification */ export type CurrentReleaseOverrideAwResource = { /** * 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 CurrentReleaseOverrideAwStack = { /** * 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 CurrentReleaseOverrideAwBinding = { /** * AWS-specific binding specification */ resource?: CurrentReleaseOverrideAwResource | undefined; /** * AWS-specific binding specification */ stack?: CurrentReleaseOverrideAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const CurrentReleaseOverrideEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type CurrentReleaseOverrideEffect = ClosedEnum< typeof CurrentReleaseOverrideEffect >; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseOverrideAwGrant = { /** * 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 CurrentReleaseOverrideAw = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseOverrideAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: CurrentReleaseOverrideEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseOverrideAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type CurrentReleaseOverrideAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type CurrentReleaseOverrideAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type CurrentReleaseOverrideAzureBinding = { /** * Azure-specific binding specification */ resource?: CurrentReleaseOverrideAzureResource | undefined; /** * Azure-specific binding specification */ stack?: CurrentReleaseOverrideAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseOverrideAzureGrant = { /** * 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 CurrentReleaseOverrideAzure = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseOverrideAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseOverrideAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type CurrentReleaseOverrideConditionResource = { expression: string; title: string; }; export type CurrentReleaseOverrideResourceConditionUnion = | CurrentReleaseOverrideConditionResource | any; /** * GCP-specific binding specification */ export type CurrentReleaseOverrideGcpResource = { condition?: CurrentReleaseOverrideConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type CurrentReleaseOverrideCondition = { expression: string; title: string; }; export type CurrentReleaseOverrideConditionUnion = | CurrentReleaseOverrideCondition | any; /** * GCP-specific binding specification */ export type CurrentReleaseOverrideGcpStack = { condition?: CurrentReleaseOverrideCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type CurrentReleaseOverrideGcpBinding = { /** * GCP-specific binding specification */ resource?: CurrentReleaseOverrideGcpResource | undefined; /** * GCP-specific binding specification */ stack?: CurrentReleaseOverrideGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseOverrideGcpGrant = { /** * 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 CurrentReleaseOverrideGcp = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseOverrideGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseOverrideGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type CurrentReleaseOverridePlatforms = { /** * 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 CurrentReleaseOverride = { /** * 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: CurrentReleaseOverridePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type CurrentReleaseOverrideUnion = CurrentReleaseOverride | string; export type CurrentReleaseManagement2 = { /** * 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 CurrentReleaseExtendAwResource = { /** * 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 CurrentReleaseExtendAwStack = { /** * 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 CurrentReleaseExtendAwBinding = { /** * AWS-specific binding specification */ resource?: CurrentReleaseExtendAwResource | undefined; /** * AWS-specific binding specification */ stack?: CurrentReleaseExtendAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const CurrentReleaseExtendEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type CurrentReleaseExtendEffect = ClosedEnum< typeof CurrentReleaseExtendEffect >; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseExtendAwGrant = { /** * 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 CurrentReleaseExtendAw = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseExtendAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: CurrentReleaseExtendEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseExtendAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type CurrentReleaseExtendAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type CurrentReleaseExtendAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type CurrentReleaseExtendAzureBinding = { /** * Azure-specific binding specification */ resource?: CurrentReleaseExtendAzureResource | undefined; /** * Azure-specific binding specification */ stack?: CurrentReleaseExtendAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseExtendAzureGrant = { /** * 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 CurrentReleaseExtendAzure = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseExtendAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseExtendAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type CurrentReleaseExtendConditionResource = { expression: string; title: string; }; export type CurrentReleaseExtendResourceConditionUnion = | CurrentReleaseExtendConditionResource | any; /** * GCP-specific binding specification */ export type CurrentReleaseExtendGcpResource = { condition?: CurrentReleaseExtendConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type CurrentReleaseExtendCondition = { expression: string; title: string; }; export type CurrentReleaseExtendConditionUnion = | CurrentReleaseExtendCondition | any; /** * GCP-specific binding specification */ export type CurrentReleaseExtendGcpStack = { condition?: CurrentReleaseExtendCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type CurrentReleaseExtendGcpBinding = { /** * GCP-specific binding specification */ resource?: CurrentReleaseExtendGcpResource | undefined; /** * GCP-specific binding specification */ stack?: CurrentReleaseExtendGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseExtendGcpGrant = { /** * 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 CurrentReleaseExtendGcp = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseExtendGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseExtendGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type CurrentReleaseExtendPlatforms = { /** * 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 CurrentReleaseExtend = { /** * 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: CurrentReleaseExtendPlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type CurrentReleaseExtendUnion = CurrentReleaseExtend | string; export type CurrentReleaseManagement1 = { /** * 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 CurrentReleaseManagementUnion = | CurrentReleaseManagement1 | CurrentReleaseManagement2 | CurrentReleaseManagementEnum; /** * AWS-specific binding specification */ export type CurrentReleaseProfileAwResource = { /** * 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 CurrentReleaseProfileAwStack = { /** * 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 CurrentReleaseProfileAwBinding = { /** * AWS-specific binding specification */ resource?: CurrentReleaseProfileAwResource | undefined; /** * AWS-specific binding specification */ stack?: CurrentReleaseProfileAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const CurrentReleaseProfileEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type CurrentReleaseProfileEffect = ClosedEnum< typeof CurrentReleaseProfileEffect >; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseProfileAwGrant = { /** * 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 CurrentReleaseProfileAw = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseProfileAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: CurrentReleaseProfileEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseProfileAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type CurrentReleaseProfileAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type CurrentReleaseProfileAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type CurrentReleaseProfileAzureBinding = { /** * Azure-specific binding specification */ resource?: CurrentReleaseProfileAzureResource | undefined; /** * Azure-specific binding specification */ stack?: CurrentReleaseProfileAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseProfileAzureGrant = { /** * 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 CurrentReleaseProfileAzure = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseProfileAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseProfileAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type CurrentReleaseProfileConditionResource = { expression: string; title: string; }; export type CurrentReleaseProfileResourceConditionUnion = | CurrentReleaseProfileConditionResource | any; /** * GCP-specific binding specification */ export type CurrentReleaseProfileGcpResource = { condition?: CurrentReleaseProfileConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type CurrentReleaseProfileCondition = { expression: string; title: string; }; export type CurrentReleaseProfileConditionUnion = | CurrentReleaseProfileCondition | any; /** * GCP-specific binding specification */ export type CurrentReleaseProfileGcpStack = { condition?: CurrentReleaseProfileCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type CurrentReleaseProfileGcpBinding = { /** * GCP-specific binding specification */ resource?: CurrentReleaseProfileGcpResource | undefined; /** * GCP-specific binding specification */ stack?: CurrentReleaseProfileGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type CurrentReleaseProfileGcpGrant = { /** * 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 CurrentReleaseProfileGcp = { /** * Generic binding configuration for permissions */ binding: CurrentReleaseProfileGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: CurrentReleaseProfileGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type CurrentReleaseProfilePlatforms = { /** * 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 CurrentReleaseProfile = { /** * 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: CurrentReleaseProfilePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type CurrentReleaseProfileUnion = CurrentReleaseProfile | string; /** * Combined permissions configuration that contains both profiles and management */ export type CurrentReleasePermissions = { /** * Management permissions configuration for stack management access */ management?: | CurrentReleaseManagement1 | CurrentReleaseManagement2 | CurrentReleaseManagementEnum | 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 CurrentReleaseConfig = { /** * 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 CurrentReleaseDependency = { 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 CurrentReleaseLifecycle = { Frozen: "frozen", Live: "live", } as const; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export type CurrentReleaseLifecycle = ClosedEnum< typeof CurrentReleaseLifecycle >; export type CurrentReleaseResources = { /** * 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: CurrentReleaseConfig; /** * 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: CurrentReleaseLifecycle; /** * 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 CurrentReleaseSupportedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type CurrentReleaseSupportedPlatform = ClosedEnum< typeof CurrentReleaseSupportedPlatform >; /** * A bag of resources, unaware of any cloud. */ export type CurrentReleaseStack = { /** * 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?: CurrentReleasePermissions | undefined; /** * Map of resource IDs to their configurations and lifecycle settings */ resources: { [k: string]: CurrentReleaseResources }; /** * Which platforms this stack supports. When None, all platforms are supported. */ supportedPlatforms?: | Array | null | undefined; }; /** * Release metadata * * @remarks * * Identifies a specific release version and includes the stack definition. * The deployment engine uses this to track which release is currently deployed * and which is the target. */ export type CurrentRelease = { /** * Short description of the release */ description?: string | null | undefined; /** * Release ID (e.g., rel_xyz). `None` for an observe deployment, which has no * * @remarks * Alien-assigned release — the platform resolves a release from `version`. */ releaseId?: string | null | undefined; /** * A bag of resources, unaware of any cloud. */ stack: CurrentReleaseStack; /** * Version string (e.g., 2.1.0) */ version?: string | null | undefined; }; export type CurrentReleaseUnion = CurrentRelease | any; export const DeploymentStatePlatformTest = { Test: "test", } as const; export type DeploymentStatePlatformTest = ClosedEnum< typeof DeploymentStatePlatformTest >; /** * Test platform environment information (mock) */ export type DeploymentStateEnvironmentInfoTest = { /** * Test identifier for this environment */ testId: string; platform: DeploymentStatePlatformTest; }; export const DeploymentStatePlatformLocal = { Local: "local", } as const; export type DeploymentStatePlatformLocal = ClosedEnum< typeof DeploymentStatePlatformLocal >; /** * Local platform environment information */ export type DeploymentStateEnvironmentInfoLocal = { /** * Architecture (e.g., "x86_64", "aarch64") */ arch: string; /** * Hostname of the machine running the deployment */ hostname: string; /** * Operating system (e.g., "linux", "macos", "windows") */ os: string; platform: DeploymentStatePlatformLocal; }; export const DeploymentStatePlatformAzure = { Azure: "azure", } as const; export type DeploymentStatePlatformAzure = ClosedEnum< typeof DeploymentStatePlatformAzure >; /** * Azure-specific environment information */ export type DeploymentStateEnvironmentInfoAzure = { /** * Azure location/region */ location: string; /** * Azure subscription ID */ subscriptionId: string; /** * Azure tenant ID */ tenantId: string; platform: DeploymentStatePlatformAzure; }; export const DeploymentStatePlatformGcp = { Gcp: "gcp", } as const; export type DeploymentStatePlatformGcp = ClosedEnum< typeof DeploymentStatePlatformGcp >; /** * GCP-specific environment information */ export type DeploymentStateEnvironmentInfoGcp = { /** * GCP project ID (e.g., "my-project") */ projectId: string; /** * GCP project number (e.g., "123456789012") */ projectNumber: string; /** * GCP region */ region: string; platform: DeploymentStatePlatformGcp; }; export const DeploymentStatePlatformAws = { Aws: "aws", } as const; export type DeploymentStatePlatformAws = ClosedEnum< typeof DeploymentStatePlatformAws >; /** * AWS-specific environment information */ export type DeploymentStateEnvironmentInfoAws = { /** * AWS account ID */ accountId: string; /** * AWS region */ region: string; platform: DeploymentStatePlatformAws; }; export type DeploymentStateEnvironmentInfoUnion = | DeploymentStateEnvironmentInfoGcp | DeploymentStateEnvironmentInfoAzure | DeploymentStateEnvironmentInfoLocal | DeploymentStateEnvironmentInfoAws | DeploymentStateEnvironmentInfoTest | any; /** * Canonical error container that provides a structured way to represent errors * * @remarks * with rich metadata including error codes, human-readable messages, context, * and chaining capabilities for error propagation. * * This struct is designed to be both machine-readable and user-friendly, * supporting serialization for API responses and detailed error reporting * in distributed systems. */ export type DeploymentStateError = { /** * A unique identifier for the type of error. * * @remarks * * This should be a short, machine-readable string that can be used * by clients to programmatically handle different error types. * Examples: "NOT_FOUND", "VALIDATION_ERROR", "TIMEOUT" */ code: string; /** * Additional diagnostic information about the error context. * * @remarks * * This optional field can contain structured data providing more details * about the error, such as validation errors, request parameters that * caused the issue, or other relevant context information. */ context?: any | null | undefined; /** * Optional human-facing remediation hint. */ hint?: string | null | undefined; /** * HTTP status code for this error. * * @remarks * * Used when converting the error to an HTTP response. If None, falls back to * the error type's default status code or 500. */ httpStatusCode?: number | null | undefined; /** * Indicates if this is an internal error that should not be exposed to users. * * @remarks * * When `true`, this error contains sensitive information or implementation * details that should not be shown to end-users. Such errors should be * logged for debugging but replaced with generic error messages in responses. */ internal: boolean; /** * Human-readable error message. * * @remarks * * This message should be clear and actionable for developers or end-users, * providing context about what went wrong and potentially how to fix it. */ message: string; /** * Indicates whether the operation that caused the error should be retried. * * @remarks * * When `true`, the error is transient and the operation might succeed * if attempted again. When `false`, retrying the same operation is * unlikely to succeed without changes. */ retryable?: boolean | undefined; /** * The underlying error that caused this error, creating an error chain. * * @remarks * * This allows for proper error propagation and debugging by maintaining * the full context of how an error occurred through multiple layers * of an application. */ source?: any | null | undefined; }; export type DeploymentStateErrorUnion = DeploymentStateError | any; /** * Represents the target cloud platform. */ export const DeploymentStatePlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStatePlatform = ClosedEnum< typeof DeploymentStatePlatform >; /** * Actor that owns structural work during the initial setup phase. */ export const DeploymentStateInitialSetupAuthority = { ImportedHandoff: "importedHandoff", DirectSetup: "directSetup", } as const; /** * Actor that owns structural work during the initial setup phase. */ export type DeploymentStateInitialSetupAuthority = ClosedEnum< typeof DeploymentStateInitialSetupAuthority >; export const DeploymentStatePendingPreparedStackTypeStringList = { StringList: "stringList", } as const; export type DeploymentStatePendingPreparedStackTypeStringList = ClosedEnum< typeof DeploymentStatePendingPreparedStackTypeStringList >; export type DeploymentStatePendingPreparedStackDefaultStringList = { type: DeploymentStatePendingPreparedStackTypeStringList; /** * String list default. */ value: Array; }; export const DeploymentStatePendingPreparedStackTypeBoolean = { Boolean: "boolean", } as const; export type DeploymentStatePendingPreparedStackTypeBoolean = ClosedEnum< typeof DeploymentStatePendingPreparedStackTypeBoolean >; export type DeploymentStatePendingPreparedStackDefaultBoolean = { type: DeploymentStatePendingPreparedStackTypeBoolean; /** * Boolean default. */ value: boolean; }; export const DeploymentStatePendingPreparedStackTypeNumber = { Number: "number", } as const; export type DeploymentStatePendingPreparedStackTypeNumber = ClosedEnum< typeof DeploymentStatePendingPreparedStackTypeNumber >; export type DeploymentStatePendingPreparedStackDefaultNumber = { type: DeploymentStatePendingPreparedStackTypeNumber; /** * Number default. */ value: string; }; export const DeploymentStatePendingPreparedStackTypeString = { String: "string", } as const; export type DeploymentStatePendingPreparedStackTypeString = ClosedEnum< typeof DeploymentStatePendingPreparedStackTypeString >; export type DeploymentStatePendingPreparedStackDefaultString = { type: DeploymentStatePendingPreparedStackTypeString; /** * String default. */ value: string; }; export type DeploymentStatePendingPreparedStackDefaultUnion = | DeploymentStatePendingPreparedStackDefaultString | DeploymentStatePendingPreparedStackDefaultNumber | DeploymentStatePendingPreparedStackDefaultBoolean | DeploymentStatePendingPreparedStackDefaultStringList | any; /** * Environment variable handling for a stack input mapping. */ export const DeploymentStatePendingPreparedStackTypeEnvEnum = { Plain: "plain", Secret: "secret", } as const; /** * Environment variable handling for a stack input mapping. */ export type DeploymentStatePendingPreparedStackTypeEnvEnum = ClosedEnum< typeof DeploymentStatePendingPreparedStackTypeEnvEnum >; export type DeploymentStatePendingPreparedStackTypeUnion = | DeploymentStatePendingPreparedStackTypeEnvEnum | any; /** * How a resolved stack input is injected into runtime environment variables. */ export type DeploymentStatePendingPreparedStackEnv = { /** * Environment variable name. */ name: string; /** * Target resource IDs or patterns. None means every env-capable resource. */ targetResources?: Array | null | undefined; type?: | DeploymentStatePendingPreparedStackTypeEnvEnum | any | null | undefined; }; /** * Primitive stack input kind. */ export const DeploymentStatePendingPreparedStackKind = { String: "string", Secret: "secret", Number: "number", Integer: "integer", Boolean: "boolean", Enum: "enum", StringList: "stringList", } as const; /** * Primitive stack input kind. */ export type DeploymentStatePendingPreparedStackKind = ClosedEnum< typeof DeploymentStatePendingPreparedStackKind >; /** * Represents the target cloud platform. */ export const DeploymentStatePendingPreparedStackPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStatePendingPreparedStackPlatform = ClosedEnum< typeof DeploymentStatePendingPreparedStackPlatform >; /** * Who can provide a stack input value. */ export const DeploymentStatePendingPreparedStackProvidedBy = { Developer: "developer", Deployer: "deployer", } as const; /** * Who can provide a stack input value. */ export type DeploymentStatePendingPreparedStackProvidedBy = ClosedEnum< typeof DeploymentStatePendingPreparedStackProvidedBy >; /** * Portable stack input validation constraints. */ export type DeploymentStatePendingPreparedStackValidation = { /** * 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 DeploymentStatePendingPreparedStackValidationUnion = | DeploymentStatePendingPreparedStackValidation | any; /** * Stack input definition serialized into a release stack. */ export type DeploymentStatePendingPreparedStackInput = { default?: | DeploymentStatePendingPreparedStackDefaultString | DeploymentStatePendingPreparedStackDefaultNumber | DeploymentStatePendingPreparedStackDefaultBoolean | DeploymentStatePendingPreparedStackDefaultStringList | 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: DeploymentStatePendingPreparedStackKind; /** * 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?: | DeploymentStatePendingPreparedStackValidation | any | null | undefined; }; export const DeploymentStatePendingPreparedStackManagementEnum = { Auto: "auto", } as const; export type DeploymentStatePendingPreparedStackManagementEnum = ClosedEnum< typeof DeploymentStatePendingPreparedStackManagementEnum >; /** * AWS-specific binding specification */ export type DeploymentStatePendingPreparedStackOverrideAwResource = { /** * 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 DeploymentStatePendingPreparedStackOverrideAwStack = { /** * 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 DeploymentStatePendingPreparedStackOverrideAwBinding = { /** * AWS-specific binding specification */ resource?: DeploymentStatePendingPreparedStackOverrideAwResource | undefined; /** * AWS-specific binding specification */ stack?: DeploymentStatePendingPreparedStackOverrideAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const DeploymentStatePendingPreparedStackOverrideEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type DeploymentStatePendingPreparedStackOverrideEffect = ClosedEnum< typeof DeploymentStatePendingPreparedStackOverrideEffect >; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackOverrideAwGrant = { /** * 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 DeploymentStatePendingPreparedStackOverrideAw = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackOverrideAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: DeploymentStatePendingPreparedStackOverrideEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackOverrideAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type DeploymentStatePendingPreparedStackOverrideAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type DeploymentStatePendingPreparedStackOverrideAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePendingPreparedStackOverrideAzureBinding = { /** * Azure-specific binding specification */ resource?: | DeploymentStatePendingPreparedStackOverrideAzureResource | undefined; /** * Azure-specific binding specification */ stack?: DeploymentStatePendingPreparedStackOverrideAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackOverrideAzureGrant = { /** * 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 DeploymentStatePendingPreparedStackOverrideAzure = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackOverrideAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackOverrideAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type DeploymentStatePendingPreparedStackOverrideConditionResource = { expression: string; title: string; }; export type DeploymentStatePendingPreparedStackOverrideResourceConditionUnion = | DeploymentStatePendingPreparedStackOverrideConditionResource | any; /** * GCP-specific binding specification */ export type DeploymentStatePendingPreparedStackOverrideGcpResource = { condition?: | DeploymentStatePendingPreparedStackOverrideConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type DeploymentStatePendingPreparedStackOverrideConditionStack = { expression: string; title: string; }; export type DeploymentStatePendingPreparedStackOverrideStackConditionUnion = | DeploymentStatePendingPreparedStackOverrideConditionStack | any; /** * GCP-specific binding specification */ export type DeploymentStatePendingPreparedStackOverrideGcpStack = { condition?: | DeploymentStatePendingPreparedStackOverrideConditionStack | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePendingPreparedStackOverrideGcpBinding = { /** * GCP-specific binding specification */ resource?: DeploymentStatePendingPreparedStackOverrideGcpResource | undefined; /** * GCP-specific binding specification */ stack?: DeploymentStatePendingPreparedStackOverrideGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackOverrideGcpGrant = { /** * 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 DeploymentStatePendingPreparedStackOverrideGcp = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackOverrideGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackOverrideGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type DeploymentStatePendingPreparedStackOverridePlatforms = { /** * 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 DeploymentStatePendingPreparedStackOverride = { /** * 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: DeploymentStatePendingPreparedStackOverridePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type DeploymentStatePendingPreparedStackOverrideUnion = | DeploymentStatePendingPreparedStackOverride | string; export type DeploymentStatePendingPreparedStackManagement2 = { /** * 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 DeploymentStatePendingPreparedStackExtendAwResource = { /** * 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 DeploymentStatePendingPreparedStackExtendAwStack = { /** * 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 DeploymentStatePendingPreparedStackExtendAwBinding = { /** * AWS-specific binding specification */ resource?: DeploymentStatePendingPreparedStackExtendAwResource | undefined; /** * AWS-specific binding specification */ stack?: DeploymentStatePendingPreparedStackExtendAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const DeploymentStatePendingPreparedStackExtendEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type DeploymentStatePendingPreparedStackExtendEffect = ClosedEnum< typeof DeploymentStatePendingPreparedStackExtendEffect >; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackExtendAwGrant = { /** * 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 DeploymentStatePendingPreparedStackExtendAw = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackExtendAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: DeploymentStatePendingPreparedStackExtendEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackExtendAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type DeploymentStatePendingPreparedStackExtendAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type DeploymentStatePendingPreparedStackExtendAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePendingPreparedStackExtendAzureBinding = { /** * Azure-specific binding specification */ resource?: DeploymentStatePendingPreparedStackExtendAzureResource | undefined; /** * Azure-specific binding specification */ stack?: DeploymentStatePendingPreparedStackExtendAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackExtendAzureGrant = { /** * 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 DeploymentStatePendingPreparedStackExtendAzure = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackExtendAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackExtendAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type DeploymentStatePendingPreparedStackExtendConditionResource = { expression: string; title: string; }; export type DeploymentStatePendingPreparedStackExtendResourceConditionUnion = | DeploymentStatePendingPreparedStackExtendConditionResource | any; /** * GCP-specific binding specification */ export type DeploymentStatePendingPreparedStackExtendGcpResource = { condition?: | DeploymentStatePendingPreparedStackExtendConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type DeploymentStatePendingPreparedStackExtendConditionStack = { expression: string; title: string; }; export type DeploymentStatePendingPreparedStackExtendStackConditionUnion = | DeploymentStatePendingPreparedStackExtendConditionStack | any; /** * GCP-specific binding specification */ export type DeploymentStatePendingPreparedStackExtendGcpStack = { condition?: | DeploymentStatePendingPreparedStackExtendConditionStack | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePendingPreparedStackExtendGcpBinding = { /** * GCP-specific binding specification */ resource?: DeploymentStatePendingPreparedStackExtendGcpResource | undefined; /** * GCP-specific binding specification */ stack?: DeploymentStatePendingPreparedStackExtendGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackExtendGcpGrant = { /** * 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 DeploymentStatePendingPreparedStackExtendGcp = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackExtendGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackExtendGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type DeploymentStatePendingPreparedStackExtendPlatforms = { /** * 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 DeploymentStatePendingPreparedStackExtend = { /** * 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: DeploymentStatePendingPreparedStackExtendPlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type DeploymentStatePendingPreparedStackExtendUnion = | DeploymentStatePendingPreparedStackExtend | string; export type DeploymentStatePendingPreparedStackManagement1 = { /** * 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 DeploymentStatePendingPreparedStackManagementUnion = | DeploymentStatePendingPreparedStackManagement1 | DeploymentStatePendingPreparedStackManagement2 | DeploymentStatePendingPreparedStackManagementEnum; /** * AWS-specific binding specification */ export type DeploymentStatePendingPreparedStackProfileAwResource = { /** * 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 DeploymentStatePendingPreparedStackProfileAwStack = { /** * 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 DeploymentStatePendingPreparedStackProfileAwBinding = { /** * AWS-specific binding specification */ resource?: DeploymentStatePendingPreparedStackProfileAwResource | undefined; /** * AWS-specific binding specification */ stack?: DeploymentStatePendingPreparedStackProfileAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const DeploymentStatePendingPreparedStackProfileEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type DeploymentStatePendingPreparedStackProfileEffect = ClosedEnum< typeof DeploymentStatePendingPreparedStackProfileEffect >; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackProfileAwGrant = { /** * 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 DeploymentStatePendingPreparedStackProfileAw = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackProfileAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: DeploymentStatePendingPreparedStackProfileEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackProfileAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type DeploymentStatePendingPreparedStackProfileAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type DeploymentStatePendingPreparedStackProfileAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePendingPreparedStackProfileAzureBinding = { /** * Azure-specific binding specification */ resource?: | DeploymentStatePendingPreparedStackProfileAzureResource | undefined; /** * Azure-specific binding specification */ stack?: DeploymentStatePendingPreparedStackProfileAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackProfileAzureGrant = { /** * 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 DeploymentStatePendingPreparedStackProfileAzure = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackProfileAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackProfileAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type DeploymentStatePendingPreparedStackProfileConditionResource = { expression: string; title: string; }; export type DeploymentStatePendingPreparedStackProfileResourceConditionUnion = | DeploymentStatePendingPreparedStackProfileConditionResource | any; /** * GCP-specific binding specification */ export type DeploymentStatePendingPreparedStackProfileGcpResource = { condition?: | DeploymentStatePendingPreparedStackProfileConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type DeploymentStatePendingPreparedStackProfileConditionStack = { expression: string; title: string; }; export type DeploymentStatePendingPreparedStackProfileStackConditionUnion = | DeploymentStatePendingPreparedStackProfileConditionStack | any; /** * GCP-specific binding specification */ export type DeploymentStatePendingPreparedStackProfileGcpStack = { condition?: | DeploymentStatePendingPreparedStackProfileConditionStack | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePendingPreparedStackProfileGcpBinding = { /** * GCP-specific binding specification */ resource?: DeploymentStatePendingPreparedStackProfileGcpResource | undefined; /** * GCP-specific binding specification */ stack?: DeploymentStatePendingPreparedStackProfileGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePendingPreparedStackProfileGcpGrant = { /** * 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 DeploymentStatePendingPreparedStackProfileGcp = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePendingPreparedStackProfileGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePendingPreparedStackProfileGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type DeploymentStatePendingPreparedStackProfilePlatforms = { /** * 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 DeploymentStatePendingPreparedStackProfile = { /** * 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: DeploymentStatePendingPreparedStackProfilePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type DeploymentStatePendingPreparedStackProfileUnion = | DeploymentStatePendingPreparedStackProfile | string; /** * Combined permissions configuration that contains both profiles and management */ export type DeploymentStatePendingPreparedStackPermissions = { /** * Management permissions configuration for stack management access */ management?: | DeploymentStatePendingPreparedStackManagement1 | DeploymentStatePendingPreparedStackManagement2 | DeploymentStatePendingPreparedStackManagementEnum | 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 DeploymentStatePendingPreparedStackConfig = { /** * 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 DeploymentStatePendingPreparedStackDependency = { 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 DeploymentStatePendingPreparedStackLifecycle = { Frozen: "frozen", Live: "live", } as const; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export type DeploymentStatePendingPreparedStackLifecycle = ClosedEnum< typeof DeploymentStatePendingPreparedStackLifecycle >; export type DeploymentStatePendingPreparedStackResources = { /** * 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: DeploymentStatePendingPreparedStackConfig; /** * 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: DeploymentStatePendingPreparedStackLifecycle; /** * 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 DeploymentStatePendingPreparedStackSupportedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStatePendingPreparedStackSupportedPlatform = ClosedEnum< typeof DeploymentStatePendingPreparedStackSupportedPlatform >; /** * A bag of resources, unaware of any cloud. */ export type DeploymentStatePendingPreparedStack = { /** * 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?: DeploymentStatePendingPreparedStackPermissions | undefined; /** * Map of resource IDs to their configurations and lifecycle settings */ resources: { [k: string]: DeploymentStatePendingPreparedStackResources }; /** * Which platforms this stack supports. When None, all platforms are supported. */ supportedPlatforms?: | Array | null | undefined; }; export type DeploymentStatePendingPreparedStackUnion = | DeploymentStatePendingPreparedStack | any; export const DeploymentStatePreparedStackTypeStringList = { StringList: "stringList", } as const; export type DeploymentStatePreparedStackTypeStringList = ClosedEnum< typeof DeploymentStatePreparedStackTypeStringList >; export type DeploymentStatePreparedStackDefaultStringList = { type: DeploymentStatePreparedStackTypeStringList; /** * String list default. */ value: Array; }; export const DeploymentStatePreparedStackTypeBoolean = { Boolean: "boolean", } as const; export type DeploymentStatePreparedStackTypeBoolean = ClosedEnum< typeof DeploymentStatePreparedStackTypeBoolean >; export type DeploymentStatePreparedStackDefaultBoolean = { type: DeploymentStatePreparedStackTypeBoolean; /** * Boolean default. */ value: boolean; }; export const DeploymentStatePreparedStackTypeNumber = { Number: "number", } as const; export type DeploymentStatePreparedStackTypeNumber = ClosedEnum< typeof DeploymentStatePreparedStackTypeNumber >; export type DeploymentStatePreparedStackDefaultNumber = { type: DeploymentStatePreparedStackTypeNumber; /** * Number default. */ value: string; }; export const DeploymentStatePreparedStackTypeString = { String: "string", } as const; export type DeploymentStatePreparedStackTypeString = ClosedEnum< typeof DeploymentStatePreparedStackTypeString >; export type DeploymentStatePreparedStackDefaultString = { type: DeploymentStatePreparedStackTypeString; /** * String default. */ value: string; }; export type DeploymentStatePreparedStackDefaultUnion = | DeploymentStatePreparedStackDefaultString | DeploymentStatePreparedStackDefaultNumber | DeploymentStatePreparedStackDefaultBoolean | DeploymentStatePreparedStackDefaultStringList | any; /** * Environment variable handling for a stack input mapping. */ export const DeploymentStatePreparedStackTypeEnvEnum = { Plain: "plain", Secret: "secret", } as const; /** * Environment variable handling for a stack input mapping. */ export type DeploymentStatePreparedStackTypeEnvEnum = ClosedEnum< typeof DeploymentStatePreparedStackTypeEnvEnum >; export type DeploymentStatePreparedStackTypeUnion = | DeploymentStatePreparedStackTypeEnvEnum | any; /** * How a resolved stack input is injected into runtime environment variables. */ export type DeploymentStatePreparedStackEnv = { /** * Environment variable name. */ name: string; /** * Target resource IDs or patterns. None means every env-capable resource. */ targetResources?: Array | null | undefined; type?: DeploymentStatePreparedStackTypeEnvEnum | any | null | undefined; }; /** * Primitive stack input kind. */ export const DeploymentStatePreparedStackKind = { String: "string", Secret: "secret", Number: "number", Integer: "integer", Boolean: "boolean", Enum: "enum", StringList: "stringList", } as const; /** * Primitive stack input kind. */ export type DeploymentStatePreparedStackKind = ClosedEnum< typeof DeploymentStatePreparedStackKind >; /** * Represents the target cloud platform. */ export const DeploymentStatePreparedStackPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStatePreparedStackPlatform = ClosedEnum< typeof DeploymentStatePreparedStackPlatform >; /** * Who can provide a stack input value. */ export const DeploymentStatePreparedStackProvidedBy = { Developer: "developer", Deployer: "deployer", } as const; /** * Who can provide a stack input value. */ export type DeploymentStatePreparedStackProvidedBy = ClosedEnum< typeof DeploymentStatePreparedStackProvidedBy >; /** * Portable stack input validation constraints. */ export type DeploymentStatePreparedStackValidation = { /** * 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 DeploymentStatePreparedStackValidationUnion = | DeploymentStatePreparedStackValidation | any; /** * Stack input definition serialized into a release stack. */ export type DeploymentStatePreparedStackInput = { default?: | DeploymentStatePreparedStackDefaultString | DeploymentStatePreparedStackDefaultNumber | DeploymentStatePreparedStackDefaultBoolean | DeploymentStatePreparedStackDefaultStringList | 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: DeploymentStatePreparedStackKind; /** * 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?: DeploymentStatePreparedStackValidation | any | null | undefined; }; export const DeploymentStatePreparedStackManagementEnum = { Auto: "auto", } as const; export type DeploymentStatePreparedStackManagementEnum = ClosedEnum< typeof DeploymentStatePreparedStackManagementEnum >; /** * AWS-specific binding specification */ export type DeploymentStatePreparedStackOverrideAwResource = { /** * 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 DeploymentStatePreparedStackOverrideAwStack = { /** * 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 DeploymentStatePreparedStackOverrideAwBinding = { /** * AWS-specific binding specification */ resource?: DeploymentStatePreparedStackOverrideAwResource | undefined; /** * AWS-specific binding specification */ stack?: DeploymentStatePreparedStackOverrideAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const DeploymentStatePreparedStackOverrideEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type DeploymentStatePreparedStackOverrideEffect = ClosedEnum< typeof DeploymentStatePreparedStackOverrideEffect >; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackOverrideAwGrant = { /** * 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 DeploymentStatePreparedStackOverrideAw = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackOverrideAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: DeploymentStatePreparedStackOverrideEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackOverrideAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type DeploymentStatePreparedStackOverrideAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type DeploymentStatePreparedStackOverrideAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePreparedStackOverrideAzureBinding = { /** * Azure-specific binding specification */ resource?: DeploymentStatePreparedStackOverrideAzureResource | undefined; /** * Azure-specific binding specification */ stack?: DeploymentStatePreparedStackOverrideAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackOverrideAzureGrant = { /** * 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 DeploymentStatePreparedStackOverrideAzure = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackOverrideAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackOverrideAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type DeploymentStatePreparedStackOverrideConditionResource = { expression: string; title: string; }; export type DeploymentStatePreparedStackOverrideResourceConditionUnion = | DeploymentStatePreparedStackOverrideConditionResource | any; /** * GCP-specific binding specification */ export type DeploymentStatePreparedStackOverrideGcpResource = { condition?: | DeploymentStatePreparedStackOverrideConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type DeploymentStatePreparedStackOverrideConditionStack = { expression: string; title: string; }; export type DeploymentStatePreparedStackOverrideStackConditionUnion = | DeploymentStatePreparedStackOverrideConditionStack | any; /** * GCP-specific binding specification */ export type DeploymentStatePreparedStackOverrideGcpStack = { condition?: | DeploymentStatePreparedStackOverrideConditionStack | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePreparedStackOverrideGcpBinding = { /** * GCP-specific binding specification */ resource?: DeploymentStatePreparedStackOverrideGcpResource | undefined; /** * GCP-specific binding specification */ stack?: DeploymentStatePreparedStackOverrideGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackOverrideGcpGrant = { /** * 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 DeploymentStatePreparedStackOverrideGcp = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackOverrideGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackOverrideGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type DeploymentStatePreparedStackOverridePlatforms = { /** * 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 DeploymentStatePreparedStackOverride = { /** * 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: DeploymentStatePreparedStackOverridePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type DeploymentStatePreparedStackOverrideUnion = | DeploymentStatePreparedStackOverride | string; export type DeploymentStatePreparedStackManagement2 = { /** * 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 DeploymentStatePreparedStackExtendAwResource = { /** * 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 DeploymentStatePreparedStackExtendAwStack = { /** * 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 DeploymentStatePreparedStackExtendAwBinding = { /** * AWS-specific binding specification */ resource?: DeploymentStatePreparedStackExtendAwResource | undefined; /** * AWS-specific binding specification */ stack?: DeploymentStatePreparedStackExtendAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const DeploymentStatePreparedStackExtendEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type DeploymentStatePreparedStackExtendEffect = ClosedEnum< typeof DeploymentStatePreparedStackExtendEffect >; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackExtendAwGrant = { /** * 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 DeploymentStatePreparedStackExtendAw = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackExtendAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: DeploymentStatePreparedStackExtendEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackExtendAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type DeploymentStatePreparedStackExtendAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type DeploymentStatePreparedStackExtendAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePreparedStackExtendAzureBinding = { /** * Azure-specific binding specification */ resource?: DeploymentStatePreparedStackExtendAzureResource | undefined; /** * Azure-specific binding specification */ stack?: DeploymentStatePreparedStackExtendAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackExtendAzureGrant = { /** * 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 DeploymentStatePreparedStackExtendAzure = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackExtendAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackExtendAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type DeploymentStatePreparedStackExtendConditionResource = { expression: string; title: string; }; export type DeploymentStatePreparedStackExtendResourceConditionUnion = | DeploymentStatePreparedStackExtendConditionResource | any; /** * GCP-specific binding specification */ export type DeploymentStatePreparedStackExtendGcpResource = { condition?: | DeploymentStatePreparedStackExtendConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type DeploymentStatePreparedStackExtendConditionStack = { expression: string; title: string; }; export type DeploymentStatePreparedStackExtendStackConditionUnion = | DeploymentStatePreparedStackExtendConditionStack | any; /** * GCP-specific binding specification */ export type DeploymentStatePreparedStackExtendGcpStack = { condition?: | DeploymentStatePreparedStackExtendConditionStack | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePreparedStackExtendGcpBinding = { /** * GCP-specific binding specification */ resource?: DeploymentStatePreparedStackExtendGcpResource | undefined; /** * GCP-specific binding specification */ stack?: DeploymentStatePreparedStackExtendGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackExtendGcpGrant = { /** * 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 DeploymentStatePreparedStackExtendGcp = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackExtendGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackExtendGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type DeploymentStatePreparedStackExtendPlatforms = { /** * 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 DeploymentStatePreparedStackExtend = { /** * 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: DeploymentStatePreparedStackExtendPlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type DeploymentStatePreparedStackExtendUnion = | DeploymentStatePreparedStackExtend | string; export type DeploymentStatePreparedStackManagement1 = { /** * 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 DeploymentStatePreparedStackManagementUnion = | DeploymentStatePreparedStackManagement1 | DeploymentStatePreparedStackManagement2 | DeploymentStatePreparedStackManagementEnum; /** * AWS-specific binding specification */ export type DeploymentStatePreparedStackProfileAwResource = { /** * 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 DeploymentStatePreparedStackProfileAwStack = { /** * 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 DeploymentStatePreparedStackProfileAwBinding = { /** * AWS-specific binding specification */ resource?: DeploymentStatePreparedStackProfileAwResource | undefined; /** * AWS-specific binding specification */ stack?: DeploymentStatePreparedStackProfileAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const DeploymentStatePreparedStackProfileEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type DeploymentStatePreparedStackProfileEffect = ClosedEnum< typeof DeploymentStatePreparedStackProfileEffect >; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackProfileAwGrant = { /** * 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 DeploymentStatePreparedStackProfileAw = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackProfileAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: DeploymentStatePreparedStackProfileEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackProfileAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type DeploymentStatePreparedStackProfileAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type DeploymentStatePreparedStackProfileAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePreparedStackProfileAzureBinding = { /** * Azure-specific binding specification */ resource?: DeploymentStatePreparedStackProfileAzureResource | undefined; /** * Azure-specific binding specification */ stack?: DeploymentStatePreparedStackProfileAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackProfileAzureGrant = { /** * 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 DeploymentStatePreparedStackProfileAzure = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackProfileAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackProfileAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type DeploymentStatePreparedStackProfileConditionResource = { expression: string; title: string; }; export type DeploymentStatePreparedStackProfileResourceConditionUnion = | DeploymentStatePreparedStackProfileConditionResource | any; /** * GCP-specific binding specification */ export type DeploymentStatePreparedStackProfileGcpResource = { condition?: | DeploymentStatePreparedStackProfileConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type DeploymentStatePreparedStackProfileConditionStack = { expression: string; title: string; }; export type DeploymentStatePreparedStackProfileStackConditionUnion = | DeploymentStatePreparedStackProfileConditionStack | any; /** * GCP-specific binding specification */ export type DeploymentStatePreparedStackProfileGcpStack = { condition?: | DeploymentStatePreparedStackProfileConditionStack | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type DeploymentStatePreparedStackProfileGcpBinding = { /** * GCP-specific binding specification */ resource?: DeploymentStatePreparedStackProfileGcpResource | undefined; /** * GCP-specific binding specification */ stack?: DeploymentStatePreparedStackProfileGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type DeploymentStatePreparedStackProfileGcpGrant = { /** * 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 DeploymentStatePreparedStackProfileGcp = { /** * Generic binding configuration for permissions */ binding: DeploymentStatePreparedStackProfileGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: DeploymentStatePreparedStackProfileGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type DeploymentStatePreparedStackProfilePlatforms = { /** * 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 DeploymentStatePreparedStackProfile = { /** * 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: DeploymentStatePreparedStackProfilePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type DeploymentStatePreparedStackProfileUnion = | DeploymentStatePreparedStackProfile | string; /** * Combined permissions configuration that contains both profiles and management */ export type DeploymentStatePreparedStackPermissions = { /** * Management permissions configuration for stack management access */ management?: | DeploymentStatePreparedStackManagement1 | DeploymentStatePreparedStackManagement2 | DeploymentStatePreparedStackManagementEnum | 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 DeploymentStatePreparedStackConfig = { /** * 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 DeploymentStatePreparedStackDependency = { 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 DeploymentStatePreparedStackLifecycle = { Frozen: "frozen", Live: "live", } as const; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export type DeploymentStatePreparedStackLifecycle = ClosedEnum< typeof DeploymentStatePreparedStackLifecycle >; export type DeploymentStatePreparedStackResources = { /** * 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: DeploymentStatePreparedStackConfig; /** * 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: DeploymentStatePreparedStackLifecycle; /** * 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 DeploymentStatePreparedStackSupportedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStatePreparedStackSupportedPlatform = ClosedEnum< typeof DeploymentStatePreparedStackSupportedPlatform >; /** * A bag of resources, unaware of any cloud. */ export type DeploymentStatePreparedStack = { /** * 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?: DeploymentStatePreparedStackPermissions | undefined; /** * Map of resource IDs to their configurations and lifecycle settings */ resources: { [k: string]: DeploymentStatePreparedStackResources }; /** * Which platforms this stack supports. When None, all platforms are supported. */ supportedPlatforms?: | Array | null | undefined; }; export type DeploymentStatePreparedStackUnion = | DeploymentStatePreparedStack | any; /** * One-shot authority for a setup re-import to replace setup-owned resources. */ export type DeploymentStateSetupUpdateAuthorization = { /** * Frozen resource projection from the last successful deployment. */ baselineFrozenDigest: string; /** * Unique revision used by persistence layers for compare-and-swap updates. */ nonce: string; /** * Release whose stack was prepared by setup. */ releaseId: string; /** * Exact setup artifact revision that authored this authority. */ setupFingerprint: string; /** * Setup fingerprint contract version. */ setupFingerprintVersion: number; /** * Stable setup target recorded on the imported deployment. */ setupTarget: string; /** * Frozen resource projection prepared by the setup re-import. */ targetFrozenDigest: string; }; export type DeploymentStateSetupUpdateAuthorizationUnion = | DeploymentStateSetupUpdateAuthorization | any; /** * Runtime metadata for deployment * * @remarks * * Stores deployment state that needs to persist across step calls. */ export type DeploymentStateRuntimeMetadata = { /** * Last generated CLI package revision whose direct setup was applied. * * @remarks * This lets a newer generated CLI refresh setup-owned infrastructure once * before handing runtime changes back to the hosted manager. */ directSetupRevision?: string | null | undefined; /** * Actor that owns structural work during the initial setup phase. */ initialSetupAuthority?: DeploymentStateInitialSetupAuthority | undefined; /** * Hash of the environment variables snapshot that was last synced to the vault * * @remarks * Used to avoid redundant sync operations during incremental deployment */ lastSyncedEnvVarsHash?: string | null | undefined; /** * Exact vault keys owned by the deployment secret synchronizer. This * * @remarks * inventory lets a later snapshot delete removed keys without listing or * touching unrelated values in the same vault. */ lastSyncedSecretNames?: Array | undefined; pendingPreparedStack?: | DeploymentStatePendingPreparedStack | any | null | undefined; /** * Canonical resolved answers for inputs that gate Frozen resources, * * @remarks * keyed by input id, recorded when the deployment is created or its * setup import registers. * * A frozen gate's answer is fixed for the deployment's lifetime: the * update path refuses input values that conflict with these, and a Live * resource sharing such an input resolves the persisted answer forever. */ persistedGateAnswers?: { [k: string]: boolean } | undefined; preparedStack?: DeploymentStatePreparedStack | any | null | undefined; /** * Whether cross-account registry access has been successfully granted. * * @remarks * Set to true after the manager successfully sets the ECR/GAR repo policy * for this deployment's target account. Prevents redundant API calls on * every reconcile tick. */ registryAccessGranted?: boolean | undefined; setupUpdateAuthorization?: | DeploymentStateSetupUpdateAuthorization | any | null | undefined; }; export type RuntimeMetadata = DeploymentStateRuntimeMetadata | any; /** * Represents the target cloud platform. */ export const DeploymentStateStackStatePlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStateStackStatePlatform = ClosedEnum< typeof DeploymentStateStackStatePlatform >; /** * 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 DeploymentStateStackStateConfig = { /** * 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; }; /** * Represents the target cloud platform. */ export const DeploymentStateControllerPlatformEnum = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentStateControllerPlatformEnum = ClosedEnum< typeof DeploymentStateControllerPlatformEnum >; export type DeploymentStateControllerPlatformUnion = | DeploymentStateControllerPlatformEnum | any; /** * Reference to a resource by its stable id and resource type. */ export type DeploymentStateStackStateDependency = { 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; }; /** * Canonical error container that provides a structured way to represent errors * * @remarks * with rich metadata including error codes, human-readable messages, context, * and chaining capabilities for error propagation. * * This struct is designed to be both machine-readable and user-friendly, * supporting serialization for API responses and detailed error reporting * in distributed systems. */ export type DeploymentStateStackStateError = { /** * A unique identifier for the type of error. * * @remarks * * This should be a short, machine-readable string that can be used * by clients to programmatically handle different error types. * Examples: "NOT_FOUND", "VALIDATION_ERROR", "TIMEOUT" */ code: string; /** * Additional diagnostic information about the error context. * * @remarks * * This optional field can contain structured data providing more details * about the error, such as validation errors, request parameters that * caused the issue, or other relevant context information. */ context?: any | null | undefined; /** * Optional human-facing remediation hint. */ hint?: string | null | undefined; /** * HTTP status code for this error. * * @remarks * * Used when converting the error to an HTTP response. If None, falls back to * the error type's default status code or 500. */ httpStatusCode?: number | null | undefined; /** * Indicates if this is an internal error that should not be exposed to users. * * @remarks * * When `true`, this error contains sensitive information or implementation * details that should not be shown to end-users. Such errors should be * logged for debugging but replaced with generic error messages in responses. */ internal: boolean; /** * Human-readable error message. * * @remarks * * This message should be clear and actionable for developers or end-users, * providing context about what went wrong and potentially how to fix it. */ message: string; /** * Indicates whether the operation that caused the error should be retried. * * @remarks * * When `true`, the error is transient and the operation might succeed * if attempted again. When `false`, retrying the same operation is * unlikely to succeed without changes. */ retryable?: boolean | undefined; /** * The underlying error that caused this error, creating an error chain. * * @remarks * * This allows for proper error propagation and debugging by maintaining * the full context of how an error occurred through multiple layers * of an application. */ source?: any | null | undefined; }; export type DeploymentStateStackStateErrorUnion = | DeploymentStateStackStateError | any; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export const DeploymentStateStackStateLifecycleEnum = { Frozen: "frozen", Live: "live", } as const; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export type DeploymentStateStackStateLifecycleEnum = ClosedEnum< typeof DeploymentStateStackStateLifecycleEnum >; export type DeploymentStateLifecycleUnion = | DeploymentStateStackStateLifecycleEnum | any; /** * Resource outputs that can hold output data for any resource type in the Alien system. All resource outputs share a common 'type' field with additional type-specific output properties. */ export type DeploymentStateOutputs = { /** * 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; }; export type DeploymentStateOutputsUnion = DeploymentStateOutputs | any; /** * 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 DeploymentStatePreviousConfig = { /** * 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; }; export type DeploymentStatePreviousConfigUnion = | DeploymentStatePreviousConfig | any; /** * Represents the high-level status of a resource during its lifecycle. */ export const DeploymentStateStackStateStatus = { Pending: "pending", Provisioning: "provisioning", ProvisionFailed: "provision-failed", Running: "running", Updating: "updating", UpdateFailed: "update-failed", Deleting: "deleting", DeleteFailed: "delete-failed", TeardownRequired: "teardown-required", Deleted: "deleted", RefreshFailed: "refresh-failed", } as const; /** * Represents the high-level status of a resource during its lifecycle. */ export type DeploymentStateStackStateStatus = ClosedEnum< typeof DeploymentStateStackStateStatus >; /** * Represents the state of a single resource within the stack for a specific platform. */ export type DeploymentStateStackStateResources = { /** * The platform-specific resource controller that manages this resource's lifecycle. * * @remarks * This is None when the resource status is Pending. * Stored as JSON to make the struct serializable and movable to alien-core. */ internal?: any | null | undefined; /** * 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: DeploymentStateStackStateConfig; controllerPlatform?: | DeploymentStateControllerPlatformEnum | any | null | undefined; /** * Complete list of dependencies for this resource, including infrastructure dependencies. * * @remarks * This preserves the full dependency information from the stack definition. */ dependencies?: Array | undefined; error?: DeploymentStateStackStateError | any | null | undefined; /** * Stores the controller state that failed, used for manual retry operations. * * @remarks * This allows resuming from the exact point where the failure occurred. * Stored as JSON to make the struct serializable and movable to alien-core. */ lastFailedState?: any | null | undefined; lifecycle?: DeploymentStateStackStateLifecycleEnum | any | null | undefined; outputs?: DeploymentStateOutputs | any | null | undefined; previousConfig?: DeploymentStatePreviousConfig | any | null | undefined; /** * Binding parameters for remote access. * * @remarks * Only populated when the resource has `remote_access: true` in its ResourceEntry. * This is the JSON serialization of the binding configuration (e.g., StorageBinding, VaultBinding). * Populated by controllers during provisioning using get_binding_params(). */ remoteBindingParams?: any | null | undefined; /** * Tracks consecutive retry attempts for the current state transition. */ retryAttempt?: number | undefined; /** * Represents the high-level status of a resource during its lifecycle. */ status: DeploymentStateStackStateStatus; /** * The high-level type of the resource (e.g., Worker::RESOURCE_TYPE, Storage::RESOURCE_TYPE). */ type: string; }; /** * Represents the collective state of all resources in a stack, including platform and pending actions. */ export type DeploymentStateStackState = { /** * Represents the target cloud platform. */ platform: DeploymentStateStackStatePlatform; /** * A prefix used for resource naming to ensure uniqueness across deployments. */ resourcePrefix: string; /** * The state of individual resources, keyed by resource ID. */ resources: { [k: string]: DeploymentStateStackStateResources }; }; export type StackState = DeploymentStateStackState | any; /** * Deployment status in the deployment lifecycle. * * @remarks * * For observe-only deployments with no release or stack state, `Running` * means the Operator is attached. Connectivity comes from `lastHeartbeatAt`; * resource health comes from inventory and resource heartbeat data. */ export const DeploymentStateStatus = { Pending: "pending", PreflightsFailed: "preflights-failed", InitialSetup: "initial-setup", InitialSetupFailed: "initial-setup-failed", Provisioning: "provisioning", WaitingForMachines: "waiting-for-machines", ProvisioningFailed: "provisioning-failed", Running: "running", RefreshFailed: "refresh-failed", UpdatePending: "update-pending", Updating: "updating", UpdateFailed: "update-failed", DeletePending: "delete-pending", Deleting: "deleting", DeleteFailed: "delete-failed", TeardownRequired: "teardown-required", TeardownFailed: "teardown-failed", Deleted: "deleted", Error: "error", } as const; /** * Deployment status in the deployment lifecycle. * * @remarks * * For observe-only deployments with no release or stack state, `Running` * means the Operator is attached. Connectivity comes from `lastHeartbeatAt`; * resource health comes from inventory and resource heartbeat data. */ export type DeploymentStateStatus = ClosedEnum; export const TargetReleaseTypeStringList = { StringList: "stringList", } as const; export type TargetReleaseTypeStringList = ClosedEnum< typeof TargetReleaseTypeStringList >; export type TargetReleaseDefaultStringList = { type: TargetReleaseTypeStringList; /** * String list default. */ value: Array; }; export const TargetReleaseTypeBoolean = { Boolean: "boolean", } as const; export type TargetReleaseTypeBoolean = ClosedEnum< typeof TargetReleaseTypeBoolean >; export type TargetReleaseDefaultBoolean = { type: TargetReleaseTypeBoolean; /** * Boolean default. */ value: boolean; }; export const TargetReleaseTypeNumber = { Number: "number", } as const; export type TargetReleaseTypeNumber = ClosedEnum< typeof TargetReleaseTypeNumber >; export type TargetReleaseDefaultNumber = { type: TargetReleaseTypeNumber; /** * Number default. */ value: string; }; export const TargetReleaseTypeString = { String: "string", } as const; export type TargetReleaseTypeString = ClosedEnum< typeof TargetReleaseTypeString >; export type TargetReleaseDefaultString = { type: TargetReleaseTypeString; /** * String default. */ value: string; }; export type TargetReleaseDefaultUnion = | TargetReleaseDefaultString | TargetReleaseDefaultNumber | TargetReleaseDefaultBoolean | TargetReleaseDefaultStringList | any; /** * Environment variable handling for a stack input mapping. */ export const TargetReleaseTypeEnvEnum = { Plain: "plain", Secret: "secret", } as const; /** * Environment variable handling for a stack input mapping. */ export type TargetReleaseTypeEnvEnum = ClosedEnum< typeof TargetReleaseTypeEnvEnum >; export type TargetReleaseTypeUnion = TargetReleaseTypeEnvEnum | any; /** * How a resolved stack input is injected into runtime environment variables. */ export type TargetReleaseEnv = { /** * Environment variable name. */ name: string; /** * Target resource IDs or patterns. None means every env-capable resource. */ targetResources?: Array | null | undefined; type?: TargetReleaseTypeEnvEnum | any | null | undefined; }; /** * Primitive stack input kind. */ export const TargetReleaseKind = { String: "string", Secret: "secret", Number: "number", Integer: "integer", Boolean: "boolean", Enum: "enum", StringList: "stringList", } as const; /** * Primitive stack input kind. */ export type TargetReleaseKind = ClosedEnum; /** * Represents the target cloud platform. */ export const TargetReleasePlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type TargetReleasePlatform = ClosedEnum; /** * Who can provide a stack input value. */ export const TargetReleaseProvidedBy = { Developer: "developer", Deployer: "deployer", } as const; /** * Who can provide a stack input value. */ export type TargetReleaseProvidedBy = ClosedEnum< typeof TargetReleaseProvidedBy >; /** * Portable stack input validation constraints. */ export type TargetReleaseValidation = { /** * 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 TargetReleaseValidationUnion = TargetReleaseValidation | any; /** * Stack input definition serialized into a release stack. */ export type TargetReleaseInput = { default?: | TargetReleaseDefaultString | TargetReleaseDefaultNumber | TargetReleaseDefaultBoolean | TargetReleaseDefaultStringList | 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: TargetReleaseKind; /** * 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?: TargetReleaseValidation | any | null | undefined; }; export const TargetReleaseManagementEnum = { Auto: "auto", } as const; export type TargetReleaseManagementEnum = ClosedEnum< typeof TargetReleaseManagementEnum >; /** * AWS-specific binding specification */ export type TargetReleaseOverrideAwResource = { /** * 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 TargetReleaseOverrideAwStack = { /** * 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 TargetReleaseOverrideAwBinding = { /** * AWS-specific binding specification */ resource?: TargetReleaseOverrideAwResource | undefined; /** * AWS-specific binding specification */ stack?: TargetReleaseOverrideAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const TargetReleaseOverrideEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type TargetReleaseOverrideEffect = ClosedEnum< typeof TargetReleaseOverrideEffect >; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseOverrideAwGrant = { /** * 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 TargetReleaseOverrideAw = { /** * Generic binding configuration for permissions */ binding: TargetReleaseOverrideAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: TargetReleaseOverrideEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseOverrideAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type TargetReleaseOverrideAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type TargetReleaseOverrideAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type TargetReleaseOverrideAzureBinding = { /** * Azure-specific binding specification */ resource?: TargetReleaseOverrideAzureResource | undefined; /** * Azure-specific binding specification */ stack?: TargetReleaseOverrideAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseOverrideAzureGrant = { /** * 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 TargetReleaseOverrideAzure = { /** * Generic binding configuration for permissions */ binding: TargetReleaseOverrideAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseOverrideAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type TargetReleaseOverrideConditionResource = { expression: string; title: string; }; export type TargetReleaseOverrideResourceConditionUnion = | TargetReleaseOverrideConditionResource | any; /** * GCP-specific binding specification */ export type TargetReleaseOverrideGcpResource = { condition?: TargetReleaseOverrideConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type TargetReleaseOverrideCondition = { expression: string; title: string; }; export type TargetReleaseOverrideConditionUnion = | TargetReleaseOverrideCondition | any; /** * GCP-specific binding specification */ export type TargetReleaseOverrideGcpStack = { condition?: TargetReleaseOverrideCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type TargetReleaseOverrideGcpBinding = { /** * GCP-specific binding specification */ resource?: TargetReleaseOverrideGcpResource | undefined; /** * GCP-specific binding specification */ stack?: TargetReleaseOverrideGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseOverrideGcpGrant = { /** * 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 TargetReleaseOverrideGcp = { /** * Generic binding configuration for permissions */ binding: TargetReleaseOverrideGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseOverrideGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type TargetReleaseOverridePlatforms = { /** * 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 TargetReleaseOverride = { /** * 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: TargetReleaseOverridePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type TargetReleaseOverrideUnion = TargetReleaseOverride | string; export type TargetReleaseManagement2 = { /** * 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 TargetReleaseExtendAwResource = { /** * 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 TargetReleaseExtendAwStack = { /** * 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 TargetReleaseExtendAwBinding = { /** * AWS-specific binding specification */ resource?: TargetReleaseExtendAwResource | undefined; /** * AWS-specific binding specification */ stack?: TargetReleaseExtendAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const TargetReleaseExtendEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type TargetReleaseExtendEffect = ClosedEnum< typeof TargetReleaseExtendEffect >; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseExtendAwGrant = { /** * 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 TargetReleaseExtendAw = { /** * Generic binding configuration for permissions */ binding: TargetReleaseExtendAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: TargetReleaseExtendEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseExtendAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type TargetReleaseExtendAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type TargetReleaseExtendAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type TargetReleaseExtendAzureBinding = { /** * Azure-specific binding specification */ resource?: TargetReleaseExtendAzureResource | undefined; /** * Azure-specific binding specification */ stack?: TargetReleaseExtendAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseExtendAzureGrant = { /** * 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 TargetReleaseExtendAzure = { /** * Generic binding configuration for permissions */ binding: TargetReleaseExtendAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseExtendAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type TargetReleaseExtendConditionResource = { expression: string; title: string; }; export type TargetReleaseExtendResourceConditionUnion = | TargetReleaseExtendConditionResource | any; /** * GCP-specific binding specification */ export type TargetReleaseExtendGcpResource = { condition?: TargetReleaseExtendConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type TargetReleaseExtendCondition = { expression: string; title: string; }; export type TargetReleaseExtendConditionUnion = | TargetReleaseExtendCondition | any; /** * GCP-specific binding specification */ export type TargetReleaseExtendGcpStack = { condition?: TargetReleaseExtendCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type TargetReleaseExtendGcpBinding = { /** * GCP-specific binding specification */ resource?: TargetReleaseExtendGcpResource | undefined; /** * GCP-specific binding specification */ stack?: TargetReleaseExtendGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseExtendGcpGrant = { /** * 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 TargetReleaseExtendGcp = { /** * Generic binding configuration for permissions */ binding: TargetReleaseExtendGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseExtendGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type TargetReleaseExtendPlatforms = { /** * 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 TargetReleaseExtend = { /** * 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: TargetReleaseExtendPlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type TargetReleaseExtendUnion = TargetReleaseExtend | string; export type TargetReleaseManagement1 = { /** * 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 TargetReleaseManagementUnion = | TargetReleaseManagement1 | TargetReleaseManagement2 | TargetReleaseManagementEnum; /** * AWS-specific binding specification */ export type TargetReleaseProfileAwResource = { /** * 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 TargetReleaseProfileAwStack = { /** * 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 TargetReleaseProfileAwBinding = { /** * AWS-specific binding specification */ resource?: TargetReleaseProfileAwResource | undefined; /** * AWS-specific binding specification */ stack?: TargetReleaseProfileAwStack | undefined; }; /** * IAM effect. Defaults to Allow. */ export const TargetReleaseProfileEffect = { Allow: "Allow", Deny: "Deny", } as const; /** * IAM effect. Defaults to Allow. */ export type TargetReleaseProfileEffect = ClosedEnum< typeof TargetReleaseProfileEffect >; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseProfileAwGrant = { /** * 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 TargetReleaseProfileAw = { /** * Generic binding configuration for permissions */ binding: TargetReleaseProfileAwBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * IAM effect. Defaults to Allow. */ effect?: TargetReleaseProfileEffect | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseProfileAwGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Azure-specific binding specification */ export type TargetReleaseProfileAzureResource = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Azure-specific binding specification */ export type TargetReleaseProfileAzureStack = { /** * Scope (subscription/resource group/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type TargetReleaseProfileAzureBinding = { /** * Azure-specific binding specification */ resource?: TargetReleaseProfileAzureResource | undefined; /** * Azure-specific binding specification */ stack?: TargetReleaseProfileAzureStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseProfileAzureGrant = { /** * 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 TargetReleaseProfileAzure = { /** * Generic binding configuration for permissions */ binding: TargetReleaseProfileAzureBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseProfileAzureGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * GCP IAM condition */ export type TargetReleaseProfileConditionResource = { expression: string; title: string; }; export type TargetReleaseProfileResourceConditionUnion = | TargetReleaseProfileConditionResource | any; /** * GCP-specific binding specification */ export type TargetReleaseProfileGcpResource = { condition?: TargetReleaseProfileConditionResource | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * GCP IAM condition */ export type TargetReleaseProfileCondition = { expression: string; title: string; }; export type TargetReleaseProfileConditionUnion = | TargetReleaseProfileCondition | any; /** * GCP-specific binding specification */ export type TargetReleaseProfileGcpStack = { condition?: TargetReleaseProfileCondition | any | null | undefined; /** * Scope (project/resource level) */ scope: string; }; /** * Generic binding configuration for permissions */ export type TargetReleaseProfileGcpBinding = { /** * GCP-specific binding specification */ resource?: TargetReleaseProfileGcpResource | undefined; /** * GCP-specific binding specification */ stack?: TargetReleaseProfileGcpStack | undefined; }; /** * Grant permissions for a specific cloud platform */ export type TargetReleaseProfileGcpGrant = { /** * 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 TargetReleaseProfileGcp = { /** * Generic binding configuration for permissions */ binding: TargetReleaseProfileGcpBinding; /** * Short admin-facing description of why this entry exists. */ description?: string | null | undefined; /** * Grant permissions for a specific cloud platform */ grant: TargetReleaseProfileGcpGrant; /** * Stable admin-facing label for this permission entry. */ label?: string | null | undefined; }; /** * Platform-specific permission configurations */ export type TargetReleaseProfilePlatforms = { /** * 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 TargetReleaseProfile = { /** * 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: TargetReleaseProfilePlatforms; }; /** * Reference to a permission set - either by name or inline definition */ export type TargetReleaseProfileUnion = TargetReleaseProfile | string; /** * Combined permissions configuration that contains both profiles and management */ export type TargetReleasePermissions = { /** * Management permissions configuration for stack management access */ management?: | TargetReleaseManagement1 | TargetReleaseManagement2 | TargetReleaseManagementEnum | 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 TargetReleaseConfig = { /** * 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 TargetReleaseDependency = { 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 TargetReleaseLifecycle = { Frozen: "frozen", Live: "live", } as const; /** * Describes the lifecycle of a resource within a stack, determining how it's managed and deployed. */ export type TargetReleaseLifecycle = ClosedEnum; export type TargetReleaseResources = { /** * 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: TargetReleaseConfig; /** * 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: TargetReleaseLifecycle; /** * 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 TargetReleaseSupportedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type TargetReleaseSupportedPlatform = ClosedEnum< typeof TargetReleaseSupportedPlatform >; /** * A bag of resources, unaware of any cloud. */ export type TargetReleaseStack = { /** * 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?: TargetReleasePermissions | undefined; /** * Map of resource IDs to their configurations and lifecycle settings */ resources: { [k: string]: TargetReleaseResources }; /** * Which platforms this stack supports. When None, all platforms are supported. */ supportedPlatforms?: Array | null | undefined; }; /** * Release metadata * * @remarks * * Identifies a specific release version and includes the stack definition. * The deployment engine uses this to track which release is currently deployed * and which is the target. */ export type TargetRelease = { /** * Short description of the release */ description?: string | null | undefined; /** * Release ID (e.g., rel_xyz). `None` for an observe deployment, which has no * * @remarks * Alien-assigned release — the platform resolves a release from `version`. */ releaseId?: string | null | undefined; /** * A bag of resources, unaware of any cloud. */ stack: TargetReleaseStack; /** * Version string (e.g., 2.1.0) */ version?: string | null | undefined; }; export type TargetReleaseUnion = TargetRelease | any; /** * Current deployment state (includes releases) */ export type DeploymentState = { currentRelease?: CurrentRelease | any | null | undefined; environmentInfo?: | DeploymentStateEnvironmentInfoGcp | DeploymentStateEnvironmentInfoAzure | DeploymentStateEnvironmentInfoLocal | DeploymentStateEnvironmentInfoAws | DeploymentStateEnvironmentInfoTest | any | null | undefined; error?: DeploymentStateError | any | null | undefined; /** * Represents the target cloud platform. */ platform: DeploymentStatePlatform; /** * Protocol version for cross-actor compatibility. * * @remarks * All actors (manager, push client, agent) check this before stepping. * Mismatched versions produce a clear error instead of silent corruption. * See docs/02-manager/10-deployment-protocol.md. */ protocolVersion: number; /** * Whether a retry has been requested for a failed deployment * * @remarks * When true and status is a failed state, the deployment system will retry failed resources */ retryRequested?: boolean | undefined; runtimeMetadata?: DeploymentStateRuntimeMetadata | any | null | undefined; stackState?: DeploymentStateStackState | any | null | undefined; /** * Deployment status in the deployment lifecycle. * * @remarks * * For observe-only deployments with no release or stack state, `Running` * means the Operator is attached. Connectivity comes from `lastHeartbeatAt`; * resource health comes from inventory and resource heartbeat data. */ status: DeploymentStateStatus; targetRelease?: TargetRelease | any | null | undefined; }; /** @internal */ export const CurrentReleaseTypeStringList$inboundSchema: z.ZodEnum< typeof CurrentReleaseTypeStringList > = z.enum(CurrentReleaseTypeStringList); /** @internal */ export const CurrentReleaseTypeStringList$outboundSchema: z.ZodEnum< typeof CurrentReleaseTypeStringList > = CurrentReleaseTypeStringList$inboundSchema; /** @internal */ export const CurrentReleaseDefaultStringList$inboundSchema: z.ZodType< CurrentReleaseDefaultStringList, unknown > = z.object({ type: CurrentReleaseTypeStringList$inboundSchema, value: z.array(z.string()), }); /** @internal */ export type CurrentReleaseDefaultStringList$Outbound = { type: string; value: Array; }; /** @internal */ export const CurrentReleaseDefaultStringList$outboundSchema: z.ZodType< CurrentReleaseDefaultStringList$Outbound, CurrentReleaseDefaultStringList > = z.object({ type: CurrentReleaseTypeStringList$outboundSchema, value: z.array(z.string()), }); export function currentReleaseDefaultStringListToJSON( currentReleaseDefaultStringList: CurrentReleaseDefaultStringList, ): string { return JSON.stringify( CurrentReleaseDefaultStringList$outboundSchema.parse( currentReleaseDefaultStringList, ), ); } export function currentReleaseDefaultStringListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseDefaultStringList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseDefaultStringList' from JSON`, ); } /** @internal */ export const CurrentReleaseTypeBoolean$inboundSchema: z.ZodEnum< typeof CurrentReleaseTypeBoolean > = z.enum(CurrentReleaseTypeBoolean); /** @internal */ export const CurrentReleaseTypeBoolean$outboundSchema: z.ZodEnum< typeof CurrentReleaseTypeBoolean > = CurrentReleaseTypeBoolean$inboundSchema; /** @internal */ export const CurrentReleaseDefaultBoolean$inboundSchema: z.ZodType< CurrentReleaseDefaultBoolean, unknown > = z.object({ type: CurrentReleaseTypeBoolean$inboundSchema, value: z.boolean(), }); /** @internal */ export type CurrentReleaseDefaultBoolean$Outbound = { type: string; value: boolean; }; /** @internal */ export const CurrentReleaseDefaultBoolean$outboundSchema: z.ZodType< CurrentReleaseDefaultBoolean$Outbound, CurrentReleaseDefaultBoolean > = z.object({ type: CurrentReleaseTypeBoolean$outboundSchema, value: z.boolean(), }); export function currentReleaseDefaultBooleanToJSON( currentReleaseDefaultBoolean: CurrentReleaseDefaultBoolean, ): string { return JSON.stringify( CurrentReleaseDefaultBoolean$outboundSchema.parse( currentReleaseDefaultBoolean, ), ); } export function currentReleaseDefaultBooleanFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseDefaultBoolean$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseDefaultBoolean' from JSON`, ); } /** @internal */ export const CurrentReleaseTypeNumber$inboundSchema: z.ZodEnum< typeof CurrentReleaseTypeNumber > = z.enum(CurrentReleaseTypeNumber); /** @internal */ export const CurrentReleaseTypeNumber$outboundSchema: z.ZodEnum< typeof CurrentReleaseTypeNumber > = CurrentReleaseTypeNumber$inboundSchema; /** @internal */ export const CurrentReleaseDefaultNumber$inboundSchema: z.ZodType< CurrentReleaseDefaultNumber, unknown > = z.object({ type: CurrentReleaseTypeNumber$inboundSchema, value: z.string(), }); /** @internal */ export type CurrentReleaseDefaultNumber$Outbound = { type: string; value: string; }; /** @internal */ export const CurrentReleaseDefaultNumber$outboundSchema: z.ZodType< CurrentReleaseDefaultNumber$Outbound, CurrentReleaseDefaultNumber > = z.object({ type: CurrentReleaseTypeNumber$outboundSchema, value: z.string(), }); export function currentReleaseDefaultNumberToJSON( currentReleaseDefaultNumber: CurrentReleaseDefaultNumber, ): string { return JSON.stringify( CurrentReleaseDefaultNumber$outboundSchema.parse( currentReleaseDefaultNumber, ), ); } export function currentReleaseDefaultNumberFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseDefaultNumber$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseDefaultNumber' from JSON`, ); } /** @internal */ export const CurrentReleaseTypeString$inboundSchema: z.ZodEnum< typeof CurrentReleaseTypeString > = z.enum(CurrentReleaseTypeString); /** @internal */ export const CurrentReleaseTypeString$outboundSchema: z.ZodEnum< typeof CurrentReleaseTypeString > = CurrentReleaseTypeString$inboundSchema; /** @internal */ export const CurrentReleaseDefaultString$inboundSchema: z.ZodType< CurrentReleaseDefaultString, unknown > = z.object({ type: CurrentReleaseTypeString$inboundSchema, value: z.string(), }); /** @internal */ export type CurrentReleaseDefaultString$Outbound = { type: string; value: string; }; /** @internal */ export const CurrentReleaseDefaultString$outboundSchema: z.ZodType< CurrentReleaseDefaultString$Outbound, CurrentReleaseDefaultString > = z.object({ type: CurrentReleaseTypeString$outboundSchema, value: z.string(), }); export function currentReleaseDefaultStringToJSON( currentReleaseDefaultString: CurrentReleaseDefaultString, ): string { return JSON.stringify( CurrentReleaseDefaultString$outboundSchema.parse( currentReleaseDefaultString, ), ); } export function currentReleaseDefaultStringFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseDefaultString$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseDefaultString' from JSON`, ); } /** @internal */ export const CurrentReleaseDefaultUnion$inboundSchema: z.ZodType< CurrentReleaseDefaultUnion, unknown > = z.union([ z.lazy(() => CurrentReleaseDefaultString$inboundSchema), z.lazy(() => CurrentReleaseDefaultNumber$inboundSchema), z.lazy(() => CurrentReleaseDefaultBoolean$inboundSchema), z.lazy(() => CurrentReleaseDefaultStringList$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseDefaultUnion$Outbound = | CurrentReleaseDefaultString$Outbound | CurrentReleaseDefaultNumber$Outbound | CurrentReleaseDefaultBoolean$Outbound | CurrentReleaseDefaultStringList$Outbound | any; /** @internal */ export const CurrentReleaseDefaultUnion$outboundSchema: z.ZodType< CurrentReleaseDefaultUnion$Outbound, CurrentReleaseDefaultUnion > = z.union([ z.lazy(() => CurrentReleaseDefaultString$outboundSchema), z.lazy(() => CurrentReleaseDefaultNumber$outboundSchema), z.lazy(() => CurrentReleaseDefaultBoolean$outboundSchema), z.lazy(() => CurrentReleaseDefaultStringList$outboundSchema), z.any(), ]); export function currentReleaseDefaultUnionToJSON( currentReleaseDefaultUnion: CurrentReleaseDefaultUnion, ): string { return JSON.stringify( CurrentReleaseDefaultUnion$outboundSchema.parse(currentReleaseDefaultUnion), ); } export function currentReleaseDefaultUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseDefaultUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseDefaultUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseTypeEnvEnum$inboundSchema: z.ZodEnum< typeof CurrentReleaseTypeEnvEnum > = z.enum(CurrentReleaseTypeEnvEnum); /** @internal */ export const CurrentReleaseTypeEnvEnum$outboundSchema: z.ZodEnum< typeof CurrentReleaseTypeEnvEnum > = CurrentReleaseTypeEnvEnum$inboundSchema; /** @internal */ export const CurrentReleaseTypeUnion$inboundSchema: z.ZodType< CurrentReleaseTypeUnion, unknown > = z.union([CurrentReleaseTypeEnvEnum$inboundSchema, z.any()]); /** @internal */ export type CurrentReleaseTypeUnion$Outbound = string | any; /** @internal */ export const CurrentReleaseTypeUnion$outboundSchema: z.ZodType< CurrentReleaseTypeUnion$Outbound, CurrentReleaseTypeUnion > = z.union([CurrentReleaseTypeEnvEnum$outboundSchema, z.any()]); export function currentReleaseTypeUnionToJSON( currentReleaseTypeUnion: CurrentReleaseTypeUnion, ): string { return JSON.stringify( CurrentReleaseTypeUnion$outboundSchema.parse(currentReleaseTypeUnion), ); } export function currentReleaseTypeUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseTypeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseTypeUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseEnv$inboundSchema: z.ZodType< CurrentReleaseEnv, unknown > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable(z.union([CurrentReleaseTypeEnvEnum$inboundSchema, z.any()])) .optional(), }); /** @internal */ export type CurrentReleaseEnv$Outbound = { name: string; targetResources?: Array | null | undefined; type?: string | any | null | undefined; }; /** @internal */ export const CurrentReleaseEnv$outboundSchema: z.ZodType< CurrentReleaseEnv$Outbound, CurrentReleaseEnv > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable(z.union([CurrentReleaseTypeEnvEnum$outboundSchema, z.any()])) .optional(), }); export function currentReleaseEnvToJSON( currentReleaseEnv: CurrentReleaseEnv, ): string { return JSON.stringify( CurrentReleaseEnv$outboundSchema.parse(currentReleaseEnv), ); } export function currentReleaseEnvFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseEnv$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseEnv' from JSON`, ); } /** @internal */ export const CurrentReleaseKind$inboundSchema: z.ZodEnum< typeof CurrentReleaseKind > = z.enum(CurrentReleaseKind); /** @internal */ export const CurrentReleaseKind$outboundSchema: z.ZodEnum< typeof CurrentReleaseKind > = CurrentReleaseKind$inboundSchema; /** @internal */ export const CurrentReleasePlatform$inboundSchema: z.ZodEnum< typeof CurrentReleasePlatform > = z.enum(CurrentReleasePlatform); /** @internal */ export const CurrentReleasePlatform$outboundSchema: z.ZodEnum< typeof CurrentReleasePlatform > = CurrentReleasePlatform$inboundSchema; /** @internal */ export const CurrentReleaseProvidedBy$inboundSchema: z.ZodEnum< typeof CurrentReleaseProvidedBy > = z.enum(CurrentReleaseProvidedBy); /** @internal */ export const CurrentReleaseProvidedBy$outboundSchema: z.ZodEnum< typeof CurrentReleaseProvidedBy > = CurrentReleaseProvidedBy$inboundSchema; /** @internal */ export const CurrentReleaseValidation$inboundSchema: z.ZodType< CurrentReleaseValidation, 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(), }); /** @internal */ export type CurrentReleaseValidation$Outbound = { format?: string | null | undefined; max?: string | null | undefined; maxItems?: number | null | undefined; maxLength?: number | null | undefined; min?: string | null | undefined; minItems?: number | null | undefined; minLength?: number | null | undefined; pattern?: string | null | undefined; values?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseValidation$outboundSchema: z.ZodType< CurrentReleaseValidation$Outbound, CurrentReleaseValidation > = 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 currentReleaseValidationToJSON( currentReleaseValidation: CurrentReleaseValidation, ): string { return JSON.stringify( CurrentReleaseValidation$outboundSchema.parse(currentReleaseValidation), ); } export function currentReleaseValidationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseValidation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseValidation' from JSON`, ); } /** @internal */ export const CurrentReleaseValidationUnion$inboundSchema: z.ZodType< CurrentReleaseValidationUnion, unknown > = z.union([z.lazy(() => CurrentReleaseValidation$inboundSchema), z.any()]); /** @internal */ export type CurrentReleaseValidationUnion$Outbound = | CurrentReleaseValidation$Outbound | any; /** @internal */ export const CurrentReleaseValidationUnion$outboundSchema: z.ZodType< CurrentReleaseValidationUnion$Outbound, CurrentReleaseValidationUnion > = z.union([z.lazy(() => CurrentReleaseValidation$outboundSchema), z.any()]); export function currentReleaseValidationUnionToJSON( currentReleaseValidationUnion: CurrentReleaseValidationUnion, ): string { return JSON.stringify( CurrentReleaseValidationUnion$outboundSchema.parse( currentReleaseValidationUnion, ), ); } export function currentReleaseValidationUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseValidationUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseValidationUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseInput$inboundSchema: z.ZodType< CurrentReleaseInput, unknown > = z.object({ default: z.nullable( z.union([ z.lazy(() => CurrentReleaseDefaultString$inboundSchema), z.lazy(() => CurrentReleaseDefaultNumber$inboundSchema), z.lazy(() => CurrentReleaseDefaultBoolean$inboundSchema), z.lazy(() => CurrentReleaseDefaultStringList$inboundSchema), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => CurrentReleaseEnv$inboundSchema)).optional(), id: z.string(), kind: CurrentReleaseKind$inboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable(z.array(CurrentReleasePlatform$inboundSchema)) .optional(), providedBy: z.array(CurrentReleaseProvidedBy$inboundSchema), required: z.boolean(), validation: z.nullable( z.union([z.lazy(() => CurrentReleaseValidation$inboundSchema), z.any()]), ).optional(), }); /** @internal */ export type CurrentReleaseInput$Outbound = { default?: | CurrentReleaseDefaultString$Outbound | CurrentReleaseDefaultNumber$Outbound | CurrentReleaseDefaultBoolean$Outbound | CurrentReleaseDefaultStringList$Outbound | any | null | undefined; description: string; env?: Array | undefined; id: string; kind: string; label: string; placeholder?: string | null | undefined; platforms?: Array | null | undefined; providedBy: Array; required: boolean; validation?: CurrentReleaseValidation$Outbound | any | null | undefined; }; /** @internal */ export const CurrentReleaseInput$outboundSchema: z.ZodType< CurrentReleaseInput$Outbound, CurrentReleaseInput > = z.object({ default: z.nullable( z.union([ z.lazy(() => CurrentReleaseDefaultString$outboundSchema), z.lazy(() => CurrentReleaseDefaultNumber$outboundSchema), z.lazy(() => CurrentReleaseDefaultBoolean$outboundSchema), z.lazy(() => CurrentReleaseDefaultStringList$outboundSchema), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => CurrentReleaseEnv$outboundSchema)).optional(), id: z.string(), kind: CurrentReleaseKind$outboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable(z.array(CurrentReleasePlatform$outboundSchema)) .optional(), providedBy: z.array(CurrentReleaseProvidedBy$outboundSchema), required: z.boolean(), validation: z.nullable( z.union([z.lazy(() => CurrentReleaseValidation$outboundSchema), z.any()]), ).optional(), }); export function currentReleaseInputToJSON( currentReleaseInput: CurrentReleaseInput, ): string { return JSON.stringify( CurrentReleaseInput$outboundSchema.parse(currentReleaseInput), ); } export function currentReleaseInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseInput' from JSON`, ); } /** @internal */ export const CurrentReleaseManagementEnum$inboundSchema: z.ZodEnum< typeof CurrentReleaseManagementEnum > = z.enum(CurrentReleaseManagementEnum); /** @internal */ export const CurrentReleaseManagementEnum$outboundSchema: z.ZodEnum< typeof CurrentReleaseManagementEnum > = CurrentReleaseManagementEnum$inboundSchema; /** @internal */ export const CurrentReleaseOverrideAwResource$inboundSchema: z.ZodType< CurrentReleaseOverrideAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type CurrentReleaseOverrideAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const CurrentReleaseOverrideAwResource$outboundSchema: z.ZodType< CurrentReleaseOverrideAwResource$Outbound, CurrentReleaseOverrideAwResource > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function currentReleaseOverrideAwResourceToJSON( currentReleaseOverrideAwResource: CurrentReleaseOverrideAwResource, ): string { return JSON.stringify( CurrentReleaseOverrideAwResource$outboundSchema.parse( currentReleaseOverrideAwResource, ), ); } export function currentReleaseOverrideAwResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAwResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAwResource' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAwStack$inboundSchema: z.ZodType< CurrentReleaseOverrideAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type CurrentReleaseOverrideAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const CurrentReleaseOverrideAwStack$outboundSchema: z.ZodType< CurrentReleaseOverrideAwStack$Outbound, CurrentReleaseOverrideAwStack > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function currentReleaseOverrideAwStackToJSON( currentReleaseOverrideAwStack: CurrentReleaseOverrideAwStack, ): string { return JSON.stringify( CurrentReleaseOverrideAwStack$outboundSchema.parse( currentReleaseOverrideAwStack, ), ); } export function currentReleaseOverrideAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAwStack' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAwBinding$inboundSchema: z.ZodType< CurrentReleaseOverrideAwBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseOverrideAwResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseOverrideAwStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseOverrideAwBinding$Outbound = { resource?: CurrentReleaseOverrideAwResource$Outbound | undefined; stack?: CurrentReleaseOverrideAwStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseOverrideAwBinding$outboundSchema: z.ZodType< CurrentReleaseOverrideAwBinding$Outbound, CurrentReleaseOverrideAwBinding > = z.object({ resource: z.lazy(() => CurrentReleaseOverrideAwResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseOverrideAwStack$outboundSchema).optional(), }); export function currentReleaseOverrideAwBindingToJSON( currentReleaseOverrideAwBinding: CurrentReleaseOverrideAwBinding, ): string { return JSON.stringify( CurrentReleaseOverrideAwBinding$outboundSchema.parse( currentReleaseOverrideAwBinding, ), ); } export function currentReleaseOverrideAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAwBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideEffect$inboundSchema: z.ZodEnum< typeof CurrentReleaseOverrideEffect > = z.enum(CurrentReleaseOverrideEffect); /** @internal */ export const CurrentReleaseOverrideEffect$outboundSchema: z.ZodEnum< typeof CurrentReleaseOverrideEffect > = CurrentReleaseOverrideEffect$inboundSchema; /** @internal */ export const CurrentReleaseOverrideAwGrant$inboundSchema: z.ZodType< CurrentReleaseOverrideAwGrant, 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(), }); /** @internal */ export type CurrentReleaseOverrideAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseOverrideAwGrant$outboundSchema: z.ZodType< CurrentReleaseOverrideAwGrant$Outbound, CurrentReleaseOverrideAwGrant > = 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 currentReleaseOverrideAwGrantToJSON( currentReleaseOverrideAwGrant: CurrentReleaseOverrideAwGrant, ): string { return JSON.stringify( CurrentReleaseOverrideAwGrant$outboundSchema.parse( currentReleaseOverrideAwGrant, ), ); } export function currentReleaseOverrideAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAwGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAw$inboundSchema: z.ZodType< CurrentReleaseOverrideAw, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseOverrideAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: CurrentReleaseOverrideEffect$inboundSchema.optional(), grant: z.lazy(() => CurrentReleaseOverrideAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseOverrideAw$Outbound = { binding: CurrentReleaseOverrideAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: CurrentReleaseOverrideAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseOverrideAw$outboundSchema: z.ZodType< CurrentReleaseOverrideAw$Outbound, CurrentReleaseOverrideAw > = z.object({ binding: z.lazy(() => CurrentReleaseOverrideAwBinding$outboundSchema), description: z.nullable(z.string()).optional(), effect: CurrentReleaseOverrideEffect$outboundSchema.optional(), grant: z.lazy(() => CurrentReleaseOverrideAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseOverrideAwToJSON( currentReleaseOverrideAw: CurrentReleaseOverrideAw, ): string { return JSON.stringify( CurrentReleaseOverrideAw$outboundSchema.parse(currentReleaseOverrideAw), ); } export function currentReleaseOverrideAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAw' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAzureResource$inboundSchema: z.ZodType< CurrentReleaseOverrideAzureResource, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type CurrentReleaseOverrideAzureResource$Outbound = { scope: string; }; /** @internal */ export const CurrentReleaseOverrideAzureResource$outboundSchema: z.ZodType< CurrentReleaseOverrideAzureResource$Outbound, CurrentReleaseOverrideAzureResource > = z.object({ scope: z.string(), }); export function currentReleaseOverrideAzureResourceToJSON( currentReleaseOverrideAzureResource: CurrentReleaseOverrideAzureResource, ): string { return JSON.stringify( CurrentReleaseOverrideAzureResource$outboundSchema.parse( currentReleaseOverrideAzureResource, ), ); } export function currentReleaseOverrideAzureResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAzureResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAzureResource' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAzureStack$inboundSchema: z.ZodType< CurrentReleaseOverrideAzureStack, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type CurrentReleaseOverrideAzureStack$Outbound = { scope: string; }; /** @internal */ export const CurrentReleaseOverrideAzureStack$outboundSchema: z.ZodType< CurrentReleaseOverrideAzureStack$Outbound, CurrentReleaseOverrideAzureStack > = z.object({ scope: z.string(), }); export function currentReleaseOverrideAzureStackToJSON( currentReleaseOverrideAzureStack: CurrentReleaseOverrideAzureStack, ): string { return JSON.stringify( CurrentReleaseOverrideAzureStack$outboundSchema.parse( currentReleaseOverrideAzureStack, ), ); } export function currentReleaseOverrideAzureStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAzureStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAzureStack' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAzureBinding$inboundSchema: z.ZodType< CurrentReleaseOverrideAzureBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseOverrideAzureResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseOverrideAzureStack$inboundSchema) .optional(), }); /** @internal */ export type CurrentReleaseOverrideAzureBinding$Outbound = { resource?: CurrentReleaseOverrideAzureResource$Outbound | undefined; stack?: CurrentReleaseOverrideAzureStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseOverrideAzureBinding$outboundSchema: z.ZodType< CurrentReleaseOverrideAzureBinding$Outbound, CurrentReleaseOverrideAzureBinding > = z.object({ resource: z.lazy(() => CurrentReleaseOverrideAzureResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseOverrideAzureStack$outboundSchema) .optional(), }); export function currentReleaseOverrideAzureBindingToJSON( currentReleaseOverrideAzureBinding: CurrentReleaseOverrideAzureBinding, ): string { return JSON.stringify( CurrentReleaseOverrideAzureBinding$outboundSchema.parse( currentReleaseOverrideAzureBinding, ), ); } export function currentReleaseOverrideAzureBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAzureBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAzureBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAzureGrant$inboundSchema: z.ZodType< CurrentReleaseOverrideAzureGrant, 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(), }); /** @internal */ export type CurrentReleaseOverrideAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseOverrideAzureGrant$outboundSchema: z.ZodType< CurrentReleaseOverrideAzureGrant$Outbound, CurrentReleaseOverrideAzureGrant > = 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 currentReleaseOverrideAzureGrantToJSON( currentReleaseOverrideAzureGrant: CurrentReleaseOverrideAzureGrant, ): string { return JSON.stringify( CurrentReleaseOverrideAzureGrant$outboundSchema.parse( currentReleaseOverrideAzureGrant, ), ); } export function currentReleaseOverrideAzureGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAzureGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAzureGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideAzure$inboundSchema: z.ZodType< CurrentReleaseOverrideAzure, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseOverrideAzureBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseOverrideAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseOverrideAzure$Outbound = { binding: CurrentReleaseOverrideAzureBinding$Outbound; description?: string | null | undefined; grant: CurrentReleaseOverrideAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseOverrideAzure$outboundSchema: z.ZodType< CurrentReleaseOverrideAzure$Outbound, CurrentReleaseOverrideAzure > = z.object({ binding: z.lazy(() => CurrentReleaseOverrideAzureBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseOverrideAzureGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseOverrideAzureToJSON( currentReleaseOverrideAzure: CurrentReleaseOverrideAzure, ): string { return JSON.stringify( CurrentReleaseOverrideAzure$outboundSchema.parse( currentReleaseOverrideAzure, ), ); } export function currentReleaseOverrideAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideAzure' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideConditionResource$inboundSchema: z.ZodType< CurrentReleaseOverrideConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type CurrentReleaseOverrideConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const CurrentReleaseOverrideConditionResource$outboundSchema: z.ZodType< CurrentReleaseOverrideConditionResource$Outbound, CurrentReleaseOverrideConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function currentReleaseOverrideConditionResourceToJSON( currentReleaseOverrideConditionResource: CurrentReleaseOverrideConditionResource, ): string { return JSON.stringify( CurrentReleaseOverrideConditionResource$outboundSchema.parse( currentReleaseOverrideConditionResource, ), ); } export function currentReleaseOverrideConditionResourceFromJSON( jsonString: string, ): SafeParseResult< CurrentReleaseOverrideConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => CurrentReleaseOverrideConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CurrentReleaseOverrideConditionResource' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideResourceConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => CurrentReleaseOverrideConditionResource$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseOverrideResourceConditionUnion$Outbound = | CurrentReleaseOverrideConditionResource$Outbound | any; /** @internal */ export const CurrentReleaseOverrideResourceConditionUnion$outboundSchema: z.ZodType< CurrentReleaseOverrideResourceConditionUnion$Outbound, CurrentReleaseOverrideResourceConditionUnion > = z.union([ z.lazy(() => CurrentReleaseOverrideConditionResource$outboundSchema), z.any(), ]); export function currentReleaseOverrideResourceConditionUnionToJSON( currentReleaseOverrideResourceConditionUnion: CurrentReleaseOverrideResourceConditionUnion, ): string { return JSON.stringify( CurrentReleaseOverrideResourceConditionUnion$outboundSchema.parse( currentReleaseOverrideResourceConditionUnion, ), ); } export function currentReleaseOverrideResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< CurrentReleaseOverrideResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => CurrentReleaseOverrideResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CurrentReleaseOverrideResourceConditionUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideGcpResource$inboundSchema: z.ZodType< CurrentReleaseOverrideGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseOverrideConditionResource$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type CurrentReleaseOverrideGcpResource$Outbound = { condition?: | CurrentReleaseOverrideConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const CurrentReleaseOverrideGcpResource$outboundSchema: z.ZodType< CurrentReleaseOverrideGcpResource$Outbound, CurrentReleaseOverrideGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseOverrideConditionResource$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function currentReleaseOverrideGcpResourceToJSON( currentReleaseOverrideGcpResource: CurrentReleaseOverrideGcpResource, ): string { return JSON.stringify( CurrentReleaseOverrideGcpResource$outboundSchema.parse( currentReleaseOverrideGcpResource, ), ); } export function currentReleaseOverrideGcpResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideGcpResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideGcpResource' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideCondition$inboundSchema: z.ZodType< CurrentReleaseOverrideCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type CurrentReleaseOverrideCondition$Outbound = { expression: string; title: string; }; /** @internal */ export const CurrentReleaseOverrideCondition$outboundSchema: z.ZodType< CurrentReleaseOverrideCondition$Outbound, CurrentReleaseOverrideCondition > = z.object({ expression: z.string(), title: z.string(), }); export function currentReleaseOverrideConditionToJSON( currentReleaseOverrideCondition: CurrentReleaseOverrideCondition, ): string { return JSON.stringify( CurrentReleaseOverrideCondition$outboundSchema.parse( currentReleaseOverrideCondition, ), ); } export function currentReleaseOverrideConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideCondition' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideConditionUnion$inboundSchema: z.ZodType< CurrentReleaseOverrideConditionUnion, unknown > = z.union([ z.lazy(() => CurrentReleaseOverrideCondition$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseOverrideConditionUnion$Outbound = | CurrentReleaseOverrideCondition$Outbound | any; /** @internal */ export const CurrentReleaseOverrideConditionUnion$outboundSchema: z.ZodType< CurrentReleaseOverrideConditionUnion$Outbound, CurrentReleaseOverrideConditionUnion > = z.union([ z.lazy(() => CurrentReleaseOverrideCondition$outboundSchema), z.any(), ]); export function currentReleaseOverrideConditionUnionToJSON( currentReleaseOverrideConditionUnion: CurrentReleaseOverrideConditionUnion, ): string { return JSON.stringify( CurrentReleaseOverrideConditionUnion$outboundSchema.parse( currentReleaseOverrideConditionUnion, ), ); } export function currentReleaseOverrideConditionUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideConditionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideConditionUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideGcpStack$inboundSchema: z.ZodType< CurrentReleaseOverrideGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseOverrideCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type CurrentReleaseOverrideGcpStack$Outbound = { condition?: CurrentReleaseOverrideCondition$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const CurrentReleaseOverrideGcpStack$outboundSchema: z.ZodType< CurrentReleaseOverrideGcpStack$Outbound, CurrentReleaseOverrideGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseOverrideCondition$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function currentReleaseOverrideGcpStackToJSON( currentReleaseOverrideGcpStack: CurrentReleaseOverrideGcpStack, ): string { return JSON.stringify( CurrentReleaseOverrideGcpStack$outboundSchema.parse( currentReleaseOverrideGcpStack, ), ); } export function currentReleaseOverrideGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideGcpStack' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideGcpBinding$inboundSchema: z.ZodType< CurrentReleaseOverrideGcpBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseOverrideGcpResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseOverrideGcpStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseOverrideGcpBinding$Outbound = { resource?: CurrentReleaseOverrideGcpResource$Outbound | undefined; stack?: CurrentReleaseOverrideGcpStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseOverrideGcpBinding$outboundSchema: z.ZodType< CurrentReleaseOverrideGcpBinding$Outbound, CurrentReleaseOverrideGcpBinding > = z.object({ resource: z.lazy(() => CurrentReleaseOverrideGcpResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseOverrideGcpStack$outboundSchema).optional(), }); export function currentReleaseOverrideGcpBindingToJSON( currentReleaseOverrideGcpBinding: CurrentReleaseOverrideGcpBinding, ): string { return JSON.stringify( CurrentReleaseOverrideGcpBinding$outboundSchema.parse( currentReleaseOverrideGcpBinding, ), ); } export function currentReleaseOverrideGcpBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideGcpBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideGcpBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideGcpGrant$inboundSchema: z.ZodType< CurrentReleaseOverrideGcpGrant, 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(), }); /** @internal */ export type CurrentReleaseOverrideGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseOverrideGcpGrant$outboundSchema: z.ZodType< CurrentReleaseOverrideGcpGrant$Outbound, CurrentReleaseOverrideGcpGrant > = 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 currentReleaseOverrideGcpGrantToJSON( currentReleaseOverrideGcpGrant: CurrentReleaseOverrideGcpGrant, ): string { return JSON.stringify( CurrentReleaseOverrideGcpGrant$outboundSchema.parse( currentReleaseOverrideGcpGrant, ), ); } export function currentReleaseOverrideGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideGcpGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideGcp$inboundSchema: z.ZodType< CurrentReleaseOverrideGcp, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseOverrideGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseOverrideGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseOverrideGcp$Outbound = { binding: CurrentReleaseOverrideGcpBinding$Outbound; description?: string | null | undefined; grant: CurrentReleaseOverrideGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseOverrideGcp$outboundSchema: z.ZodType< CurrentReleaseOverrideGcp$Outbound, CurrentReleaseOverrideGcp > = z.object({ binding: z.lazy(() => CurrentReleaseOverrideGcpBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseOverrideGcpGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseOverrideGcpToJSON( currentReleaseOverrideGcp: CurrentReleaseOverrideGcp, ): string { return JSON.stringify( CurrentReleaseOverrideGcp$outboundSchema.parse(currentReleaseOverrideGcp), ); } export function currentReleaseOverrideGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideGcp' from JSON`, ); } /** @internal */ export const CurrentReleaseOverridePlatforms$inboundSchema: z.ZodType< CurrentReleaseOverridePlatforms, unknown > = z.object({ aws: z.nullable(z.array(z.lazy(() => CurrentReleaseOverrideAw$inboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => CurrentReleaseOverrideAzure$inboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => CurrentReleaseOverrideGcp$inboundSchema)), ).optional(), }); /** @internal */ export type CurrentReleaseOverridePlatforms$Outbound = { aws?: Array | null | undefined; azure?: Array | null | undefined; gcp?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseOverridePlatforms$outboundSchema: z.ZodType< CurrentReleaseOverridePlatforms$Outbound, CurrentReleaseOverridePlatforms > = z.object({ aws: z.nullable( z.array(z.lazy(() => CurrentReleaseOverrideAw$outboundSchema)), ).optional(), azure: z.nullable( z.array(z.lazy(() => CurrentReleaseOverrideAzure$outboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => CurrentReleaseOverrideGcp$outboundSchema)), ).optional(), }); export function currentReleaseOverridePlatformsToJSON( currentReleaseOverridePlatforms: CurrentReleaseOverridePlatforms, ): string { return JSON.stringify( CurrentReleaseOverridePlatforms$outboundSchema.parse( currentReleaseOverridePlatforms, ), ); } export function currentReleaseOverridePlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverridePlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverridePlatforms' from JSON`, ); } /** @internal */ export const CurrentReleaseOverride$inboundSchema: z.ZodType< CurrentReleaseOverride, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => CurrentReleaseOverridePlatforms$inboundSchema), }); /** @internal */ export type CurrentReleaseOverride$Outbound = { description: string; id: string; platforms: CurrentReleaseOverridePlatforms$Outbound; }; /** @internal */ export const CurrentReleaseOverride$outboundSchema: z.ZodType< CurrentReleaseOverride$Outbound, CurrentReleaseOverride > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => CurrentReleaseOverridePlatforms$outboundSchema), }); export function currentReleaseOverrideToJSON( currentReleaseOverride: CurrentReleaseOverride, ): string { return JSON.stringify( CurrentReleaseOverride$outboundSchema.parse(currentReleaseOverride), ); } export function currentReleaseOverrideFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverride$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverride' from JSON`, ); } /** @internal */ export const CurrentReleaseOverrideUnion$inboundSchema: z.ZodType< CurrentReleaseOverrideUnion, unknown > = z.union([z.lazy(() => CurrentReleaseOverride$inboundSchema), z.string()]); /** @internal */ export type CurrentReleaseOverrideUnion$Outbound = | CurrentReleaseOverride$Outbound | string; /** @internal */ export const CurrentReleaseOverrideUnion$outboundSchema: z.ZodType< CurrentReleaseOverrideUnion$Outbound, CurrentReleaseOverrideUnion > = z.union([z.lazy(() => CurrentReleaseOverride$outboundSchema), z.string()]); export function currentReleaseOverrideUnionToJSON( currentReleaseOverrideUnion: CurrentReleaseOverrideUnion, ): string { return JSON.stringify( CurrentReleaseOverrideUnion$outboundSchema.parse( currentReleaseOverrideUnion, ), ); } export function currentReleaseOverrideUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseOverrideUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseOverrideUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseManagement2$inboundSchema: z.ZodType< CurrentReleaseManagement2, unknown > = z.object({ override: z.record( z.string(), z.array( z.union([z.lazy(() => CurrentReleaseOverride$inboundSchema), z.string()]), ), ), }); /** @internal */ export type CurrentReleaseManagement2$Outbound = { override: { [k: string]: Array }; }; /** @internal */ export const CurrentReleaseManagement2$outboundSchema: z.ZodType< CurrentReleaseManagement2$Outbound, CurrentReleaseManagement2 > = z.object({ override: z.record( z.string(), z.array(z.union([ z.lazy(() => CurrentReleaseOverride$outboundSchema), z.string(), ])), ), }); export function currentReleaseManagement2ToJSON( currentReleaseManagement2: CurrentReleaseManagement2, ): string { return JSON.stringify( CurrentReleaseManagement2$outboundSchema.parse(currentReleaseManagement2), ); } export function currentReleaseManagement2FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseManagement2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseManagement2' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAwResource$inboundSchema: z.ZodType< CurrentReleaseExtendAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type CurrentReleaseExtendAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const CurrentReleaseExtendAwResource$outboundSchema: z.ZodType< CurrentReleaseExtendAwResource$Outbound, CurrentReleaseExtendAwResource > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function currentReleaseExtendAwResourceToJSON( currentReleaseExtendAwResource: CurrentReleaseExtendAwResource, ): string { return JSON.stringify( CurrentReleaseExtendAwResource$outboundSchema.parse( currentReleaseExtendAwResource, ), ); } export function currentReleaseExtendAwResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAwResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAwResource' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAwStack$inboundSchema: z.ZodType< CurrentReleaseExtendAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type CurrentReleaseExtendAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const CurrentReleaseExtendAwStack$outboundSchema: z.ZodType< CurrentReleaseExtendAwStack$Outbound, CurrentReleaseExtendAwStack > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function currentReleaseExtendAwStackToJSON( currentReleaseExtendAwStack: CurrentReleaseExtendAwStack, ): string { return JSON.stringify( CurrentReleaseExtendAwStack$outboundSchema.parse( currentReleaseExtendAwStack, ), ); } export function currentReleaseExtendAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAwStack' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAwBinding$inboundSchema: z.ZodType< CurrentReleaseExtendAwBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseExtendAwResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseExtendAwStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseExtendAwBinding$Outbound = { resource?: CurrentReleaseExtendAwResource$Outbound | undefined; stack?: CurrentReleaseExtendAwStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseExtendAwBinding$outboundSchema: z.ZodType< CurrentReleaseExtendAwBinding$Outbound, CurrentReleaseExtendAwBinding > = z.object({ resource: z.lazy(() => CurrentReleaseExtendAwResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseExtendAwStack$outboundSchema).optional(), }); export function currentReleaseExtendAwBindingToJSON( currentReleaseExtendAwBinding: CurrentReleaseExtendAwBinding, ): string { return JSON.stringify( CurrentReleaseExtendAwBinding$outboundSchema.parse( currentReleaseExtendAwBinding, ), ); } export function currentReleaseExtendAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAwBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendEffect$inboundSchema: z.ZodEnum< typeof CurrentReleaseExtendEffect > = z.enum(CurrentReleaseExtendEffect); /** @internal */ export const CurrentReleaseExtendEffect$outboundSchema: z.ZodEnum< typeof CurrentReleaseExtendEffect > = CurrentReleaseExtendEffect$inboundSchema; /** @internal */ export const CurrentReleaseExtendAwGrant$inboundSchema: z.ZodType< CurrentReleaseExtendAwGrant, 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(), }); /** @internal */ export type CurrentReleaseExtendAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseExtendAwGrant$outboundSchema: z.ZodType< CurrentReleaseExtendAwGrant$Outbound, CurrentReleaseExtendAwGrant > = 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 currentReleaseExtendAwGrantToJSON( currentReleaseExtendAwGrant: CurrentReleaseExtendAwGrant, ): string { return JSON.stringify( CurrentReleaseExtendAwGrant$outboundSchema.parse( currentReleaseExtendAwGrant, ), ); } export function currentReleaseExtendAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAwGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAw$inboundSchema: z.ZodType< CurrentReleaseExtendAw, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseExtendAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: CurrentReleaseExtendEffect$inboundSchema.optional(), grant: z.lazy(() => CurrentReleaseExtendAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseExtendAw$Outbound = { binding: CurrentReleaseExtendAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: CurrentReleaseExtendAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseExtendAw$outboundSchema: z.ZodType< CurrentReleaseExtendAw$Outbound, CurrentReleaseExtendAw > = z.object({ binding: z.lazy(() => CurrentReleaseExtendAwBinding$outboundSchema), description: z.nullable(z.string()).optional(), effect: CurrentReleaseExtendEffect$outboundSchema.optional(), grant: z.lazy(() => CurrentReleaseExtendAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseExtendAwToJSON( currentReleaseExtendAw: CurrentReleaseExtendAw, ): string { return JSON.stringify( CurrentReleaseExtendAw$outboundSchema.parse(currentReleaseExtendAw), ); } export function currentReleaseExtendAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAw' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAzureResource$inboundSchema: z.ZodType< CurrentReleaseExtendAzureResource, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type CurrentReleaseExtendAzureResource$Outbound = { scope: string; }; /** @internal */ export const CurrentReleaseExtendAzureResource$outboundSchema: z.ZodType< CurrentReleaseExtendAzureResource$Outbound, CurrentReleaseExtendAzureResource > = z.object({ scope: z.string(), }); export function currentReleaseExtendAzureResourceToJSON( currentReleaseExtendAzureResource: CurrentReleaseExtendAzureResource, ): string { return JSON.stringify( CurrentReleaseExtendAzureResource$outboundSchema.parse( currentReleaseExtendAzureResource, ), ); } export function currentReleaseExtendAzureResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAzureResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAzureResource' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAzureStack$inboundSchema: z.ZodType< CurrentReleaseExtendAzureStack, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type CurrentReleaseExtendAzureStack$Outbound = { scope: string; }; /** @internal */ export const CurrentReleaseExtendAzureStack$outboundSchema: z.ZodType< CurrentReleaseExtendAzureStack$Outbound, CurrentReleaseExtendAzureStack > = z.object({ scope: z.string(), }); export function currentReleaseExtendAzureStackToJSON( currentReleaseExtendAzureStack: CurrentReleaseExtendAzureStack, ): string { return JSON.stringify( CurrentReleaseExtendAzureStack$outboundSchema.parse( currentReleaseExtendAzureStack, ), ); } export function currentReleaseExtendAzureStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAzureStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAzureStack' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAzureBinding$inboundSchema: z.ZodType< CurrentReleaseExtendAzureBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseExtendAzureResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseExtendAzureStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseExtendAzureBinding$Outbound = { resource?: CurrentReleaseExtendAzureResource$Outbound | undefined; stack?: CurrentReleaseExtendAzureStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseExtendAzureBinding$outboundSchema: z.ZodType< CurrentReleaseExtendAzureBinding$Outbound, CurrentReleaseExtendAzureBinding > = z.object({ resource: z.lazy(() => CurrentReleaseExtendAzureResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseExtendAzureStack$outboundSchema).optional(), }); export function currentReleaseExtendAzureBindingToJSON( currentReleaseExtendAzureBinding: CurrentReleaseExtendAzureBinding, ): string { return JSON.stringify( CurrentReleaseExtendAzureBinding$outboundSchema.parse( currentReleaseExtendAzureBinding, ), ); } export function currentReleaseExtendAzureBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAzureBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAzureBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAzureGrant$inboundSchema: z.ZodType< CurrentReleaseExtendAzureGrant, 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(), }); /** @internal */ export type CurrentReleaseExtendAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseExtendAzureGrant$outboundSchema: z.ZodType< CurrentReleaseExtendAzureGrant$Outbound, CurrentReleaseExtendAzureGrant > = 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 currentReleaseExtendAzureGrantToJSON( currentReleaseExtendAzureGrant: CurrentReleaseExtendAzureGrant, ): string { return JSON.stringify( CurrentReleaseExtendAzureGrant$outboundSchema.parse( currentReleaseExtendAzureGrant, ), ); } export function currentReleaseExtendAzureGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAzureGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAzureGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendAzure$inboundSchema: z.ZodType< CurrentReleaseExtendAzure, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseExtendAzureBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseExtendAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseExtendAzure$Outbound = { binding: CurrentReleaseExtendAzureBinding$Outbound; description?: string | null | undefined; grant: CurrentReleaseExtendAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseExtendAzure$outboundSchema: z.ZodType< CurrentReleaseExtendAzure$Outbound, CurrentReleaseExtendAzure > = z.object({ binding: z.lazy(() => CurrentReleaseExtendAzureBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseExtendAzureGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseExtendAzureToJSON( currentReleaseExtendAzure: CurrentReleaseExtendAzure, ): string { return JSON.stringify( CurrentReleaseExtendAzure$outboundSchema.parse(currentReleaseExtendAzure), ); } export function currentReleaseExtendAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendAzure' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendConditionResource$inboundSchema: z.ZodType< CurrentReleaseExtendConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type CurrentReleaseExtendConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const CurrentReleaseExtendConditionResource$outboundSchema: z.ZodType< CurrentReleaseExtendConditionResource$Outbound, CurrentReleaseExtendConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function currentReleaseExtendConditionResourceToJSON( currentReleaseExtendConditionResource: CurrentReleaseExtendConditionResource, ): string { return JSON.stringify( CurrentReleaseExtendConditionResource$outboundSchema.parse( currentReleaseExtendConditionResource, ), ); } export function currentReleaseExtendConditionResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendConditionResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendConditionResource' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendResourceConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => CurrentReleaseExtendConditionResource$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseExtendResourceConditionUnion$Outbound = | CurrentReleaseExtendConditionResource$Outbound | any; /** @internal */ export const CurrentReleaseExtendResourceConditionUnion$outboundSchema: z.ZodType< CurrentReleaseExtendResourceConditionUnion$Outbound, CurrentReleaseExtendResourceConditionUnion > = z.union([ z.lazy(() => CurrentReleaseExtendConditionResource$outboundSchema), z.any(), ]); export function currentReleaseExtendResourceConditionUnionToJSON( currentReleaseExtendResourceConditionUnion: CurrentReleaseExtendResourceConditionUnion, ): string { return JSON.stringify( CurrentReleaseExtendResourceConditionUnion$outboundSchema.parse( currentReleaseExtendResourceConditionUnion, ), ); } export function currentReleaseExtendResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< CurrentReleaseExtendResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => CurrentReleaseExtendResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CurrentReleaseExtendResourceConditionUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendGcpResource$inboundSchema: z.ZodType< CurrentReleaseExtendGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseExtendConditionResource$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type CurrentReleaseExtendGcpResource$Outbound = { condition?: | CurrentReleaseExtendConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const CurrentReleaseExtendGcpResource$outboundSchema: z.ZodType< CurrentReleaseExtendGcpResource$Outbound, CurrentReleaseExtendGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseExtendConditionResource$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function currentReleaseExtendGcpResourceToJSON( currentReleaseExtendGcpResource: CurrentReleaseExtendGcpResource, ): string { return JSON.stringify( CurrentReleaseExtendGcpResource$outboundSchema.parse( currentReleaseExtendGcpResource, ), ); } export function currentReleaseExtendGcpResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendGcpResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendGcpResource' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendCondition$inboundSchema: z.ZodType< CurrentReleaseExtendCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type CurrentReleaseExtendCondition$Outbound = { expression: string; title: string; }; /** @internal */ export const CurrentReleaseExtendCondition$outboundSchema: z.ZodType< CurrentReleaseExtendCondition$Outbound, CurrentReleaseExtendCondition > = z.object({ expression: z.string(), title: z.string(), }); export function currentReleaseExtendConditionToJSON( currentReleaseExtendCondition: CurrentReleaseExtendCondition, ): string { return JSON.stringify( CurrentReleaseExtendCondition$outboundSchema.parse( currentReleaseExtendCondition, ), ); } export function currentReleaseExtendConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendCondition' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendConditionUnion$inboundSchema: z.ZodType< CurrentReleaseExtendConditionUnion, unknown > = z.union([ z.lazy(() => CurrentReleaseExtendCondition$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseExtendConditionUnion$Outbound = | CurrentReleaseExtendCondition$Outbound | any; /** @internal */ export const CurrentReleaseExtendConditionUnion$outboundSchema: z.ZodType< CurrentReleaseExtendConditionUnion$Outbound, CurrentReleaseExtendConditionUnion > = z.union([ z.lazy(() => CurrentReleaseExtendCondition$outboundSchema), z.any(), ]); export function currentReleaseExtendConditionUnionToJSON( currentReleaseExtendConditionUnion: CurrentReleaseExtendConditionUnion, ): string { return JSON.stringify( CurrentReleaseExtendConditionUnion$outboundSchema.parse( currentReleaseExtendConditionUnion, ), ); } export function currentReleaseExtendConditionUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendConditionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendConditionUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendGcpStack$inboundSchema: z.ZodType< CurrentReleaseExtendGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseExtendCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type CurrentReleaseExtendGcpStack$Outbound = { condition?: CurrentReleaseExtendCondition$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const CurrentReleaseExtendGcpStack$outboundSchema: z.ZodType< CurrentReleaseExtendGcpStack$Outbound, CurrentReleaseExtendGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseExtendCondition$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function currentReleaseExtendGcpStackToJSON( currentReleaseExtendGcpStack: CurrentReleaseExtendGcpStack, ): string { return JSON.stringify( CurrentReleaseExtendGcpStack$outboundSchema.parse( currentReleaseExtendGcpStack, ), ); } export function currentReleaseExtendGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendGcpStack' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendGcpBinding$inboundSchema: z.ZodType< CurrentReleaseExtendGcpBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseExtendGcpResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseExtendGcpStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseExtendGcpBinding$Outbound = { resource?: CurrentReleaseExtendGcpResource$Outbound | undefined; stack?: CurrentReleaseExtendGcpStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseExtendGcpBinding$outboundSchema: z.ZodType< CurrentReleaseExtendGcpBinding$Outbound, CurrentReleaseExtendGcpBinding > = z.object({ resource: z.lazy(() => CurrentReleaseExtendGcpResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseExtendGcpStack$outboundSchema).optional(), }); export function currentReleaseExtendGcpBindingToJSON( currentReleaseExtendGcpBinding: CurrentReleaseExtendGcpBinding, ): string { return JSON.stringify( CurrentReleaseExtendGcpBinding$outboundSchema.parse( currentReleaseExtendGcpBinding, ), ); } export function currentReleaseExtendGcpBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendGcpBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendGcpBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendGcpGrant$inboundSchema: z.ZodType< CurrentReleaseExtendGcpGrant, 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(), }); /** @internal */ export type CurrentReleaseExtendGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseExtendGcpGrant$outboundSchema: z.ZodType< CurrentReleaseExtendGcpGrant$Outbound, CurrentReleaseExtendGcpGrant > = 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 currentReleaseExtendGcpGrantToJSON( currentReleaseExtendGcpGrant: CurrentReleaseExtendGcpGrant, ): string { return JSON.stringify( CurrentReleaseExtendGcpGrant$outboundSchema.parse( currentReleaseExtendGcpGrant, ), ); } export function currentReleaseExtendGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendGcpGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendGcp$inboundSchema: z.ZodType< CurrentReleaseExtendGcp, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseExtendGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseExtendGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseExtendGcp$Outbound = { binding: CurrentReleaseExtendGcpBinding$Outbound; description?: string | null | undefined; grant: CurrentReleaseExtendGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseExtendGcp$outboundSchema: z.ZodType< CurrentReleaseExtendGcp$Outbound, CurrentReleaseExtendGcp > = z.object({ binding: z.lazy(() => CurrentReleaseExtendGcpBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseExtendGcpGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseExtendGcpToJSON( currentReleaseExtendGcp: CurrentReleaseExtendGcp, ): string { return JSON.stringify( CurrentReleaseExtendGcp$outboundSchema.parse(currentReleaseExtendGcp), ); } export function currentReleaseExtendGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendGcp' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendPlatforms$inboundSchema: z.ZodType< CurrentReleaseExtendPlatforms, unknown > = z.object({ aws: z.nullable(z.array(z.lazy(() => CurrentReleaseExtendAw$inboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => CurrentReleaseExtendAzure$inboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => CurrentReleaseExtendGcp$inboundSchema))) .optional(), }); /** @internal */ export type CurrentReleaseExtendPlatforms$Outbound = { aws?: Array | null | undefined; azure?: Array | null | undefined; gcp?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseExtendPlatforms$outboundSchema: z.ZodType< CurrentReleaseExtendPlatforms$Outbound, CurrentReleaseExtendPlatforms > = z.object({ aws: z.nullable(z.array(z.lazy(() => CurrentReleaseExtendAw$outboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => CurrentReleaseExtendAzure$outboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => CurrentReleaseExtendGcp$outboundSchema))) .optional(), }); export function currentReleaseExtendPlatformsToJSON( currentReleaseExtendPlatforms: CurrentReleaseExtendPlatforms, ): string { return JSON.stringify( CurrentReleaseExtendPlatforms$outboundSchema.parse( currentReleaseExtendPlatforms, ), ); } export function currentReleaseExtendPlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendPlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendPlatforms' from JSON`, ); } /** @internal */ export const CurrentReleaseExtend$inboundSchema: z.ZodType< CurrentReleaseExtend, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => CurrentReleaseExtendPlatforms$inboundSchema), }); /** @internal */ export type CurrentReleaseExtend$Outbound = { description: string; id: string; platforms: CurrentReleaseExtendPlatforms$Outbound; }; /** @internal */ export const CurrentReleaseExtend$outboundSchema: z.ZodType< CurrentReleaseExtend$Outbound, CurrentReleaseExtend > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => CurrentReleaseExtendPlatforms$outboundSchema), }); export function currentReleaseExtendToJSON( currentReleaseExtend: CurrentReleaseExtend, ): string { return JSON.stringify( CurrentReleaseExtend$outboundSchema.parse(currentReleaseExtend), ); } export function currentReleaseExtendFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtend$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtend' from JSON`, ); } /** @internal */ export const CurrentReleaseExtendUnion$inboundSchema: z.ZodType< CurrentReleaseExtendUnion, unknown > = z.union([z.lazy(() => CurrentReleaseExtend$inboundSchema), z.string()]); /** @internal */ export type CurrentReleaseExtendUnion$Outbound = | CurrentReleaseExtend$Outbound | string; /** @internal */ export const CurrentReleaseExtendUnion$outboundSchema: z.ZodType< CurrentReleaseExtendUnion$Outbound, CurrentReleaseExtendUnion > = z.union([z.lazy(() => CurrentReleaseExtend$outboundSchema), z.string()]); export function currentReleaseExtendUnionToJSON( currentReleaseExtendUnion: CurrentReleaseExtendUnion, ): string { return JSON.stringify( CurrentReleaseExtendUnion$outboundSchema.parse(currentReleaseExtendUnion), ); } export function currentReleaseExtendUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseExtendUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseExtendUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseManagement1$inboundSchema: z.ZodType< CurrentReleaseManagement1, unknown > = z.object({ extend: z.record( z.string(), z.array( z.union([z.lazy(() => CurrentReleaseExtend$inboundSchema), z.string()]), ), ), }); /** @internal */ export type CurrentReleaseManagement1$Outbound = { extend: { [k: string]: Array }; }; /** @internal */ export const CurrentReleaseManagement1$outboundSchema: z.ZodType< CurrentReleaseManagement1$Outbound, CurrentReleaseManagement1 > = z.object({ extend: z.record( z.string(), z.array( z.union([z.lazy(() => CurrentReleaseExtend$outboundSchema), z.string()]), ), ), }); export function currentReleaseManagement1ToJSON( currentReleaseManagement1: CurrentReleaseManagement1, ): string { return JSON.stringify( CurrentReleaseManagement1$outboundSchema.parse(currentReleaseManagement1), ); } export function currentReleaseManagement1FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseManagement1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseManagement1' from JSON`, ); } /** @internal */ export const CurrentReleaseManagementUnion$inboundSchema: z.ZodType< CurrentReleaseManagementUnion, unknown > = z.union([ z.lazy(() => CurrentReleaseManagement1$inboundSchema), z.lazy(() => CurrentReleaseManagement2$inboundSchema), CurrentReleaseManagementEnum$inboundSchema, ]); /** @internal */ export type CurrentReleaseManagementUnion$Outbound = | CurrentReleaseManagement1$Outbound | CurrentReleaseManagement2$Outbound | string; /** @internal */ export const CurrentReleaseManagementUnion$outboundSchema: z.ZodType< CurrentReleaseManagementUnion$Outbound, CurrentReleaseManagementUnion > = z.union([ z.lazy(() => CurrentReleaseManagement1$outboundSchema), z.lazy(() => CurrentReleaseManagement2$outboundSchema), CurrentReleaseManagementEnum$outboundSchema, ]); export function currentReleaseManagementUnionToJSON( currentReleaseManagementUnion: CurrentReleaseManagementUnion, ): string { return JSON.stringify( CurrentReleaseManagementUnion$outboundSchema.parse( currentReleaseManagementUnion, ), ); } export function currentReleaseManagementUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseManagementUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseManagementUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAwResource$inboundSchema: z.ZodType< CurrentReleaseProfileAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type CurrentReleaseProfileAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const CurrentReleaseProfileAwResource$outboundSchema: z.ZodType< CurrentReleaseProfileAwResource$Outbound, CurrentReleaseProfileAwResource > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function currentReleaseProfileAwResourceToJSON( currentReleaseProfileAwResource: CurrentReleaseProfileAwResource, ): string { return JSON.stringify( CurrentReleaseProfileAwResource$outboundSchema.parse( currentReleaseProfileAwResource, ), ); } export function currentReleaseProfileAwResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAwResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAwResource' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAwStack$inboundSchema: z.ZodType< CurrentReleaseProfileAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type CurrentReleaseProfileAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const CurrentReleaseProfileAwStack$outboundSchema: z.ZodType< CurrentReleaseProfileAwStack$Outbound, CurrentReleaseProfileAwStack > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function currentReleaseProfileAwStackToJSON( currentReleaseProfileAwStack: CurrentReleaseProfileAwStack, ): string { return JSON.stringify( CurrentReleaseProfileAwStack$outboundSchema.parse( currentReleaseProfileAwStack, ), ); } export function currentReleaseProfileAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAwStack' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAwBinding$inboundSchema: z.ZodType< CurrentReleaseProfileAwBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseProfileAwResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseProfileAwStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseProfileAwBinding$Outbound = { resource?: CurrentReleaseProfileAwResource$Outbound | undefined; stack?: CurrentReleaseProfileAwStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseProfileAwBinding$outboundSchema: z.ZodType< CurrentReleaseProfileAwBinding$Outbound, CurrentReleaseProfileAwBinding > = z.object({ resource: z.lazy(() => CurrentReleaseProfileAwResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseProfileAwStack$outboundSchema).optional(), }); export function currentReleaseProfileAwBindingToJSON( currentReleaseProfileAwBinding: CurrentReleaseProfileAwBinding, ): string { return JSON.stringify( CurrentReleaseProfileAwBinding$outboundSchema.parse( currentReleaseProfileAwBinding, ), ); } export function currentReleaseProfileAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAwBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileEffect$inboundSchema: z.ZodEnum< typeof CurrentReleaseProfileEffect > = z.enum(CurrentReleaseProfileEffect); /** @internal */ export const CurrentReleaseProfileEffect$outboundSchema: z.ZodEnum< typeof CurrentReleaseProfileEffect > = CurrentReleaseProfileEffect$inboundSchema; /** @internal */ export const CurrentReleaseProfileAwGrant$inboundSchema: z.ZodType< CurrentReleaseProfileAwGrant, 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(), }); /** @internal */ export type CurrentReleaseProfileAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseProfileAwGrant$outboundSchema: z.ZodType< CurrentReleaseProfileAwGrant$Outbound, CurrentReleaseProfileAwGrant > = 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 currentReleaseProfileAwGrantToJSON( currentReleaseProfileAwGrant: CurrentReleaseProfileAwGrant, ): string { return JSON.stringify( CurrentReleaseProfileAwGrant$outboundSchema.parse( currentReleaseProfileAwGrant, ), ); } export function currentReleaseProfileAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAwGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAw$inboundSchema: z.ZodType< CurrentReleaseProfileAw, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseProfileAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: CurrentReleaseProfileEffect$inboundSchema.optional(), grant: z.lazy(() => CurrentReleaseProfileAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseProfileAw$Outbound = { binding: CurrentReleaseProfileAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: CurrentReleaseProfileAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseProfileAw$outboundSchema: z.ZodType< CurrentReleaseProfileAw$Outbound, CurrentReleaseProfileAw > = z.object({ binding: z.lazy(() => CurrentReleaseProfileAwBinding$outboundSchema), description: z.nullable(z.string()).optional(), effect: CurrentReleaseProfileEffect$outboundSchema.optional(), grant: z.lazy(() => CurrentReleaseProfileAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseProfileAwToJSON( currentReleaseProfileAw: CurrentReleaseProfileAw, ): string { return JSON.stringify( CurrentReleaseProfileAw$outboundSchema.parse(currentReleaseProfileAw), ); } export function currentReleaseProfileAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAw' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAzureResource$inboundSchema: z.ZodType< CurrentReleaseProfileAzureResource, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type CurrentReleaseProfileAzureResource$Outbound = { scope: string; }; /** @internal */ export const CurrentReleaseProfileAzureResource$outboundSchema: z.ZodType< CurrentReleaseProfileAzureResource$Outbound, CurrentReleaseProfileAzureResource > = z.object({ scope: z.string(), }); export function currentReleaseProfileAzureResourceToJSON( currentReleaseProfileAzureResource: CurrentReleaseProfileAzureResource, ): string { return JSON.stringify( CurrentReleaseProfileAzureResource$outboundSchema.parse( currentReleaseProfileAzureResource, ), ); } export function currentReleaseProfileAzureResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAzureResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAzureResource' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAzureStack$inboundSchema: z.ZodType< CurrentReleaseProfileAzureStack, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type CurrentReleaseProfileAzureStack$Outbound = { scope: string; }; /** @internal */ export const CurrentReleaseProfileAzureStack$outboundSchema: z.ZodType< CurrentReleaseProfileAzureStack$Outbound, CurrentReleaseProfileAzureStack > = z.object({ scope: z.string(), }); export function currentReleaseProfileAzureStackToJSON( currentReleaseProfileAzureStack: CurrentReleaseProfileAzureStack, ): string { return JSON.stringify( CurrentReleaseProfileAzureStack$outboundSchema.parse( currentReleaseProfileAzureStack, ), ); } export function currentReleaseProfileAzureStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAzureStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAzureStack' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAzureBinding$inboundSchema: z.ZodType< CurrentReleaseProfileAzureBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseProfileAzureResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseProfileAzureStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseProfileAzureBinding$Outbound = { resource?: CurrentReleaseProfileAzureResource$Outbound | undefined; stack?: CurrentReleaseProfileAzureStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseProfileAzureBinding$outboundSchema: z.ZodType< CurrentReleaseProfileAzureBinding$Outbound, CurrentReleaseProfileAzureBinding > = z.object({ resource: z.lazy(() => CurrentReleaseProfileAzureResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseProfileAzureStack$outboundSchema) .optional(), }); export function currentReleaseProfileAzureBindingToJSON( currentReleaseProfileAzureBinding: CurrentReleaseProfileAzureBinding, ): string { return JSON.stringify( CurrentReleaseProfileAzureBinding$outboundSchema.parse( currentReleaseProfileAzureBinding, ), ); } export function currentReleaseProfileAzureBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAzureBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAzureBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAzureGrant$inboundSchema: z.ZodType< CurrentReleaseProfileAzureGrant, 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(), }); /** @internal */ export type CurrentReleaseProfileAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseProfileAzureGrant$outboundSchema: z.ZodType< CurrentReleaseProfileAzureGrant$Outbound, CurrentReleaseProfileAzureGrant > = 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 currentReleaseProfileAzureGrantToJSON( currentReleaseProfileAzureGrant: CurrentReleaseProfileAzureGrant, ): string { return JSON.stringify( CurrentReleaseProfileAzureGrant$outboundSchema.parse( currentReleaseProfileAzureGrant, ), ); } export function currentReleaseProfileAzureGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAzureGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAzureGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileAzure$inboundSchema: z.ZodType< CurrentReleaseProfileAzure, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseProfileAzureBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseProfileAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseProfileAzure$Outbound = { binding: CurrentReleaseProfileAzureBinding$Outbound; description?: string | null | undefined; grant: CurrentReleaseProfileAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseProfileAzure$outboundSchema: z.ZodType< CurrentReleaseProfileAzure$Outbound, CurrentReleaseProfileAzure > = z.object({ binding: z.lazy(() => CurrentReleaseProfileAzureBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseProfileAzureGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseProfileAzureToJSON( currentReleaseProfileAzure: CurrentReleaseProfileAzure, ): string { return JSON.stringify( CurrentReleaseProfileAzure$outboundSchema.parse(currentReleaseProfileAzure), ); } export function currentReleaseProfileAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileAzure' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileConditionResource$inboundSchema: z.ZodType< CurrentReleaseProfileConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type CurrentReleaseProfileConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const CurrentReleaseProfileConditionResource$outboundSchema: z.ZodType< CurrentReleaseProfileConditionResource$Outbound, CurrentReleaseProfileConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function currentReleaseProfileConditionResourceToJSON( currentReleaseProfileConditionResource: CurrentReleaseProfileConditionResource, ): string { return JSON.stringify( CurrentReleaseProfileConditionResource$outboundSchema.parse( currentReleaseProfileConditionResource, ), ); } export function currentReleaseProfileConditionResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileConditionResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileConditionResource' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileResourceConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => CurrentReleaseProfileConditionResource$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseProfileResourceConditionUnion$Outbound = | CurrentReleaseProfileConditionResource$Outbound | any; /** @internal */ export const CurrentReleaseProfileResourceConditionUnion$outboundSchema: z.ZodType< CurrentReleaseProfileResourceConditionUnion$Outbound, CurrentReleaseProfileResourceConditionUnion > = z.union([ z.lazy(() => CurrentReleaseProfileConditionResource$outboundSchema), z.any(), ]); export function currentReleaseProfileResourceConditionUnionToJSON( currentReleaseProfileResourceConditionUnion: CurrentReleaseProfileResourceConditionUnion, ): string { return JSON.stringify( CurrentReleaseProfileResourceConditionUnion$outboundSchema.parse( currentReleaseProfileResourceConditionUnion, ), ); } export function currentReleaseProfileResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< CurrentReleaseProfileResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => CurrentReleaseProfileResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CurrentReleaseProfileResourceConditionUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileGcpResource$inboundSchema: z.ZodType< CurrentReleaseProfileGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseProfileConditionResource$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type CurrentReleaseProfileGcpResource$Outbound = { condition?: | CurrentReleaseProfileConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const CurrentReleaseProfileGcpResource$outboundSchema: z.ZodType< CurrentReleaseProfileGcpResource$Outbound, CurrentReleaseProfileGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseProfileConditionResource$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function currentReleaseProfileGcpResourceToJSON( currentReleaseProfileGcpResource: CurrentReleaseProfileGcpResource, ): string { return JSON.stringify( CurrentReleaseProfileGcpResource$outboundSchema.parse( currentReleaseProfileGcpResource, ), ); } export function currentReleaseProfileGcpResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileGcpResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileGcpResource' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileCondition$inboundSchema: z.ZodType< CurrentReleaseProfileCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type CurrentReleaseProfileCondition$Outbound = { expression: string; title: string; }; /** @internal */ export const CurrentReleaseProfileCondition$outboundSchema: z.ZodType< CurrentReleaseProfileCondition$Outbound, CurrentReleaseProfileCondition > = z.object({ expression: z.string(), title: z.string(), }); export function currentReleaseProfileConditionToJSON( currentReleaseProfileCondition: CurrentReleaseProfileCondition, ): string { return JSON.stringify( CurrentReleaseProfileCondition$outboundSchema.parse( currentReleaseProfileCondition, ), ); } export function currentReleaseProfileConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileCondition' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileConditionUnion$inboundSchema: z.ZodType< CurrentReleaseProfileConditionUnion, unknown > = z.union([ z.lazy(() => CurrentReleaseProfileCondition$inboundSchema), z.any(), ]); /** @internal */ export type CurrentReleaseProfileConditionUnion$Outbound = | CurrentReleaseProfileCondition$Outbound | any; /** @internal */ export const CurrentReleaseProfileConditionUnion$outboundSchema: z.ZodType< CurrentReleaseProfileConditionUnion$Outbound, CurrentReleaseProfileConditionUnion > = z.union([ z.lazy(() => CurrentReleaseProfileCondition$outboundSchema), z.any(), ]); export function currentReleaseProfileConditionUnionToJSON( currentReleaseProfileConditionUnion: CurrentReleaseProfileConditionUnion, ): string { return JSON.stringify( CurrentReleaseProfileConditionUnion$outboundSchema.parse( currentReleaseProfileConditionUnion, ), ); } export function currentReleaseProfileConditionUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileConditionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileConditionUnion' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileGcpStack$inboundSchema: z.ZodType< CurrentReleaseProfileGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseProfileCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type CurrentReleaseProfileGcpStack$Outbound = { condition?: CurrentReleaseProfileCondition$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const CurrentReleaseProfileGcpStack$outboundSchema: z.ZodType< CurrentReleaseProfileGcpStack$Outbound, CurrentReleaseProfileGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => CurrentReleaseProfileCondition$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function currentReleaseProfileGcpStackToJSON( currentReleaseProfileGcpStack: CurrentReleaseProfileGcpStack, ): string { return JSON.stringify( CurrentReleaseProfileGcpStack$outboundSchema.parse( currentReleaseProfileGcpStack, ), ); } export function currentReleaseProfileGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileGcpStack' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileGcpBinding$inboundSchema: z.ZodType< CurrentReleaseProfileGcpBinding, unknown > = z.object({ resource: z.lazy(() => CurrentReleaseProfileGcpResource$inboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseProfileGcpStack$inboundSchema).optional(), }); /** @internal */ export type CurrentReleaseProfileGcpBinding$Outbound = { resource?: CurrentReleaseProfileGcpResource$Outbound | undefined; stack?: CurrentReleaseProfileGcpStack$Outbound | undefined; }; /** @internal */ export const CurrentReleaseProfileGcpBinding$outboundSchema: z.ZodType< CurrentReleaseProfileGcpBinding$Outbound, CurrentReleaseProfileGcpBinding > = z.object({ resource: z.lazy(() => CurrentReleaseProfileGcpResource$outboundSchema) .optional(), stack: z.lazy(() => CurrentReleaseProfileGcpStack$outboundSchema).optional(), }); export function currentReleaseProfileGcpBindingToJSON( currentReleaseProfileGcpBinding: CurrentReleaseProfileGcpBinding, ): string { return JSON.stringify( CurrentReleaseProfileGcpBinding$outboundSchema.parse( currentReleaseProfileGcpBinding, ), ); } export function currentReleaseProfileGcpBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileGcpBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileGcpBinding' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileGcpGrant$inboundSchema: z.ZodType< CurrentReleaseProfileGcpGrant, 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(), }); /** @internal */ export type CurrentReleaseProfileGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseProfileGcpGrant$outboundSchema: z.ZodType< CurrentReleaseProfileGcpGrant$Outbound, CurrentReleaseProfileGcpGrant > = 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 currentReleaseProfileGcpGrantToJSON( currentReleaseProfileGcpGrant: CurrentReleaseProfileGcpGrant, ): string { return JSON.stringify( CurrentReleaseProfileGcpGrant$outboundSchema.parse( currentReleaseProfileGcpGrant, ), ); } export function currentReleaseProfileGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileGcpGrant' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileGcp$inboundSchema: z.ZodType< CurrentReleaseProfileGcp, unknown > = z.object({ binding: z.lazy(() => CurrentReleaseProfileGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseProfileGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentReleaseProfileGcp$Outbound = { binding: CurrentReleaseProfileGcpBinding$Outbound; description?: string | null | undefined; grant: CurrentReleaseProfileGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const CurrentReleaseProfileGcp$outboundSchema: z.ZodType< CurrentReleaseProfileGcp$Outbound, CurrentReleaseProfileGcp > = z.object({ binding: z.lazy(() => CurrentReleaseProfileGcpBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => CurrentReleaseProfileGcpGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function currentReleaseProfileGcpToJSON( currentReleaseProfileGcp: CurrentReleaseProfileGcp, ): string { return JSON.stringify( CurrentReleaseProfileGcp$outboundSchema.parse(currentReleaseProfileGcp), ); } export function currentReleaseProfileGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileGcp' from JSON`, ); } /** @internal */ export const CurrentReleaseProfilePlatforms$inboundSchema: z.ZodType< CurrentReleaseProfilePlatforms, unknown > = z.object({ aws: z.nullable(z.array(z.lazy(() => CurrentReleaseProfileAw$inboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => CurrentReleaseProfileAzure$inboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => CurrentReleaseProfileGcp$inboundSchema))) .optional(), }); /** @internal */ export type CurrentReleaseProfilePlatforms$Outbound = { aws?: Array | null | undefined; azure?: Array | null | undefined; gcp?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseProfilePlatforms$outboundSchema: z.ZodType< CurrentReleaseProfilePlatforms$Outbound, CurrentReleaseProfilePlatforms > = z.object({ aws: z.nullable(z.array(z.lazy(() => CurrentReleaseProfileAw$outboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => CurrentReleaseProfileAzure$outboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => CurrentReleaseProfileGcp$outboundSchema)), ).optional(), }); export function currentReleaseProfilePlatformsToJSON( currentReleaseProfilePlatforms: CurrentReleaseProfilePlatforms, ): string { return JSON.stringify( CurrentReleaseProfilePlatforms$outboundSchema.parse( currentReleaseProfilePlatforms, ), ); } export function currentReleaseProfilePlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfilePlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfilePlatforms' from JSON`, ); } /** @internal */ export const CurrentReleaseProfile$inboundSchema: z.ZodType< CurrentReleaseProfile, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => CurrentReleaseProfilePlatforms$inboundSchema), }); /** @internal */ export type CurrentReleaseProfile$Outbound = { description: string; id: string; platforms: CurrentReleaseProfilePlatforms$Outbound; }; /** @internal */ export const CurrentReleaseProfile$outboundSchema: z.ZodType< CurrentReleaseProfile$Outbound, CurrentReleaseProfile > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => CurrentReleaseProfilePlatforms$outboundSchema), }); export function currentReleaseProfileToJSON( currentReleaseProfile: CurrentReleaseProfile, ): string { return JSON.stringify( CurrentReleaseProfile$outboundSchema.parse(currentReleaseProfile), ); } export function currentReleaseProfileFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfile' from JSON`, ); } /** @internal */ export const CurrentReleaseProfileUnion$inboundSchema: z.ZodType< CurrentReleaseProfileUnion, unknown > = z.union([z.lazy(() => CurrentReleaseProfile$inboundSchema), z.string()]); /** @internal */ export type CurrentReleaseProfileUnion$Outbound = | CurrentReleaseProfile$Outbound | string; /** @internal */ export const CurrentReleaseProfileUnion$outboundSchema: z.ZodType< CurrentReleaseProfileUnion$Outbound, CurrentReleaseProfileUnion > = z.union([z.lazy(() => CurrentReleaseProfile$outboundSchema), z.string()]); export function currentReleaseProfileUnionToJSON( currentReleaseProfileUnion: CurrentReleaseProfileUnion, ): string { return JSON.stringify( CurrentReleaseProfileUnion$outboundSchema.parse(currentReleaseProfileUnion), ); } export function currentReleaseProfileUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseProfileUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseProfileUnion' from JSON`, ); } /** @internal */ export const CurrentReleasePermissions$inboundSchema: z.ZodType< CurrentReleasePermissions, unknown > = z.object({ management: z.union([ z.lazy(() => CurrentReleaseManagement1$inboundSchema), z.lazy(() => CurrentReleaseManagement2$inboundSchema), CurrentReleaseManagementEnum$inboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => CurrentReleaseProfile$inboundSchema), z.string(), ]), ), ), ), }); /** @internal */ export type CurrentReleasePermissions$Outbound = { management?: | CurrentReleaseManagement1$Outbound | CurrentReleaseManagement2$Outbound | string | undefined; profiles: { [k: string]: { [k: string]: Array; }; }; }; /** @internal */ export const CurrentReleasePermissions$outboundSchema: z.ZodType< CurrentReleasePermissions$Outbound, CurrentReleasePermissions > = z.object({ management: z.union([ z.lazy(() => CurrentReleaseManagement1$outboundSchema), z.lazy(() => CurrentReleaseManagement2$outboundSchema), CurrentReleaseManagementEnum$outboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => CurrentReleaseProfile$outboundSchema), z.string(), ]), ), ), ), }); export function currentReleasePermissionsToJSON( currentReleasePermissions: CurrentReleasePermissions, ): string { return JSON.stringify( CurrentReleasePermissions$outboundSchema.parse(currentReleasePermissions), ); } export function currentReleasePermissionsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleasePermissions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleasePermissions' from JSON`, ); } /** @internal */ export const CurrentReleaseConfig$inboundSchema: z.ZodType< CurrentReleaseConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type CurrentReleaseConfig$Outbound = { id: string; type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const CurrentReleaseConfig$outboundSchema: z.ZodType< CurrentReleaseConfig$Outbound, CurrentReleaseConfig > = z.object({ id: z.string(), type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function currentReleaseConfigToJSON( currentReleaseConfig: CurrentReleaseConfig, ): string { return JSON.stringify( CurrentReleaseConfig$outboundSchema.parse(currentReleaseConfig), ); } export function currentReleaseConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseConfig' from JSON`, ); } /** @internal */ export const CurrentReleaseDependency$inboundSchema: z.ZodType< CurrentReleaseDependency, unknown > = z.object({ id: z.string(), type: z.string(), }); /** @internal */ export type CurrentReleaseDependency$Outbound = { id: string; type: string; }; /** @internal */ export const CurrentReleaseDependency$outboundSchema: z.ZodType< CurrentReleaseDependency$Outbound, CurrentReleaseDependency > = z.object({ id: z.string(), type: z.string(), }); export function currentReleaseDependencyToJSON( currentReleaseDependency: CurrentReleaseDependency, ): string { return JSON.stringify( CurrentReleaseDependency$outboundSchema.parse(currentReleaseDependency), ); } export function currentReleaseDependencyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseDependency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseDependency' from JSON`, ); } /** @internal */ export const CurrentReleaseLifecycle$inboundSchema: z.ZodEnum< typeof CurrentReleaseLifecycle > = z.enum(CurrentReleaseLifecycle); /** @internal */ export const CurrentReleaseLifecycle$outboundSchema: z.ZodEnum< typeof CurrentReleaseLifecycle > = CurrentReleaseLifecycle$inboundSchema; /** @internal */ export const CurrentReleaseResources$inboundSchema: z.ZodType< CurrentReleaseResources, unknown > = z.object({ config: z.lazy(() => CurrentReleaseConfig$inboundSchema), dependencies: z.array(z.lazy(() => CurrentReleaseDependency$inboundSchema)), enabledWhen: z.nullable(z.string()).optional(), lifecycle: CurrentReleaseLifecycle$inboundSchema, remoteAccess: z.boolean().optional(), }); /** @internal */ export type CurrentReleaseResources$Outbound = { config: CurrentReleaseConfig$Outbound; dependencies: Array; enabledWhen?: string | null | undefined; lifecycle: string; remoteAccess?: boolean | undefined; }; /** @internal */ export const CurrentReleaseResources$outboundSchema: z.ZodType< CurrentReleaseResources$Outbound, CurrentReleaseResources > = z.object({ config: z.lazy(() => CurrentReleaseConfig$outboundSchema), dependencies: z.array(z.lazy(() => CurrentReleaseDependency$outboundSchema)), enabledWhen: z.nullable(z.string()).optional(), lifecycle: CurrentReleaseLifecycle$outboundSchema, remoteAccess: z.boolean().optional(), }); export function currentReleaseResourcesToJSON( currentReleaseResources: CurrentReleaseResources, ): string { return JSON.stringify( CurrentReleaseResources$outboundSchema.parse(currentReleaseResources), ); } export function currentReleaseResourcesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseResources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseResources' from JSON`, ); } /** @internal */ export const CurrentReleaseSupportedPlatform$inboundSchema: z.ZodEnum< typeof CurrentReleaseSupportedPlatform > = z.enum(CurrentReleaseSupportedPlatform); /** @internal */ export const CurrentReleaseSupportedPlatform$outboundSchema: z.ZodEnum< typeof CurrentReleaseSupportedPlatform > = CurrentReleaseSupportedPlatform$inboundSchema; /** @internal */ export const CurrentReleaseStack$inboundSchema: z.ZodType< CurrentReleaseStack, unknown > = z.object({ id: z.string(), inputs: z.array(z.lazy(() => CurrentReleaseInput$inboundSchema)).optional(), permissions: z.lazy(() => CurrentReleasePermissions$inboundSchema).optional(), resources: z.record( z.string(), z.lazy(() => CurrentReleaseResources$inboundSchema), ), supportedPlatforms: z.nullable( z.array(CurrentReleaseSupportedPlatform$inboundSchema), ).optional(), }); /** @internal */ export type CurrentReleaseStack$Outbound = { id: string; inputs?: Array | undefined; permissions?: CurrentReleasePermissions$Outbound | undefined; resources: { [k: string]: CurrentReleaseResources$Outbound }; supportedPlatforms?: Array | null | undefined; }; /** @internal */ export const CurrentReleaseStack$outboundSchema: z.ZodType< CurrentReleaseStack$Outbound, CurrentReleaseStack > = z.object({ id: z.string(), inputs: z.array(z.lazy(() => CurrentReleaseInput$outboundSchema)).optional(), permissions: z.lazy(() => CurrentReleasePermissions$outboundSchema) .optional(), resources: z.record( z.string(), z.lazy(() => CurrentReleaseResources$outboundSchema), ), supportedPlatforms: z.nullable( z.array(CurrentReleaseSupportedPlatform$outboundSchema), ).optional(), }); export function currentReleaseStackToJSON( currentReleaseStack: CurrentReleaseStack, ): string { return JSON.stringify( CurrentReleaseStack$outboundSchema.parse(currentReleaseStack), ); } export function currentReleaseStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseStack' from JSON`, ); } /** @internal */ export const CurrentRelease$inboundSchema: z.ZodType = z.object({ description: z.nullable(z.string()).optional(), releaseId: z.nullable(z.string()).optional(), stack: z.lazy(() => CurrentReleaseStack$inboundSchema), version: z.nullable(z.string()).optional(), }); /** @internal */ export type CurrentRelease$Outbound = { description?: string | null | undefined; releaseId?: string | null | undefined; stack: CurrentReleaseStack$Outbound; version?: string | null | undefined; }; /** @internal */ export const CurrentRelease$outboundSchema: z.ZodType< CurrentRelease$Outbound, CurrentRelease > = z.object({ description: z.nullable(z.string()).optional(), releaseId: z.nullable(z.string()).optional(), stack: z.lazy(() => CurrentReleaseStack$outboundSchema), version: z.nullable(z.string()).optional(), }); export function currentReleaseToJSON(currentRelease: CurrentRelease): string { return JSON.stringify(CurrentRelease$outboundSchema.parse(currentRelease)); } export function currentReleaseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentRelease$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentRelease' from JSON`, ); } /** @internal */ export const CurrentReleaseUnion$inboundSchema: z.ZodType< CurrentReleaseUnion, unknown > = z.union([z.lazy(() => CurrentRelease$inboundSchema), z.any()]); /** @internal */ export type CurrentReleaseUnion$Outbound = CurrentRelease$Outbound | any; /** @internal */ export const CurrentReleaseUnion$outboundSchema: z.ZodType< CurrentReleaseUnion$Outbound, CurrentReleaseUnion > = z.union([z.lazy(() => CurrentRelease$outboundSchema), z.any()]); export function currentReleaseUnionToJSON( currentReleaseUnion: CurrentReleaseUnion, ): string { return JSON.stringify( CurrentReleaseUnion$outboundSchema.parse(currentReleaseUnion), ); } export function currentReleaseUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentReleaseUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentReleaseUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePlatformTest$inboundSchema: z.ZodEnum< typeof DeploymentStatePlatformTest > = z.enum(DeploymentStatePlatformTest); /** @internal */ export const DeploymentStatePlatformTest$outboundSchema: z.ZodEnum< typeof DeploymentStatePlatformTest > = DeploymentStatePlatformTest$inboundSchema; /** @internal */ export const DeploymentStateEnvironmentInfoTest$inboundSchema: z.ZodType< DeploymentStateEnvironmentInfoTest, unknown > = z.object({ testId: z.string(), platform: DeploymentStatePlatformTest$inboundSchema, }); /** @internal */ export type DeploymentStateEnvironmentInfoTest$Outbound = { testId: string; platform: string; }; /** @internal */ export const DeploymentStateEnvironmentInfoTest$outboundSchema: z.ZodType< DeploymentStateEnvironmentInfoTest$Outbound, DeploymentStateEnvironmentInfoTest > = z.object({ testId: z.string(), platform: DeploymentStatePlatformTest$outboundSchema, }); export function deploymentStateEnvironmentInfoTestToJSON( deploymentStateEnvironmentInfoTest: DeploymentStateEnvironmentInfoTest, ): string { return JSON.stringify( DeploymentStateEnvironmentInfoTest$outboundSchema.parse( deploymentStateEnvironmentInfoTest, ), ); } export function deploymentStateEnvironmentInfoTestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateEnvironmentInfoTest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateEnvironmentInfoTest' from JSON`, ); } /** @internal */ export const DeploymentStatePlatformLocal$inboundSchema: z.ZodEnum< typeof DeploymentStatePlatformLocal > = z.enum(DeploymentStatePlatformLocal); /** @internal */ export const DeploymentStatePlatformLocal$outboundSchema: z.ZodEnum< typeof DeploymentStatePlatformLocal > = DeploymentStatePlatformLocal$inboundSchema; /** @internal */ export const DeploymentStateEnvironmentInfoLocal$inboundSchema: z.ZodType< DeploymentStateEnvironmentInfoLocal, unknown > = z.object({ arch: z.string(), hostname: z.string(), os: z.string(), platform: DeploymentStatePlatformLocal$inboundSchema, }); /** @internal */ export type DeploymentStateEnvironmentInfoLocal$Outbound = { arch: string; hostname: string; os: string; platform: string; }; /** @internal */ export const DeploymentStateEnvironmentInfoLocal$outboundSchema: z.ZodType< DeploymentStateEnvironmentInfoLocal$Outbound, DeploymentStateEnvironmentInfoLocal > = z.object({ arch: z.string(), hostname: z.string(), os: z.string(), platform: DeploymentStatePlatformLocal$outboundSchema, }); export function deploymentStateEnvironmentInfoLocalToJSON( deploymentStateEnvironmentInfoLocal: DeploymentStateEnvironmentInfoLocal, ): string { return JSON.stringify( DeploymentStateEnvironmentInfoLocal$outboundSchema.parse( deploymentStateEnvironmentInfoLocal, ), ); } export function deploymentStateEnvironmentInfoLocalFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateEnvironmentInfoLocal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateEnvironmentInfoLocal' from JSON`, ); } /** @internal */ export const DeploymentStatePlatformAzure$inboundSchema: z.ZodEnum< typeof DeploymentStatePlatformAzure > = z.enum(DeploymentStatePlatformAzure); /** @internal */ export const DeploymentStatePlatformAzure$outboundSchema: z.ZodEnum< typeof DeploymentStatePlatformAzure > = DeploymentStatePlatformAzure$inboundSchema; /** @internal */ export const DeploymentStateEnvironmentInfoAzure$inboundSchema: z.ZodType< DeploymentStateEnvironmentInfoAzure, unknown > = z.object({ location: z.string(), subscriptionId: z.string(), tenantId: z.string(), platform: DeploymentStatePlatformAzure$inboundSchema, }); /** @internal */ export type DeploymentStateEnvironmentInfoAzure$Outbound = { location: string; subscriptionId: string; tenantId: string; platform: string; }; /** @internal */ export const DeploymentStateEnvironmentInfoAzure$outboundSchema: z.ZodType< DeploymentStateEnvironmentInfoAzure$Outbound, DeploymentStateEnvironmentInfoAzure > = z.object({ location: z.string(), subscriptionId: z.string(), tenantId: z.string(), platform: DeploymentStatePlatformAzure$outboundSchema, }); export function deploymentStateEnvironmentInfoAzureToJSON( deploymentStateEnvironmentInfoAzure: DeploymentStateEnvironmentInfoAzure, ): string { return JSON.stringify( DeploymentStateEnvironmentInfoAzure$outboundSchema.parse( deploymentStateEnvironmentInfoAzure, ), ); } export function deploymentStateEnvironmentInfoAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateEnvironmentInfoAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateEnvironmentInfoAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePlatformGcp$inboundSchema: z.ZodEnum< typeof DeploymentStatePlatformGcp > = z.enum(DeploymentStatePlatformGcp); /** @internal */ export const DeploymentStatePlatformGcp$outboundSchema: z.ZodEnum< typeof DeploymentStatePlatformGcp > = DeploymentStatePlatformGcp$inboundSchema; /** @internal */ export const DeploymentStateEnvironmentInfoGcp$inboundSchema: z.ZodType< DeploymentStateEnvironmentInfoGcp, unknown > = z.object({ projectId: z.string(), projectNumber: z.string(), region: z.string(), platform: DeploymentStatePlatformGcp$inboundSchema, }); /** @internal */ export type DeploymentStateEnvironmentInfoGcp$Outbound = { projectId: string; projectNumber: string; region: string; platform: string; }; /** @internal */ export const DeploymentStateEnvironmentInfoGcp$outboundSchema: z.ZodType< DeploymentStateEnvironmentInfoGcp$Outbound, DeploymentStateEnvironmentInfoGcp > = z.object({ projectId: z.string(), projectNumber: z.string(), region: z.string(), platform: DeploymentStatePlatformGcp$outboundSchema, }); export function deploymentStateEnvironmentInfoGcpToJSON( deploymentStateEnvironmentInfoGcp: DeploymentStateEnvironmentInfoGcp, ): string { return JSON.stringify( DeploymentStateEnvironmentInfoGcp$outboundSchema.parse( deploymentStateEnvironmentInfoGcp, ), ); } export function deploymentStateEnvironmentInfoGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateEnvironmentInfoGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateEnvironmentInfoGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePlatformAws$inboundSchema: z.ZodEnum< typeof DeploymentStatePlatformAws > = z.enum(DeploymentStatePlatformAws); /** @internal */ export const DeploymentStatePlatformAws$outboundSchema: z.ZodEnum< typeof DeploymentStatePlatformAws > = DeploymentStatePlatformAws$inboundSchema; /** @internal */ export const DeploymentStateEnvironmentInfoAws$inboundSchema: z.ZodType< DeploymentStateEnvironmentInfoAws, unknown > = z.object({ accountId: z.string(), region: z.string(), platform: DeploymentStatePlatformAws$inboundSchema, }); /** @internal */ export type DeploymentStateEnvironmentInfoAws$Outbound = { accountId: string; region: string; platform: string; }; /** @internal */ export const DeploymentStateEnvironmentInfoAws$outboundSchema: z.ZodType< DeploymentStateEnvironmentInfoAws$Outbound, DeploymentStateEnvironmentInfoAws > = z.object({ accountId: z.string(), region: z.string(), platform: DeploymentStatePlatformAws$outboundSchema, }); export function deploymentStateEnvironmentInfoAwsToJSON( deploymentStateEnvironmentInfoAws: DeploymentStateEnvironmentInfoAws, ): string { return JSON.stringify( DeploymentStateEnvironmentInfoAws$outboundSchema.parse( deploymentStateEnvironmentInfoAws, ), ); } export function deploymentStateEnvironmentInfoAwsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateEnvironmentInfoAws$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateEnvironmentInfoAws' from JSON`, ); } /** @internal */ export const DeploymentStateEnvironmentInfoUnion$inboundSchema: z.ZodType< DeploymentStateEnvironmentInfoUnion, unknown > = z.union([ z.lazy(() => DeploymentStateEnvironmentInfoGcp$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAzure$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoLocal$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAws$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoTest$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStateEnvironmentInfoUnion$Outbound = | DeploymentStateEnvironmentInfoGcp$Outbound | DeploymentStateEnvironmentInfoAzure$Outbound | DeploymentStateEnvironmentInfoLocal$Outbound | DeploymentStateEnvironmentInfoAws$Outbound | DeploymentStateEnvironmentInfoTest$Outbound | any; /** @internal */ export const DeploymentStateEnvironmentInfoUnion$outboundSchema: z.ZodType< DeploymentStateEnvironmentInfoUnion$Outbound, DeploymentStateEnvironmentInfoUnion > = z.union([ z.lazy(() => DeploymentStateEnvironmentInfoGcp$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAzure$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoLocal$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAws$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoTest$outboundSchema), z.any(), ]); export function deploymentStateEnvironmentInfoUnionToJSON( deploymentStateEnvironmentInfoUnion: DeploymentStateEnvironmentInfoUnion, ): string { return JSON.stringify( DeploymentStateEnvironmentInfoUnion$outboundSchema.parse( deploymentStateEnvironmentInfoUnion, ), ); } export function deploymentStateEnvironmentInfoUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateEnvironmentInfoUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateEnvironmentInfoUnion' from JSON`, ); } /** @internal */ export const DeploymentStateError$inboundSchema: z.ZodType< DeploymentStateError, unknown > = z.object({ code: z.string(), context: z.nullable(z.any()).optional(), hint: z.nullable(z.string()).optional(), httpStatusCode: z.nullable(z.int()).optional(), internal: z.boolean(), message: z.string(), retryable: z.boolean().default(false), source: z.nullable(z.any()).optional(), }); /** @internal */ export type DeploymentStateError$Outbound = { code: string; context?: any | null | undefined; hint?: string | null | undefined; httpStatusCode?: number | null | undefined; internal: boolean; message: string; retryable: boolean; source?: any | null | undefined; }; /** @internal */ export const DeploymentStateError$outboundSchema: z.ZodType< DeploymentStateError$Outbound, DeploymentStateError > = z.object({ code: z.string(), context: z.nullable(z.any()).optional(), hint: z.nullable(z.string()).optional(), httpStatusCode: z.nullable(z.int()).optional(), internal: z.boolean(), message: z.string(), retryable: z.boolean().default(false), source: z.nullable(z.any()).optional(), }); export function deploymentStateErrorToJSON( deploymentStateError: DeploymentStateError, ): string { return JSON.stringify( DeploymentStateError$outboundSchema.parse(deploymentStateError), ); } export function deploymentStateErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateError' from JSON`, ); } /** @internal */ export const DeploymentStateErrorUnion$inboundSchema: z.ZodType< DeploymentStateErrorUnion, unknown > = z.union([z.lazy(() => DeploymentStateError$inboundSchema), z.any()]); /** @internal */ export type DeploymentStateErrorUnion$Outbound = | DeploymentStateError$Outbound | any; /** @internal */ export const DeploymentStateErrorUnion$outboundSchema: z.ZodType< DeploymentStateErrorUnion$Outbound, DeploymentStateErrorUnion > = z.union([z.lazy(() => DeploymentStateError$outboundSchema), z.any()]); export function deploymentStateErrorUnionToJSON( deploymentStateErrorUnion: DeploymentStateErrorUnion, ): string { return JSON.stringify( DeploymentStateErrorUnion$outboundSchema.parse(deploymentStateErrorUnion), ); } export function deploymentStateErrorUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateErrorUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateErrorUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePlatform$inboundSchema: z.ZodEnum< typeof DeploymentStatePlatform > = z.enum(DeploymentStatePlatform); /** @internal */ export const DeploymentStatePlatform$outboundSchema: z.ZodEnum< typeof DeploymentStatePlatform > = DeploymentStatePlatform$inboundSchema; /** @internal */ export const DeploymentStateInitialSetupAuthority$inboundSchema: z.ZodEnum< typeof DeploymentStateInitialSetupAuthority > = z.enum(DeploymentStateInitialSetupAuthority); /** @internal */ export const DeploymentStateInitialSetupAuthority$outboundSchema: z.ZodEnum< typeof DeploymentStateInitialSetupAuthority > = DeploymentStateInitialSetupAuthority$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackTypeStringList$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackTypeStringList, ); /** @internal */ export const DeploymentStatePendingPreparedStackTypeStringList$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackTypeStringList$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultStringList$inboundSchema: z.ZodType = z .object({ type: DeploymentStatePendingPreparedStackTypeStringList$inboundSchema, value: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackDefaultStringList$Outbound = { type: string; value: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultStringList$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackDefaultStringList$Outbound, DeploymentStatePendingPreparedStackDefaultStringList > = z.object({ type: DeploymentStatePendingPreparedStackTypeStringList$outboundSchema, value: z.array(z.string()), }); export function deploymentStatePendingPreparedStackDefaultStringListToJSON( deploymentStatePendingPreparedStackDefaultStringList: DeploymentStatePendingPreparedStackDefaultStringList, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackDefaultStringList$outboundSchema.parse( deploymentStatePendingPreparedStackDefaultStringList, ), ); } export function deploymentStatePendingPreparedStackDefaultStringListFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackDefaultStringList, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackDefaultStringList$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackDefaultStringList' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackTypeBoolean$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackTypeBoolean, ); /** @internal */ export const DeploymentStatePendingPreparedStackTypeBoolean$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackTypeBoolean$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultBoolean$inboundSchema: z.ZodType = z .object({ type: DeploymentStatePendingPreparedStackTypeBoolean$inboundSchema, value: z.boolean(), }); /** @internal */ export type DeploymentStatePendingPreparedStackDefaultBoolean$Outbound = { type: string; value: boolean; }; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultBoolean$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackDefaultBoolean$Outbound, DeploymentStatePendingPreparedStackDefaultBoolean > = z.object({ type: DeploymentStatePendingPreparedStackTypeBoolean$outboundSchema, value: z.boolean(), }); export function deploymentStatePendingPreparedStackDefaultBooleanToJSON( deploymentStatePendingPreparedStackDefaultBoolean: DeploymentStatePendingPreparedStackDefaultBoolean, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackDefaultBoolean$outboundSchema.parse( deploymentStatePendingPreparedStackDefaultBoolean, ), ); } export function deploymentStatePendingPreparedStackDefaultBooleanFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackDefaultBoolean, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackDefaultBoolean$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackDefaultBoolean' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackTypeNumber$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackTypeNumber, ); /** @internal */ export const DeploymentStatePendingPreparedStackTypeNumber$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackTypeNumber$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultNumber$inboundSchema: z.ZodType = z .object({ type: DeploymentStatePendingPreparedStackTypeNumber$inboundSchema, value: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackDefaultNumber$Outbound = { type: string; value: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultNumber$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackDefaultNumber$Outbound, DeploymentStatePendingPreparedStackDefaultNumber > = z.object({ type: DeploymentStatePendingPreparedStackTypeNumber$outboundSchema, value: z.string(), }); export function deploymentStatePendingPreparedStackDefaultNumberToJSON( deploymentStatePendingPreparedStackDefaultNumber: DeploymentStatePendingPreparedStackDefaultNumber, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackDefaultNumber$outboundSchema.parse( deploymentStatePendingPreparedStackDefaultNumber, ), ); } export function deploymentStatePendingPreparedStackDefaultNumberFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackDefaultNumber, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackDefaultNumber$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackDefaultNumber' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackTypeString$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackTypeString, ); /** @internal */ export const DeploymentStatePendingPreparedStackTypeString$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackTypeString$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultString$inboundSchema: z.ZodType = z .object({ type: DeploymentStatePendingPreparedStackTypeString$inboundSchema, value: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackDefaultString$Outbound = { type: string; value: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultString$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackDefaultString$Outbound, DeploymentStatePendingPreparedStackDefaultString > = z.object({ type: DeploymentStatePendingPreparedStackTypeString$outboundSchema, value: z.string(), }); export function deploymentStatePendingPreparedStackDefaultStringToJSON( deploymentStatePendingPreparedStackDefaultString: DeploymentStatePendingPreparedStackDefaultString, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackDefaultString$outboundSchema.parse( deploymentStatePendingPreparedStackDefaultString, ), ); } export function deploymentStatePendingPreparedStackDefaultStringFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackDefaultString, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackDefaultString$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackDefaultString' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackDefaultUnion$inboundSchema: z.ZodType = z.union( [ z.lazy(() => DeploymentStatePendingPreparedStackDefaultString$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultNumber$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultBoolean$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultStringList$inboundSchema ), z.any(), ], ); /** @internal */ export type DeploymentStatePendingPreparedStackDefaultUnion$Outbound = | DeploymentStatePendingPreparedStackDefaultString$Outbound | DeploymentStatePendingPreparedStackDefaultNumber$Outbound | DeploymentStatePendingPreparedStackDefaultBoolean$Outbound | DeploymentStatePendingPreparedStackDefaultStringList$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackDefaultUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackDefaultUnion$Outbound, DeploymentStatePendingPreparedStackDefaultUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackDefaultString$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultNumber$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultBoolean$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultStringList$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackDefaultUnionToJSON( deploymentStatePendingPreparedStackDefaultUnion: DeploymentStatePendingPreparedStackDefaultUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackDefaultUnion$outboundSchema.parse( deploymentStatePendingPreparedStackDefaultUnion, ), ); } export function deploymentStatePendingPreparedStackDefaultUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackDefaultUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackDefaultUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackDefaultUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackTypeEnvEnum$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackTypeEnvEnum, ); /** @internal */ export const DeploymentStatePendingPreparedStackTypeEnvEnum$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackTypeEnvEnum$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackTypeUnion$inboundSchema: z.ZodType = z.union([ DeploymentStatePendingPreparedStackTypeEnvEnum$inboundSchema, z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackTypeUnion$Outbound = | string | any; /** @internal */ export const DeploymentStatePendingPreparedStackTypeUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackTypeUnion$Outbound, DeploymentStatePendingPreparedStackTypeUnion > = z.union([ DeploymentStatePendingPreparedStackTypeEnvEnum$outboundSchema, z.any(), ]); export function deploymentStatePendingPreparedStackTypeUnionToJSON( deploymentStatePendingPreparedStackTypeUnion: DeploymentStatePendingPreparedStackTypeUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackTypeUnion$outboundSchema.parse( deploymentStatePendingPreparedStackTypeUnion, ), ); } export function deploymentStatePendingPreparedStackTypeUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackTypeUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackTypeUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackTypeUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackEnv$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackEnv, unknown > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable( z.union([ DeploymentStatePendingPreparedStackTypeEnvEnum$inboundSchema, z.any(), ]), ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackEnv$Outbound = { name: string; targetResources?: Array | null | undefined; type?: string | any | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackEnv$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackEnv$Outbound, DeploymentStatePendingPreparedStackEnv > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable( z.union([ DeploymentStatePendingPreparedStackTypeEnvEnum$outboundSchema, z.any(), ]), ).optional(), }); export function deploymentStatePendingPreparedStackEnvToJSON( deploymentStatePendingPreparedStackEnv: DeploymentStatePendingPreparedStackEnv, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackEnv$outboundSchema.parse( deploymentStatePendingPreparedStackEnv, ), ); } export function deploymentStatePendingPreparedStackEnvFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackEnv$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackEnv' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackKind$inboundSchema: z.ZodEnum< typeof DeploymentStatePendingPreparedStackKind > = z.enum(DeploymentStatePendingPreparedStackKind); /** @internal */ export const DeploymentStatePendingPreparedStackKind$outboundSchema: z.ZodEnum< typeof DeploymentStatePendingPreparedStackKind > = DeploymentStatePendingPreparedStackKind$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackPlatform$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackPlatform, ); /** @internal */ export const DeploymentStatePendingPreparedStackPlatform$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackPlatform$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackProvidedBy$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackProvidedBy, ); /** @internal */ export const DeploymentStatePendingPreparedStackProvidedBy$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackProvidedBy$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackValidation$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackValidation$Outbound = { format?: string | null | undefined; max?: string | null | undefined; maxItems?: number | null | undefined; maxLength?: number | null | undefined; min?: string | null | undefined; minItems?: number | null | undefined; minLength?: number | null | undefined; pattern?: string | null | undefined; values?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackValidation$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackValidation$Outbound, DeploymentStatePendingPreparedStackValidation > = 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 deploymentStatePendingPreparedStackValidationToJSON( deploymentStatePendingPreparedStackValidation: DeploymentStatePendingPreparedStackValidation, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackValidation$outboundSchema.parse( deploymentStatePendingPreparedStackValidation, ), ); } export function deploymentStatePendingPreparedStackValidationFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackValidation, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackValidation$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackValidation' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackValidationUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => DeploymentStatePendingPreparedStackValidation$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackValidationUnion$Outbound = | DeploymentStatePendingPreparedStackValidation$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackValidationUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackValidationUnion$Outbound, DeploymentStatePendingPreparedStackValidationUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackValidation$outboundSchema), z.any(), ]); export function deploymentStatePendingPreparedStackValidationUnionToJSON( deploymentStatePendingPreparedStackValidationUnion: DeploymentStatePendingPreparedStackValidationUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackValidationUnion$outboundSchema.parse( deploymentStatePendingPreparedStackValidationUnion, ), ); } export function deploymentStatePendingPreparedStackValidationUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackValidationUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackValidationUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackValidationUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackInput$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackInput, unknown > = z.object({ default: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackDefaultString$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultNumber$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultBoolean$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultStringList$inboundSchema ), z.any(), ]), ).optional(), description: z.string(), env: z.array( z.lazy(() => DeploymentStatePendingPreparedStackEnv$inboundSchema), ).optional(), id: z.string(), kind: DeploymentStatePendingPreparedStackKind$inboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable( z.array(DeploymentStatePendingPreparedStackPlatform$inboundSchema), ).optional(), providedBy: z.array( DeploymentStatePendingPreparedStackProvidedBy$inboundSchema, ), required: z.boolean(), validation: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackValidation$inboundSchema), z.any(), ]), ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackInput$Outbound = { default?: | DeploymentStatePendingPreparedStackDefaultString$Outbound | DeploymentStatePendingPreparedStackDefaultNumber$Outbound | DeploymentStatePendingPreparedStackDefaultBoolean$Outbound | DeploymentStatePendingPreparedStackDefaultStringList$Outbound | any | null | undefined; description: string; env?: Array | undefined; id: string; kind: string; label: string; placeholder?: string | null | undefined; platforms?: Array | null | undefined; providedBy: Array; required: boolean; validation?: | DeploymentStatePendingPreparedStackValidation$Outbound | any | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackInput$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackInput$Outbound, DeploymentStatePendingPreparedStackInput > = z.object({ default: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackDefaultString$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultNumber$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultBoolean$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackDefaultStringList$outboundSchema ), z.any(), ]), ).optional(), description: z.string(), env: z.array( z.lazy(() => DeploymentStatePendingPreparedStackEnv$outboundSchema), ).optional(), id: z.string(), kind: DeploymentStatePendingPreparedStackKind$outboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable( z.array(DeploymentStatePendingPreparedStackPlatform$outboundSchema), ).optional(), providedBy: z.array( DeploymentStatePendingPreparedStackProvidedBy$outboundSchema, ), required: z.boolean(), validation: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackValidation$outboundSchema ), z.any(), ]), ).optional(), }); export function deploymentStatePendingPreparedStackInputToJSON( deploymentStatePendingPreparedStackInput: DeploymentStatePendingPreparedStackInput, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackInput$outboundSchema.parse( deploymentStatePendingPreparedStackInput, ), ); } export function deploymentStatePendingPreparedStackInputFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackInput, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackInput$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackInput' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackManagementEnum$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackManagementEnum, ); /** @internal */ export const DeploymentStatePendingPreparedStackManagementEnum$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackManagementEnum$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAwResource$Outbound, DeploymentStatePendingPreparedStackOverrideAwResource > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePendingPreparedStackOverrideAwResourceToJSON( deploymentStatePendingPreparedStackOverrideAwResource: DeploymentStatePendingPreparedStackOverrideAwResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAwResource$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAwResource, ), ); } export function deploymentStatePendingPreparedStackOverrideAwResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAwResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAwResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwStack$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAwStack$Outbound, DeploymentStatePendingPreparedStackOverrideAwStack > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePendingPreparedStackOverrideAwStackToJSON( deploymentStatePendingPreparedStackOverrideAwStack: DeploymentStatePendingPreparedStackOverrideAwStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAwStack$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAwStack, ), ); } export function deploymentStatePendingPreparedStackOverrideAwStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAwStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAwStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAwStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAwBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackOverrideAwResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackOverrideAwStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAwBinding$Outbound, DeploymentStatePendingPreparedStackOverrideAwBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackOverrideAwBindingToJSON( deploymentStatePendingPreparedStackOverrideAwBinding: DeploymentStatePendingPreparedStackOverrideAwBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAwBinding$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAwBinding, ), ); } export function deploymentStatePendingPreparedStackOverrideAwBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAwBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideEffect$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackOverrideEffect, ); /** @internal */ export const DeploymentStatePendingPreparedStackOverrideEffect$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackOverrideEffect$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAwGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAwGrant$Outbound, DeploymentStatePendingPreparedStackOverrideAwGrant > = 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 deploymentStatePendingPreparedStackOverrideAwGrantToJSON( deploymentStatePendingPreparedStackOverrideAwGrant: DeploymentStatePendingPreparedStackOverrideAwGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAwGrant$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAwGrant, ), ); } export function deploymentStatePendingPreparedStackOverrideAwGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAwGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAwGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAwGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAw$inboundSchema: z.ZodType = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwBinding$inboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePendingPreparedStackOverrideEffect$inboundSchema .optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAw$Outbound = { binding: DeploymentStatePendingPreparedStackOverrideAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: DeploymentStatePendingPreparedStackOverrideAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAw$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAw$Outbound, DeploymentStatePendingPreparedStackOverrideAw > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwBinding$outboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePendingPreparedStackOverrideEffect$outboundSchema .optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAwGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackOverrideAwToJSON( deploymentStatePendingPreparedStackOverrideAw: DeploymentStatePendingPreparedStackOverrideAw, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAw$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAw, ), ); } export function deploymentStatePendingPreparedStackOverrideAwFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAw, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAw$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAw' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureResource$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAzureResource$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAzureResource$Outbound, DeploymentStatePendingPreparedStackOverrideAzureResource > = z.object({ scope: z.string(), }); export function deploymentStatePendingPreparedStackOverrideAzureResourceToJSON( deploymentStatePendingPreparedStackOverrideAzureResource: DeploymentStatePendingPreparedStackOverrideAzureResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAzureResource$outboundSchema .parse(deploymentStatePendingPreparedStackOverrideAzureResource), ); } export function deploymentStatePendingPreparedStackOverrideAzureResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAzureResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAzureResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureStack$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAzureStack$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAzureStack$Outbound, DeploymentStatePendingPreparedStackOverrideAzureStack > = z.object({ scope: z.string(), }); export function deploymentStatePendingPreparedStackOverrideAzureStackToJSON( deploymentStatePendingPreparedStackOverrideAzureStack: DeploymentStatePendingPreparedStackOverrideAzureStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAzureStack$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAzureStack, ), ); } export function deploymentStatePendingPreparedStackOverrideAzureStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAzureStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAzureBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackOverrideAzureResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackOverrideAzureStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAzureBinding$Outbound, DeploymentStatePendingPreparedStackOverrideAzureBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackOverrideAzureBindingToJSON( deploymentStatePendingPreparedStackOverrideAzureBinding: DeploymentStatePendingPreparedStackOverrideAzureBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAzureBinding$outboundSchema .parse(deploymentStatePendingPreparedStackOverrideAzureBinding), ); } export function deploymentStatePendingPreparedStackOverrideAzureBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAzureBinding$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAzureBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzureGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAzureGrant$Outbound, DeploymentStatePendingPreparedStackOverrideAzureGrant > = 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 deploymentStatePendingPreparedStackOverrideAzureGrantToJSON( deploymentStatePendingPreparedStackOverrideAzureGrant: DeploymentStatePendingPreparedStackOverrideAzureGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAzureGrant$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAzureGrant, ), ); } export function deploymentStatePendingPreparedStackOverrideAzureGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAzureGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzure$inboundSchema: z.ZodType = z .object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideAzure$Outbound = { binding: DeploymentStatePendingPreparedStackOverrideAzureBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePendingPreparedStackOverrideAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideAzure$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideAzure$Outbound, DeploymentStatePendingPreparedStackOverrideAzure > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzureGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackOverrideAzureToJSON( deploymentStatePendingPreparedStackOverrideAzure: DeploymentStatePendingPreparedStackOverrideAzure, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideAzure$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideAzure, ), ); } export function deploymentStatePendingPreparedStackOverrideAzureFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideAzure, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideAzure$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideConditionResource$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideConditionResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideConditionResource$Outbound, DeploymentStatePendingPreparedStackOverrideConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePendingPreparedStackOverrideConditionResourceToJSON( deploymentStatePendingPreparedStackOverrideConditionResource: DeploymentStatePendingPreparedStackOverrideConditionResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideConditionResource$outboundSchema .parse(deploymentStatePendingPreparedStackOverrideConditionResource), ); } export function deploymentStatePendingPreparedStackOverrideConditionResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideConditionResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideConditionResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideResourceConditionUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideResourceConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionResource$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideResourceConditionUnion$Outbound = | DeploymentStatePendingPreparedStackOverrideConditionResource$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideResourceConditionUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideResourceConditionUnion$Outbound, DeploymentStatePendingPreparedStackOverrideResourceConditionUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionResource$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackOverrideResourceConditionUnionToJSON( deploymentStatePendingPreparedStackOverrideResourceConditionUnion: DeploymentStatePendingPreparedStackOverrideResourceConditionUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideResourceConditionUnion$outboundSchema .parse(deploymentStatePendingPreparedStackOverrideResourceConditionUnion), ); } export function deploymentStatePendingPreparedStackOverrideResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideResourceConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideResourceConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideGcpResource$Outbound = { condition?: | DeploymentStatePendingPreparedStackOverrideConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideGcpResource$Outbound, DeploymentStatePendingPreparedStackOverrideGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionResource$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePendingPreparedStackOverrideGcpResourceToJSON( deploymentStatePendingPreparedStackOverrideGcpResource: DeploymentStatePendingPreparedStackOverrideGcpResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideGcpResource$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideGcpResource, ), ); } export function deploymentStatePendingPreparedStackOverrideGcpResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideGcpResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideGcpResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideConditionStack$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideConditionStack, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideConditionStack$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideConditionStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideConditionStack$Outbound, DeploymentStatePendingPreparedStackOverrideConditionStack > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePendingPreparedStackOverrideConditionStackToJSON( deploymentStatePendingPreparedStackOverrideConditionStack: DeploymentStatePendingPreparedStackOverrideConditionStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideConditionStack$outboundSchema .parse(deploymentStatePendingPreparedStackOverrideConditionStack), ); } export function deploymentStatePendingPreparedStackOverrideConditionStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideConditionStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideConditionStack$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideConditionStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideStackConditionUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideStackConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionStack$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideStackConditionUnion$Outbound = | DeploymentStatePendingPreparedStackOverrideConditionStack$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideStackConditionUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideStackConditionUnion$Outbound, DeploymentStatePendingPreparedStackOverrideStackConditionUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionStack$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackOverrideStackConditionUnionToJSON( deploymentStatePendingPreparedStackOverrideStackConditionUnion: DeploymentStatePendingPreparedStackOverrideStackConditionUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideStackConditionUnion$outboundSchema .parse(deploymentStatePendingPreparedStackOverrideStackConditionUnion), ); } export function deploymentStatePendingPreparedStackOverrideStackConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideStackConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideStackConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideStackConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpStack$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionStack$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideGcpStack$Outbound = { condition?: | DeploymentStatePendingPreparedStackOverrideConditionStack$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideGcpStack$Outbound, DeploymentStatePendingPreparedStackOverrideGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverrideConditionStack$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePendingPreparedStackOverrideGcpStackToJSON( deploymentStatePendingPreparedStackOverrideGcpStack: DeploymentStatePendingPreparedStackOverrideGcpStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideGcpStack$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideGcpStack, ), ); } export function deploymentStatePendingPreparedStackOverrideGcpStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideGcpStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideGcpBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackOverrideGcpResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackOverrideGcpStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideGcpBinding$Outbound, DeploymentStatePendingPreparedStackOverrideGcpBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackOverrideGcpBindingToJSON( deploymentStatePendingPreparedStackOverrideGcpBinding: DeploymentStatePendingPreparedStackOverrideGcpBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideGcpBinding$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideGcpBinding, ), ); } export function deploymentStatePendingPreparedStackOverrideGcpBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideGcpBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcpGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideGcpGrant$Outbound, DeploymentStatePendingPreparedStackOverrideGcpGrant > = 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 deploymentStatePendingPreparedStackOverrideGcpGrantToJSON( deploymentStatePendingPreparedStackOverrideGcpGrant: DeploymentStatePendingPreparedStackOverrideGcpGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideGcpGrant$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideGcpGrant, ), ); } export function deploymentStatePendingPreparedStackOverrideGcpGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideGcpGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcp$inboundSchema: z.ZodType = z.object( { binding: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }, ); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideGcp$Outbound = { binding: DeploymentStatePendingPreparedStackOverrideGcpBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePendingPreparedStackOverrideGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideGcp$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideGcp$Outbound, DeploymentStatePendingPreparedStackOverrideGcp > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcpGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackOverrideGcpToJSON( deploymentStatePendingPreparedStackOverrideGcp: DeploymentStatePendingPreparedStackOverrideGcp, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideGcp$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideGcp, ), ); } export function deploymentStatePendingPreparedStackOverrideGcpFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideGcp, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideGcp$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverridePlatforms$inboundSchema: z.ZodType = z .object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackOverrideAw$inboundSchema )), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzure$inboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcp$inboundSchema )), ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverridePlatforms$Outbound = { aws?: | Array | null | undefined; azure?: | Array | null | undefined; gcp?: | Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverridePlatforms$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverridePlatforms$Outbound, DeploymentStatePendingPreparedStackOverridePlatforms > = z.object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackOverrideAw$outboundSchema )), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackOverrideAzure$outboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackOverrideGcp$outboundSchema )), ).optional(), }); export function deploymentStatePendingPreparedStackOverridePlatformsToJSON( deploymentStatePendingPreparedStackOverridePlatforms: DeploymentStatePendingPreparedStackOverridePlatforms, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverridePlatforms$outboundSchema.parse( deploymentStatePendingPreparedStackOverridePlatforms, ), ); } export function deploymentStatePendingPreparedStackOverridePlatformsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverridePlatforms, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverridePlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverridePlatforms' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverride$inboundSchema: z.ZodType = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePendingPreparedStackOverridePlatforms$inboundSchema ), }); /** @internal */ export type DeploymentStatePendingPreparedStackOverride$Outbound = { description: string; id: string; platforms: DeploymentStatePendingPreparedStackOverridePlatforms$Outbound; }; /** @internal */ export const DeploymentStatePendingPreparedStackOverride$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverride$Outbound, DeploymentStatePendingPreparedStackOverride > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePendingPreparedStackOverridePlatforms$outboundSchema ), }); export function deploymentStatePendingPreparedStackOverrideToJSON( deploymentStatePendingPreparedStackOverride: DeploymentStatePendingPreparedStackOverride, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverride$outboundSchema.parse( deploymentStatePendingPreparedStackOverride, ), ); } export function deploymentStatePendingPreparedStackOverrideFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverride, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverride$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverride' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackOverrideUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => DeploymentStatePendingPreparedStackOverride$inboundSchema), z.string(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackOverrideUnion$Outbound = | DeploymentStatePendingPreparedStackOverride$Outbound | string; /** @internal */ export const DeploymentStatePendingPreparedStackOverrideUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackOverrideUnion$Outbound, DeploymentStatePendingPreparedStackOverrideUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverride$outboundSchema), z.string(), ]); export function deploymentStatePendingPreparedStackOverrideUnionToJSON( deploymentStatePendingPreparedStackOverrideUnion: DeploymentStatePendingPreparedStackOverrideUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackOverrideUnion$outboundSchema.parse( deploymentStatePendingPreparedStackOverrideUnion, ), ); } export function deploymentStatePendingPreparedStackOverrideUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackOverrideUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackOverrideUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackOverrideUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackManagement2$inboundSchema: z.ZodType = z.object( { override: z.record( z.string(), z.array( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverride$inboundSchema ), z.string(), ]), ), ), }, ); /** @internal */ export type DeploymentStatePendingPreparedStackManagement2$Outbound = { override: { [k: string]: Array< DeploymentStatePendingPreparedStackOverride$Outbound | string >; }; }; /** @internal */ export const DeploymentStatePendingPreparedStackManagement2$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackManagement2$Outbound, DeploymentStatePendingPreparedStackManagement2 > = z.object({ override: z.record( z.string(), z.array(z.union([ z.lazy(() => DeploymentStatePendingPreparedStackOverride$outboundSchema ), z.string(), ])), ), }); export function deploymentStatePendingPreparedStackManagement2ToJSON( deploymentStatePendingPreparedStackManagement2: DeploymentStatePendingPreparedStackManagement2, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackManagement2$outboundSchema.parse( deploymentStatePendingPreparedStackManagement2, ), ); } export function deploymentStatePendingPreparedStackManagement2FromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackManagement2, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackManagement2$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackManagement2' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAwResource$Outbound, DeploymentStatePendingPreparedStackExtendAwResource > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePendingPreparedStackExtendAwResourceToJSON( deploymentStatePendingPreparedStackExtendAwResource: DeploymentStatePendingPreparedStackExtendAwResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAwResource$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAwResource, ), ); } export function deploymentStatePendingPreparedStackExtendAwResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAwResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAwResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwStack$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAwStack$Outbound, DeploymentStatePendingPreparedStackExtendAwStack > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePendingPreparedStackExtendAwStackToJSON( deploymentStatePendingPreparedStackExtendAwStack: DeploymentStatePendingPreparedStackExtendAwStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAwStack$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAwStack, ), ); } export function deploymentStatePendingPreparedStackExtendAwStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAwStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAwStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAwStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAwBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackExtendAwResource$Outbound | undefined; stack?: DeploymentStatePendingPreparedStackExtendAwStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAwBinding$Outbound, DeploymentStatePendingPreparedStackExtendAwBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackExtendAwBindingToJSON( deploymentStatePendingPreparedStackExtendAwBinding: DeploymentStatePendingPreparedStackExtendAwBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAwBinding$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAwBinding, ), ); } export function deploymentStatePendingPreparedStackExtendAwBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAwBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendEffect$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackExtendEffect, ); /** @internal */ export const DeploymentStatePendingPreparedStackExtendEffect$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackExtendEffect$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAwGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAwGrant$Outbound, DeploymentStatePendingPreparedStackExtendAwGrant > = 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 deploymentStatePendingPreparedStackExtendAwGrantToJSON( deploymentStatePendingPreparedStackExtendAwGrant: DeploymentStatePendingPreparedStackExtendAwGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAwGrant$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAwGrant, ), ); } export function deploymentStatePendingPreparedStackExtendAwGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAwGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAwGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAwGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAw$inboundSchema: z.ZodType = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwBinding$inboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePendingPreparedStackExtendEffect$inboundSchema .optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAw$Outbound = { binding: DeploymentStatePendingPreparedStackExtendAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: DeploymentStatePendingPreparedStackExtendAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAw$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAw$Outbound, DeploymentStatePendingPreparedStackExtendAw > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwBinding$outboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePendingPreparedStackExtendEffect$outboundSchema .optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackExtendAwGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackExtendAwToJSON( deploymentStatePendingPreparedStackExtendAw: DeploymentStatePendingPreparedStackExtendAw, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAw$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAw, ), ); } export function deploymentStatePendingPreparedStackExtendAwFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAw, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAw$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAw' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureResource$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAzureResource$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAzureResource$Outbound, DeploymentStatePendingPreparedStackExtendAzureResource > = z.object({ scope: z.string(), }); export function deploymentStatePendingPreparedStackExtendAzureResourceToJSON( deploymentStatePendingPreparedStackExtendAzureResource: DeploymentStatePendingPreparedStackExtendAzureResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAzureResource$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAzureResource, ), ); } export function deploymentStatePendingPreparedStackExtendAzureResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAzureResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAzureResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureStack$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAzureStack$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAzureStack$Outbound, DeploymentStatePendingPreparedStackExtendAzureStack > = z.object({ scope: z.string(), }); export function deploymentStatePendingPreparedStackExtendAzureStackToJSON( deploymentStatePendingPreparedStackExtendAzureStack: DeploymentStatePendingPreparedStackExtendAzureStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAzureStack$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAzureStack, ), ); } export function deploymentStatePendingPreparedStackExtendAzureStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAzureStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAzureBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackExtendAzureResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackExtendAzureStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAzureBinding$Outbound, DeploymentStatePendingPreparedStackExtendAzureBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackExtendAzureBindingToJSON( deploymentStatePendingPreparedStackExtendAzureBinding: DeploymentStatePendingPreparedStackExtendAzureBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAzureBinding$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAzureBinding, ), ); } export function deploymentStatePendingPreparedStackExtendAzureBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAzureBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzureGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAzureGrant$Outbound, DeploymentStatePendingPreparedStackExtendAzureGrant > = 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 deploymentStatePendingPreparedStackExtendAzureGrantToJSON( deploymentStatePendingPreparedStackExtendAzureGrant: DeploymentStatePendingPreparedStackExtendAzureGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAzureGrant$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAzureGrant, ), ); } export function deploymentStatePendingPreparedStackExtendAzureGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAzureGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzure$inboundSchema: z.ZodType = z.object( { binding: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }, ); /** @internal */ export type DeploymentStatePendingPreparedStackExtendAzure$Outbound = { binding: DeploymentStatePendingPreparedStackExtendAzureBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePendingPreparedStackExtendAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendAzure$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendAzure$Outbound, DeploymentStatePendingPreparedStackExtendAzure > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackExtendAzureGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackExtendAzureToJSON( deploymentStatePendingPreparedStackExtendAzure: DeploymentStatePendingPreparedStackExtendAzure, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendAzure$outboundSchema.parse( deploymentStatePendingPreparedStackExtendAzure, ), ); } export function deploymentStatePendingPreparedStackExtendAzureFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendAzure, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendAzure$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendConditionResource$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendConditionResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendConditionResource$Outbound, DeploymentStatePendingPreparedStackExtendConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePendingPreparedStackExtendConditionResourceToJSON( deploymentStatePendingPreparedStackExtendConditionResource: DeploymentStatePendingPreparedStackExtendConditionResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendConditionResource$outboundSchema .parse(deploymentStatePendingPreparedStackExtendConditionResource), ); } export function deploymentStatePendingPreparedStackExtendConditionResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendConditionResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackExtendConditionResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendResourceConditionUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendResourceConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionResource$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackExtendResourceConditionUnion$Outbound = | DeploymentStatePendingPreparedStackExtendConditionResource$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackExtendResourceConditionUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendResourceConditionUnion$Outbound, DeploymentStatePendingPreparedStackExtendResourceConditionUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionResource$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackExtendResourceConditionUnionToJSON( deploymentStatePendingPreparedStackExtendResourceConditionUnion: DeploymentStatePendingPreparedStackExtendResourceConditionUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendResourceConditionUnion$outboundSchema .parse(deploymentStatePendingPreparedStackExtendResourceConditionUnion), ); } export function deploymentStatePendingPreparedStackExtendResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendResourceConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackExtendResourceConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendGcpResource$Outbound = { condition?: | DeploymentStatePendingPreparedStackExtendConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendGcpResource$Outbound, DeploymentStatePendingPreparedStackExtendGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionResource$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePendingPreparedStackExtendGcpResourceToJSON( deploymentStatePendingPreparedStackExtendGcpResource: DeploymentStatePendingPreparedStackExtendGcpResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendGcpResource$outboundSchema.parse( deploymentStatePendingPreparedStackExtendGcpResource, ), ); } export function deploymentStatePendingPreparedStackExtendGcpResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendGcpResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendConditionStack$inboundSchema: z.ZodType = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendConditionStack$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendConditionStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendConditionStack$Outbound, DeploymentStatePendingPreparedStackExtendConditionStack > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePendingPreparedStackExtendConditionStackToJSON( deploymentStatePendingPreparedStackExtendConditionStack: DeploymentStatePendingPreparedStackExtendConditionStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendConditionStack$outboundSchema .parse(deploymentStatePendingPreparedStackExtendConditionStack), ); } export function deploymentStatePendingPreparedStackExtendConditionStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendConditionStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendConditionStack$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackExtendConditionStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendStackConditionUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendStackConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionStack$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackExtendStackConditionUnion$Outbound = | DeploymentStatePendingPreparedStackExtendConditionStack$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackExtendStackConditionUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendStackConditionUnion$Outbound, DeploymentStatePendingPreparedStackExtendStackConditionUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionStack$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackExtendStackConditionUnionToJSON( deploymentStatePendingPreparedStackExtendStackConditionUnion: DeploymentStatePendingPreparedStackExtendStackConditionUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendStackConditionUnion$outboundSchema .parse(deploymentStatePendingPreparedStackExtendStackConditionUnion), ); } export function deploymentStatePendingPreparedStackExtendStackConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendStackConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendStackConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackExtendStackConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpStack$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionStack$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendGcpStack$Outbound = { condition?: | DeploymentStatePendingPreparedStackExtendConditionStack$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendGcpStack$Outbound, DeploymentStatePendingPreparedStackExtendGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtendConditionStack$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePendingPreparedStackExtendGcpStackToJSON( deploymentStatePendingPreparedStackExtendGcpStack: DeploymentStatePendingPreparedStackExtendGcpStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendGcpStack$outboundSchema.parse( deploymentStatePendingPreparedStackExtendGcpStack, ), ); } export function deploymentStatePendingPreparedStackExtendGcpStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendGcpStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendGcpBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackExtendGcpResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackExtendGcpStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendGcpBinding$Outbound, DeploymentStatePendingPreparedStackExtendGcpBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackExtendGcpBindingToJSON( deploymentStatePendingPreparedStackExtendGcpBinding: DeploymentStatePendingPreparedStackExtendGcpBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendGcpBinding$outboundSchema.parse( deploymentStatePendingPreparedStackExtendGcpBinding, ), ); } export function deploymentStatePendingPreparedStackExtendGcpBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendGcpBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcpGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendGcpGrant$Outbound, DeploymentStatePendingPreparedStackExtendGcpGrant > = 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 deploymentStatePendingPreparedStackExtendGcpGrantToJSON( deploymentStatePendingPreparedStackExtendGcpGrant: DeploymentStatePendingPreparedStackExtendGcpGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendGcpGrant$outboundSchema.parse( deploymentStatePendingPreparedStackExtendGcpGrant, ), ); } export function deploymentStatePendingPreparedStackExtendGcpGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendGcpGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcp$inboundSchema: z.ZodType = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendGcp$Outbound = { binding: DeploymentStatePendingPreparedStackExtendGcpBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePendingPreparedStackExtendGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendGcp$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendGcp$Outbound, DeploymentStatePendingPreparedStackExtendGcp > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackExtendGcpGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackExtendGcpToJSON( deploymentStatePendingPreparedStackExtendGcp: DeploymentStatePendingPreparedStackExtendGcp, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendGcp$outboundSchema.parse( deploymentStatePendingPreparedStackExtendGcp, ), ); } export function deploymentStatePendingPreparedStackExtendGcpFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendGcp, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendGcp$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendPlatforms$inboundSchema: z.ZodType = z .object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackExtendAw$inboundSchema )), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackExtendAzure$inboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackExtendGcp$inboundSchema )), ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtendPlatforms$Outbound = { aws?: | Array | null | undefined; azure?: | Array | null | undefined; gcp?: | Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtendPlatforms$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendPlatforms$Outbound, DeploymentStatePendingPreparedStackExtendPlatforms > = z.object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackExtendAw$outboundSchema )), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackExtendAzure$outboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackExtendGcp$outboundSchema )), ).optional(), }); export function deploymentStatePendingPreparedStackExtendPlatformsToJSON( deploymentStatePendingPreparedStackExtendPlatforms: DeploymentStatePendingPreparedStackExtendPlatforms, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendPlatforms$outboundSchema.parse( deploymentStatePendingPreparedStackExtendPlatforms, ), ); } export function deploymentStatePendingPreparedStackExtendPlatformsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendPlatforms, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendPlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendPlatforms' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtend$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtend, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePendingPreparedStackExtendPlatforms$inboundSchema ), }); /** @internal */ export type DeploymentStatePendingPreparedStackExtend$Outbound = { description: string; id: string; platforms: DeploymentStatePendingPreparedStackExtendPlatforms$Outbound; }; /** @internal */ export const DeploymentStatePendingPreparedStackExtend$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtend$Outbound, DeploymentStatePendingPreparedStackExtend > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePendingPreparedStackExtendPlatforms$outboundSchema ), }); export function deploymentStatePendingPreparedStackExtendToJSON( deploymentStatePendingPreparedStackExtend: DeploymentStatePendingPreparedStackExtend, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtend$outboundSchema.parse( deploymentStatePendingPreparedStackExtend, ), ); } export function deploymentStatePendingPreparedStackExtendFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtend, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtend$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtend' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackExtendUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtend$inboundSchema), z.string(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackExtendUnion$Outbound = | DeploymentStatePendingPreparedStackExtend$Outbound | string; /** @internal */ export const DeploymentStatePendingPreparedStackExtendUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackExtendUnion$Outbound, DeploymentStatePendingPreparedStackExtendUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtend$outboundSchema), z.string(), ]); export function deploymentStatePendingPreparedStackExtendUnionToJSON( deploymentStatePendingPreparedStackExtendUnion: DeploymentStatePendingPreparedStackExtendUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackExtendUnion$outboundSchema.parse( deploymentStatePendingPreparedStackExtendUnion, ), ); } export function deploymentStatePendingPreparedStackExtendUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackExtendUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackExtendUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackExtendUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackManagement1$inboundSchema: z.ZodType = z.object( { extend: z.record( z.string(), z.array( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtend$inboundSchema ), z.string(), ]), ), ), }, ); /** @internal */ export type DeploymentStatePendingPreparedStackManagement1$Outbound = { extend: { [k: string]: Array< DeploymentStatePendingPreparedStackExtend$Outbound | string >; }; }; /** @internal */ export const DeploymentStatePendingPreparedStackManagement1$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackManagement1$Outbound, DeploymentStatePendingPreparedStackManagement1 > = z.object({ extend: z.record( z.string(), z.array(z.union([ z.lazy(() => DeploymentStatePendingPreparedStackExtend$outboundSchema), z.string(), ])), ), }); export function deploymentStatePendingPreparedStackManagement1ToJSON( deploymentStatePendingPreparedStackManagement1: DeploymentStatePendingPreparedStackManagement1, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackManagement1$outboundSchema.parse( deploymentStatePendingPreparedStackManagement1, ), ); } export function deploymentStatePendingPreparedStackManagement1FromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackManagement1, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackManagement1$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackManagement1' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackManagementUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => DeploymentStatePendingPreparedStackManagement1$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackManagement2$inboundSchema ), DeploymentStatePendingPreparedStackManagementEnum$inboundSchema, ]); /** @internal */ export type DeploymentStatePendingPreparedStackManagementUnion$Outbound = | DeploymentStatePendingPreparedStackManagement1$Outbound | DeploymentStatePendingPreparedStackManagement2$Outbound | string; /** @internal */ export const DeploymentStatePendingPreparedStackManagementUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackManagementUnion$Outbound, DeploymentStatePendingPreparedStackManagementUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackManagement1$outboundSchema), z.lazy(() => DeploymentStatePendingPreparedStackManagement2$outboundSchema), DeploymentStatePendingPreparedStackManagementEnum$outboundSchema, ]); export function deploymentStatePendingPreparedStackManagementUnionToJSON( deploymentStatePendingPreparedStackManagementUnion: DeploymentStatePendingPreparedStackManagementUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackManagementUnion$outboundSchema.parse( deploymentStatePendingPreparedStackManagementUnion, ), ); } export function deploymentStatePendingPreparedStackManagementUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackManagementUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackManagementUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackManagementUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAwResource$Outbound, DeploymentStatePendingPreparedStackProfileAwResource > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePendingPreparedStackProfileAwResourceToJSON( deploymentStatePendingPreparedStackProfileAwResource: DeploymentStatePendingPreparedStackProfileAwResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAwResource$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAwResource, ), ); } export function deploymentStatePendingPreparedStackProfileAwResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAwResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAwResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwStack$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAwStack$Outbound, DeploymentStatePendingPreparedStackProfileAwStack > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePendingPreparedStackProfileAwStackToJSON( deploymentStatePendingPreparedStackProfileAwStack: DeploymentStatePendingPreparedStackProfileAwStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAwStack$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAwStack, ), ); } export function deploymentStatePendingPreparedStackProfileAwStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAwStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAwStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAwStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAwBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackProfileAwResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackProfileAwStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAwBinding$Outbound, DeploymentStatePendingPreparedStackProfileAwBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackProfileAwBindingToJSON( deploymentStatePendingPreparedStackProfileAwBinding: DeploymentStatePendingPreparedStackProfileAwBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAwBinding$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAwBinding, ), ); } export function deploymentStatePendingPreparedStackProfileAwBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAwBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileEffect$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackProfileEffect, ); /** @internal */ export const DeploymentStatePendingPreparedStackProfileEffect$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackProfileEffect$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAwGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAwGrant$Outbound, DeploymentStatePendingPreparedStackProfileAwGrant > = 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 deploymentStatePendingPreparedStackProfileAwGrantToJSON( deploymentStatePendingPreparedStackProfileAwGrant: DeploymentStatePendingPreparedStackProfileAwGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAwGrant$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAwGrant, ), ); } export function deploymentStatePendingPreparedStackProfileAwGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAwGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAwGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAwGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAw$inboundSchema: z.ZodType = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwBinding$inboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePendingPreparedStackProfileEffect$inboundSchema .optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAw$Outbound = { binding: DeploymentStatePendingPreparedStackProfileAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: DeploymentStatePendingPreparedStackProfileAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAw$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAw$Outbound, DeploymentStatePendingPreparedStackProfileAw > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwBinding$outboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePendingPreparedStackProfileEffect$outboundSchema .optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackProfileAwGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackProfileAwToJSON( deploymentStatePendingPreparedStackProfileAw: DeploymentStatePendingPreparedStackProfileAw, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAw$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAw, ), ); } export function deploymentStatePendingPreparedStackProfileAwFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAw, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAw$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAw' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureResource$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAzureResource$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAzureResource$Outbound, DeploymentStatePendingPreparedStackProfileAzureResource > = z.object({ scope: z.string(), }); export function deploymentStatePendingPreparedStackProfileAzureResourceToJSON( deploymentStatePendingPreparedStackProfileAzureResource: DeploymentStatePendingPreparedStackProfileAzureResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAzureResource$outboundSchema .parse(deploymentStatePendingPreparedStackProfileAzureResource), ); } export function deploymentStatePendingPreparedStackProfileAzureResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAzureResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAzureResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureStack$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAzureStack$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAzureStack$Outbound, DeploymentStatePendingPreparedStackProfileAzureStack > = z.object({ scope: z.string(), }); export function deploymentStatePendingPreparedStackProfileAzureStackToJSON( deploymentStatePendingPreparedStackProfileAzureStack: DeploymentStatePendingPreparedStackProfileAzureStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAzureStack$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAzureStack, ), ); } export function deploymentStatePendingPreparedStackProfileAzureStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAzureStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAzureBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackProfileAzureResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackProfileAzureStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAzureBinding$Outbound, DeploymentStatePendingPreparedStackProfileAzureBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackProfileAzureBindingToJSON( deploymentStatePendingPreparedStackProfileAzureBinding: DeploymentStatePendingPreparedStackProfileAzureBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAzureBinding$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAzureBinding, ), ); } export function deploymentStatePendingPreparedStackProfileAzureBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAzureBinding$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAzureBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzureGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAzureGrant$Outbound, DeploymentStatePendingPreparedStackProfileAzureGrant > = 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 deploymentStatePendingPreparedStackProfileAzureGrantToJSON( deploymentStatePendingPreparedStackProfileAzureGrant: DeploymentStatePendingPreparedStackProfileAzureGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAzureGrant$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAzureGrant, ), ); } export function deploymentStatePendingPreparedStackProfileAzureGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAzureGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzure$inboundSchema: z.ZodType = z .object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileAzure$Outbound = { binding: DeploymentStatePendingPreparedStackProfileAzureBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePendingPreparedStackProfileAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileAzure$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileAzure$Outbound, DeploymentStatePendingPreparedStackProfileAzure > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackProfileAzureGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackProfileAzureToJSON( deploymentStatePendingPreparedStackProfileAzure: DeploymentStatePendingPreparedStackProfileAzure, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileAzure$outboundSchema.parse( deploymentStatePendingPreparedStackProfileAzure, ), ); } export function deploymentStatePendingPreparedStackProfileAzureFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileAzure, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileAzure$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileConditionResource$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileConditionResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileConditionResource$Outbound, DeploymentStatePendingPreparedStackProfileConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePendingPreparedStackProfileConditionResourceToJSON( deploymentStatePendingPreparedStackProfileConditionResource: DeploymentStatePendingPreparedStackProfileConditionResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileConditionResource$outboundSchema .parse(deploymentStatePendingPreparedStackProfileConditionResource), ); } export function deploymentStatePendingPreparedStackProfileConditionResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileConditionResource$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackProfileConditionResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileResourceConditionUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileResourceConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionResource$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackProfileResourceConditionUnion$Outbound = | DeploymentStatePendingPreparedStackProfileConditionResource$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackProfileResourceConditionUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileResourceConditionUnion$Outbound, DeploymentStatePendingPreparedStackProfileResourceConditionUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionResource$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackProfileResourceConditionUnionToJSON( deploymentStatePendingPreparedStackProfileResourceConditionUnion: DeploymentStatePendingPreparedStackProfileResourceConditionUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileResourceConditionUnion$outboundSchema .parse(deploymentStatePendingPreparedStackProfileResourceConditionUnion), ); } export function deploymentStatePendingPreparedStackProfileResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileResourceConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackProfileResourceConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileGcpResource$Outbound = { condition?: | DeploymentStatePendingPreparedStackProfileConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpResource$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileGcpResource$Outbound, DeploymentStatePendingPreparedStackProfileGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionResource$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePendingPreparedStackProfileGcpResourceToJSON( deploymentStatePendingPreparedStackProfileGcpResource: DeploymentStatePendingPreparedStackProfileGcpResource, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileGcpResource$outboundSchema.parse( deploymentStatePendingPreparedStackProfileGcpResource, ), ); } export function deploymentStatePendingPreparedStackProfileGcpResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileGcpResource' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileConditionStack$inboundSchema: z.ZodType = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileConditionStack$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileConditionStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileConditionStack$Outbound, DeploymentStatePendingPreparedStackProfileConditionStack > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePendingPreparedStackProfileConditionStackToJSON( deploymentStatePendingPreparedStackProfileConditionStack: DeploymentStatePendingPreparedStackProfileConditionStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileConditionStack$outboundSchema .parse(deploymentStatePendingPreparedStackProfileConditionStack), ); } export function deploymentStatePendingPreparedStackProfileConditionStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileConditionStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileConditionStack$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackProfileConditionStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileStackConditionUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileStackConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionStack$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackProfileStackConditionUnion$Outbound = | DeploymentStatePendingPreparedStackProfileConditionStack$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackProfileStackConditionUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileStackConditionUnion$Outbound, DeploymentStatePendingPreparedStackProfileStackConditionUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionStack$outboundSchema ), z.any(), ]); export function deploymentStatePendingPreparedStackProfileStackConditionUnionToJSON( deploymentStatePendingPreparedStackProfileStackConditionUnion: DeploymentStatePendingPreparedStackProfileStackConditionUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileStackConditionUnion$outboundSchema .parse(deploymentStatePendingPreparedStackProfileStackConditionUnion), ); } export function deploymentStatePendingPreparedStackProfileStackConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileStackConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileStackConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStackProfileStackConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpStack$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionStack$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileGcpStack$Outbound = { condition?: | DeploymentStatePendingPreparedStackProfileConditionStack$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileGcpStack$Outbound, DeploymentStatePendingPreparedStackProfileGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfileConditionStack$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePendingPreparedStackProfileGcpStackToJSON( deploymentStatePendingPreparedStackProfileGcpStack: DeploymentStatePendingPreparedStackProfileGcpStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileGcpStack$outboundSchema.parse( deploymentStatePendingPreparedStackProfileGcpStack, ), ); } export function deploymentStatePendingPreparedStackProfileGcpStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileGcpStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileGcpBinding$Outbound = { resource?: | DeploymentStatePendingPreparedStackProfileGcpResource$Outbound | undefined; stack?: | DeploymentStatePendingPreparedStackProfileGcpStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpBinding$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileGcpBinding$Outbound, DeploymentStatePendingPreparedStackProfileGcpBinding > = z.object({ resource: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpStack$outboundSchema ).optional(), }); export function deploymentStatePendingPreparedStackProfileGcpBindingToJSON( deploymentStatePendingPreparedStackProfileGcpBinding: DeploymentStatePendingPreparedStackProfileGcpBinding, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileGcpBinding$outboundSchema.parse( deploymentStatePendingPreparedStackProfileGcpBinding, ), ); } export function deploymentStatePendingPreparedStackProfileGcpBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileGcpBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcpGrant$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileGcpGrant$Outbound, DeploymentStatePendingPreparedStackProfileGcpGrant > = 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 deploymentStatePendingPreparedStackProfileGcpGrantToJSON( deploymentStatePendingPreparedStackProfileGcpGrant: DeploymentStatePendingPreparedStackProfileGcpGrant, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileGcpGrant$outboundSchema.parse( deploymentStatePendingPreparedStackProfileGcpGrant, ), ); } export function deploymentStatePendingPreparedStackProfileGcpGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileGcpGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcp$inboundSchema: z.ZodType = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfileGcp$Outbound = { binding: DeploymentStatePendingPreparedStackProfileGcpBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePendingPreparedStackProfileGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfileGcp$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileGcp$Outbound, DeploymentStatePendingPreparedStackProfileGcp > = z.object({ binding: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePendingPreparedStackProfileGcpGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePendingPreparedStackProfileGcpToJSON( deploymentStatePendingPreparedStackProfileGcp: DeploymentStatePendingPreparedStackProfileGcp, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileGcp$outboundSchema.parse( deploymentStatePendingPreparedStackProfileGcp, ), ); } export function deploymentStatePendingPreparedStackProfileGcpFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileGcp, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileGcp$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfilePlatforms$inboundSchema: z.ZodType = z .object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackProfileAw$inboundSchema )), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackProfileAzure$inboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackProfileGcp$inboundSchema )), ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfilePlatforms$Outbound = { aws?: | Array | null | undefined; azure?: | Array | null | undefined; gcp?: | Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfilePlatforms$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfilePlatforms$Outbound, DeploymentStatePendingPreparedStackProfilePlatforms > = z.object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackProfileAw$outboundSchema )), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackProfileAzure$outboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePendingPreparedStackProfileGcp$outboundSchema )), ).optional(), }); export function deploymentStatePendingPreparedStackProfilePlatformsToJSON( deploymentStatePendingPreparedStackProfilePlatforms: DeploymentStatePendingPreparedStackProfilePlatforms, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfilePlatforms$outboundSchema.parse( deploymentStatePendingPreparedStackProfilePlatforms, ), ); } export function deploymentStatePendingPreparedStackProfilePlatformsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfilePlatforms, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfilePlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfilePlatforms' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfile$inboundSchema: z.ZodType = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePendingPreparedStackProfilePlatforms$inboundSchema ), }); /** @internal */ export type DeploymentStatePendingPreparedStackProfile$Outbound = { description: string; id: string; platforms: DeploymentStatePendingPreparedStackProfilePlatforms$Outbound; }; /** @internal */ export const DeploymentStatePendingPreparedStackProfile$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfile$Outbound, DeploymentStatePendingPreparedStackProfile > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePendingPreparedStackProfilePlatforms$outboundSchema ), }); export function deploymentStatePendingPreparedStackProfileToJSON( deploymentStatePendingPreparedStackProfile: DeploymentStatePendingPreparedStackProfile, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfile$outboundSchema.parse( deploymentStatePendingPreparedStackProfile, ), ); } export function deploymentStatePendingPreparedStackProfileFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfile, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfile$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfile' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackProfileUnion$inboundSchema: z.ZodType = z.union( [ z.lazy(() => DeploymentStatePendingPreparedStackProfile$inboundSchema), z.string(), ], ); /** @internal */ export type DeploymentStatePendingPreparedStackProfileUnion$Outbound = | DeploymentStatePendingPreparedStackProfile$Outbound | string; /** @internal */ export const DeploymentStatePendingPreparedStackProfileUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackProfileUnion$Outbound, DeploymentStatePendingPreparedStackProfileUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfile$outboundSchema), z.string(), ]); export function deploymentStatePendingPreparedStackProfileUnionToJSON( deploymentStatePendingPreparedStackProfileUnion: DeploymentStatePendingPreparedStackProfileUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackProfileUnion$outboundSchema.parse( deploymentStatePendingPreparedStackProfileUnion, ), ); } export function deploymentStatePendingPreparedStackProfileUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackProfileUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackProfileUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackProfileUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackPermissions$inboundSchema: z.ZodType = z.object( { management: z.union([ z.lazy(() => DeploymentStatePendingPreparedStackManagement1$inboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackManagement2$inboundSchema ), DeploymentStatePendingPreparedStackManagementEnum$inboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfile$inboundSchema ), z.string(), ]), ), ), ), }, ); /** @internal */ export type DeploymentStatePendingPreparedStackPermissions$Outbound = { management?: | DeploymentStatePendingPreparedStackManagement1$Outbound | DeploymentStatePendingPreparedStackManagement2$Outbound | string | undefined; profiles: { [k: string]: { [k: string]: Array< DeploymentStatePendingPreparedStackProfile$Outbound | string >; }; }; }; /** @internal */ export const DeploymentStatePendingPreparedStackPermissions$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackPermissions$Outbound, DeploymentStatePendingPreparedStackPermissions > = z.object({ management: z.union([ z.lazy(() => DeploymentStatePendingPreparedStackManagement1$outboundSchema ), z.lazy(() => DeploymentStatePendingPreparedStackManagement2$outboundSchema ), DeploymentStatePendingPreparedStackManagementEnum$outboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => DeploymentStatePendingPreparedStackProfile$outboundSchema ), z.string(), ]), ), ), ), }); export function deploymentStatePendingPreparedStackPermissionsToJSON( deploymentStatePendingPreparedStackPermissions: DeploymentStatePendingPreparedStackPermissions, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackPermissions$outboundSchema.parse( deploymentStatePendingPreparedStackPermissions, ), ); } export function deploymentStatePendingPreparedStackPermissionsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackPermissions, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackPermissions$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackPermissions' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackConfig$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type DeploymentStatePendingPreparedStackConfig$Outbound = { id: string; type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const DeploymentStatePendingPreparedStackConfig$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackConfig$Outbound, DeploymentStatePendingPreparedStackConfig > = z.object({ id: z.string(), type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function deploymentStatePendingPreparedStackConfigToJSON( deploymentStatePendingPreparedStackConfig: DeploymentStatePendingPreparedStackConfig, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackConfig$outboundSchema.parse( deploymentStatePendingPreparedStackConfig, ), ); } export function deploymentStatePendingPreparedStackConfigFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackConfig, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackConfig$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackConfig' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackDependency$inboundSchema: z.ZodType = z.object({ id: z.string(), type: z.string(), }); /** @internal */ export type DeploymentStatePendingPreparedStackDependency$Outbound = { id: string; type: string; }; /** @internal */ export const DeploymentStatePendingPreparedStackDependency$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackDependency$Outbound, DeploymentStatePendingPreparedStackDependency > = z.object({ id: z.string(), type: z.string(), }); export function deploymentStatePendingPreparedStackDependencyToJSON( deploymentStatePendingPreparedStackDependency: DeploymentStatePendingPreparedStackDependency, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackDependency$outboundSchema.parse( deploymentStatePendingPreparedStackDependency, ), ); } export function deploymentStatePendingPreparedStackDependencyFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackDependency, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackDependency$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackDependency' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackLifecycle$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePendingPreparedStackLifecycle, ); /** @internal */ export const DeploymentStatePendingPreparedStackLifecycle$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackLifecycle$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStackResources$inboundSchema: z.ZodType = z.object({ config: z.lazy(() => DeploymentStatePendingPreparedStackConfig$inboundSchema ), dependencies: z.array( z.lazy(() => DeploymentStatePendingPreparedStackDependency$inboundSchema), ), enabledWhen: z.nullable(z.string()).optional(), lifecycle: DeploymentStatePendingPreparedStackLifecycle$inboundSchema, remoteAccess: z.boolean().optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStackResources$Outbound = { config: DeploymentStatePendingPreparedStackConfig$Outbound; dependencies: Array; enabledWhen?: string | null | undefined; lifecycle: string; remoteAccess?: boolean | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStackResources$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackResources$Outbound, DeploymentStatePendingPreparedStackResources > = z.object({ config: z.lazy(() => DeploymentStatePendingPreparedStackConfig$outboundSchema ), dependencies: z.array( z.lazy(() => DeploymentStatePendingPreparedStackDependency$outboundSchema ), ), enabledWhen: z.nullable(z.string()).optional(), lifecycle: DeploymentStatePendingPreparedStackLifecycle$outboundSchema, remoteAccess: z.boolean().optional(), }); export function deploymentStatePendingPreparedStackResourcesToJSON( deploymentStatePendingPreparedStackResources: DeploymentStatePendingPreparedStackResources, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackResources$outboundSchema.parse( deploymentStatePendingPreparedStackResources, ), ); } export function deploymentStatePendingPreparedStackResourcesFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackResources, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackResources$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackResources' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackSupportedPlatform$inboundSchema: z.ZodEnum = z .enum(DeploymentStatePendingPreparedStackSupportedPlatform); /** @internal */ export const DeploymentStatePendingPreparedStackSupportedPlatform$outboundSchema: z.ZodEnum = DeploymentStatePendingPreparedStackSupportedPlatform$inboundSchema; /** @internal */ export const DeploymentStatePendingPreparedStack$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStack, unknown > = z.object({ id: z.string(), inputs: z.array( z.lazy(() => DeploymentStatePendingPreparedStackInput$inboundSchema), ).optional(), permissions: z.lazy(() => DeploymentStatePendingPreparedStackPermissions$inboundSchema ).optional(), resources: z.record( z.string(), z.lazy(() => DeploymentStatePendingPreparedStackResources$inboundSchema), ), supportedPlatforms: z.nullable( z.array(DeploymentStatePendingPreparedStackSupportedPlatform$inboundSchema), ).optional(), }); /** @internal */ export type DeploymentStatePendingPreparedStack$Outbound = { id: string; inputs?: Array | undefined; permissions?: | DeploymentStatePendingPreparedStackPermissions$Outbound | undefined; resources: { [k: string]: DeploymentStatePendingPreparedStackResources$Outbound; }; supportedPlatforms?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePendingPreparedStack$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStack$Outbound, DeploymentStatePendingPreparedStack > = z.object({ id: z.string(), inputs: z.array( z.lazy(() => DeploymentStatePendingPreparedStackInput$outboundSchema), ).optional(), permissions: z.lazy(() => DeploymentStatePendingPreparedStackPermissions$outboundSchema ).optional(), resources: z.record( z.string(), z.lazy(() => DeploymentStatePendingPreparedStackResources$outboundSchema), ), supportedPlatforms: z.nullable( z.array( DeploymentStatePendingPreparedStackSupportedPlatform$outboundSchema, ), ).optional(), }); export function deploymentStatePendingPreparedStackToJSON( deploymentStatePendingPreparedStack: DeploymentStatePendingPreparedStack, ): string { return JSON.stringify( DeploymentStatePendingPreparedStack$outboundSchema.parse( deploymentStatePendingPreparedStack, ), ); } export function deploymentStatePendingPreparedStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePendingPreparedStack' from JSON`, ); } /** @internal */ export const DeploymentStatePendingPreparedStackUnion$inboundSchema: z.ZodType< DeploymentStatePendingPreparedStackUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStack$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStatePendingPreparedStackUnion$Outbound = | DeploymentStatePendingPreparedStack$Outbound | any; /** @internal */ export const DeploymentStatePendingPreparedStackUnion$outboundSchema: z.ZodType< DeploymentStatePendingPreparedStackUnion$Outbound, DeploymentStatePendingPreparedStackUnion > = z.union([ z.lazy(() => DeploymentStatePendingPreparedStack$outboundSchema), z.any(), ]); export function deploymentStatePendingPreparedStackUnionToJSON( deploymentStatePendingPreparedStackUnion: DeploymentStatePendingPreparedStackUnion, ): string { return JSON.stringify( DeploymentStatePendingPreparedStackUnion$outboundSchema.parse( deploymentStatePendingPreparedStackUnion, ), ); } export function deploymentStatePendingPreparedStackUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePendingPreparedStackUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePendingPreparedStackUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePendingPreparedStackUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackTypeStringList$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePreparedStackTypeStringList, ); /** @internal */ export const DeploymentStatePreparedStackTypeStringList$outboundSchema: z.ZodEnum = DeploymentStatePreparedStackTypeStringList$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackDefaultStringList$inboundSchema: z.ZodType = z.object({ type: DeploymentStatePreparedStackTypeStringList$inboundSchema, value: z.array(z.string()), }); /** @internal */ export type DeploymentStatePreparedStackDefaultStringList$Outbound = { type: string; value: Array; }; /** @internal */ export const DeploymentStatePreparedStackDefaultStringList$outboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultStringList$Outbound, DeploymentStatePreparedStackDefaultStringList > = z.object({ type: DeploymentStatePreparedStackTypeStringList$outboundSchema, value: z.array(z.string()), }); export function deploymentStatePreparedStackDefaultStringListToJSON( deploymentStatePreparedStackDefaultStringList: DeploymentStatePreparedStackDefaultStringList, ): string { return JSON.stringify( DeploymentStatePreparedStackDefaultStringList$outboundSchema.parse( deploymentStatePreparedStackDefaultStringList, ), ); } export function deploymentStatePreparedStackDefaultStringListFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackDefaultStringList, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackDefaultStringList$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackDefaultStringList' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackTypeBoolean$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeBoolean > = z.enum(DeploymentStatePreparedStackTypeBoolean); /** @internal */ export const DeploymentStatePreparedStackTypeBoolean$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeBoolean > = DeploymentStatePreparedStackTypeBoolean$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackDefaultBoolean$inboundSchema: z.ZodType = z.object({ type: DeploymentStatePreparedStackTypeBoolean$inboundSchema, value: z.boolean(), }); /** @internal */ export type DeploymentStatePreparedStackDefaultBoolean$Outbound = { type: string; value: boolean; }; /** @internal */ export const DeploymentStatePreparedStackDefaultBoolean$outboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultBoolean$Outbound, DeploymentStatePreparedStackDefaultBoolean > = z.object({ type: DeploymentStatePreparedStackTypeBoolean$outboundSchema, value: z.boolean(), }); export function deploymentStatePreparedStackDefaultBooleanToJSON( deploymentStatePreparedStackDefaultBoolean: DeploymentStatePreparedStackDefaultBoolean, ): string { return JSON.stringify( DeploymentStatePreparedStackDefaultBoolean$outboundSchema.parse( deploymentStatePreparedStackDefaultBoolean, ), ); } export function deploymentStatePreparedStackDefaultBooleanFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackDefaultBoolean, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackDefaultBoolean$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackDefaultBoolean' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackTypeNumber$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeNumber > = z.enum(DeploymentStatePreparedStackTypeNumber); /** @internal */ export const DeploymentStatePreparedStackTypeNumber$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeNumber > = DeploymentStatePreparedStackTypeNumber$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackDefaultNumber$inboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultNumber, unknown > = z.object({ type: DeploymentStatePreparedStackTypeNumber$inboundSchema, value: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackDefaultNumber$Outbound = { type: string; value: string; }; /** @internal */ export const DeploymentStatePreparedStackDefaultNumber$outboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultNumber$Outbound, DeploymentStatePreparedStackDefaultNumber > = z.object({ type: DeploymentStatePreparedStackTypeNumber$outboundSchema, value: z.string(), }); export function deploymentStatePreparedStackDefaultNumberToJSON( deploymentStatePreparedStackDefaultNumber: DeploymentStatePreparedStackDefaultNumber, ): string { return JSON.stringify( DeploymentStatePreparedStackDefaultNumber$outboundSchema.parse( deploymentStatePreparedStackDefaultNumber, ), ); } export function deploymentStatePreparedStackDefaultNumberFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackDefaultNumber, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackDefaultNumber$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackDefaultNumber' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackTypeString$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeString > = z.enum(DeploymentStatePreparedStackTypeString); /** @internal */ export const DeploymentStatePreparedStackTypeString$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeString > = DeploymentStatePreparedStackTypeString$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackDefaultString$inboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultString, unknown > = z.object({ type: DeploymentStatePreparedStackTypeString$inboundSchema, value: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackDefaultString$Outbound = { type: string; value: string; }; /** @internal */ export const DeploymentStatePreparedStackDefaultString$outboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultString$Outbound, DeploymentStatePreparedStackDefaultString > = z.object({ type: DeploymentStatePreparedStackTypeString$outboundSchema, value: z.string(), }); export function deploymentStatePreparedStackDefaultStringToJSON( deploymentStatePreparedStackDefaultString: DeploymentStatePreparedStackDefaultString, ): string { return JSON.stringify( DeploymentStatePreparedStackDefaultString$outboundSchema.parse( deploymentStatePreparedStackDefaultString, ), ); } export function deploymentStatePreparedStackDefaultStringFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackDefaultString, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackDefaultString$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackDefaultString' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackDefaultUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStackDefaultString$inboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultNumber$inboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultBoolean$inboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultStringList$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackDefaultUnion$Outbound = | DeploymentStatePreparedStackDefaultString$Outbound | DeploymentStatePreparedStackDefaultNumber$Outbound | DeploymentStatePreparedStackDefaultBoolean$Outbound | DeploymentStatePreparedStackDefaultStringList$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackDefaultUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackDefaultUnion$Outbound, DeploymentStatePreparedStackDefaultUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackDefaultString$outboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultNumber$outboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultBoolean$outboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultStringList$outboundSchema), z.any(), ]); export function deploymentStatePreparedStackDefaultUnionToJSON( deploymentStatePreparedStackDefaultUnion: DeploymentStatePreparedStackDefaultUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackDefaultUnion$outboundSchema.parse( deploymentStatePreparedStackDefaultUnion, ), ); } export function deploymentStatePreparedStackDefaultUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackDefaultUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackDefaultUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackDefaultUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackTypeEnvEnum$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeEnvEnum > = z.enum(DeploymentStatePreparedStackTypeEnvEnum); /** @internal */ export const DeploymentStatePreparedStackTypeEnvEnum$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackTypeEnvEnum > = DeploymentStatePreparedStackTypeEnvEnum$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackTypeUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackTypeUnion, unknown > = z.union([DeploymentStatePreparedStackTypeEnvEnum$inboundSchema, z.any()]); /** @internal */ export type DeploymentStatePreparedStackTypeUnion$Outbound = string | any; /** @internal */ export const DeploymentStatePreparedStackTypeUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackTypeUnion$Outbound, DeploymentStatePreparedStackTypeUnion > = z.union([DeploymentStatePreparedStackTypeEnvEnum$outboundSchema, z.any()]); export function deploymentStatePreparedStackTypeUnionToJSON( deploymentStatePreparedStackTypeUnion: DeploymentStatePreparedStackTypeUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackTypeUnion$outboundSchema.parse( deploymentStatePreparedStackTypeUnion, ), ); } export function deploymentStatePreparedStackTypeUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackTypeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackTypeUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackEnv$inboundSchema: z.ZodType< DeploymentStatePreparedStackEnv, unknown > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable( z.union([DeploymentStatePreparedStackTypeEnvEnum$inboundSchema, z.any()]), ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackEnv$Outbound = { name: string; targetResources?: Array | null | undefined; type?: string | any | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackEnv$outboundSchema: z.ZodType< DeploymentStatePreparedStackEnv$Outbound, DeploymentStatePreparedStackEnv > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable( z.union([DeploymentStatePreparedStackTypeEnvEnum$outboundSchema, z.any()]), ).optional(), }); export function deploymentStatePreparedStackEnvToJSON( deploymentStatePreparedStackEnv: DeploymentStatePreparedStackEnv, ): string { return JSON.stringify( DeploymentStatePreparedStackEnv$outboundSchema.parse( deploymentStatePreparedStackEnv, ), ); } export function deploymentStatePreparedStackEnvFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackEnv$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackEnv' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackKind$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackKind > = z.enum(DeploymentStatePreparedStackKind); /** @internal */ export const DeploymentStatePreparedStackKind$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackKind > = DeploymentStatePreparedStackKind$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackPlatform$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackPlatform > = z.enum(DeploymentStatePreparedStackPlatform); /** @internal */ export const DeploymentStatePreparedStackPlatform$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackPlatform > = DeploymentStatePreparedStackPlatform$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackProvidedBy$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackProvidedBy > = z.enum(DeploymentStatePreparedStackProvidedBy); /** @internal */ export const DeploymentStatePreparedStackProvidedBy$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackProvidedBy > = DeploymentStatePreparedStackProvidedBy$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackValidation$inboundSchema: z.ZodType< DeploymentStatePreparedStackValidation, 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(), }); /** @internal */ export type DeploymentStatePreparedStackValidation$Outbound = { format?: string | null | undefined; max?: string | null | undefined; maxItems?: number | null | undefined; maxLength?: number | null | undefined; min?: string | null | undefined; minItems?: number | null | undefined; minLength?: number | null | undefined; pattern?: string | null | undefined; values?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackValidation$outboundSchema: z.ZodType< DeploymentStatePreparedStackValidation$Outbound, DeploymentStatePreparedStackValidation > = 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 deploymentStatePreparedStackValidationToJSON( deploymentStatePreparedStackValidation: DeploymentStatePreparedStackValidation, ): string { return JSON.stringify( DeploymentStatePreparedStackValidation$outboundSchema.parse( deploymentStatePreparedStackValidation, ), ); } export function deploymentStatePreparedStackValidationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackValidation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackValidation' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackValidationUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => DeploymentStatePreparedStackValidation$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackValidationUnion$Outbound = | DeploymentStatePreparedStackValidation$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackValidationUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackValidationUnion$Outbound, DeploymentStatePreparedStackValidationUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackValidation$outboundSchema), z.any(), ]); export function deploymentStatePreparedStackValidationUnionToJSON( deploymentStatePreparedStackValidationUnion: DeploymentStatePreparedStackValidationUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackValidationUnion$outboundSchema.parse( deploymentStatePreparedStackValidationUnion, ), ); } export function deploymentStatePreparedStackValidationUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackValidationUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackValidationUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackValidationUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackInput$inboundSchema: z.ZodType< DeploymentStatePreparedStackInput, unknown > = z.object({ default: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackDefaultString$inboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultNumber$inboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultBoolean$inboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultStringList$inboundSchema), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => DeploymentStatePreparedStackEnv$inboundSchema)) .optional(), id: z.string(), kind: DeploymentStatePreparedStackKind$inboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable( z.array(DeploymentStatePreparedStackPlatform$inboundSchema), ).optional(), providedBy: z.array(DeploymentStatePreparedStackProvidedBy$inboundSchema), required: z.boolean(), validation: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackValidation$inboundSchema), z.any(), ]), ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackInput$Outbound = { default?: | DeploymentStatePreparedStackDefaultString$Outbound | DeploymentStatePreparedStackDefaultNumber$Outbound | DeploymentStatePreparedStackDefaultBoolean$Outbound | DeploymentStatePreparedStackDefaultStringList$Outbound | any | null | undefined; description: string; env?: Array | undefined; id: string; kind: string; label: string; placeholder?: string | null | undefined; platforms?: Array | null | undefined; providedBy: Array; required: boolean; validation?: | DeploymentStatePreparedStackValidation$Outbound | any | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackInput$outboundSchema: z.ZodType< DeploymentStatePreparedStackInput$Outbound, DeploymentStatePreparedStackInput > = z.object({ default: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackDefaultString$outboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultNumber$outboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultBoolean$outboundSchema), z.lazy(() => DeploymentStatePreparedStackDefaultStringList$outboundSchema ), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => DeploymentStatePreparedStackEnv$outboundSchema)) .optional(), id: z.string(), kind: DeploymentStatePreparedStackKind$outboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable( z.array(DeploymentStatePreparedStackPlatform$outboundSchema), ).optional(), providedBy: z.array(DeploymentStatePreparedStackProvidedBy$outboundSchema), required: z.boolean(), validation: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackValidation$outboundSchema), z.any(), ]), ).optional(), }); export function deploymentStatePreparedStackInputToJSON( deploymentStatePreparedStackInput: DeploymentStatePreparedStackInput, ): string { return JSON.stringify( DeploymentStatePreparedStackInput$outboundSchema.parse( deploymentStatePreparedStackInput, ), ); } export function deploymentStatePreparedStackInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackInput' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackManagementEnum$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePreparedStackManagementEnum, ); /** @internal */ export const DeploymentStatePreparedStackManagementEnum$outboundSchema: z.ZodEnum = DeploymentStatePreparedStackManagementEnum$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackOverrideAwResource$inboundSchema: z.ZodType = z.object( { condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }, ); /** @internal */ export type DeploymentStatePreparedStackOverrideAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAwResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAwResource$Outbound, DeploymentStatePreparedStackOverrideAwResource > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePreparedStackOverrideAwResourceToJSON( deploymentStatePreparedStackOverrideAwResource: DeploymentStatePreparedStackOverrideAwResource, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAwResource$outboundSchema.parse( deploymentStatePreparedStackOverrideAwResource, ), ); } export function deploymentStatePreparedStackOverrideAwResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAwResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAwResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAwStack$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAwStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAwStack$Outbound, DeploymentStatePreparedStackOverrideAwStack > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePreparedStackOverrideAwStackToJSON( deploymentStatePreparedStackOverrideAwStack: DeploymentStatePreparedStackOverrideAwStack, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAwStack$outboundSchema.parse( deploymentStatePreparedStackOverrideAwStack, ), ); } export function deploymentStatePreparedStackOverrideAwStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAwStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAwStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAwStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAwBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackOverrideAwResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackOverrideAwStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAwBinding$Outbound = { resource?: | DeploymentStatePreparedStackOverrideAwResource$Outbound | undefined; stack?: DeploymentStatePreparedStackOverrideAwStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAwBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAwBinding$Outbound, DeploymentStatePreparedStackOverrideAwBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackOverrideAwResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackOverrideAwStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackOverrideAwBindingToJSON( deploymentStatePreparedStackOverrideAwBinding: DeploymentStatePreparedStackOverrideAwBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAwBinding$outboundSchema.parse( deploymentStatePreparedStackOverrideAwBinding, ), ); } export function deploymentStatePreparedStackOverrideAwBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAwBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideEffect$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePreparedStackOverrideEffect, ); /** @internal */ export const DeploymentStatePreparedStackOverrideEffect$outboundSchema: z.ZodEnum = DeploymentStatePreparedStackOverrideEffect$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackOverrideAwGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAwGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAwGrant$Outbound, DeploymentStatePreparedStackOverrideAwGrant > = 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 deploymentStatePreparedStackOverrideAwGrantToJSON( deploymentStatePreparedStackOverrideAwGrant: DeploymentStatePreparedStackOverrideAwGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAwGrant$outboundSchema.parse( deploymentStatePreparedStackOverrideAwGrant, ), ); } export function deploymentStatePreparedStackOverrideAwGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAwGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAwGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAwGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAw$inboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAw, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackOverrideAwBinding$inboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePreparedStackOverrideEffect$inboundSchema.optional(), grant: z.lazy(() => DeploymentStatePreparedStackOverrideAwGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAw$Outbound = { binding: DeploymentStatePreparedStackOverrideAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: DeploymentStatePreparedStackOverrideAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAw$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAw$Outbound, DeploymentStatePreparedStackOverrideAw > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackOverrideAwBinding$outboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePreparedStackOverrideEffect$outboundSchema.optional(), grant: z.lazy(() => DeploymentStatePreparedStackOverrideAwGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackOverrideAwToJSON( deploymentStatePreparedStackOverrideAw: DeploymentStatePreparedStackOverrideAw, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAw$outboundSchema.parse( deploymentStatePreparedStackOverrideAw, ), ); } export function deploymentStatePreparedStackOverrideAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackOverrideAw' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAzureResource$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAzureResource$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAzureResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAzureResource$Outbound, DeploymentStatePreparedStackOverrideAzureResource > = z.object({ scope: z.string(), }); export function deploymentStatePreparedStackOverrideAzureResourceToJSON( deploymentStatePreparedStackOverrideAzureResource: DeploymentStatePreparedStackOverrideAzureResource, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAzureResource$outboundSchema.parse( deploymentStatePreparedStackOverrideAzureResource, ), ); } export function deploymentStatePreparedStackOverrideAzureResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAzureResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAzureResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAzureStack$inboundSchema: z.ZodType = z.object( { scope: z.string(), }, ); /** @internal */ export type DeploymentStatePreparedStackOverrideAzureStack$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAzureStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAzureStack$Outbound, DeploymentStatePreparedStackOverrideAzureStack > = z.object({ scope: z.string(), }); export function deploymentStatePreparedStackOverrideAzureStackToJSON( deploymentStatePreparedStackOverrideAzureStack: DeploymentStatePreparedStackOverrideAzureStack, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAzureStack$outboundSchema.parse( deploymentStatePreparedStackOverrideAzureStack, ), ); } export function deploymentStatePreparedStackOverrideAzureStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAzureStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAzureBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePreparedStackOverrideAzureResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackOverrideAzureStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAzureBinding$Outbound = { resource?: | DeploymentStatePreparedStackOverrideAzureResource$Outbound | undefined; stack?: DeploymentStatePreparedStackOverrideAzureStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAzureBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAzureBinding$Outbound, DeploymentStatePreparedStackOverrideAzureBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackOverrideAzureResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackOverrideAzureStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackOverrideAzureBindingToJSON( deploymentStatePreparedStackOverrideAzureBinding: DeploymentStatePreparedStackOverrideAzureBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAzureBinding$outboundSchema.parse( deploymentStatePreparedStackOverrideAzureBinding, ), ); } export function deploymentStatePreparedStackOverrideAzureBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAzureBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAzureGrant$inboundSchema: z.ZodType = 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(), }, ); /** @internal */ export type DeploymentStatePreparedStackOverrideAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAzureGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAzureGrant$Outbound, DeploymentStatePreparedStackOverrideAzureGrant > = 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 deploymentStatePreparedStackOverrideAzureGrantToJSON( deploymentStatePreparedStackOverrideAzureGrant: DeploymentStatePreparedStackOverrideAzureGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAzureGrant$outboundSchema.parse( deploymentStatePreparedStackOverrideAzureGrant, ), ); } export function deploymentStatePreparedStackOverrideAzureGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAzureGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideAzure$inboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAzure, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackOverrideAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackOverrideAzureGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideAzure$Outbound = { binding: DeploymentStatePreparedStackOverrideAzureBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePreparedStackOverrideAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideAzure$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideAzure$Outbound, DeploymentStatePreparedStackOverrideAzure > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackOverrideAzureBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackOverrideAzureGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackOverrideAzureToJSON( deploymentStatePreparedStackOverrideAzure: DeploymentStatePreparedStackOverrideAzure, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideAzure$outboundSchema.parse( deploymentStatePreparedStackOverrideAzure, ), ); } export function deploymentStatePreparedStackOverrideAzureFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideAzure, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideAzure$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideConditionResource$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePreparedStackOverrideConditionResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideConditionResource$Outbound, DeploymentStatePreparedStackOverrideConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePreparedStackOverrideConditionResourceToJSON( deploymentStatePreparedStackOverrideConditionResource: DeploymentStatePreparedStackOverrideConditionResource, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideConditionResource$outboundSchema.parse( deploymentStatePreparedStackOverrideConditionResource, ), ); } export function deploymentStatePreparedStackOverrideConditionResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideConditionResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideResourceConditionUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideResourceConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionResource$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackOverrideResourceConditionUnion$Outbound = | DeploymentStatePreparedStackOverrideConditionResource$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackOverrideResourceConditionUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideResourceConditionUnion$Outbound, DeploymentStatePreparedStackOverrideResourceConditionUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionResource$outboundSchema ), z.any(), ]); export function deploymentStatePreparedStackOverrideResourceConditionUnionToJSON( deploymentStatePreparedStackOverrideResourceConditionUnion: DeploymentStatePreparedStackOverrideResourceConditionUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideResourceConditionUnion$outboundSchema .parse(deploymentStatePreparedStackOverrideResourceConditionUnion), ); } export function deploymentStatePreparedStackOverrideResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideResourceConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackOverrideResourceConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideGcpResource$inboundSchema: z.ZodType = z .object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideGcpResource$Outbound = { condition?: | DeploymentStatePreparedStackOverrideConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePreparedStackOverrideGcpResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideGcpResource$Outbound, DeploymentStatePreparedStackOverrideGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionResource$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePreparedStackOverrideGcpResourceToJSON( deploymentStatePreparedStackOverrideGcpResource: DeploymentStatePreparedStackOverrideGcpResource, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideGcpResource$outboundSchema.parse( deploymentStatePreparedStackOverrideGcpResource, ), ); } export function deploymentStatePreparedStackOverrideGcpResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideGcpResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideConditionStack$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideConditionStack$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePreparedStackOverrideConditionStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideConditionStack$Outbound, DeploymentStatePreparedStackOverrideConditionStack > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePreparedStackOverrideConditionStackToJSON( deploymentStatePreparedStackOverrideConditionStack: DeploymentStatePreparedStackOverrideConditionStack, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideConditionStack$outboundSchema.parse( deploymentStatePreparedStackOverrideConditionStack, ), ); } export function deploymentStatePreparedStackOverrideConditionStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideConditionStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideConditionStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideConditionStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideStackConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionStack$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackOverrideStackConditionUnion$Outbound = | DeploymentStatePreparedStackOverrideConditionStack$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackOverrideStackConditionUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideStackConditionUnion$Outbound, DeploymentStatePreparedStackOverrideStackConditionUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionStack$outboundSchema ), z.any(), ]); export function deploymentStatePreparedStackOverrideStackConditionUnionToJSON( deploymentStatePreparedStackOverrideStackConditionUnion: DeploymentStatePreparedStackOverrideStackConditionUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideStackConditionUnion$outboundSchema .parse(deploymentStatePreparedStackOverrideStackConditionUnion), ); } export function deploymentStatePreparedStackOverrideStackConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideStackConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideStackConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackOverrideStackConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideGcpStack$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionStack$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideGcpStack$Outbound = { condition?: | DeploymentStatePreparedStackOverrideConditionStack$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePreparedStackOverrideGcpStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideGcpStack$Outbound, DeploymentStatePreparedStackOverrideGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackOverrideConditionStack$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePreparedStackOverrideGcpStackToJSON( deploymentStatePreparedStackOverrideGcpStack: DeploymentStatePreparedStackOverrideGcpStack, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideGcpStack$outboundSchema.parse( deploymentStatePreparedStackOverrideGcpStack, ), ); } export function deploymentStatePreparedStackOverrideGcpStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideGcpStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideGcpBinding$inboundSchema: z.ZodType = z.object( { resource: z.lazy(() => DeploymentStatePreparedStackOverrideGcpResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackOverrideGcpStack$inboundSchema ).optional(), }, ); /** @internal */ export type DeploymentStatePreparedStackOverrideGcpBinding$Outbound = { resource?: | DeploymentStatePreparedStackOverrideGcpResource$Outbound | undefined; stack?: DeploymentStatePreparedStackOverrideGcpStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideGcpBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideGcpBinding$Outbound, DeploymentStatePreparedStackOverrideGcpBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackOverrideGcpResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackOverrideGcpStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackOverrideGcpBindingToJSON( deploymentStatePreparedStackOverrideGcpBinding: DeploymentStatePreparedStackOverrideGcpBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideGcpBinding$outboundSchema.parse( deploymentStatePreparedStackOverrideGcpBinding, ), ); } export function deploymentStatePreparedStackOverrideGcpBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideGcpBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideGcpGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideGcpGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideGcpGrant$Outbound, DeploymentStatePreparedStackOverrideGcpGrant > = 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 deploymentStatePreparedStackOverrideGcpGrantToJSON( deploymentStatePreparedStackOverrideGcpGrant: DeploymentStatePreparedStackOverrideGcpGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideGcpGrant$outboundSchema.parse( deploymentStatePreparedStackOverrideGcpGrant, ), ); } export function deploymentStatePreparedStackOverrideGcpGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideGcpGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideGcp$inboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideGcp, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackOverrideGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackOverrideGcpGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackOverrideGcp$Outbound = { binding: DeploymentStatePreparedStackOverrideGcpBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePreparedStackOverrideGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverrideGcp$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideGcp$Outbound, DeploymentStatePreparedStackOverrideGcp > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackOverrideGcpBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackOverrideGcpGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackOverrideGcpToJSON( deploymentStatePreparedStackOverrideGcp: DeploymentStatePreparedStackOverrideGcp, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideGcp$outboundSchema.parse( deploymentStatePreparedStackOverrideGcp, ), ); } export function deploymentStatePreparedStackOverrideGcpFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideGcp, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideGcp$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverridePlatforms$inboundSchema: z.ZodType = z.object({ aws: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackOverrideAw$inboundSchema), ), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackOverrideAzure$inboundSchema )), ).optional(), gcp: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackOverrideGcp$inboundSchema), ), ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackOverridePlatforms$Outbound = { aws?: | Array | null | undefined; azure?: | Array | null | undefined; gcp?: | Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackOverridePlatforms$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverridePlatforms$Outbound, DeploymentStatePreparedStackOverridePlatforms > = z.object({ aws: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackOverrideAw$outboundSchema), ), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackOverrideAzure$outboundSchema )), ).optional(), gcp: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackOverrideGcp$outboundSchema )), ).optional(), }); export function deploymentStatePreparedStackOverridePlatformsToJSON( deploymentStatePreparedStackOverridePlatforms: DeploymentStatePreparedStackOverridePlatforms, ): string { return JSON.stringify( DeploymentStatePreparedStackOverridePlatforms$outboundSchema.parse( deploymentStatePreparedStackOverridePlatforms, ), ); } export function deploymentStatePreparedStackOverridePlatformsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverridePlatforms, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverridePlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverridePlatforms' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverride$inboundSchema: z.ZodType< DeploymentStatePreparedStackOverride, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePreparedStackOverridePlatforms$inboundSchema ), }); /** @internal */ export type DeploymentStatePreparedStackOverride$Outbound = { description: string; id: string; platforms: DeploymentStatePreparedStackOverridePlatforms$Outbound; }; /** @internal */ export const DeploymentStatePreparedStackOverride$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverride$Outbound, DeploymentStatePreparedStackOverride > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePreparedStackOverridePlatforms$outboundSchema ), }); export function deploymentStatePreparedStackOverrideToJSON( deploymentStatePreparedStackOverride: DeploymentStatePreparedStackOverride, ): string { return JSON.stringify( DeploymentStatePreparedStackOverride$outboundSchema.parse( deploymentStatePreparedStackOverride, ), ); } export function deploymentStatePreparedStackOverrideFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverride$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackOverride' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackOverrideUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStackOverride$inboundSchema), z.string(), ]); /** @internal */ export type DeploymentStatePreparedStackOverrideUnion$Outbound = | DeploymentStatePreparedStackOverride$Outbound | string; /** @internal */ export const DeploymentStatePreparedStackOverrideUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackOverrideUnion$Outbound, DeploymentStatePreparedStackOverrideUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackOverride$outboundSchema), z.string(), ]); export function deploymentStatePreparedStackOverrideUnionToJSON( deploymentStatePreparedStackOverrideUnion: DeploymentStatePreparedStackOverrideUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackOverrideUnion$outboundSchema.parse( deploymentStatePreparedStackOverrideUnion, ), ); } export function deploymentStatePreparedStackOverrideUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackOverrideUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackOverrideUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackOverrideUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackManagement2$inboundSchema: z.ZodType< DeploymentStatePreparedStackManagement2, unknown > = z.object({ override: z.record( z.string(), z.array(z.union([ z.lazy(() => DeploymentStatePreparedStackOverride$inboundSchema), z.string(), ])), ), }); /** @internal */ export type DeploymentStatePreparedStackManagement2$Outbound = { override: { [k: string]: Array; }; }; /** @internal */ export const DeploymentStatePreparedStackManagement2$outboundSchema: z.ZodType< DeploymentStatePreparedStackManagement2$Outbound, DeploymentStatePreparedStackManagement2 > = z.object({ override: z.record( z.string(), z.array(z.union([ z.lazy(() => DeploymentStatePreparedStackOverride$outboundSchema), z.string(), ])), ), }); export function deploymentStatePreparedStackManagement2ToJSON( deploymentStatePreparedStackManagement2: DeploymentStatePreparedStackManagement2, ): string { return JSON.stringify( DeploymentStatePreparedStackManagement2$outboundSchema.parse( deploymentStatePreparedStackManagement2, ), ); } export function deploymentStatePreparedStackManagement2FromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackManagement2, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackManagement2$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackManagement2' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAwResource$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePreparedStackExtendAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePreparedStackExtendAwResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAwResource$Outbound, DeploymentStatePreparedStackExtendAwResource > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePreparedStackExtendAwResourceToJSON( deploymentStatePreparedStackExtendAwResource: DeploymentStatePreparedStackExtendAwResource, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAwResource$outboundSchema.parse( deploymentStatePreparedStackExtendAwResource, ), ); } export function deploymentStatePreparedStackExtendAwResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAwResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAwResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAwStack$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePreparedStackExtendAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePreparedStackExtendAwStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAwStack$Outbound, DeploymentStatePreparedStackExtendAwStack > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePreparedStackExtendAwStackToJSON( deploymentStatePreparedStackExtendAwStack: DeploymentStatePreparedStackExtendAwStack, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAwStack$outboundSchema.parse( deploymentStatePreparedStackExtendAwStack, ), ); } export function deploymentStatePreparedStackExtendAwStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAwStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAwStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAwStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAwBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackExtendAwResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackExtendAwStack$inboundSchema) .optional(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAwBinding$Outbound = { resource?: DeploymentStatePreparedStackExtendAwResource$Outbound | undefined; stack?: DeploymentStatePreparedStackExtendAwStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendAwBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAwBinding$Outbound, DeploymentStatePreparedStackExtendAwBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackExtendAwResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackExtendAwStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackExtendAwBindingToJSON( deploymentStatePreparedStackExtendAwBinding: DeploymentStatePreparedStackExtendAwBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAwBinding$outboundSchema.parse( deploymentStatePreparedStackExtendAwBinding, ), ); } export function deploymentStatePreparedStackExtendAwBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAwBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendEffect$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackExtendEffect > = z.enum(DeploymentStatePreparedStackExtendEffect); /** @internal */ export const DeploymentStatePreparedStackExtendEffect$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackExtendEffect > = DeploymentStatePreparedStackExtendEffect$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackExtendAwGrant$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAwGrant, 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(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendAwGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAwGrant$Outbound, DeploymentStatePreparedStackExtendAwGrant > = 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 deploymentStatePreparedStackExtendAwGrantToJSON( deploymentStatePreparedStackExtendAwGrant: DeploymentStatePreparedStackExtendAwGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAwGrant$outboundSchema.parse( deploymentStatePreparedStackExtendAwGrant, ), ); } export function deploymentStatePreparedStackExtendAwGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAwGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAwGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAwGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAw$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAw, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackExtendAwBinding$inboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePreparedStackExtendEffect$inboundSchema.optional(), grant: z.lazy(() => DeploymentStatePreparedStackExtendAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAw$Outbound = { binding: DeploymentStatePreparedStackExtendAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: DeploymentStatePreparedStackExtendAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendAw$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAw$Outbound, DeploymentStatePreparedStackExtendAw > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackExtendAwBinding$outboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePreparedStackExtendEffect$outboundSchema.optional(), grant: z.lazy(() => DeploymentStatePreparedStackExtendAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackExtendAwToJSON( deploymentStatePreparedStackExtendAw: DeploymentStatePreparedStackExtendAw, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAw$outboundSchema.parse( deploymentStatePreparedStackExtendAw, ), ); } export function deploymentStatePreparedStackExtendAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackExtendAw' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAzureResource$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAzureResource$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePreparedStackExtendAzureResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAzureResource$Outbound, DeploymentStatePreparedStackExtendAzureResource > = z.object({ scope: z.string(), }); export function deploymentStatePreparedStackExtendAzureResourceToJSON( deploymentStatePreparedStackExtendAzureResource: DeploymentStatePreparedStackExtendAzureResource, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAzureResource$outboundSchema.parse( deploymentStatePreparedStackExtendAzureResource, ), ); } export function deploymentStatePreparedStackExtendAzureResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAzureResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAzureResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAzureStack$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAzureStack$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePreparedStackExtendAzureStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAzureStack$Outbound, DeploymentStatePreparedStackExtendAzureStack > = z.object({ scope: z.string(), }); export function deploymentStatePreparedStackExtendAzureStackToJSON( deploymentStatePreparedStackExtendAzureStack: DeploymentStatePreparedStackExtendAzureStack, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAzureStack$outboundSchema.parse( deploymentStatePreparedStackExtendAzureStack, ), ); } export function deploymentStatePreparedStackExtendAzureStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAzureStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAzureBinding$inboundSchema: z.ZodType = z.object( { resource: z.lazy(() => DeploymentStatePreparedStackExtendAzureResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackExtendAzureStack$inboundSchema ).optional(), }, ); /** @internal */ export type DeploymentStatePreparedStackExtendAzureBinding$Outbound = { resource?: | DeploymentStatePreparedStackExtendAzureResource$Outbound | undefined; stack?: DeploymentStatePreparedStackExtendAzureStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendAzureBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAzureBinding$Outbound, DeploymentStatePreparedStackExtendAzureBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackExtendAzureResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackExtendAzureStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackExtendAzureBindingToJSON( deploymentStatePreparedStackExtendAzureBinding: DeploymentStatePreparedStackExtendAzureBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAzureBinding$outboundSchema.parse( deploymentStatePreparedStackExtendAzureBinding, ), ); } export function deploymentStatePreparedStackExtendAzureBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAzureBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAzureGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendAzureGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAzureGrant$Outbound, DeploymentStatePreparedStackExtendAzureGrant > = 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 deploymentStatePreparedStackExtendAzureGrantToJSON( deploymentStatePreparedStackExtendAzureGrant: DeploymentStatePreparedStackExtendAzureGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAzureGrant$outboundSchema.parse( deploymentStatePreparedStackExtendAzureGrant, ), ); } export function deploymentStatePreparedStackExtendAzureGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAzureGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendAzure$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAzure, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackExtendAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackExtendAzureGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackExtendAzure$Outbound = { binding: DeploymentStatePreparedStackExtendAzureBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePreparedStackExtendAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendAzure$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendAzure$Outbound, DeploymentStatePreparedStackExtendAzure > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackExtendAzureBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackExtendAzureGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackExtendAzureToJSON( deploymentStatePreparedStackExtendAzure: DeploymentStatePreparedStackExtendAzure, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendAzure$outboundSchema.parse( deploymentStatePreparedStackExtendAzure, ), ); } export function deploymentStatePreparedStackExtendAzureFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendAzure, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendAzure$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendConditionResource$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackExtendConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePreparedStackExtendConditionResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendConditionResource$Outbound, DeploymentStatePreparedStackExtendConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePreparedStackExtendConditionResourceToJSON( deploymentStatePreparedStackExtendConditionResource: DeploymentStatePreparedStackExtendConditionResource, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendConditionResource$outboundSchema.parse( deploymentStatePreparedStackExtendConditionResource, ), ); } export function deploymentStatePreparedStackExtendConditionResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendConditionResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendResourceConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionResource$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackExtendResourceConditionUnion$Outbound = | DeploymentStatePreparedStackExtendConditionResource$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackExtendResourceConditionUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendResourceConditionUnion$Outbound, DeploymentStatePreparedStackExtendResourceConditionUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionResource$outboundSchema ), z.any(), ]); export function deploymentStatePreparedStackExtendResourceConditionUnionToJSON( deploymentStatePreparedStackExtendResourceConditionUnion: DeploymentStatePreparedStackExtendResourceConditionUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendResourceConditionUnion$outboundSchema .parse(deploymentStatePreparedStackExtendResourceConditionUnion), ); } export function deploymentStatePreparedStackExtendResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendResourceConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackExtendResourceConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendGcpResource$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionResource$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackExtendGcpResource$Outbound = { condition?: | DeploymentStatePreparedStackExtendConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePreparedStackExtendGcpResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendGcpResource$Outbound, DeploymentStatePreparedStackExtendGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionResource$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePreparedStackExtendGcpResourceToJSON( deploymentStatePreparedStackExtendGcpResource: DeploymentStatePreparedStackExtendGcpResource, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendGcpResource$outboundSchema.parse( deploymentStatePreparedStackExtendGcpResource, ), ); } export function deploymentStatePreparedStackExtendGcpResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendGcpResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendConditionStack$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackExtendConditionStack$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePreparedStackExtendConditionStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendConditionStack$Outbound, DeploymentStatePreparedStackExtendConditionStack > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePreparedStackExtendConditionStackToJSON( deploymentStatePreparedStackExtendConditionStack: DeploymentStatePreparedStackExtendConditionStack, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendConditionStack$outboundSchema.parse( deploymentStatePreparedStackExtendConditionStack, ), ); } export function deploymentStatePreparedStackExtendConditionStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendConditionStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendConditionStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendConditionStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendStackConditionUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionStack$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackExtendStackConditionUnion$Outbound = | DeploymentStatePreparedStackExtendConditionStack$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackExtendStackConditionUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendStackConditionUnion$Outbound, DeploymentStatePreparedStackExtendStackConditionUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionStack$outboundSchema ), z.any(), ]); export function deploymentStatePreparedStackExtendStackConditionUnionToJSON( deploymentStatePreparedStackExtendStackConditionUnion: DeploymentStatePreparedStackExtendStackConditionUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendStackConditionUnion$outboundSchema.parse( deploymentStatePreparedStackExtendStackConditionUnion, ), ); } export function deploymentStatePreparedStackExtendStackConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendStackConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendStackConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendStackConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendGcpStack$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionStack$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackExtendGcpStack$Outbound = { condition?: | DeploymentStatePreparedStackExtendConditionStack$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePreparedStackExtendGcpStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendGcpStack$Outbound, DeploymentStatePreparedStackExtendGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackExtendConditionStack$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePreparedStackExtendGcpStackToJSON( deploymentStatePreparedStackExtendGcpStack: DeploymentStatePreparedStackExtendGcpStack, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendGcpStack$outboundSchema.parse( deploymentStatePreparedStackExtendGcpStack, ), ); } export function deploymentStatePreparedStackExtendGcpStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendGcpStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendGcpBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackExtendGcpResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackExtendGcpStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackExtendGcpBinding$Outbound = { resource?: DeploymentStatePreparedStackExtendGcpResource$Outbound | undefined; stack?: DeploymentStatePreparedStackExtendGcpStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendGcpBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendGcpBinding$Outbound, DeploymentStatePreparedStackExtendGcpBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackExtendGcpResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackExtendGcpStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackExtendGcpBindingToJSON( deploymentStatePreparedStackExtendGcpBinding: DeploymentStatePreparedStackExtendGcpBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendGcpBinding$outboundSchema.parse( deploymentStatePreparedStackExtendGcpBinding, ), ); } export function deploymentStatePreparedStackExtendGcpBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendGcpBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendGcpGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackExtendGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendGcpGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendGcpGrant$Outbound, DeploymentStatePreparedStackExtendGcpGrant > = 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 deploymentStatePreparedStackExtendGcpGrantToJSON( deploymentStatePreparedStackExtendGcpGrant: DeploymentStatePreparedStackExtendGcpGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendGcpGrant$outboundSchema.parse( deploymentStatePreparedStackExtendGcpGrant, ), ); } export function deploymentStatePreparedStackExtendGcpGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendGcpGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendGcp$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtendGcp, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackExtendGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackExtendGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackExtendGcp$Outbound = { binding: DeploymentStatePreparedStackExtendGcpBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePreparedStackExtendGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendGcp$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendGcp$Outbound, DeploymentStatePreparedStackExtendGcp > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackExtendGcpBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackExtendGcpGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackExtendGcpToJSON( deploymentStatePreparedStackExtendGcp: DeploymentStatePreparedStackExtendGcp, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendGcp$outboundSchema.parse( deploymentStatePreparedStackExtendGcp, ), ); } export function deploymentStatePreparedStackExtendGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackExtendGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendPlatforms$inboundSchema: z.ZodType = z.object({ aws: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackExtendAw$inboundSchema)), ).optional(), azure: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackExtendAzure$inboundSchema), ), ).optional(), gcp: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackExtendGcp$inboundSchema), ), ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackExtendPlatforms$Outbound = { aws?: Array | null | undefined; azure?: | Array | null | undefined; gcp?: | Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackExtendPlatforms$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendPlatforms$Outbound, DeploymentStatePreparedStackExtendPlatforms > = z.object({ aws: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackExtendAw$outboundSchema), ), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackExtendAzure$outboundSchema )), ).optional(), gcp: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackExtendGcp$outboundSchema), ), ).optional(), }); export function deploymentStatePreparedStackExtendPlatformsToJSON( deploymentStatePreparedStackExtendPlatforms: DeploymentStatePreparedStackExtendPlatforms, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendPlatforms$outboundSchema.parse( deploymentStatePreparedStackExtendPlatforms, ), ); } export function deploymentStatePreparedStackExtendPlatformsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendPlatforms, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendPlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendPlatforms' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtend$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtend, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePreparedStackExtendPlatforms$inboundSchema ), }); /** @internal */ export type DeploymentStatePreparedStackExtend$Outbound = { description: string; id: string; platforms: DeploymentStatePreparedStackExtendPlatforms$Outbound; }; /** @internal */ export const DeploymentStatePreparedStackExtend$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtend$Outbound, DeploymentStatePreparedStackExtend > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePreparedStackExtendPlatforms$outboundSchema ), }); export function deploymentStatePreparedStackExtendToJSON( deploymentStatePreparedStackExtend: DeploymentStatePreparedStackExtend, ): string { return JSON.stringify( DeploymentStatePreparedStackExtend$outboundSchema.parse( deploymentStatePreparedStackExtend, ), ); } export function deploymentStatePreparedStackExtendFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtend$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackExtend' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackExtendUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackExtendUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStackExtend$inboundSchema), z.string(), ]); /** @internal */ export type DeploymentStatePreparedStackExtendUnion$Outbound = | DeploymentStatePreparedStackExtend$Outbound | string; /** @internal */ export const DeploymentStatePreparedStackExtendUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackExtendUnion$Outbound, DeploymentStatePreparedStackExtendUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackExtend$outboundSchema), z.string(), ]); export function deploymentStatePreparedStackExtendUnionToJSON( deploymentStatePreparedStackExtendUnion: DeploymentStatePreparedStackExtendUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackExtendUnion$outboundSchema.parse( deploymentStatePreparedStackExtendUnion, ), ); } export function deploymentStatePreparedStackExtendUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackExtendUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackExtendUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackExtendUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackManagement1$inboundSchema: z.ZodType< DeploymentStatePreparedStackManagement1, unknown > = z.object({ extend: z.record( z.string(), z.array(z.union([ z.lazy(() => DeploymentStatePreparedStackExtend$inboundSchema), z.string(), ])), ), }); /** @internal */ export type DeploymentStatePreparedStackManagement1$Outbound = { extend: { [k: string]: Array; }; }; /** @internal */ export const DeploymentStatePreparedStackManagement1$outboundSchema: z.ZodType< DeploymentStatePreparedStackManagement1$Outbound, DeploymentStatePreparedStackManagement1 > = z.object({ extend: z.record( z.string(), z.array(z.union([ z.lazy(() => DeploymentStatePreparedStackExtend$outboundSchema), z.string(), ])), ), }); export function deploymentStatePreparedStackManagement1ToJSON( deploymentStatePreparedStackManagement1: DeploymentStatePreparedStackManagement1, ): string { return JSON.stringify( DeploymentStatePreparedStackManagement1$outboundSchema.parse( deploymentStatePreparedStackManagement1, ), ); } export function deploymentStatePreparedStackManagement1FromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackManagement1, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackManagement1$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackManagement1' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackManagementUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => DeploymentStatePreparedStackManagement1$inboundSchema), z.lazy(() => DeploymentStatePreparedStackManagement2$inboundSchema), DeploymentStatePreparedStackManagementEnum$inboundSchema, ]); /** @internal */ export type DeploymentStatePreparedStackManagementUnion$Outbound = | DeploymentStatePreparedStackManagement1$Outbound | DeploymentStatePreparedStackManagement2$Outbound | string; /** @internal */ export const DeploymentStatePreparedStackManagementUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackManagementUnion$Outbound, DeploymentStatePreparedStackManagementUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackManagement1$outboundSchema), z.lazy(() => DeploymentStatePreparedStackManagement2$outboundSchema), DeploymentStatePreparedStackManagementEnum$outboundSchema, ]); export function deploymentStatePreparedStackManagementUnionToJSON( deploymentStatePreparedStackManagementUnion: DeploymentStatePreparedStackManagementUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackManagementUnion$outboundSchema.parse( deploymentStatePreparedStackManagementUnion, ), ); } export function deploymentStatePreparedStackManagementUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackManagementUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackManagementUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackManagementUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAwResource$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePreparedStackProfileAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePreparedStackProfileAwResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAwResource$Outbound, DeploymentStatePreparedStackProfileAwResource > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePreparedStackProfileAwResourceToJSON( deploymentStatePreparedStackProfileAwResource: DeploymentStatePreparedStackProfileAwResource, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAwResource$outboundSchema.parse( deploymentStatePreparedStackProfileAwResource, ), ); } export function deploymentStatePreparedStackProfileAwResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAwResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAwResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAwResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAwStack$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); /** @internal */ export type DeploymentStatePreparedStackProfileAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const DeploymentStatePreparedStackProfileAwStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAwStack$Outbound, DeploymentStatePreparedStackProfileAwStack > = z.object({ condition: z.nullable( z.record(z.string(), z.record(z.string(), z.string())), ).optional(), resources: z.array(z.string()), }); export function deploymentStatePreparedStackProfileAwStackToJSON( deploymentStatePreparedStackProfileAwStack: DeploymentStatePreparedStackProfileAwStack, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAwStack$outboundSchema.parse( deploymentStatePreparedStackProfileAwStack, ), ); } export function deploymentStatePreparedStackProfileAwStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAwStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAwStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAwStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAwBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackProfileAwResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackProfileAwStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAwBinding$Outbound = { resource?: DeploymentStatePreparedStackProfileAwResource$Outbound | undefined; stack?: DeploymentStatePreparedStackProfileAwStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileAwBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAwBinding$Outbound, DeploymentStatePreparedStackProfileAwBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackProfileAwResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackProfileAwStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackProfileAwBindingToJSON( deploymentStatePreparedStackProfileAwBinding: DeploymentStatePreparedStackProfileAwBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAwBinding$outboundSchema.parse( deploymentStatePreparedStackProfileAwBinding, ), ); } export function deploymentStatePreparedStackProfileAwBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAwBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAwBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAwBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileEffect$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackProfileEffect > = z.enum(DeploymentStatePreparedStackProfileEffect); /** @internal */ export const DeploymentStatePreparedStackProfileEffect$outboundSchema: z.ZodEnum = DeploymentStatePreparedStackProfileEffect$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackProfileAwGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileAwGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAwGrant$Outbound, DeploymentStatePreparedStackProfileAwGrant > = 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 deploymentStatePreparedStackProfileAwGrantToJSON( deploymentStatePreparedStackProfileAwGrant: DeploymentStatePreparedStackProfileAwGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAwGrant$outboundSchema.parse( deploymentStatePreparedStackProfileAwGrant, ), ); } export function deploymentStatePreparedStackProfileAwGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAwGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAwGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAwGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAw$inboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAw, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackProfileAwBinding$inboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePreparedStackProfileEffect$inboundSchema.optional(), grant: z.lazy(() => DeploymentStatePreparedStackProfileAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAw$Outbound = { binding: DeploymentStatePreparedStackProfileAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: DeploymentStatePreparedStackProfileAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileAw$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAw$Outbound, DeploymentStatePreparedStackProfileAw > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackProfileAwBinding$outboundSchema ), description: z.nullable(z.string()).optional(), effect: DeploymentStatePreparedStackProfileEffect$outboundSchema.optional(), grant: z.lazy(() => DeploymentStatePreparedStackProfileAwGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackProfileAwToJSON( deploymentStatePreparedStackProfileAw: DeploymentStatePreparedStackProfileAw, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAw$outboundSchema.parse( deploymentStatePreparedStackProfileAw, ), ); } export function deploymentStatePreparedStackProfileAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackProfileAw' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAzureResource$inboundSchema: z.ZodType = z .object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAzureResource$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePreparedStackProfileAzureResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAzureResource$Outbound, DeploymentStatePreparedStackProfileAzureResource > = z.object({ scope: z.string(), }); export function deploymentStatePreparedStackProfileAzureResourceToJSON( deploymentStatePreparedStackProfileAzureResource: DeploymentStatePreparedStackProfileAzureResource, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAzureResource$outboundSchema.parse( deploymentStatePreparedStackProfileAzureResource, ), ); } export function deploymentStatePreparedStackProfileAzureResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAzureResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAzureResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAzureResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAzureStack$inboundSchema: z.ZodType = z.object({ scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAzureStack$Outbound = { scope: string; }; /** @internal */ export const DeploymentStatePreparedStackProfileAzureStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAzureStack$Outbound, DeploymentStatePreparedStackProfileAzureStack > = z.object({ scope: z.string(), }); export function deploymentStatePreparedStackProfileAzureStackToJSON( deploymentStatePreparedStackProfileAzureStack: DeploymentStatePreparedStackProfileAzureStack, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAzureStack$outboundSchema.parse( deploymentStatePreparedStackProfileAzureStack, ), ); } export function deploymentStatePreparedStackProfileAzureStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAzureStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAzureStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAzureStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAzureBinding$inboundSchema: z.ZodType = z .object({ resource: z.lazy(() => DeploymentStatePreparedStackProfileAzureResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackProfileAzureStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAzureBinding$Outbound = { resource?: | DeploymentStatePreparedStackProfileAzureResource$Outbound | undefined; stack?: DeploymentStatePreparedStackProfileAzureStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileAzureBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAzureBinding$Outbound, DeploymentStatePreparedStackProfileAzureBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackProfileAzureResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackProfileAzureStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackProfileAzureBindingToJSON( deploymentStatePreparedStackProfileAzureBinding: DeploymentStatePreparedStackProfileAzureBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAzureBinding$outboundSchema.parse( deploymentStatePreparedStackProfileAzureBinding, ), ); } export function deploymentStatePreparedStackProfileAzureBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAzureBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAzureBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAzureBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAzureGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileAzureGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAzureGrant$Outbound, DeploymentStatePreparedStackProfileAzureGrant > = 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 deploymentStatePreparedStackProfileAzureGrantToJSON( deploymentStatePreparedStackProfileAzureGrant: DeploymentStatePreparedStackProfileAzureGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAzureGrant$outboundSchema.parse( deploymentStatePreparedStackProfileAzureGrant, ), ); } export function deploymentStatePreparedStackProfileAzureGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAzureGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAzureGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAzureGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileAzure$inboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAzure, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackProfileAzureBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackProfileAzureGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfileAzure$Outbound = { binding: DeploymentStatePreparedStackProfileAzureBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePreparedStackProfileAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileAzure$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileAzure$Outbound, DeploymentStatePreparedStackProfileAzure > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackProfileAzureBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackProfileAzureGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackProfileAzureToJSON( deploymentStatePreparedStackProfileAzure: DeploymentStatePreparedStackProfileAzure, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileAzure$outboundSchema.parse( deploymentStatePreparedStackProfileAzure, ), ); } export function deploymentStatePreparedStackProfileAzureFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileAzure, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileAzure$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileAzure' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileConditionResource$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackProfileConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePreparedStackProfileConditionResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileConditionResource$Outbound, DeploymentStatePreparedStackProfileConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePreparedStackProfileConditionResourceToJSON( deploymentStatePreparedStackProfileConditionResource: DeploymentStatePreparedStackProfileConditionResource, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileConditionResource$outboundSchema.parse( deploymentStatePreparedStackProfileConditionResource, ), ); } export function deploymentStatePreparedStackProfileConditionResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileConditionResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileConditionResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileConditionResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileResourceConditionUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackProfileResourceConditionUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionResource$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackProfileResourceConditionUnion$Outbound = | DeploymentStatePreparedStackProfileConditionResource$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackProfileResourceConditionUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileResourceConditionUnion$Outbound, DeploymentStatePreparedStackProfileResourceConditionUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionResource$outboundSchema ), z.any(), ]); export function deploymentStatePreparedStackProfileResourceConditionUnionToJSON( deploymentStatePreparedStackProfileResourceConditionUnion: DeploymentStatePreparedStackProfileResourceConditionUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileResourceConditionUnion$outboundSchema .parse(deploymentStatePreparedStackProfileResourceConditionUnion), ); } export function deploymentStatePreparedStackProfileResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileResourceConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackProfileResourceConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileGcpResource$inboundSchema: z.ZodType = z.object( { condition: z.nullable(z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionResource$inboundSchema ), z.any(), ])).optional(), scope: z.string(), }, ); /** @internal */ export type DeploymentStatePreparedStackProfileGcpResource$Outbound = { condition?: | DeploymentStatePreparedStackProfileConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePreparedStackProfileGcpResource$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileGcpResource$Outbound, DeploymentStatePreparedStackProfileGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionResource$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePreparedStackProfileGcpResourceToJSON( deploymentStatePreparedStackProfileGcpResource: DeploymentStatePreparedStackProfileGcpResource, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileGcpResource$outboundSchema.parse( deploymentStatePreparedStackProfileGcpResource, ), ); } export function deploymentStatePreparedStackProfileGcpResourceFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileGcpResource, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileGcpResource$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileGcpResource' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileConditionStack$inboundSchema: z.ZodType = z .object({ expression: z.string(), title: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackProfileConditionStack$Outbound = { expression: string; title: string; }; /** @internal */ export const DeploymentStatePreparedStackProfileConditionStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileConditionStack$Outbound, DeploymentStatePreparedStackProfileConditionStack > = z.object({ expression: z.string(), title: z.string(), }); export function deploymentStatePreparedStackProfileConditionStackToJSON( deploymentStatePreparedStackProfileConditionStack: DeploymentStatePreparedStackProfileConditionStack, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileConditionStack$outboundSchema.parse( deploymentStatePreparedStackProfileConditionStack, ), ); } export function deploymentStatePreparedStackProfileConditionStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileConditionStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileConditionStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileConditionStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileStackConditionUnion$inboundSchema: z.ZodType = z .union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionStack$inboundSchema ), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackProfileStackConditionUnion$Outbound = | DeploymentStatePreparedStackProfileConditionStack$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackProfileStackConditionUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileStackConditionUnion$Outbound, DeploymentStatePreparedStackProfileStackConditionUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionStack$outboundSchema ), z.any(), ]); export function deploymentStatePreparedStackProfileStackConditionUnionToJSON( deploymentStatePreparedStackProfileStackConditionUnion: DeploymentStatePreparedStackProfileStackConditionUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileStackConditionUnion$outboundSchema.parse( deploymentStatePreparedStackProfileStackConditionUnion, ), ); } export function deploymentStatePreparedStackProfileStackConditionUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileStackConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileStackConditionUnion$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackProfileStackConditionUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileGcpStack$inboundSchema: z.ZodType = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionStack$inboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackProfileGcpStack$Outbound = { condition?: | DeploymentStatePreparedStackProfileConditionStack$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const DeploymentStatePreparedStackProfileGcpStack$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileGcpStack$Outbound, DeploymentStatePreparedStackProfileGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStackProfileConditionStack$outboundSchema ), z.any(), ]), ).optional(), scope: z.string(), }); export function deploymentStatePreparedStackProfileGcpStackToJSON( deploymentStatePreparedStackProfileGcpStack: DeploymentStatePreparedStackProfileGcpStack, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileGcpStack$outboundSchema.parse( deploymentStatePreparedStackProfileGcpStack, ), ); } export function deploymentStatePreparedStackProfileGcpStackFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileGcpStack, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileGcpStack$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileGcpStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileGcpBinding$inboundSchema: z.ZodType = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackProfileGcpResource$inboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackProfileGcpStack$inboundSchema ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfileGcpBinding$Outbound = { resource?: | DeploymentStatePreparedStackProfileGcpResource$Outbound | undefined; stack?: DeploymentStatePreparedStackProfileGcpStack$Outbound | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileGcpBinding$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileGcpBinding$Outbound, DeploymentStatePreparedStackProfileGcpBinding > = z.object({ resource: z.lazy(() => DeploymentStatePreparedStackProfileGcpResource$outboundSchema ).optional(), stack: z.lazy(() => DeploymentStatePreparedStackProfileGcpStack$outboundSchema ).optional(), }); export function deploymentStatePreparedStackProfileGcpBindingToJSON( deploymentStatePreparedStackProfileGcpBinding: DeploymentStatePreparedStackProfileGcpBinding, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileGcpBinding$outboundSchema.parse( deploymentStatePreparedStackProfileGcpBinding, ), ); } export function deploymentStatePreparedStackProfileGcpBindingFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileGcpBinding, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileGcpBinding$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileGcpBinding' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileGcpGrant$inboundSchema: z.ZodType = 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(), }); /** @internal */ export type DeploymentStatePreparedStackProfileGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileGcpGrant$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileGcpGrant$Outbound, DeploymentStatePreparedStackProfileGcpGrant > = 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 deploymentStatePreparedStackProfileGcpGrantToJSON( deploymentStatePreparedStackProfileGcpGrant: DeploymentStatePreparedStackProfileGcpGrant, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileGcpGrant$outboundSchema.parse( deploymentStatePreparedStackProfileGcpGrant, ), ); } export function deploymentStatePreparedStackProfileGcpGrantFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileGcpGrant, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileGcpGrant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileGcpGrant' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileGcp$inboundSchema: z.ZodType< DeploymentStatePreparedStackProfileGcp, unknown > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackProfileGcpBinding$inboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackProfileGcpGrant$inboundSchema ), label: z.nullable(z.string()).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfileGcp$Outbound = { binding: DeploymentStatePreparedStackProfileGcpBinding$Outbound; description?: string | null | undefined; grant: DeploymentStatePreparedStackProfileGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfileGcp$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileGcp$Outbound, DeploymentStatePreparedStackProfileGcp > = z.object({ binding: z.lazy(() => DeploymentStatePreparedStackProfileGcpBinding$outboundSchema ), description: z.nullable(z.string()).optional(), grant: z.lazy(() => DeploymentStatePreparedStackProfileGcpGrant$outboundSchema ), label: z.nullable(z.string()).optional(), }); export function deploymentStatePreparedStackProfileGcpToJSON( deploymentStatePreparedStackProfileGcp: DeploymentStatePreparedStackProfileGcp, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileGcp$outboundSchema.parse( deploymentStatePreparedStackProfileGcp, ), ); } export function deploymentStatePreparedStackProfileGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackProfileGcp' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfilePlatforms$inboundSchema: z.ZodType = z.object({ aws: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackProfileAw$inboundSchema), ), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackProfileAzure$inboundSchema )), ).optional(), gcp: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackProfileGcp$inboundSchema), ), ).optional(), }); /** @internal */ export type DeploymentStatePreparedStackProfilePlatforms$Outbound = { aws?: | Array | null | undefined; azure?: | Array | null | undefined; gcp?: | Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStackProfilePlatforms$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfilePlatforms$Outbound, DeploymentStatePreparedStackProfilePlatforms > = z.object({ aws: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackProfileAw$outboundSchema), ), ).optional(), azure: z.nullable( z.array(z.lazy(() => DeploymentStatePreparedStackProfileAzure$outboundSchema )), ).optional(), gcp: z.nullable( z.array( z.lazy(() => DeploymentStatePreparedStackProfileGcp$outboundSchema), ), ).optional(), }); export function deploymentStatePreparedStackProfilePlatformsToJSON( deploymentStatePreparedStackProfilePlatforms: DeploymentStatePreparedStackProfilePlatforms, ): string { return JSON.stringify( DeploymentStatePreparedStackProfilePlatforms$outboundSchema.parse( deploymentStatePreparedStackProfilePlatforms, ), ); } export function deploymentStatePreparedStackProfilePlatformsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfilePlatforms, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfilePlatforms$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfilePlatforms' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfile$inboundSchema: z.ZodType< DeploymentStatePreparedStackProfile, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePreparedStackProfilePlatforms$inboundSchema ), }); /** @internal */ export type DeploymentStatePreparedStackProfile$Outbound = { description: string; id: string; platforms: DeploymentStatePreparedStackProfilePlatforms$Outbound; }; /** @internal */ export const DeploymentStatePreparedStackProfile$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfile$Outbound, DeploymentStatePreparedStackProfile > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => DeploymentStatePreparedStackProfilePlatforms$outboundSchema ), }); export function deploymentStatePreparedStackProfileToJSON( deploymentStatePreparedStackProfile: DeploymentStatePreparedStackProfile, ): string { return JSON.stringify( DeploymentStatePreparedStackProfile$outboundSchema.parse( deploymentStatePreparedStackProfile, ), ); } export function deploymentStatePreparedStackProfileFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackProfile' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackProfileUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackProfileUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStackProfile$inboundSchema), z.string(), ]); /** @internal */ export type DeploymentStatePreparedStackProfileUnion$Outbound = | DeploymentStatePreparedStackProfile$Outbound | string; /** @internal */ export const DeploymentStatePreparedStackProfileUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackProfileUnion$Outbound, DeploymentStatePreparedStackProfileUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStackProfile$outboundSchema), z.string(), ]); export function deploymentStatePreparedStackProfileUnionToJSON( deploymentStatePreparedStackProfileUnion: DeploymentStatePreparedStackProfileUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackProfileUnion$outboundSchema.parse( deploymentStatePreparedStackProfileUnion, ), ); } export function deploymentStatePreparedStackProfileUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackProfileUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackProfileUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackProfileUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackPermissions$inboundSchema: z.ZodType< DeploymentStatePreparedStackPermissions, unknown > = z.object({ management: z.union([ z.lazy(() => DeploymentStatePreparedStackManagement1$inboundSchema), z.lazy(() => DeploymentStatePreparedStackManagement2$inboundSchema), DeploymentStatePreparedStackManagementEnum$inboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => DeploymentStatePreparedStackProfile$inboundSchema), z.string(), ]), ), ), ), }); /** @internal */ export type DeploymentStatePreparedStackPermissions$Outbound = { management?: | DeploymentStatePreparedStackManagement1$Outbound | DeploymentStatePreparedStackManagement2$Outbound | string | undefined; profiles: { [k: string]: { [k: string]: Array; }; }; }; /** @internal */ export const DeploymentStatePreparedStackPermissions$outboundSchema: z.ZodType< DeploymentStatePreparedStackPermissions$Outbound, DeploymentStatePreparedStackPermissions > = z.object({ management: z.union([ z.lazy(() => DeploymentStatePreparedStackManagement1$outboundSchema), z.lazy(() => DeploymentStatePreparedStackManagement2$outboundSchema), DeploymentStatePreparedStackManagementEnum$outboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => DeploymentStatePreparedStackProfile$outboundSchema), z.string(), ]), ), ), ), }); export function deploymentStatePreparedStackPermissionsToJSON( deploymentStatePreparedStackPermissions: DeploymentStatePreparedStackPermissions, ): string { return JSON.stringify( DeploymentStatePreparedStackPermissions$outboundSchema.parse( deploymentStatePreparedStackPermissions, ), ); } export function deploymentStatePreparedStackPermissionsFromJSON( jsonString: string, ): SafeParseResult< DeploymentStatePreparedStackPermissions, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStatePreparedStackPermissions$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStatePreparedStackPermissions' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackConfig$inboundSchema: z.ZodType< DeploymentStatePreparedStackConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type DeploymentStatePreparedStackConfig$Outbound = { id: string; type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const DeploymentStatePreparedStackConfig$outboundSchema: z.ZodType< DeploymentStatePreparedStackConfig$Outbound, DeploymentStatePreparedStackConfig > = z.object({ id: z.string(), type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function deploymentStatePreparedStackConfigToJSON( deploymentStatePreparedStackConfig: DeploymentStatePreparedStackConfig, ): string { return JSON.stringify( DeploymentStatePreparedStackConfig$outboundSchema.parse( deploymentStatePreparedStackConfig, ), ); } export function deploymentStatePreparedStackConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackConfig' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackDependency$inboundSchema: z.ZodType< DeploymentStatePreparedStackDependency, unknown > = z.object({ id: z.string(), type: z.string(), }); /** @internal */ export type DeploymentStatePreparedStackDependency$Outbound = { id: string; type: string; }; /** @internal */ export const DeploymentStatePreparedStackDependency$outboundSchema: z.ZodType< DeploymentStatePreparedStackDependency$Outbound, DeploymentStatePreparedStackDependency > = z.object({ id: z.string(), type: z.string(), }); export function deploymentStatePreparedStackDependencyToJSON( deploymentStatePreparedStackDependency: DeploymentStatePreparedStackDependency, ): string { return JSON.stringify( DeploymentStatePreparedStackDependency$outboundSchema.parse( deploymentStatePreparedStackDependency, ), ); } export function deploymentStatePreparedStackDependencyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackDependency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackDependency' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackLifecycle$inboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackLifecycle > = z.enum(DeploymentStatePreparedStackLifecycle); /** @internal */ export const DeploymentStatePreparedStackLifecycle$outboundSchema: z.ZodEnum< typeof DeploymentStatePreparedStackLifecycle > = DeploymentStatePreparedStackLifecycle$inboundSchema; /** @internal */ export const DeploymentStatePreparedStackResources$inboundSchema: z.ZodType< DeploymentStatePreparedStackResources, unknown > = z.object({ config: z.lazy(() => DeploymentStatePreparedStackConfig$inboundSchema), dependencies: z.array( z.lazy(() => DeploymentStatePreparedStackDependency$inboundSchema), ), enabledWhen: z.nullable(z.string()).optional(), lifecycle: DeploymentStatePreparedStackLifecycle$inboundSchema, remoteAccess: z.boolean().optional(), }); /** @internal */ export type DeploymentStatePreparedStackResources$Outbound = { config: DeploymentStatePreparedStackConfig$Outbound; dependencies: Array; enabledWhen?: string | null | undefined; lifecycle: string; remoteAccess?: boolean | undefined; }; /** @internal */ export const DeploymentStatePreparedStackResources$outboundSchema: z.ZodType< DeploymentStatePreparedStackResources$Outbound, DeploymentStatePreparedStackResources > = z.object({ config: z.lazy(() => DeploymentStatePreparedStackConfig$outboundSchema), dependencies: z.array( z.lazy(() => DeploymentStatePreparedStackDependency$outboundSchema), ), enabledWhen: z.nullable(z.string()).optional(), lifecycle: DeploymentStatePreparedStackLifecycle$outboundSchema, remoteAccess: z.boolean().optional(), }); export function deploymentStatePreparedStackResourcesToJSON( deploymentStatePreparedStackResources: DeploymentStatePreparedStackResources, ): string { return JSON.stringify( DeploymentStatePreparedStackResources$outboundSchema.parse( deploymentStatePreparedStackResources, ), ); } export function deploymentStatePreparedStackResourcesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackResources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackResources' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackSupportedPlatform$inboundSchema: z.ZodEnum = z.enum( DeploymentStatePreparedStackSupportedPlatform, ); /** @internal */ export const DeploymentStatePreparedStackSupportedPlatform$outboundSchema: z.ZodEnum = DeploymentStatePreparedStackSupportedPlatform$inboundSchema; /** @internal */ export const DeploymentStatePreparedStack$inboundSchema: z.ZodType< DeploymentStatePreparedStack, unknown > = z.object({ id: z.string(), inputs: z.array(z.lazy(() => DeploymentStatePreparedStackInput$inboundSchema)) .optional(), permissions: z.lazy(() => DeploymentStatePreparedStackPermissions$inboundSchema ).optional(), resources: z.record( z.string(), z.lazy(() => DeploymentStatePreparedStackResources$inboundSchema), ), supportedPlatforms: z.nullable( z.array(DeploymentStatePreparedStackSupportedPlatform$inboundSchema), ).optional(), }); /** @internal */ export type DeploymentStatePreparedStack$Outbound = { id: string; inputs?: Array | undefined; permissions?: DeploymentStatePreparedStackPermissions$Outbound | undefined; resources: { [k: string]: DeploymentStatePreparedStackResources$Outbound }; supportedPlatforms?: Array | null | undefined; }; /** @internal */ export const DeploymentStatePreparedStack$outboundSchema: z.ZodType< DeploymentStatePreparedStack$Outbound, DeploymentStatePreparedStack > = z.object({ id: z.string(), inputs: z.array( z.lazy(() => DeploymentStatePreparedStackInput$outboundSchema), ).optional(), permissions: z.lazy(() => DeploymentStatePreparedStackPermissions$outboundSchema ).optional(), resources: z.record( z.string(), z.lazy(() => DeploymentStatePreparedStackResources$outboundSchema), ), supportedPlatforms: z.nullable( z.array(DeploymentStatePreparedStackSupportedPlatform$outboundSchema), ).optional(), }); export function deploymentStatePreparedStackToJSON( deploymentStatePreparedStack: DeploymentStatePreparedStack, ): string { return JSON.stringify( DeploymentStatePreparedStack$outboundSchema.parse( deploymentStatePreparedStack, ), ); } export function deploymentStatePreparedStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStack' from JSON`, ); } /** @internal */ export const DeploymentStatePreparedStackUnion$inboundSchema: z.ZodType< DeploymentStatePreparedStackUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreparedStack$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStatePreparedStackUnion$Outbound = | DeploymentStatePreparedStack$Outbound | any; /** @internal */ export const DeploymentStatePreparedStackUnion$outboundSchema: z.ZodType< DeploymentStatePreparedStackUnion$Outbound, DeploymentStatePreparedStackUnion > = z.union([ z.lazy(() => DeploymentStatePreparedStack$outboundSchema), z.any(), ]); export function deploymentStatePreparedStackUnionToJSON( deploymentStatePreparedStackUnion: DeploymentStatePreparedStackUnion, ): string { return JSON.stringify( DeploymentStatePreparedStackUnion$outboundSchema.parse( deploymentStatePreparedStackUnion, ), ); } export function deploymentStatePreparedStackUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreparedStackUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreparedStackUnion' from JSON`, ); } /** @internal */ export const DeploymentStateSetupUpdateAuthorization$inboundSchema: z.ZodType< DeploymentStateSetupUpdateAuthorization, unknown > = z.object({ baselineFrozenDigest: z.string(), nonce: z.string(), releaseId: z.string(), setupFingerprint: z.string(), setupFingerprintVersion: z.int(), setupTarget: z.string(), targetFrozenDigest: z.string(), }); /** @internal */ export type DeploymentStateSetupUpdateAuthorization$Outbound = { baselineFrozenDigest: string; nonce: string; releaseId: string; setupFingerprint: string; setupFingerprintVersion: number; setupTarget: string; targetFrozenDigest: string; }; /** @internal */ export const DeploymentStateSetupUpdateAuthorization$outboundSchema: z.ZodType< DeploymentStateSetupUpdateAuthorization$Outbound, DeploymentStateSetupUpdateAuthorization > = z.object({ baselineFrozenDigest: z.string(), nonce: z.string(), releaseId: z.string(), setupFingerprint: z.string(), setupFingerprintVersion: z.int(), setupTarget: z.string(), targetFrozenDigest: z.string(), }); export function deploymentStateSetupUpdateAuthorizationToJSON( deploymentStateSetupUpdateAuthorization: DeploymentStateSetupUpdateAuthorization, ): string { return JSON.stringify( DeploymentStateSetupUpdateAuthorization$outboundSchema.parse( deploymentStateSetupUpdateAuthorization, ), ); } export function deploymentStateSetupUpdateAuthorizationFromJSON( jsonString: string, ): SafeParseResult< DeploymentStateSetupUpdateAuthorization, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStateSetupUpdateAuthorization$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStateSetupUpdateAuthorization' from JSON`, ); } /** @internal */ export const DeploymentStateSetupUpdateAuthorizationUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => DeploymentStateSetupUpdateAuthorization$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStateSetupUpdateAuthorizationUnion$Outbound = | DeploymentStateSetupUpdateAuthorization$Outbound | any; /** @internal */ export const DeploymentStateSetupUpdateAuthorizationUnion$outboundSchema: z.ZodType< DeploymentStateSetupUpdateAuthorizationUnion$Outbound, DeploymentStateSetupUpdateAuthorizationUnion > = z.union([ z.lazy(() => DeploymentStateSetupUpdateAuthorization$outboundSchema), z.any(), ]); export function deploymentStateSetupUpdateAuthorizationUnionToJSON( deploymentStateSetupUpdateAuthorizationUnion: DeploymentStateSetupUpdateAuthorizationUnion, ): string { return JSON.stringify( DeploymentStateSetupUpdateAuthorizationUnion$outboundSchema.parse( deploymentStateSetupUpdateAuthorizationUnion, ), ); } export function deploymentStateSetupUpdateAuthorizationUnionFromJSON( jsonString: string, ): SafeParseResult< DeploymentStateSetupUpdateAuthorizationUnion, SDKValidationError > { return safeParse( jsonString, (x) => DeploymentStateSetupUpdateAuthorizationUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeploymentStateSetupUpdateAuthorizationUnion' from JSON`, ); } /** @internal */ export const DeploymentStateRuntimeMetadata$inboundSchema: z.ZodType< DeploymentStateRuntimeMetadata, unknown > = z.object({ directSetupRevision: z.nullable(z.string()).optional(), initialSetupAuthority: DeploymentStateInitialSetupAuthority$inboundSchema .optional(), lastSyncedEnvVarsHash: z.nullable(z.string()).optional(), lastSyncedSecretNames: z.array(z.string()).optional(), pendingPreparedStack: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStack$inboundSchema), z.any(), ]), ).optional(), persistedGateAnswers: z.record(z.string(), z.boolean()).optional(), preparedStack: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStack$inboundSchema), z.any(), ]), ).optional(), registryAccessGranted: z.boolean().optional(), setupUpdateAuthorization: z.nullable( z.union([ z.lazy(() => DeploymentStateSetupUpdateAuthorization$inboundSchema), z.any(), ]), ).optional(), }); /** @internal */ export type DeploymentStateRuntimeMetadata$Outbound = { directSetupRevision?: string | null | undefined; initialSetupAuthority?: string | undefined; lastSyncedEnvVarsHash?: string | null | undefined; lastSyncedSecretNames?: Array | undefined; pendingPreparedStack?: | DeploymentStatePendingPreparedStack$Outbound | any | null | undefined; persistedGateAnswers?: { [k: string]: boolean } | undefined; preparedStack?: | DeploymentStatePreparedStack$Outbound | any | null | undefined; registryAccessGranted?: boolean | undefined; setupUpdateAuthorization?: | DeploymentStateSetupUpdateAuthorization$Outbound | any | null | undefined; }; /** @internal */ export const DeploymentStateRuntimeMetadata$outboundSchema: z.ZodType< DeploymentStateRuntimeMetadata$Outbound, DeploymentStateRuntimeMetadata > = z.object({ directSetupRevision: z.nullable(z.string()).optional(), initialSetupAuthority: DeploymentStateInitialSetupAuthority$outboundSchema .optional(), lastSyncedEnvVarsHash: z.nullable(z.string()).optional(), lastSyncedSecretNames: z.array(z.string()).optional(), pendingPreparedStack: z.nullable( z.union([ z.lazy(() => DeploymentStatePendingPreparedStack$outboundSchema), z.any(), ]), ).optional(), persistedGateAnswers: z.record(z.string(), z.boolean()).optional(), preparedStack: z.nullable( z.union([ z.lazy(() => DeploymentStatePreparedStack$outboundSchema), z.any(), ]), ).optional(), registryAccessGranted: z.boolean().optional(), setupUpdateAuthorization: z.nullable( z.union([ z.lazy(() => DeploymentStateSetupUpdateAuthorization$outboundSchema), z.any(), ]), ).optional(), }); export function deploymentStateRuntimeMetadataToJSON( deploymentStateRuntimeMetadata: DeploymentStateRuntimeMetadata, ): string { return JSON.stringify( DeploymentStateRuntimeMetadata$outboundSchema.parse( deploymentStateRuntimeMetadata, ), ); } export function deploymentStateRuntimeMetadataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateRuntimeMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateRuntimeMetadata' from JSON`, ); } /** @internal */ export const RuntimeMetadata$inboundSchema: z.ZodType< RuntimeMetadata, unknown > = z.union([ z.lazy(() => DeploymentStateRuntimeMetadata$inboundSchema), z.any(), ]); /** @internal */ export type RuntimeMetadata$Outbound = | DeploymentStateRuntimeMetadata$Outbound | any; /** @internal */ export const RuntimeMetadata$outboundSchema: z.ZodType< RuntimeMetadata$Outbound, RuntimeMetadata > = z.union([ z.lazy(() => DeploymentStateRuntimeMetadata$outboundSchema), z.any(), ]); export function runtimeMetadataToJSON( runtimeMetadata: RuntimeMetadata, ): string { return JSON.stringify(RuntimeMetadata$outboundSchema.parse(runtimeMetadata)); } export function runtimeMetadataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RuntimeMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RuntimeMetadata' from JSON`, ); } /** @internal */ export const DeploymentStateStackStatePlatform$inboundSchema: z.ZodEnum< typeof DeploymentStateStackStatePlatform > = z.enum(DeploymentStateStackStatePlatform); /** @internal */ export const DeploymentStateStackStatePlatform$outboundSchema: z.ZodEnum< typeof DeploymentStateStackStatePlatform > = DeploymentStateStackStatePlatform$inboundSchema; /** @internal */ export const DeploymentStateStackStateConfig$inboundSchema: z.ZodType< DeploymentStateStackStateConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type DeploymentStateStackStateConfig$Outbound = { id: string; type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const DeploymentStateStackStateConfig$outboundSchema: z.ZodType< DeploymentStateStackStateConfig$Outbound, DeploymentStateStackStateConfig > = z.object({ id: z.string(), type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function deploymentStateStackStateConfigToJSON( deploymentStateStackStateConfig: DeploymentStateStackStateConfig, ): string { return JSON.stringify( DeploymentStateStackStateConfig$outboundSchema.parse( deploymentStateStackStateConfig, ), ); } export function deploymentStateStackStateConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateStackStateConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateStackStateConfig' from JSON`, ); } /** @internal */ export const DeploymentStateControllerPlatformEnum$inboundSchema: z.ZodEnum< typeof DeploymentStateControllerPlatformEnum > = z.enum(DeploymentStateControllerPlatformEnum); /** @internal */ export const DeploymentStateControllerPlatformEnum$outboundSchema: z.ZodEnum< typeof DeploymentStateControllerPlatformEnum > = DeploymentStateControllerPlatformEnum$inboundSchema; /** @internal */ export const DeploymentStateControllerPlatformUnion$inboundSchema: z.ZodType< DeploymentStateControllerPlatformUnion, unknown > = z.union([DeploymentStateControllerPlatformEnum$inboundSchema, z.any()]); /** @internal */ export type DeploymentStateControllerPlatformUnion$Outbound = string | any; /** @internal */ export const DeploymentStateControllerPlatformUnion$outboundSchema: z.ZodType< DeploymentStateControllerPlatformUnion$Outbound, DeploymentStateControllerPlatformUnion > = z.union([DeploymentStateControllerPlatformEnum$outboundSchema, z.any()]); export function deploymentStateControllerPlatformUnionToJSON( deploymentStateControllerPlatformUnion: DeploymentStateControllerPlatformUnion, ): string { return JSON.stringify( DeploymentStateControllerPlatformUnion$outboundSchema.parse( deploymentStateControllerPlatformUnion, ), ); } export function deploymentStateControllerPlatformUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateControllerPlatformUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateControllerPlatformUnion' from JSON`, ); } /** @internal */ export const DeploymentStateStackStateDependency$inboundSchema: z.ZodType< DeploymentStateStackStateDependency, unknown > = z.object({ id: z.string(), type: z.string(), }); /** @internal */ export type DeploymentStateStackStateDependency$Outbound = { id: string; type: string; }; /** @internal */ export const DeploymentStateStackStateDependency$outboundSchema: z.ZodType< DeploymentStateStackStateDependency$Outbound, DeploymentStateStackStateDependency > = z.object({ id: z.string(), type: z.string(), }); export function deploymentStateStackStateDependencyToJSON( deploymentStateStackStateDependency: DeploymentStateStackStateDependency, ): string { return JSON.stringify( DeploymentStateStackStateDependency$outboundSchema.parse( deploymentStateStackStateDependency, ), ); } export function deploymentStateStackStateDependencyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateStackStateDependency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateStackStateDependency' from JSON`, ); } /** @internal */ export const DeploymentStateStackStateError$inboundSchema: z.ZodType< DeploymentStateStackStateError, unknown > = z.object({ code: z.string(), context: z.nullable(z.any()).optional(), hint: z.nullable(z.string()).optional(), httpStatusCode: z.nullable(z.int()).optional(), internal: z.boolean(), message: z.string(), retryable: z.boolean().default(false), source: z.nullable(z.any()).optional(), }); /** @internal */ export type DeploymentStateStackStateError$Outbound = { code: string; context?: any | null | undefined; hint?: string | null | undefined; httpStatusCode?: number | null | undefined; internal: boolean; message: string; retryable: boolean; source?: any | null | undefined; }; /** @internal */ export const DeploymentStateStackStateError$outboundSchema: z.ZodType< DeploymentStateStackStateError$Outbound, DeploymentStateStackStateError > = z.object({ code: z.string(), context: z.nullable(z.any()).optional(), hint: z.nullable(z.string()).optional(), httpStatusCode: z.nullable(z.int()).optional(), internal: z.boolean(), message: z.string(), retryable: z.boolean().default(false), source: z.nullable(z.any()).optional(), }); export function deploymentStateStackStateErrorToJSON( deploymentStateStackStateError: DeploymentStateStackStateError, ): string { return JSON.stringify( DeploymentStateStackStateError$outboundSchema.parse( deploymentStateStackStateError, ), ); } export function deploymentStateStackStateErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateStackStateError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateStackStateError' from JSON`, ); } /** @internal */ export const DeploymentStateStackStateErrorUnion$inboundSchema: z.ZodType< DeploymentStateStackStateErrorUnion, unknown > = z.union([ z.lazy(() => DeploymentStateStackStateError$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStateStackStateErrorUnion$Outbound = | DeploymentStateStackStateError$Outbound | any; /** @internal */ export const DeploymentStateStackStateErrorUnion$outboundSchema: z.ZodType< DeploymentStateStackStateErrorUnion$Outbound, DeploymentStateStackStateErrorUnion > = z.union([ z.lazy(() => DeploymentStateStackStateError$outboundSchema), z.any(), ]); export function deploymentStateStackStateErrorUnionToJSON( deploymentStateStackStateErrorUnion: DeploymentStateStackStateErrorUnion, ): string { return JSON.stringify( DeploymentStateStackStateErrorUnion$outboundSchema.parse( deploymentStateStackStateErrorUnion, ), ); } export function deploymentStateStackStateErrorUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateStackStateErrorUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateStackStateErrorUnion' from JSON`, ); } /** @internal */ export const DeploymentStateStackStateLifecycleEnum$inboundSchema: z.ZodEnum< typeof DeploymentStateStackStateLifecycleEnum > = z.enum(DeploymentStateStackStateLifecycleEnum); /** @internal */ export const DeploymentStateStackStateLifecycleEnum$outboundSchema: z.ZodEnum< typeof DeploymentStateStackStateLifecycleEnum > = DeploymentStateStackStateLifecycleEnum$inboundSchema; /** @internal */ export const DeploymentStateLifecycleUnion$inboundSchema: z.ZodType< DeploymentStateLifecycleUnion, unknown > = z.union([DeploymentStateStackStateLifecycleEnum$inboundSchema, z.any()]); /** @internal */ export type DeploymentStateLifecycleUnion$Outbound = string | any; /** @internal */ export const DeploymentStateLifecycleUnion$outboundSchema: z.ZodType< DeploymentStateLifecycleUnion$Outbound, DeploymentStateLifecycleUnion > = z.union([DeploymentStateStackStateLifecycleEnum$outboundSchema, z.any()]); export function deploymentStateLifecycleUnionToJSON( deploymentStateLifecycleUnion: DeploymentStateLifecycleUnion, ): string { return JSON.stringify( DeploymentStateLifecycleUnion$outboundSchema.parse( deploymentStateLifecycleUnion, ), ); } export function deploymentStateLifecycleUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateLifecycleUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateLifecycleUnion' from JSON`, ); } /** @internal */ export const DeploymentStateOutputs$inboundSchema: z.ZodType< DeploymentStateOutputs, unknown > = collectExtraKeys$( z.object({ type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type DeploymentStateOutputs$Outbound = { type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const DeploymentStateOutputs$outboundSchema: z.ZodType< DeploymentStateOutputs$Outbound, DeploymentStateOutputs > = z.object({ type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function deploymentStateOutputsToJSON( deploymentStateOutputs: DeploymentStateOutputs, ): string { return JSON.stringify( DeploymentStateOutputs$outboundSchema.parse(deploymentStateOutputs), ); } export function deploymentStateOutputsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateOutputs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateOutputs' from JSON`, ); } /** @internal */ export const DeploymentStateOutputsUnion$inboundSchema: z.ZodType< DeploymentStateOutputsUnion, unknown > = z.union([z.lazy(() => DeploymentStateOutputs$inboundSchema), z.any()]); /** @internal */ export type DeploymentStateOutputsUnion$Outbound = | DeploymentStateOutputs$Outbound | any; /** @internal */ export const DeploymentStateOutputsUnion$outboundSchema: z.ZodType< DeploymentStateOutputsUnion$Outbound, DeploymentStateOutputsUnion > = z.union([z.lazy(() => DeploymentStateOutputs$outboundSchema), z.any()]); export function deploymentStateOutputsUnionToJSON( deploymentStateOutputsUnion: DeploymentStateOutputsUnion, ): string { return JSON.stringify( DeploymentStateOutputsUnion$outboundSchema.parse( deploymentStateOutputsUnion, ), ); } export function deploymentStateOutputsUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateOutputsUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateOutputsUnion' from JSON`, ); } /** @internal */ export const DeploymentStatePreviousConfig$inboundSchema: z.ZodType< DeploymentStatePreviousConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type DeploymentStatePreviousConfig$Outbound = { id: string; type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const DeploymentStatePreviousConfig$outboundSchema: z.ZodType< DeploymentStatePreviousConfig$Outbound, DeploymentStatePreviousConfig > = z.object({ id: z.string(), type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function deploymentStatePreviousConfigToJSON( deploymentStatePreviousConfig: DeploymentStatePreviousConfig, ): string { return JSON.stringify( DeploymentStatePreviousConfig$outboundSchema.parse( deploymentStatePreviousConfig, ), ); } export function deploymentStatePreviousConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreviousConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreviousConfig' from JSON`, ); } /** @internal */ export const DeploymentStatePreviousConfigUnion$inboundSchema: z.ZodType< DeploymentStatePreviousConfigUnion, unknown > = z.union([ z.lazy(() => DeploymentStatePreviousConfig$inboundSchema), z.any(), ]); /** @internal */ export type DeploymentStatePreviousConfigUnion$Outbound = | DeploymentStatePreviousConfig$Outbound | any; /** @internal */ export const DeploymentStatePreviousConfigUnion$outboundSchema: z.ZodType< DeploymentStatePreviousConfigUnion$Outbound, DeploymentStatePreviousConfigUnion > = z.union([ z.lazy(() => DeploymentStatePreviousConfig$outboundSchema), z.any(), ]); export function deploymentStatePreviousConfigUnionToJSON( deploymentStatePreviousConfigUnion: DeploymentStatePreviousConfigUnion, ): string { return JSON.stringify( DeploymentStatePreviousConfigUnion$outboundSchema.parse( deploymentStatePreviousConfigUnion, ), ); } export function deploymentStatePreviousConfigUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStatePreviousConfigUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStatePreviousConfigUnion' from JSON`, ); } /** @internal */ export const DeploymentStateStackStateStatus$inboundSchema: z.ZodEnum< typeof DeploymentStateStackStateStatus > = z.enum(DeploymentStateStackStateStatus); /** @internal */ export const DeploymentStateStackStateStatus$outboundSchema: z.ZodEnum< typeof DeploymentStateStackStateStatus > = DeploymentStateStackStateStatus$inboundSchema; /** @internal */ export const DeploymentStateStackStateResources$inboundSchema: z.ZodType< DeploymentStateStackStateResources, unknown > = z.object({ _internal: z.nullable(z.any()).optional(), config: z.lazy(() => DeploymentStateStackStateConfig$inboundSchema), controllerPlatform: z.nullable( z.union([DeploymentStateControllerPlatformEnum$inboundSchema, z.any()]), ).optional(), dependencies: z.array( z.lazy(() => DeploymentStateStackStateDependency$inboundSchema), ).optional(), error: z.nullable( z.union([ z.lazy(() => DeploymentStateStackStateError$inboundSchema), z.any(), ]), ).optional(), lastFailedState: z.nullable(z.any()).optional(), lifecycle: z.nullable( z.union([DeploymentStateStackStateLifecycleEnum$inboundSchema, z.any()]), ).optional(), outputs: z.nullable( z.union([z.lazy(() => DeploymentStateOutputs$inboundSchema), z.any()]), ).optional(), previousConfig: z.nullable( z.union([ z.lazy(() => DeploymentStatePreviousConfig$inboundSchema), z.any(), ]), ).optional(), remoteBindingParams: z.nullable(z.any()).optional(), retryAttempt: z.int().optional(), status: DeploymentStateStackStateStatus$inboundSchema, type: z.string(), }).transform((v) => { return remap$(v, { "_internal": "internal", }); }); /** @internal */ export type DeploymentStateStackStateResources$Outbound = { _internal?: any | null | undefined; config: DeploymentStateStackStateConfig$Outbound; controllerPlatform?: string | any | null | undefined; dependencies?: | Array | undefined; error?: DeploymentStateStackStateError$Outbound | any | null | undefined; lastFailedState?: any | null | undefined; lifecycle?: string | any | null | undefined; outputs?: DeploymentStateOutputs$Outbound | any | null | undefined; previousConfig?: | DeploymentStatePreviousConfig$Outbound | any | null | undefined; remoteBindingParams?: any | null | undefined; retryAttempt?: number | undefined; status: string; type: string; }; /** @internal */ export const DeploymentStateStackStateResources$outboundSchema: z.ZodType< DeploymentStateStackStateResources$Outbound, DeploymentStateStackStateResources > = z.object({ internal: z.nullable(z.any()).optional(), config: z.lazy(() => DeploymentStateStackStateConfig$outboundSchema), controllerPlatform: z.nullable( z.union([DeploymentStateControllerPlatformEnum$outboundSchema, z.any()]), ).optional(), dependencies: z.array( z.lazy(() => DeploymentStateStackStateDependency$outboundSchema), ).optional(), error: z.nullable( z.union([ z.lazy(() => DeploymentStateStackStateError$outboundSchema), z.any(), ]), ).optional(), lastFailedState: z.nullable(z.any()).optional(), lifecycle: z.nullable( z.union([DeploymentStateStackStateLifecycleEnum$outboundSchema, z.any()]), ).optional(), outputs: z.nullable( z.union([z.lazy(() => DeploymentStateOutputs$outboundSchema), z.any()]), ).optional(), previousConfig: z.nullable( z.union([ z.lazy(() => DeploymentStatePreviousConfig$outboundSchema), z.any(), ]), ).optional(), remoteBindingParams: z.nullable(z.any()).optional(), retryAttempt: z.int().optional(), status: DeploymentStateStackStateStatus$outboundSchema, type: z.string(), }).transform((v) => { return remap$(v, { internal: "_internal", }); }); export function deploymentStateStackStateResourcesToJSON( deploymentStateStackStateResources: DeploymentStateStackStateResources, ): string { return JSON.stringify( DeploymentStateStackStateResources$outboundSchema.parse( deploymentStateStackStateResources, ), ); } export function deploymentStateStackStateResourcesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateStackStateResources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateStackStateResources' from JSON`, ); } /** @internal */ export const DeploymentStateStackState$inboundSchema: z.ZodType< DeploymentStateStackState, unknown > = z.object({ platform: DeploymentStateStackStatePlatform$inboundSchema, resourcePrefix: z.string(), resources: z.record( z.string(), z.lazy(() => DeploymentStateStackStateResources$inboundSchema), ), }); /** @internal */ export type DeploymentStateStackState$Outbound = { platform: string; resourcePrefix: string; resources: { [k: string]: DeploymentStateStackStateResources$Outbound }; }; /** @internal */ export const DeploymentStateStackState$outboundSchema: z.ZodType< DeploymentStateStackState$Outbound, DeploymentStateStackState > = z.object({ platform: DeploymentStateStackStatePlatform$outboundSchema, resourcePrefix: z.string(), resources: z.record( z.string(), z.lazy(() => DeploymentStateStackStateResources$outboundSchema), ), }); export function deploymentStateStackStateToJSON( deploymentStateStackState: DeploymentStateStackState, ): string { return JSON.stringify( DeploymentStateStackState$outboundSchema.parse(deploymentStateStackState), ); } export function deploymentStateStackStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentStateStackState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentStateStackState' from JSON`, ); } /** @internal */ export const StackState$inboundSchema: z.ZodType = z.union( [z.lazy(() => DeploymentStateStackState$inboundSchema), z.any()], ); /** @internal */ export type StackState$Outbound = DeploymentStateStackState$Outbound | any; /** @internal */ export const StackState$outboundSchema: z.ZodType< StackState$Outbound, StackState > = z.union([z.lazy(() => DeploymentStateStackState$outboundSchema), z.any()]); export function stackStateToJSON(stackState: StackState): string { return JSON.stringify(StackState$outboundSchema.parse(stackState)); } export function stackStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StackState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackState' from JSON`, ); } /** @internal */ export const DeploymentStateStatus$inboundSchema: z.ZodEnum< typeof DeploymentStateStatus > = z.enum(DeploymentStateStatus); /** @internal */ export const DeploymentStateStatus$outboundSchema: z.ZodEnum< typeof DeploymentStateStatus > = DeploymentStateStatus$inboundSchema; /** @internal */ export const TargetReleaseTypeStringList$inboundSchema: z.ZodEnum< typeof TargetReleaseTypeStringList > = z.enum(TargetReleaseTypeStringList); /** @internal */ export const TargetReleaseTypeStringList$outboundSchema: z.ZodEnum< typeof TargetReleaseTypeStringList > = TargetReleaseTypeStringList$inboundSchema; /** @internal */ export const TargetReleaseDefaultStringList$inboundSchema: z.ZodType< TargetReleaseDefaultStringList, unknown > = z.object({ type: TargetReleaseTypeStringList$inboundSchema, value: z.array(z.string()), }); /** @internal */ export type TargetReleaseDefaultStringList$Outbound = { type: string; value: Array; }; /** @internal */ export const TargetReleaseDefaultStringList$outboundSchema: z.ZodType< TargetReleaseDefaultStringList$Outbound, TargetReleaseDefaultStringList > = z.object({ type: TargetReleaseTypeStringList$outboundSchema, value: z.array(z.string()), }); export function targetReleaseDefaultStringListToJSON( targetReleaseDefaultStringList: TargetReleaseDefaultStringList, ): string { return JSON.stringify( TargetReleaseDefaultStringList$outboundSchema.parse( targetReleaseDefaultStringList, ), ); } export function targetReleaseDefaultStringListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseDefaultStringList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseDefaultStringList' from JSON`, ); } /** @internal */ export const TargetReleaseTypeBoolean$inboundSchema: z.ZodEnum< typeof TargetReleaseTypeBoolean > = z.enum(TargetReleaseTypeBoolean); /** @internal */ export const TargetReleaseTypeBoolean$outboundSchema: z.ZodEnum< typeof TargetReleaseTypeBoolean > = TargetReleaseTypeBoolean$inboundSchema; /** @internal */ export const TargetReleaseDefaultBoolean$inboundSchema: z.ZodType< TargetReleaseDefaultBoolean, unknown > = z.object({ type: TargetReleaseTypeBoolean$inboundSchema, value: z.boolean(), }); /** @internal */ export type TargetReleaseDefaultBoolean$Outbound = { type: string; value: boolean; }; /** @internal */ export const TargetReleaseDefaultBoolean$outboundSchema: z.ZodType< TargetReleaseDefaultBoolean$Outbound, TargetReleaseDefaultBoolean > = z.object({ type: TargetReleaseTypeBoolean$outboundSchema, value: z.boolean(), }); export function targetReleaseDefaultBooleanToJSON( targetReleaseDefaultBoolean: TargetReleaseDefaultBoolean, ): string { return JSON.stringify( TargetReleaseDefaultBoolean$outboundSchema.parse( targetReleaseDefaultBoolean, ), ); } export function targetReleaseDefaultBooleanFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseDefaultBoolean$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseDefaultBoolean' from JSON`, ); } /** @internal */ export const TargetReleaseTypeNumber$inboundSchema: z.ZodEnum< typeof TargetReleaseTypeNumber > = z.enum(TargetReleaseTypeNumber); /** @internal */ export const TargetReleaseTypeNumber$outboundSchema: z.ZodEnum< typeof TargetReleaseTypeNumber > = TargetReleaseTypeNumber$inboundSchema; /** @internal */ export const TargetReleaseDefaultNumber$inboundSchema: z.ZodType< TargetReleaseDefaultNumber, unknown > = z.object({ type: TargetReleaseTypeNumber$inboundSchema, value: z.string(), }); /** @internal */ export type TargetReleaseDefaultNumber$Outbound = { type: string; value: string; }; /** @internal */ export const TargetReleaseDefaultNumber$outboundSchema: z.ZodType< TargetReleaseDefaultNumber$Outbound, TargetReleaseDefaultNumber > = z.object({ type: TargetReleaseTypeNumber$outboundSchema, value: z.string(), }); export function targetReleaseDefaultNumberToJSON( targetReleaseDefaultNumber: TargetReleaseDefaultNumber, ): string { return JSON.stringify( TargetReleaseDefaultNumber$outboundSchema.parse(targetReleaseDefaultNumber), ); } export function targetReleaseDefaultNumberFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseDefaultNumber$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseDefaultNumber' from JSON`, ); } /** @internal */ export const TargetReleaseTypeString$inboundSchema: z.ZodEnum< typeof TargetReleaseTypeString > = z.enum(TargetReleaseTypeString); /** @internal */ export const TargetReleaseTypeString$outboundSchema: z.ZodEnum< typeof TargetReleaseTypeString > = TargetReleaseTypeString$inboundSchema; /** @internal */ export const TargetReleaseDefaultString$inboundSchema: z.ZodType< TargetReleaseDefaultString, unknown > = z.object({ type: TargetReleaseTypeString$inboundSchema, value: z.string(), }); /** @internal */ export type TargetReleaseDefaultString$Outbound = { type: string; value: string; }; /** @internal */ export const TargetReleaseDefaultString$outboundSchema: z.ZodType< TargetReleaseDefaultString$Outbound, TargetReleaseDefaultString > = z.object({ type: TargetReleaseTypeString$outboundSchema, value: z.string(), }); export function targetReleaseDefaultStringToJSON( targetReleaseDefaultString: TargetReleaseDefaultString, ): string { return JSON.stringify( TargetReleaseDefaultString$outboundSchema.parse(targetReleaseDefaultString), ); } export function targetReleaseDefaultStringFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseDefaultString$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseDefaultString' from JSON`, ); } /** @internal */ export const TargetReleaseDefaultUnion$inboundSchema: z.ZodType< TargetReleaseDefaultUnion, unknown > = z.union([ z.lazy(() => TargetReleaseDefaultString$inboundSchema), z.lazy(() => TargetReleaseDefaultNumber$inboundSchema), z.lazy(() => TargetReleaseDefaultBoolean$inboundSchema), z.lazy(() => TargetReleaseDefaultStringList$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseDefaultUnion$Outbound = | TargetReleaseDefaultString$Outbound | TargetReleaseDefaultNumber$Outbound | TargetReleaseDefaultBoolean$Outbound | TargetReleaseDefaultStringList$Outbound | any; /** @internal */ export const TargetReleaseDefaultUnion$outboundSchema: z.ZodType< TargetReleaseDefaultUnion$Outbound, TargetReleaseDefaultUnion > = z.union([ z.lazy(() => TargetReleaseDefaultString$outboundSchema), z.lazy(() => TargetReleaseDefaultNumber$outboundSchema), z.lazy(() => TargetReleaseDefaultBoolean$outboundSchema), z.lazy(() => TargetReleaseDefaultStringList$outboundSchema), z.any(), ]); export function targetReleaseDefaultUnionToJSON( targetReleaseDefaultUnion: TargetReleaseDefaultUnion, ): string { return JSON.stringify( TargetReleaseDefaultUnion$outboundSchema.parse(targetReleaseDefaultUnion), ); } export function targetReleaseDefaultUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseDefaultUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseDefaultUnion' from JSON`, ); } /** @internal */ export const TargetReleaseTypeEnvEnum$inboundSchema: z.ZodEnum< typeof TargetReleaseTypeEnvEnum > = z.enum(TargetReleaseTypeEnvEnum); /** @internal */ export const TargetReleaseTypeEnvEnum$outboundSchema: z.ZodEnum< typeof TargetReleaseTypeEnvEnum > = TargetReleaseTypeEnvEnum$inboundSchema; /** @internal */ export const TargetReleaseTypeUnion$inboundSchema: z.ZodType< TargetReleaseTypeUnion, unknown > = z.union([TargetReleaseTypeEnvEnum$inboundSchema, z.any()]); /** @internal */ export type TargetReleaseTypeUnion$Outbound = string | any; /** @internal */ export const TargetReleaseTypeUnion$outboundSchema: z.ZodType< TargetReleaseTypeUnion$Outbound, TargetReleaseTypeUnion > = z.union([TargetReleaseTypeEnvEnum$outboundSchema, z.any()]); export function targetReleaseTypeUnionToJSON( targetReleaseTypeUnion: TargetReleaseTypeUnion, ): string { return JSON.stringify( TargetReleaseTypeUnion$outboundSchema.parse(targetReleaseTypeUnion), ); } export function targetReleaseTypeUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseTypeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseTypeUnion' from JSON`, ); } /** @internal */ export const TargetReleaseEnv$inboundSchema: z.ZodType< TargetReleaseEnv, unknown > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable(z.union([TargetReleaseTypeEnvEnum$inboundSchema, z.any()])) .optional(), }); /** @internal */ export type TargetReleaseEnv$Outbound = { name: string; targetResources?: Array | null | undefined; type?: string | any | null | undefined; }; /** @internal */ export const TargetReleaseEnv$outboundSchema: z.ZodType< TargetReleaseEnv$Outbound, TargetReleaseEnv > = z.object({ name: z.string(), targetResources: z.nullable(z.array(z.string())).optional(), type: z.nullable(z.union([TargetReleaseTypeEnvEnum$outboundSchema, z.any()])) .optional(), }); export function targetReleaseEnvToJSON( targetReleaseEnv: TargetReleaseEnv, ): string { return JSON.stringify( TargetReleaseEnv$outboundSchema.parse(targetReleaseEnv), ); } export function targetReleaseEnvFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseEnv$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseEnv' from JSON`, ); } /** @internal */ export const TargetReleaseKind$inboundSchema: z.ZodEnum< typeof TargetReleaseKind > = z.enum(TargetReleaseKind); /** @internal */ export const TargetReleaseKind$outboundSchema: z.ZodEnum< typeof TargetReleaseKind > = TargetReleaseKind$inboundSchema; /** @internal */ export const TargetReleasePlatform$inboundSchema: z.ZodEnum< typeof TargetReleasePlatform > = z.enum(TargetReleasePlatform); /** @internal */ export const TargetReleasePlatform$outboundSchema: z.ZodEnum< typeof TargetReleasePlatform > = TargetReleasePlatform$inboundSchema; /** @internal */ export const TargetReleaseProvidedBy$inboundSchema: z.ZodEnum< typeof TargetReleaseProvidedBy > = z.enum(TargetReleaseProvidedBy); /** @internal */ export const TargetReleaseProvidedBy$outboundSchema: z.ZodEnum< typeof TargetReleaseProvidedBy > = TargetReleaseProvidedBy$inboundSchema; /** @internal */ export const TargetReleaseValidation$inboundSchema: z.ZodType< TargetReleaseValidation, 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(), }); /** @internal */ export type TargetReleaseValidation$Outbound = { format?: string | null | undefined; max?: string | null | undefined; maxItems?: number | null | undefined; maxLength?: number | null | undefined; min?: string | null | undefined; minItems?: number | null | undefined; minLength?: number | null | undefined; pattern?: string | null | undefined; values?: Array | null | undefined; }; /** @internal */ export const TargetReleaseValidation$outboundSchema: z.ZodType< TargetReleaseValidation$Outbound, TargetReleaseValidation > = 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 targetReleaseValidationToJSON( targetReleaseValidation: TargetReleaseValidation, ): string { return JSON.stringify( TargetReleaseValidation$outboundSchema.parse(targetReleaseValidation), ); } export function targetReleaseValidationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseValidation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseValidation' from JSON`, ); } /** @internal */ export const TargetReleaseValidationUnion$inboundSchema: z.ZodType< TargetReleaseValidationUnion, unknown > = z.union([z.lazy(() => TargetReleaseValidation$inboundSchema), z.any()]); /** @internal */ export type TargetReleaseValidationUnion$Outbound = | TargetReleaseValidation$Outbound | any; /** @internal */ export const TargetReleaseValidationUnion$outboundSchema: z.ZodType< TargetReleaseValidationUnion$Outbound, TargetReleaseValidationUnion > = z.union([z.lazy(() => TargetReleaseValidation$outboundSchema), z.any()]); export function targetReleaseValidationUnionToJSON( targetReleaseValidationUnion: TargetReleaseValidationUnion, ): string { return JSON.stringify( TargetReleaseValidationUnion$outboundSchema.parse( targetReleaseValidationUnion, ), ); } export function targetReleaseValidationUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseValidationUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseValidationUnion' from JSON`, ); } /** @internal */ export const TargetReleaseInput$inboundSchema: z.ZodType< TargetReleaseInput, unknown > = z.object({ default: z.nullable( z.union([ z.lazy(() => TargetReleaseDefaultString$inboundSchema), z.lazy(() => TargetReleaseDefaultNumber$inboundSchema), z.lazy(() => TargetReleaseDefaultBoolean$inboundSchema), z.lazy(() => TargetReleaseDefaultStringList$inboundSchema), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => TargetReleaseEnv$inboundSchema)).optional(), id: z.string(), kind: TargetReleaseKind$inboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable(z.array(TargetReleasePlatform$inboundSchema)) .optional(), providedBy: z.array(TargetReleaseProvidedBy$inboundSchema), required: z.boolean(), validation: z.nullable( z.union([z.lazy(() => TargetReleaseValidation$inboundSchema), z.any()]), ).optional(), }); /** @internal */ export type TargetReleaseInput$Outbound = { default?: | TargetReleaseDefaultString$Outbound | TargetReleaseDefaultNumber$Outbound | TargetReleaseDefaultBoolean$Outbound | TargetReleaseDefaultStringList$Outbound | any | null | undefined; description: string; env?: Array | undefined; id: string; kind: string; label: string; placeholder?: string | null | undefined; platforms?: Array | null | undefined; providedBy: Array; required: boolean; validation?: TargetReleaseValidation$Outbound | any | null | undefined; }; /** @internal */ export const TargetReleaseInput$outboundSchema: z.ZodType< TargetReleaseInput$Outbound, TargetReleaseInput > = z.object({ default: z.nullable( z.union([ z.lazy(() => TargetReleaseDefaultString$outboundSchema), z.lazy(() => TargetReleaseDefaultNumber$outboundSchema), z.lazy(() => TargetReleaseDefaultBoolean$outboundSchema), z.lazy(() => TargetReleaseDefaultStringList$outboundSchema), z.any(), ]), ).optional(), description: z.string(), env: z.array(z.lazy(() => TargetReleaseEnv$outboundSchema)).optional(), id: z.string(), kind: TargetReleaseKind$outboundSchema, label: z.string(), placeholder: z.nullable(z.string()).optional(), platforms: z.nullable(z.array(TargetReleasePlatform$outboundSchema)) .optional(), providedBy: z.array(TargetReleaseProvidedBy$outboundSchema), required: z.boolean(), validation: z.nullable( z.union([z.lazy(() => TargetReleaseValidation$outboundSchema), z.any()]), ).optional(), }); export function targetReleaseInputToJSON( targetReleaseInput: TargetReleaseInput, ): string { return JSON.stringify( TargetReleaseInput$outboundSchema.parse(targetReleaseInput), ); } export function targetReleaseInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseInput' from JSON`, ); } /** @internal */ export const TargetReleaseManagementEnum$inboundSchema: z.ZodEnum< typeof TargetReleaseManagementEnum > = z.enum(TargetReleaseManagementEnum); /** @internal */ export const TargetReleaseManagementEnum$outboundSchema: z.ZodEnum< typeof TargetReleaseManagementEnum > = TargetReleaseManagementEnum$inboundSchema; /** @internal */ export const TargetReleaseOverrideAwResource$inboundSchema: z.ZodType< TargetReleaseOverrideAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type TargetReleaseOverrideAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const TargetReleaseOverrideAwResource$outboundSchema: z.ZodType< TargetReleaseOverrideAwResource$Outbound, TargetReleaseOverrideAwResource > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function targetReleaseOverrideAwResourceToJSON( targetReleaseOverrideAwResource: TargetReleaseOverrideAwResource, ): string { return JSON.stringify( TargetReleaseOverrideAwResource$outboundSchema.parse( targetReleaseOverrideAwResource, ), ); } export function targetReleaseOverrideAwResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAwResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAwResource' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAwStack$inboundSchema: z.ZodType< TargetReleaseOverrideAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type TargetReleaseOverrideAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const TargetReleaseOverrideAwStack$outboundSchema: z.ZodType< TargetReleaseOverrideAwStack$Outbound, TargetReleaseOverrideAwStack > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function targetReleaseOverrideAwStackToJSON( targetReleaseOverrideAwStack: TargetReleaseOverrideAwStack, ): string { return JSON.stringify( TargetReleaseOverrideAwStack$outboundSchema.parse( targetReleaseOverrideAwStack, ), ); } export function targetReleaseOverrideAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAwStack' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAwBinding$inboundSchema: z.ZodType< TargetReleaseOverrideAwBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseOverrideAwResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseOverrideAwStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseOverrideAwBinding$Outbound = { resource?: TargetReleaseOverrideAwResource$Outbound | undefined; stack?: TargetReleaseOverrideAwStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseOverrideAwBinding$outboundSchema: z.ZodType< TargetReleaseOverrideAwBinding$Outbound, TargetReleaseOverrideAwBinding > = z.object({ resource: z.lazy(() => TargetReleaseOverrideAwResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseOverrideAwStack$outboundSchema).optional(), }); export function targetReleaseOverrideAwBindingToJSON( targetReleaseOverrideAwBinding: TargetReleaseOverrideAwBinding, ): string { return JSON.stringify( TargetReleaseOverrideAwBinding$outboundSchema.parse( targetReleaseOverrideAwBinding, ), ); } export function targetReleaseOverrideAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAwBinding' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideEffect$inboundSchema: z.ZodEnum< typeof TargetReleaseOverrideEffect > = z.enum(TargetReleaseOverrideEffect); /** @internal */ export const TargetReleaseOverrideEffect$outboundSchema: z.ZodEnum< typeof TargetReleaseOverrideEffect > = TargetReleaseOverrideEffect$inboundSchema; /** @internal */ export const TargetReleaseOverrideAwGrant$inboundSchema: z.ZodType< TargetReleaseOverrideAwGrant, 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(), }); /** @internal */ export type TargetReleaseOverrideAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseOverrideAwGrant$outboundSchema: z.ZodType< TargetReleaseOverrideAwGrant$Outbound, TargetReleaseOverrideAwGrant > = 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 targetReleaseOverrideAwGrantToJSON( targetReleaseOverrideAwGrant: TargetReleaseOverrideAwGrant, ): string { return JSON.stringify( TargetReleaseOverrideAwGrant$outboundSchema.parse( targetReleaseOverrideAwGrant, ), ); } export function targetReleaseOverrideAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAwGrant' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAw$inboundSchema: z.ZodType< TargetReleaseOverrideAw, unknown > = z.object({ binding: z.lazy(() => TargetReleaseOverrideAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: TargetReleaseOverrideEffect$inboundSchema.optional(), grant: z.lazy(() => TargetReleaseOverrideAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseOverrideAw$Outbound = { binding: TargetReleaseOverrideAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: TargetReleaseOverrideAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseOverrideAw$outboundSchema: z.ZodType< TargetReleaseOverrideAw$Outbound, TargetReleaseOverrideAw > = z.object({ binding: z.lazy(() => TargetReleaseOverrideAwBinding$outboundSchema), description: z.nullable(z.string()).optional(), effect: TargetReleaseOverrideEffect$outboundSchema.optional(), grant: z.lazy(() => TargetReleaseOverrideAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseOverrideAwToJSON( targetReleaseOverrideAw: TargetReleaseOverrideAw, ): string { return JSON.stringify( TargetReleaseOverrideAw$outboundSchema.parse(targetReleaseOverrideAw), ); } export function targetReleaseOverrideAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAw' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAzureResource$inboundSchema: z.ZodType< TargetReleaseOverrideAzureResource, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type TargetReleaseOverrideAzureResource$Outbound = { scope: string; }; /** @internal */ export const TargetReleaseOverrideAzureResource$outboundSchema: z.ZodType< TargetReleaseOverrideAzureResource$Outbound, TargetReleaseOverrideAzureResource > = z.object({ scope: z.string(), }); export function targetReleaseOverrideAzureResourceToJSON( targetReleaseOverrideAzureResource: TargetReleaseOverrideAzureResource, ): string { return JSON.stringify( TargetReleaseOverrideAzureResource$outboundSchema.parse( targetReleaseOverrideAzureResource, ), ); } export function targetReleaseOverrideAzureResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAzureResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAzureResource' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAzureStack$inboundSchema: z.ZodType< TargetReleaseOverrideAzureStack, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type TargetReleaseOverrideAzureStack$Outbound = { scope: string; }; /** @internal */ export const TargetReleaseOverrideAzureStack$outboundSchema: z.ZodType< TargetReleaseOverrideAzureStack$Outbound, TargetReleaseOverrideAzureStack > = z.object({ scope: z.string(), }); export function targetReleaseOverrideAzureStackToJSON( targetReleaseOverrideAzureStack: TargetReleaseOverrideAzureStack, ): string { return JSON.stringify( TargetReleaseOverrideAzureStack$outboundSchema.parse( targetReleaseOverrideAzureStack, ), ); } export function targetReleaseOverrideAzureStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAzureStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAzureStack' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAzureBinding$inboundSchema: z.ZodType< TargetReleaseOverrideAzureBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseOverrideAzureResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseOverrideAzureStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseOverrideAzureBinding$Outbound = { resource?: TargetReleaseOverrideAzureResource$Outbound | undefined; stack?: TargetReleaseOverrideAzureStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseOverrideAzureBinding$outboundSchema: z.ZodType< TargetReleaseOverrideAzureBinding$Outbound, TargetReleaseOverrideAzureBinding > = z.object({ resource: z.lazy(() => TargetReleaseOverrideAzureResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseOverrideAzureStack$outboundSchema) .optional(), }); export function targetReleaseOverrideAzureBindingToJSON( targetReleaseOverrideAzureBinding: TargetReleaseOverrideAzureBinding, ): string { return JSON.stringify( TargetReleaseOverrideAzureBinding$outboundSchema.parse( targetReleaseOverrideAzureBinding, ), ); } export function targetReleaseOverrideAzureBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAzureBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAzureBinding' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAzureGrant$inboundSchema: z.ZodType< TargetReleaseOverrideAzureGrant, 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(), }); /** @internal */ export type TargetReleaseOverrideAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseOverrideAzureGrant$outboundSchema: z.ZodType< TargetReleaseOverrideAzureGrant$Outbound, TargetReleaseOverrideAzureGrant > = 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 targetReleaseOverrideAzureGrantToJSON( targetReleaseOverrideAzureGrant: TargetReleaseOverrideAzureGrant, ): string { return JSON.stringify( TargetReleaseOverrideAzureGrant$outboundSchema.parse( targetReleaseOverrideAzureGrant, ), ); } export function targetReleaseOverrideAzureGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAzureGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAzureGrant' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideAzure$inboundSchema: z.ZodType< TargetReleaseOverrideAzure, unknown > = z.object({ binding: z.lazy(() => TargetReleaseOverrideAzureBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseOverrideAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseOverrideAzure$Outbound = { binding: TargetReleaseOverrideAzureBinding$Outbound; description?: string | null | undefined; grant: TargetReleaseOverrideAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseOverrideAzure$outboundSchema: z.ZodType< TargetReleaseOverrideAzure$Outbound, TargetReleaseOverrideAzure > = z.object({ binding: z.lazy(() => TargetReleaseOverrideAzureBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseOverrideAzureGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseOverrideAzureToJSON( targetReleaseOverrideAzure: TargetReleaseOverrideAzure, ): string { return JSON.stringify( TargetReleaseOverrideAzure$outboundSchema.parse(targetReleaseOverrideAzure), ); } export function targetReleaseOverrideAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideAzure' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideConditionResource$inboundSchema: z.ZodType< TargetReleaseOverrideConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type TargetReleaseOverrideConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const TargetReleaseOverrideConditionResource$outboundSchema: z.ZodType< TargetReleaseOverrideConditionResource$Outbound, TargetReleaseOverrideConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function targetReleaseOverrideConditionResourceToJSON( targetReleaseOverrideConditionResource: TargetReleaseOverrideConditionResource, ): string { return JSON.stringify( TargetReleaseOverrideConditionResource$outboundSchema.parse( targetReleaseOverrideConditionResource, ), ); } export function targetReleaseOverrideConditionResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideConditionResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideConditionResource' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideResourceConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => TargetReleaseOverrideConditionResource$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseOverrideResourceConditionUnion$Outbound = | TargetReleaseOverrideConditionResource$Outbound | any; /** @internal */ export const TargetReleaseOverrideResourceConditionUnion$outboundSchema: z.ZodType< TargetReleaseOverrideResourceConditionUnion$Outbound, TargetReleaseOverrideResourceConditionUnion > = z.union([ z.lazy(() => TargetReleaseOverrideConditionResource$outboundSchema), z.any(), ]); export function targetReleaseOverrideResourceConditionUnionToJSON( targetReleaseOverrideResourceConditionUnion: TargetReleaseOverrideResourceConditionUnion, ): string { return JSON.stringify( TargetReleaseOverrideResourceConditionUnion$outboundSchema.parse( targetReleaseOverrideResourceConditionUnion, ), ); } export function targetReleaseOverrideResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< TargetReleaseOverrideResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => TargetReleaseOverrideResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TargetReleaseOverrideResourceConditionUnion' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideGcpResource$inboundSchema: z.ZodType< TargetReleaseOverrideGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseOverrideConditionResource$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type TargetReleaseOverrideGcpResource$Outbound = { condition?: | TargetReleaseOverrideConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const TargetReleaseOverrideGcpResource$outboundSchema: z.ZodType< TargetReleaseOverrideGcpResource$Outbound, TargetReleaseOverrideGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseOverrideConditionResource$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function targetReleaseOverrideGcpResourceToJSON( targetReleaseOverrideGcpResource: TargetReleaseOverrideGcpResource, ): string { return JSON.stringify( TargetReleaseOverrideGcpResource$outboundSchema.parse( targetReleaseOverrideGcpResource, ), ); } export function targetReleaseOverrideGcpResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideGcpResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideGcpResource' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideCondition$inboundSchema: z.ZodType< TargetReleaseOverrideCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type TargetReleaseOverrideCondition$Outbound = { expression: string; title: string; }; /** @internal */ export const TargetReleaseOverrideCondition$outboundSchema: z.ZodType< TargetReleaseOverrideCondition$Outbound, TargetReleaseOverrideCondition > = z.object({ expression: z.string(), title: z.string(), }); export function targetReleaseOverrideConditionToJSON( targetReleaseOverrideCondition: TargetReleaseOverrideCondition, ): string { return JSON.stringify( TargetReleaseOverrideCondition$outboundSchema.parse( targetReleaseOverrideCondition, ), ); } export function targetReleaseOverrideConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideCondition' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideConditionUnion$inboundSchema: z.ZodType< TargetReleaseOverrideConditionUnion, unknown > = z.union([ z.lazy(() => TargetReleaseOverrideCondition$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseOverrideConditionUnion$Outbound = | TargetReleaseOverrideCondition$Outbound | any; /** @internal */ export const TargetReleaseOverrideConditionUnion$outboundSchema: z.ZodType< TargetReleaseOverrideConditionUnion$Outbound, TargetReleaseOverrideConditionUnion > = z.union([ z.lazy(() => TargetReleaseOverrideCondition$outboundSchema), z.any(), ]); export function targetReleaseOverrideConditionUnionToJSON( targetReleaseOverrideConditionUnion: TargetReleaseOverrideConditionUnion, ): string { return JSON.stringify( TargetReleaseOverrideConditionUnion$outboundSchema.parse( targetReleaseOverrideConditionUnion, ), ); } export function targetReleaseOverrideConditionUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideConditionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideConditionUnion' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideGcpStack$inboundSchema: z.ZodType< TargetReleaseOverrideGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseOverrideCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type TargetReleaseOverrideGcpStack$Outbound = { condition?: TargetReleaseOverrideCondition$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const TargetReleaseOverrideGcpStack$outboundSchema: z.ZodType< TargetReleaseOverrideGcpStack$Outbound, TargetReleaseOverrideGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseOverrideCondition$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function targetReleaseOverrideGcpStackToJSON( targetReleaseOverrideGcpStack: TargetReleaseOverrideGcpStack, ): string { return JSON.stringify( TargetReleaseOverrideGcpStack$outboundSchema.parse( targetReleaseOverrideGcpStack, ), ); } export function targetReleaseOverrideGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideGcpStack' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideGcpBinding$inboundSchema: z.ZodType< TargetReleaseOverrideGcpBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseOverrideGcpResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseOverrideGcpStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseOverrideGcpBinding$Outbound = { resource?: TargetReleaseOverrideGcpResource$Outbound | undefined; stack?: TargetReleaseOverrideGcpStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseOverrideGcpBinding$outboundSchema: z.ZodType< TargetReleaseOverrideGcpBinding$Outbound, TargetReleaseOverrideGcpBinding > = z.object({ resource: z.lazy(() => TargetReleaseOverrideGcpResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseOverrideGcpStack$outboundSchema).optional(), }); export function targetReleaseOverrideGcpBindingToJSON( targetReleaseOverrideGcpBinding: TargetReleaseOverrideGcpBinding, ): string { return JSON.stringify( TargetReleaseOverrideGcpBinding$outboundSchema.parse( targetReleaseOverrideGcpBinding, ), ); } export function targetReleaseOverrideGcpBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideGcpBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideGcpBinding' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideGcpGrant$inboundSchema: z.ZodType< TargetReleaseOverrideGcpGrant, 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(), }); /** @internal */ export type TargetReleaseOverrideGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseOverrideGcpGrant$outboundSchema: z.ZodType< TargetReleaseOverrideGcpGrant$Outbound, TargetReleaseOverrideGcpGrant > = 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 targetReleaseOverrideGcpGrantToJSON( targetReleaseOverrideGcpGrant: TargetReleaseOverrideGcpGrant, ): string { return JSON.stringify( TargetReleaseOverrideGcpGrant$outboundSchema.parse( targetReleaseOverrideGcpGrant, ), ); } export function targetReleaseOverrideGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideGcpGrant' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideGcp$inboundSchema: z.ZodType< TargetReleaseOverrideGcp, unknown > = z.object({ binding: z.lazy(() => TargetReleaseOverrideGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseOverrideGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseOverrideGcp$Outbound = { binding: TargetReleaseOverrideGcpBinding$Outbound; description?: string | null | undefined; grant: TargetReleaseOverrideGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseOverrideGcp$outboundSchema: z.ZodType< TargetReleaseOverrideGcp$Outbound, TargetReleaseOverrideGcp > = z.object({ binding: z.lazy(() => TargetReleaseOverrideGcpBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseOverrideGcpGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseOverrideGcpToJSON( targetReleaseOverrideGcp: TargetReleaseOverrideGcp, ): string { return JSON.stringify( TargetReleaseOverrideGcp$outboundSchema.parse(targetReleaseOverrideGcp), ); } export function targetReleaseOverrideGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideGcp' from JSON`, ); } /** @internal */ export const TargetReleaseOverridePlatforms$inboundSchema: z.ZodType< TargetReleaseOverridePlatforms, unknown > = z.object({ aws: z.nullable(z.array(z.lazy(() => TargetReleaseOverrideAw$inboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => TargetReleaseOverrideAzure$inboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => TargetReleaseOverrideGcp$inboundSchema))) .optional(), }); /** @internal */ export type TargetReleaseOverridePlatforms$Outbound = { aws?: Array | null | undefined; azure?: Array | null | undefined; gcp?: Array | null | undefined; }; /** @internal */ export const TargetReleaseOverridePlatforms$outboundSchema: z.ZodType< TargetReleaseOverridePlatforms$Outbound, TargetReleaseOverridePlatforms > = z.object({ aws: z.nullable(z.array(z.lazy(() => TargetReleaseOverrideAw$outboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => TargetReleaseOverrideAzure$outboundSchema)), ).optional(), gcp: z.nullable( z.array(z.lazy(() => TargetReleaseOverrideGcp$outboundSchema)), ).optional(), }); export function targetReleaseOverridePlatformsToJSON( targetReleaseOverridePlatforms: TargetReleaseOverridePlatforms, ): string { return JSON.stringify( TargetReleaseOverridePlatforms$outboundSchema.parse( targetReleaseOverridePlatforms, ), ); } export function targetReleaseOverridePlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverridePlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverridePlatforms' from JSON`, ); } /** @internal */ export const TargetReleaseOverride$inboundSchema: z.ZodType< TargetReleaseOverride, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => TargetReleaseOverridePlatforms$inboundSchema), }); /** @internal */ export type TargetReleaseOverride$Outbound = { description: string; id: string; platforms: TargetReleaseOverridePlatforms$Outbound; }; /** @internal */ export const TargetReleaseOverride$outboundSchema: z.ZodType< TargetReleaseOverride$Outbound, TargetReleaseOverride > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => TargetReleaseOverridePlatforms$outboundSchema), }); export function targetReleaseOverrideToJSON( targetReleaseOverride: TargetReleaseOverride, ): string { return JSON.stringify( TargetReleaseOverride$outboundSchema.parse(targetReleaseOverride), ); } export function targetReleaseOverrideFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverride$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverride' from JSON`, ); } /** @internal */ export const TargetReleaseOverrideUnion$inboundSchema: z.ZodType< TargetReleaseOverrideUnion, unknown > = z.union([z.lazy(() => TargetReleaseOverride$inboundSchema), z.string()]); /** @internal */ export type TargetReleaseOverrideUnion$Outbound = | TargetReleaseOverride$Outbound | string; /** @internal */ export const TargetReleaseOverrideUnion$outboundSchema: z.ZodType< TargetReleaseOverrideUnion$Outbound, TargetReleaseOverrideUnion > = z.union([z.lazy(() => TargetReleaseOverride$outboundSchema), z.string()]); export function targetReleaseOverrideUnionToJSON( targetReleaseOverrideUnion: TargetReleaseOverrideUnion, ): string { return JSON.stringify( TargetReleaseOverrideUnion$outboundSchema.parse(targetReleaseOverrideUnion), ); } export function targetReleaseOverrideUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseOverrideUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseOverrideUnion' from JSON`, ); } /** @internal */ export const TargetReleaseManagement2$inboundSchema: z.ZodType< TargetReleaseManagement2, unknown > = z.object({ override: z.record( z.string(), z.array( z.union([z.lazy(() => TargetReleaseOverride$inboundSchema), z.string()]), ), ), }); /** @internal */ export type TargetReleaseManagement2$Outbound = { override: { [k: string]: Array }; }; /** @internal */ export const TargetReleaseManagement2$outboundSchema: z.ZodType< TargetReleaseManagement2$Outbound, TargetReleaseManagement2 > = z.object({ override: z.record( z.string(), z.array( z.union([z.lazy(() => TargetReleaseOverride$outboundSchema), z.string()]), ), ), }); export function targetReleaseManagement2ToJSON( targetReleaseManagement2: TargetReleaseManagement2, ): string { return JSON.stringify( TargetReleaseManagement2$outboundSchema.parse(targetReleaseManagement2), ); } export function targetReleaseManagement2FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseManagement2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseManagement2' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAwResource$inboundSchema: z.ZodType< TargetReleaseExtendAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type TargetReleaseExtendAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const TargetReleaseExtendAwResource$outboundSchema: z.ZodType< TargetReleaseExtendAwResource$Outbound, TargetReleaseExtendAwResource > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function targetReleaseExtendAwResourceToJSON( targetReleaseExtendAwResource: TargetReleaseExtendAwResource, ): string { return JSON.stringify( TargetReleaseExtendAwResource$outboundSchema.parse( targetReleaseExtendAwResource, ), ); } export function targetReleaseExtendAwResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAwResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAwResource' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAwStack$inboundSchema: z.ZodType< TargetReleaseExtendAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type TargetReleaseExtendAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const TargetReleaseExtendAwStack$outboundSchema: z.ZodType< TargetReleaseExtendAwStack$Outbound, TargetReleaseExtendAwStack > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function targetReleaseExtendAwStackToJSON( targetReleaseExtendAwStack: TargetReleaseExtendAwStack, ): string { return JSON.stringify( TargetReleaseExtendAwStack$outboundSchema.parse(targetReleaseExtendAwStack), ); } export function targetReleaseExtendAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAwStack' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAwBinding$inboundSchema: z.ZodType< TargetReleaseExtendAwBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseExtendAwResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseExtendAwStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseExtendAwBinding$Outbound = { resource?: TargetReleaseExtendAwResource$Outbound | undefined; stack?: TargetReleaseExtendAwStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseExtendAwBinding$outboundSchema: z.ZodType< TargetReleaseExtendAwBinding$Outbound, TargetReleaseExtendAwBinding > = z.object({ resource: z.lazy(() => TargetReleaseExtendAwResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseExtendAwStack$outboundSchema).optional(), }); export function targetReleaseExtendAwBindingToJSON( targetReleaseExtendAwBinding: TargetReleaseExtendAwBinding, ): string { return JSON.stringify( TargetReleaseExtendAwBinding$outboundSchema.parse( targetReleaseExtendAwBinding, ), ); } export function targetReleaseExtendAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAwBinding' from JSON`, ); } /** @internal */ export const TargetReleaseExtendEffect$inboundSchema: z.ZodEnum< typeof TargetReleaseExtendEffect > = z.enum(TargetReleaseExtendEffect); /** @internal */ export const TargetReleaseExtendEffect$outboundSchema: z.ZodEnum< typeof TargetReleaseExtendEffect > = TargetReleaseExtendEffect$inboundSchema; /** @internal */ export const TargetReleaseExtendAwGrant$inboundSchema: z.ZodType< TargetReleaseExtendAwGrant, 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(), }); /** @internal */ export type TargetReleaseExtendAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseExtendAwGrant$outboundSchema: z.ZodType< TargetReleaseExtendAwGrant$Outbound, TargetReleaseExtendAwGrant > = 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 targetReleaseExtendAwGrantToJSON( targetReleaseExtendAwGrant: TargetReleaseExtendAwGrant, ): string { return JSON.stringify( TargetReleaseExtendAwGrant$outboundSchema.parse(targetReleaseExtendAwGrant), ); } export function targetReleaseExtendAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAwGrant' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAw$inboundSchema: z.ZodType< TargetReleaseExtendAw, unknown > = z.object({ binding: z.lazy(() => TargetReleaseExtendAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: TargetReleaseExtendEffect$inboundSchema.optional(), grant: z.lazy(() => TargetReleaseExtendAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseExtendAw$Outbound = { binding: TargetReleaseExtendAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: TargetReleaseExtendAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseExtendAw$outboundSchema: z.ZodType< TargetReleaseExtendAw$Outbound, TargetReleaseExtendAw > = z.object({ binding: z.lazy(() => TargetReleaseExtendAwBinding$outboundSchema), description: z.nullable(z.string()).optional(), effect: TargetReleaseExtendEffect$outboundSchema.optional(), grant: z.lazy(() => TargetReleaseExtendAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseExtendAwToJSON( targetReleaseExtendAw: TargetReleaseExtendAw, ): string { return JSON.stringify( TargetReleaseExtendAw$outboundSchema.parse(targetReleaseExtendAw), ); } export function targetReleaseExtendAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAw' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAzureResource$inboundSchema: z.ZodType< TargetReleaseExtendAzureResource, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type TargetReleaseExtendAzureResource$Outbound = { scope: string; }; /** @internal */ export const TargetReleaseExtendAzureResource$outboundSchema: z.ZodType< TargetReleaseExtendAzureResource$Outbound, TargetReleaseExtendAzureResource > = z.object({ scope: z.string(), }); export function targetReleaseExtendAzureResourceToJSON( targetReleaseExtendAzureResource: TargetReleaseExtendAzureResource, ): string { return JSON.stringify( TargetReleaseExtendAzureResource$outboundSchema.parse( targetReleaseExtendAzureResource, ), ); } export function targetReleaseExtendAzureResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAzureResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAzureResource' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAzureStack$inboundSchema: z.ZodType< TargetReleaseExtendAzureStack, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type TargetReleaseExtendAzureStack$Outbound = { scope: string; }; /** @internal */ export const TargetReleaseExtendAzureStack$outboundSchema: z.ZodType< TargetReleaseExtendAzureStack$Outbound, TargetReleaseExtendAzureStack > = z.object({ scope: z.string(), }); export function targetReleaseExtendAzureStackToJSON( targetReleaseExtendAzureStack: TargetReleaseExtendAzureStack, ): string { return JSON.stringify( TargetReleaseExtendAzureStack$outboundSchema.parse( targetReleaseExtendAzureStack, ), ); } export function targetReleaseExtendAzureStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAzureStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAzureStack' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAzureBinding$inboundSchema: z.ZodType< TargetReleaseExtendAzureBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseExtendAzureResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseExtendAzureStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseExtendAzureBinding$Outbound = { resource?: TargetReleaseExtendAzureResource$Outbound | undefined; stack?: TargetReleaseExtendAzureStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseExtendAzureBinding$outboundSchema: z.ZodType< TargetReleaseExtendAzureBinding$Outbound, TargetReleaseExtendAzureBinding > = z.object({ resource: z.lazy(() => TargetReleaseExtendAzureResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseExtendAzureStack$outboundSchema).optional(), }); export function targetReleaseExtendAzureBindingToJSON( targetReleaseExtendAzureBinding: TargetReleaseExtendAzureBinding, ): string { return JSON.stringify( TargetReleaseExtendAzureBinding$outboundSchema.parse( targetReleaseExtendAzureBinding, ), ); } export function targetReleaseExtendAzureBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAzureBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAzureBinding' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAzureGrant$inboundSchema: z.ZodType< TargetReleaseExtendAzureGrant, 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(), }); /** @internal */ export type TargetReleaseExtendAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseExtendAzureGrant$outboundSchema: z.ZodType< TargetReleaseExtendAzureGrant$Outbound, TargetReleaseExtendAzureGrant > = 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 targetReleaseExtendAzureGrantToJSON( targetReleaseExtendAzureGrant: TargetReleaseExtendAzureGrant, ): string { return JSON.stringify( TargetReleaseExtendAzureGrant$outboundSchema.parse( targetReleaseExtendAzureGrant, ), ); } export function targetReleaseExtendAzureGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAzureGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAzureGrant' from JSON`, ); } /** @internal */ export const TargetReleaseExtendAzure$inboundSchema: z.ZodType< TargetReleaseExtendAzure, unknown > = z.object({ binding: z.lazy(() => TargetReleaseExtendAzureBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseExtendAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseExtendAzure$Outbound = { binding: TargetReleaseExtendAzureBinding$Outbound; description?: string | null | undefined; grant: TargetReleaseExtendAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseExtendAzure$outboundSchema: z.ZodType< TargetReleaseExtendAzure$Outbound, TargetReleaseExtendAzure > = z.object({ binding: z.lazy(() => TargetReleaseExtendAzureBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseExtendAzureGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseExtendAzureToJSON( targetReleaseExtendAzure: TargetReleaseExtendAzure, ): string { return JSON.stringify( TargetReleaseExtendAzure$outboundSchema.parse(targetReleaseExtendAzure), ); } export function targetReleaseExtendAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendAzure' from JSON`, ); } /** @internal */ export const TargetReleaseExtendConditionResource$inboundSchema: z.ZodType< TargetReleaseExtendConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type TargetReleaseExtendConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const TargetReleaseExtendConditionResource$outboundSchema: z.ZodType< TargetReleaseExtendConditionResource$Outbound, TargetReleaseExtendConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function targetReleaseExtendConditionResourceToJSON( targetReleaseExtendConditionResource: TargetReleaseExtendConditionResource, ): string { return JSON.stringify( TargetReleaseExtendConditionResource$outboundSchema.parse( targetReleaseExtendConditionResource, ), ); } export function targetReleaseExtendConditionResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendConditionResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendConditionResource' from JSON`, ); } /** @internal */ export const TargetReleaseExtendResourceConditionUnion$inboundSchema: z.ZodType< TargetReleaseExtendResourceConditionUnion, unknown > = z.union([ z.lazy(() => TargetReleaseExtendConditionResource$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseExtendResourceConditionUnion$Outbound = | TargetReleaseExtendConditionResource$Outbound | any; /** @internal */ export const TargetReleaseExtendResourceConditionUnion$outboundSchema: z.ZodType< TargetReleaseExtendResourceConditionUnion$Outbound, TargetReleaseExtendResourceConditionUnion > = z.union([ z.lazy(() => TargetReleaseExtendConditionResource$outboundSchema), z.any(), ]); export function targetReleaseExtendResourceConditionUnionToJSON( targetReleaseExtendResourceConditionUnion: TargetReleaseExtendResourceConditionUnion, ): string { return JSON.stringify( TargetReleaseExtendResourceConditionUnion$outboundSchema.parse( targetReleaseExtendResourceConditionUnion, ), ); } export function targetReleaseExtendResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< TargetReleaseExtendResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => TargetReleaseExtendResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TargetReleaseExtendResourceConditionUnion' from JSON`, ); } /** @internal */ export const TargetReleaseExtendGcpResource$inboundSchema: z.ZodType< TargetReleaseExtendGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseExtendConditionResource$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type TargetReleaseExtendGcpResource$Outbound = { condition?: | TargetReleaseExtendConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const TargetReleaseExtendGcpResource$outboundSchema: z.ZodType< TargetReleaseExtendGcpResource$Outbound, TargetReleaseExtendGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseExtendConditionResource$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function targetReleaseExtendGcpResourceToJSON( targetReleaseExtendGcpResource: TargetReleaseExtendGcpResource, ): string { return JSON.stringify( TargetReleaseExtendGcpResource$outboundSchema.parse( targetReleaseExtendGcpResource, ), ); } export function targetReleaseExtendGcpResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendGcpResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendGcpResource' from JSON`, ); } /** @internal */ export const TargetReleaseExtendCondition$inboundSchema: z.ZodType< TargetReleaseExtendCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type TargetReleaseExtendCondition$Outbound = { expression: string; title: string; }; /** @internal */ export const TargetReleaseExtendCondition$outboundSchema: z.ZodType< TargetReleaseExtendCondition$Outbound, TargetReleaseExtendCondition > = z.object({ expression: z.string(), title: z.string(), }); export function targetReleaseExtendConditionToJSON( targetReleaseExtendCondition: TargetReleaseExtendCondition, ): string { return JSON.stringify( TargetReleaseExtendCondition$outboundSchema.parse( targetReleaseExtendCondition, ), ); } export function targetReleaseExtendConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendCondition' from JSON`, ); } /** @internal */ export const TargetReleaseExtendConditionUnion$inboundSchema: z.ZodType< TargetReleaseExtendConditionUnion, unknown > = z.union([ z.lazy(() => TargetReleaseExtendCondition$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseExtendConditionUnion$Outbound = | TargetReleaseExtendCondition$Outbound | any; /** @internal */ export const TargetReleaseExtendConditionUnion$outboundSchema: z.ZodType< TargetReleaseExtendConditionUnion$Outbound, TargetReleaseExtendConditionUnion > = z.union([ z.lazy(() => TargetReleaseExtendCondition$outboundSchema), z.any(), ]); export function targetReleaseExtendConditionUnionToJSON( targetReleaseExtendConditionUnion: TargetReleaseExtendConditionUnion, ): string { return JSON.stringify( TargetReleaseExtendConditionUnion$outboundSchema.parse( targetReleaseExtendConditionUnion, ), ); } export function targetReleaseExtendConditionUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendConditionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendConditionUnion' from JSON`, ); } /** @internal */ export const TargetReleaseExtendGcpStack$inboundSchema: z.ZodType< TargetReleaseExtendGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseExtendCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type TargetReleaseExtendGcpStack$Outbound = { condition?: TargetReleaseExtendCondition$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const TargetReleaseExtendGcpStack$outboundSchema: z.ZodType< TargetReleaseExtendGcpStack$Outbound, TargetReleaseExtendGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseExtendCondition$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function targetReleaseExtendGcpStackToJSON( targetReleaseExtendGcpStack: TargetReleaseExtendGcpStack, ): string { return JSON.stringify( TargetReleaseExtendGcpStack$outboundSchema.parse( targetReleaseExtendGcpStack, ), ); } export function targetReleaseExtendGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendGcpStack' from JSON`, ); } /** @internal */ export const TargetReleaseExtendGcpBinding$inboundSchema: z.ZodType< TargetReleaseExtendGcpBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseExtendGcpResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseExtendGcpStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseExtendGcpBinding$Outbound = { resource?: TargetReleaseExtendGcpResource$Outbound | undefined; stack?: TargetReleaseExtendGcpStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseExtendGcpBinding$outboundSchema: z.ZodType< TargetReleaseExtendGcpBinding$Outbound, TargetReleaseExtendGcpBinding > = z.object({ resource: z.lazy(() => TargetReleaseExtendGcpResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseExtendGcpStack$outboundSchema).optional(), }); export function targetReleaseExtendGcpBindingToJSON( targetReleaseExtendGcpBinding: TargetReleaseExtendGcpBinding, ): string { return JSON.stringify( TargetReleaseExtendGcpBinding$outboundSchema.parse( targetReleaseExtendGcpBinding, ), ); } export function targetReleaseExtendGcpBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendGcpBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendGcpBinding' from JSON`, ); } /** @internal */ export const TargetReleaseExtendGcpGrant$inboundSchema: z.ZodType< TargetReleaseExtendGcpGrant, 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(), }); /** @internal */ export type TargetReleaseExtendGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseExtendGcpGrant$outboundSchema: z.ZodType< TargetReleaseExtendGcpGrant$Outbound, TargetReleaseExtendGcpGrant > = 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 targetReleaseExtendGcpGrantToJSON( targetReleaseExtendGcpGrant: TargetReleaseExtendGcpGrant, ): string { return JSON.stringify( TargetReleaseExtendGcpGrant$outboundSchema.parse( targetReleaseExtendGcpGrant, ), ); } export function targetReleaseExtendGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendGcpGrant' from JSON`, ); } /** @internal */ export const TargetReleaseExtendGcp$inboundSchema: z.ZodType< TargetReleaseExtendGcp, unknown > = z.object({ binding: z.lazy(() => TargetReleaseExtendGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseExtendGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseExtendGcp$Outbound = { binding: TargetReleaseExtendGcpBinding$Outbound; description?: string | null | undefined; grant: TargetReleaseExtendGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseExtendGcp$outboundSchema: z.ZodType< TargetReleaseExtendGcp$Outbound, TargetReleaseExtendGcp > = z.object({ binding: z.lazy(() => TargetReleaseExtendGcpBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseExtendGcpGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseExtendGcpToJSON( targetReleaseExtendGcp: TargetReleaseExtendGcp, ): string { return JSON.stringify( TargetReleaseExtendGcp$outboundSchema.parse(targetReleaseExtendGcp), ); } export function targetReleaseExtendGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendGcp' from JSON`, ); } /** @internal */ export const TargetReleaseExtendPlatforms$inboundSchema: z.ZodType< TargetReleaseExtendPlatforms, unknown > = z.object({ aws: z.nullable(z.array(z.lazy(() => TargetReleaseExtendAw$inboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => TargetReleaseExtendAzure$inboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => TargetReleaseExtendGcp$inboundSchema))) .optional(), }); /** @internal */ export type TargetReleaseExtendPlatforms$Outbound = { aws?: Array | null | undefined; azure?: Array | null | undefined; gcp?: Array | null | undefined; }; /** @internal */ export const TargetReleaseExtendPlatforms$outboundSchema: z.ZodType< TargetReleaseExtendPlatforms$Outbound, TargetReleaseExtendPlatforms > = z.object({ aws: z.nullable(z.array(z.lazy(() => TargetReleaseExtendAw$outboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => TargetReleaseExtendAzure$outboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => TargetReleaseExtendGcp$outboundSchema))) .optional(), }); export function targetReleaseExtendPlatformsToJSON( targetReleaseExtendPlatforms: TargetReleaseExtendPlatforms, ): string { return JSON.stringify( TargetReleaseExtendPlatforms$outboundSchema.parse( targetReleaseExtendPlatforms, ), ); } export function targetReleaseExtendPlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendPlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendPlatforms' from JSON`, ); } /** @internal */ export const TargetReleaseExtend$inboundSchema: z.ZodType< TargetReleaseExtend, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => TargetReleaseExtendPlatforms$inboundSchema), }); /** @internal */ export type TargetReleaseExtend$Outbound = { description: string; id: string; platforms: TargetReleaseExtendPlatforms$Outbound; }; /** @internal */ export const TargetReleaseExtend$outboundSchema: z.ZodType< TargetReleaseExtend$Outbound, TargetReleaseExtend > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => TargetReleaseExtendPlatforms$outboundSchema), }); export function targetReleaseExtendToJSON( targetReleaseExtend: TargetReleaseExtend, ): string { return JSON.stringify( TargetReleaseExtend$outboundSchema.parse(targetReleaseExtend), ); } export function targetReleaseExtendFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtend$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtend' from JSON`, ); } /** @internal */ export const TargetReleaseExtendUnion$inboundSchema: z.ZodType< TargetReleaseExtendUnion, unknown > = z.union([z.lazy(() => TargetReleaseExtend$inboundSchema), z.string()]); /** @internal */ export type TargetReleaseExtendUnion$Outbound = | TargetReleaseExtend$Outbound | string; /** @internal */ export const TargetReleaseExtendUnion$outboundSchema: z.ZodType< TargetReleaseExtendUnion$Outbound, TargetReleaseExtendUnion > = z.union([z.lazy(() => TargetReleaseExtend$outboundSchema), z.string()]); export function targetReleaseExtendUnionToJSON( targetReleaseExtendUnion: TargetReleaseExtendUnion, ): string { return JSON.stringify( TargetReleaseExtendUnion$outboundSchema.parse(targetReleaseExtendUnion), ); } export function targetReleaseExtendUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseExtendUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseExtendUnion' from JSON`, ); } /** @internal */ export const TargetReleaseManagement1$inboundSchema: z.ZodType< TargetReleaseManagement1, unknown > = z.object({ extend: z.record( z.string(), z.array( z.union([z.lazy(() => TargetReleaseExtend$inboundSchema), z.string()]), ), ), }); /** @internal */ export type TargetReleaseManagement1$Outbound = { extend: { [k: string]: Array }; }; /** @internal */ export const TargetReleaseManagement1$outboundSchema: z.ZodType< TargetReleaseManagement1$Outbound, TargetReleaseManagement1 > = z.object({ extend: z.record( z.string(), z.array( z.union([z.lazy(() => TargetReleaseExtend$outboundSchema), z.string()]), ), ), }); export function targetReleaseManagement1ToJSON( targetReleaseManagement1: TargetReleaseManagement1, ): string { return JSON.stringify( TargetReleaseManagement1$outboundSchema.parse(targetReleaseManagement1), ); } export function targetReleaseManagement1FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseManagement1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseManagement1' from JSON`, ); } /** @internal */ export const TargetReleaseManagementUnion$inboundSchema: z.ZodType< TargetReleaseManagementUnion, unknown > = z.union([ z.lazy(() => TargetReleaseManagement1$inboundSchema), z.lazy(() => TargetReleaseManagement2$inboundSchema), TargetReleaseManagementEnum$inboundSchema, ]); /** @internal */ export type TargetReleaseManagementUnion$Outbound = | TargetReleaseManagement1$Outbound | TargetReleaseManagement2$Outbound | string; /** @internal */ export const TargetReleaseManagementUnion$outboundSchema: z.ZodType< TargetReleaseManagementUnion$Outbound, TargetReleaseManagementUnion > = z.union([ z.lazy(() => TargetReleaseManagement1$outboundSchema), z.lazy(() => TargetReleaseManagement2$outboundSchema), TargetReleaseManagementEnum$outboundSchema, ]); export function targetReleaseManagementUnionToJSON( targetReleaseManagementUnion: TargetReleaseManagementUnion, ): string { return JSON.stringify( TargetReleaseManagementUnion$outboundSchema.parse( targetReleaseManagementUnion, ), ); } export function targetReleaseManagementUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseManagementUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseManagementUnion' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAwResource$inboundSchema: z.ZodType< TargetReleaseProfileAwResource, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type TargetReleaseProfileAwResource$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const TargetReleaseProfileAwResource$outboundSchema: z.ZodType< TargetReleaseProfileAwResource$Outbound, TargetReleaseProfileAwResource > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function targetReleaseProfileAwResourceToJSON( targetReleaseProfileAwResource: TargetReleaseProfileAwResource, ): string { return JSON.stringify( TargetReleaseProfileAwResource$outboundSchema.parse( targetReleaseProfileAwResource, ), ); } export function targetReleaseProfileAwResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAwResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAwResource' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAwStack$inboundSchema: z.ZodType< TargetReleaseProfileAwStack, unknown > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); /** @internal */ export type TargetReleaseProfileAwStack$Outbound = { condition?: { [k: string]: { [k: string]: string } } | null | undefined; resources: Array; }; /** @internal */ export const TargetReleaseProfileAwStack$outboundSchema: z.ZodType< TargetReleaseProfileAwStack$Outbound, TargetReleaseProfileAwStack > = z.object({ condition: z.nullable(z.record(z.string(), z.record(z.string(), z.string()))) .optional(), resources: z.array(z.string()), }); export function targetReleaseProfileAwStackToJSON( targetReleaseProfileAwStack: TargetReleaseProfileAwStack, ): string { return JSON.stringify( TargetReleaseProfileAwStack$outboundSchema.parse( targetReleaseProfileAwStack, ), ); } export function targetReleaseProfileAwStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAwStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAwStack' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAwBinding$inboundSchema: z.ZodType< TargetReleaseProfileAwBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseProfileAwResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseProfileAwStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseProfileAwBinding$Outbound = { resource?: TargetReleaseProfileAwResource$Outbound | undefined; stack?: TargetReleaseProfileAwStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseProfileAwBinding$outboundSchema: z.ZodType< TargetReleaseProfileAwBinding$Outbound, TargetReleaseProfileAwBinding > = z.object({ resource: z.lazy(() => TargetReleaseProfileAwResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseProfileAwStack$outboundSchema).optional(), }); export function targetReleaseProfileAwBindingToJSON( targetReleaseProfileAwBinding: TargetReleaseProfileAwBinding, ): string { return JSON.stringify( TargetReleaseProfileAwBinding$outboundSchema.parse( targetReleaseProfileAwBinding, ), ); } export function targetReleaseProfileAwBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAwBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAwBinding' from JSON`, ); } /** @internal */ export const TargetReleaseProfileEffect$inboundSchema: z.ZodEnum< typeof TargetReleaseProfileEffect > = z.enum(TargetReleaseProfileEffect); /** @internal */ export const TargetReleaseProfileEffect$outboundSchema: z.ZodEnum< typeof TargetReleaseProfileEffect > = TargetReleaseProfileEffect$inboundSchema; /** @internal */ export const TargetReleaseProfileAwGrant$inboundSchema: z.ZodType< TargetReleaseProfileAwGrant, 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(), }); /** @internal */ export type TargetReleaseProfileAwGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseProfileAwGrant$outboundSchema: z.ZodType< TargetReleaseProfileAwGrant$Outbound, TargetReleaseProfileAwGrant > = 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 targetReleaseProfileAwGrantToJSON( targetReleaseProfileAwGrant: TargetReleaseProfileAwGrant, ): string { return JSON.stringify( TargetReleaseProfileAwGrant$outboundSchema.parse( targetReleaseProfileAwGrant, ), ); } export function targetReleaseProfileAwGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAwGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAwGrant' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAw$inboundSchema: z.ZodType< TargetReleaseProfileAw, unknown > = z.object({ binding: z.lazy(() => TargetReleaseProfileAwBinding$inboundSchema), description: z.nullable(z.string()).optional(), effect: TargetReleaseProfileEffect$inboundSchema.optional(), grant: z.lazy(() => TargetReleaseProfileAwGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseProfileAw$Outbound = { binding: TargetReleaseProfileAwBinding$Outbound; description?: string | null | undefined; effect?: string | undefined; grant: TargetReleaseProfileAwGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseProfileAw$outboundSchema: z.ZodType< TargetReleaseProfileAw$Outbound, TargetReleaseProfileAw > = z.object({ binding: z.lazy(() => TargetReleaseProfileAwBinding$outboundSchema), description: z.nullable(z.string()).optional(), effect: TargetReleaseProfileEffect$outboundSchema.optional(), grant: z.lazy(() => TargetReleaseProfileAwGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseProfileAwToJSON( targetReleaseProfileAw: TargetReleaseProfileAw, ): string { return JSON.stringify( TargetReleaseProfileAw$outboundSchema.parse(targetReleaseProfileAw), ); } export function targetReleaseProfileAwFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAw$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAw' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAzureResource$inboundSchema: z.ZodType< TargetReleaseProfileAzureResource, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type TargetReleaseProfileAzureResource$Outbound = { scope: string; }; /** @internal */ export const TargetReleaseProfileAzureResource$outboundSchema: z.ZodType< TargetReleaseProfileAzureResource$Outbound, TargetReleaseProfileAzureResource > = z.object({ scope: z.string(), }); export function targetReleaseProfileAzureResourceToJSON( targetReleaseProfileAzureResource: TargetReleaseProfileAzureResource, ): string { return JSON.stringify( TargetReleaseProfileAzureResource$outboundSchema.parse( targetReleaseProfileAzureResource, ), ); } export function targetReleaseProfileAzureResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAzureResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAzureResource' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAzureStack$inboundSchema: z.ZodType< TargetReleaseProfileAzureStack, unknown > = z.object({ scope: z.string(), }); /** @internal */ export type TargetReleaseProfileAzureStack$Outbound = { scope: string; }; /** @internal */ export const TargetReleaseProfileAzureStack$outboundSchema: z.ZodType< TargetReleaseProfileAzureStack$Outbound, TargetReleaseProfileAzureStack > = z.object({ scope: z.string(), }); export function targetReleaseProfileAzureStackToJSON( targetReleaseProfileAzureStack: TargetReleaseProfileAzureStack, ): string { return JSON.stringify( TargetReleaseProfileAzureStack$outboundSchema.parse( targetReleaseProfileAzureStack, ), ); } export function targetReleaseProfileAzureStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAzureStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAzureStack' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAzureBinding$inboundSchema: z.ZodType< TargetReleaseProfileAzureBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseProfileAzureResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseProfileAzureStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseProfileAzureBinding$Outbound = { resource?: TargetReleaseProfileAzureResource$Outbound | undefined; stack?: TargetReleaseProfileAzureStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseProfileAzureBinding$outboundSchema: z.ZodType< TargetReleaseProfileAzureBinding$Outbound, TargetReleaseProfileAzureBinding > = z.object({ resource: z.lazy(() => TargetReleaseProfileAzureResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseProfileAzureStack$outboundSchema).optional(), }); export function targetReleaseProfileAzureBindingToJSON( targetReleaseProfileAzureBinding: TargetReleaseProfileAzureBinding, ): string { return JSON.stringify( TargetReleaseProfileAzureBinding$outboundSchema.parse( targetReleaseProfileAzureBinding, ), ); } export function targetReleaseProfileAzureBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAzureBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAzureBinding' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAzureGrant$inboundSchema: z.ZodType< TargetReleaseProfileAzureGrant, 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(), }); /** @internal */ export type TargetReleaseProfileAzureGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseProfileAzureGrant$outboundSchema: z.ZodType< TargetReleaseProfileAzureGrant$Outbound, TargetReleaseProfileAzureGrant > = 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 targetReleaseProfileAzureGrantToJSON( targetReleaseProfileAzureGrant: TargetReleaseProfileAzureGrant, ): string { return JSON.stringify( TargetReleaseProfileAzureGrant$outboundSchema.parse( targetReleaseProfileAzureGrant, ), ); } export function targetReleaseProfileAzureGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAzureGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAzureGrant' from JSON`, ); } /** @internal */ export const TargetReleaseProfileAzure$inboundSchema: z.ZodType< TargetReleaseProfileAzure, unknown > = z.object({ binding: z.lazy(() => TargetReleaseProfileAzureBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseProfileAzureGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseProfileAzure$Outbound = { binding: TargetReleaseProfileAzureBinding$Outbound; description?: string | null | undefined; grant: TargetReleaseProfileAzureGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseProfileAzure$outboundSchema: z.ZodType< TargetReleaseProfileAzure$Outbound, TargetReleaseProfileAzure > = z.object({ binding: z.lazy(() => TargetReleaseProfileAzureBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseProfileAzureGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseProfileAzureToJSON( targetReleaseProfileAzure: TargetReleaseProfileAzure, ): string { return JSON.stringify( TargetReleaseProfileAzure$outboundSchema.parse(targetReleaseProfileAzure), ); } export function targetReleaseProfileAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileAzure' from JSON`, ); } /** @internal */ export const TargetReleaseProfileConditionResource$inboundSchema: z.ZodType< TargetReleaseProfileConditionResource, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type TargetReleaseProfileConditionResource$Outbound = { expression: string; title: string; }; /** @internal */ export const TargetReleaseProfileConditionResource$outboundSchema: z.ZodType< TargetReleaseProfileConditionResource$Outbound, TargetReleaseProfileConditionResource > = z.object({ expression: z.string(), title: z.string(), }); export function targetReleaseProfileConditionResourceToJSON( targetReleaseProfileConditionResource: TargetReleaseProfileConditionResource, ): string { return JSON.stringify( TargetReleaseProfileConditionResource$outboundSchema.parse( targetReleaseProfileConditionResource, ), ); } export function targetReleaseProfileConditionResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileConditionResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileConditionResource' from JSON`, ); } /** @internal */ export const TargetReleaseProfileResourceConditionUnion$inboundSchema: z.ZodType = z.union([ z.lazy(() => TargetReleaseProfileConditionResource$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseProfileResourceConditionUnion$Outbound = | TargetReleaseProfileConditionResource$Outbound | any; /** @internal */ export const TargetReleaseProfileResourceConditionUnion$outboundSchema: z.ZodType< TargetReleaseProfileResourceConditionUnion$Outbound, TargetReleaseProfileResourceConditionUnion > = z.union([ z.lazy(() => TargetReleaseProfileConditionResource$outboundSchema), z.any(), ]); export function targetReleaseProfileResourceConditionUnionToJSON( targetReleaseProfileResourceConditionUnion: TargetReleaseProfileResourceConditionUnion, ): string { return JSON.stringify( TargetReleaseProfileResourceConditionUnion$outboundSchema.parse( targetReleaseProfileResourceConditionUnion, ), ); } export function targetReleaseProfileResourceConditionUnionFromJSON( jsonString: string, ): SafeParseResult< TargetReleaseProfileResourceConditionUnion, SDKValidationError > { return safeParse( jsonString, (x) => TargetReleaseProfileResourceConditionUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'TargetReleaseProfileResourceConditionUnion' from JSON`, ); } /** @internal */ export const TargetReleaseProfileGcpResource$inboundSchema: z.ZodType< TargetReleaseProfileGcpResource, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseProfileConditionResource$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type TargetReleaseProfileGcpResource$Outbound = { condition?: | TargetReleaseProfileConditionResource$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const TargetReleaseProfileGcpResource$outboundSchema: z.ZodType< TargetReleaseProfileGcpResource$Outbound, TargetReleaseProfileGcpResource > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseProfileConditionResource$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function targetReleaseProfileGcpResourceToJSON( targetReleaseProfileGcpResource: TargetReleaseProfileGcpResource, ): string { return JSON.stringify( TargetReleaseProfileGcpResource$outboundSchema.parse( targetReleaseProfileGcpResource, ), ); } export function targetReleaseProfileGcpResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileGcpResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileGcpResource' from JSON`, ); } /** @internal */ export const TargetReleaseProfileCondition$inboundSchema: z.ZodType< TargetReleaseProfileCondition, unknown > = z.object({ expression: z.string(), title: z.string(), }); /** @internal */ export type TargetReleaseProfileCondition$Outbound = { expression: string; title: string; }; /** @internal */ export const TargetReleaseProfileCondition$outboundSchema: z.ZodType< TargetReleaseProfileCondition$Outbound, TargetReleaseProfileCondition > = z.object({ expression: z.string(), title: z.string(), }); export function targetReleaseProfileConditionToJSON( targetReleaseProfileCondition: TargetReleaseProfileCondition, ): string { return JSON.stringify( TargetReleaseProfileCondition$outboundSchema.parse( targetReleaseProfileCondition, ), ); } export function targetReleaseProfileConditionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileCondition' from JSON`, ); } /** @internal */ export const TargetReleaseProfileConditionUnion$inboundSchema: z.ZodType< TargetReleaseProfileConditionUnion, unknown > = z.union([ z.lazy(() => TargetReleaseProfileCondition$inboundSchema), z.any(), ]); /** @internal */ export type TargetReleaseProfileConditionUnion$Outbound = | TargetReleaseProfileCondition$Outbound | any; /** @internal */ export const TargetReleaseProfileConditionUnion$outboundSchema: z.ZodType< TargetReleaseProfileConditionUnion$Outbound, TargetReleaseProfileConditionUnion > = z.union([ z.lazy(() => TargetReleaseProfileCondition$outboundSchema), z.any(), ]); export function targetReleaseProfileConditionUnionToJSON( targetReleaseProfileConditionUnion: TargetReleaseProfileConditionUnion, ): string { return JSON.stringify( TargetReleaseProfileConditionUnion$outboundSchema.parse( targetReleaseProfileConditionUnion, ), ); } export function targetReleaseProfileConditionUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileConditionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileConditionUnion' from JSON`, ); } /** @internal */ export const TargetReleaseProfileGcpStack$inboundSchema: z.ZodType< TargetReleaseProfileGcpStack, unknown > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseProfileCondition$inboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); /** @internal */ export type TargetReleaseProfileGcpStack$Outbound = { condition?: TargetReleaseProfileCondition$Outbound | any | null | undefined; scope: string; }; /** @internal */ export const TargetReleaseProfileGcpStack$outboundSchema: z.ZodType< TargetReleaseProfileGcpStack$Outbound, TargetReleaseProfileGcpStack > = z.object({ condition: z.nullable( z.union([ z.lazy(() => TargetReleaseProfileCondition$outboundSchema), z.any(), ]), ).optional(), scope: z.string(), }); export function targetReleaseProfileGcpStackToJSON( targetReleaseProfileGcpStack: TargetReleaseProfileGcpStack, ): string { return JSON.stringify( TargetReleaseProfileGcpStack$outboundSchema.parse( targetReleaseProfileGcpStack, ), ); } export function targetReleaseProfileGcpStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileGcpStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileGcpStack' from JSON`, ); } /** @internal */ export const TargetReleaseProfileGcpBinding$inboundSchema: z.ZodType< TargetReleaseProfileGcpBinding, unknown > = z.object({ resource: z.lazy(() => TargetReleaseProfileGcpResource$inboundSchema) .optional(), stack: z.lazy(() => TargetReleaseProfileGcpStack$inboundSchema).optional(), }); /** @internal */ export type TargetReleaseProfileGcpBinding$Outbound = { resource?: TargetReleaseProfileGcpResource$Outbound | undefined; stack?: TargetReleaseProfileGcpStack$Outbound | undefined; }; /** @internal */ export const TargetReleaseProfileGcpBinding$outboundSchema: z.ZodType< TargetReleaseProfileGcpBinding$Outbound, TargetReleaseProfileGcpBinding > = z.object({ resource: z.lazy(() => TargetReleaseProfileGcpResource$outboundSchema) .optional(), stack: z.lazy(() => TargetReleaseProfileGcpStack$outboundSchema).optional(), }); export function targetReleaseProfileGcpBindingToJSON( targetReleaseProfileGcpBinding: TargetReleaseProfileGcpBinding, ): string { return JSON.stringify( TargetReleaseProfileGcpBinding$outboundSchema.parse( targetReleaseProfileGcpBinding, ), ); } export function targetReleaseProfileGcpBindingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileGcpBinding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileGcpBinding' from JSON`, ); } /** @internal */ export const TargetReleaseProfileGcpGrant$inboundSchema: z.ZodType< TargetReleaseProfileGcpGrant, 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(), }); /** @internal */ export type TargetReleaseProfileGcpGrant$Outbound = { actions?: Array | null | undefined; dataActions?: Array | null | undefined; permissions?: Array | null | undefined; predefinedRoles?: Array | null | undefined; residualPermissions?: Array | null | undefined; }; /** @internal */ export const TargetReleaseProfileGcpGrant$outboundSchema: z.ZodType< TargetReleaseProfileGcpGrant$Outbound, TargetReleaseProfileGcpGrant > = 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 targetReleaseProfileGcpGrantToJSON( targetReleaseProfileGcpGrant: TargetReleaseProfileGcpGrant, ): string { return JSON.stringify( TargetReleaseProfileGcpGrant$outboundSchema.parse( targetReleaseProfileGcpGrant, ), ); } export function targetReleaseProfileGcpGrantFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileGcpGrant$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileGcpGrant' from JSON`, ); } /** @internal */ export const TargetReleaseProfileGcp$inboundSchema: z.ZodType< TargetReleaseProfileGcp, unknown > = z.object({ binding: z.lazy(() => TargetReleaseProfileGcpBinding$inboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseProfileGcpGrant$inboundSchema), label: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetReleaseProfileGcp$Outbound = { binding: TargetReleaseProfileGcpBinding$Outbound; description?: string | null | undefined; grant: TargetReleaseProfileGcpGrant$Outbound; label?: string | null | undefined; }; /** @internal */ export const TargetReleaseProfileGcp$outboundSchema: z.ZodType< TargetReleaseProfileGcp$Outbound, TargetReleaseProfileGcp > = z.object({ binding: z.lazy(() => TargetReleaseProfileGcpBinding$outboundSchema), description: z.nullable(z.string()).optional(), grant: z.lazy(() => TargetReleaseProfileGcpGrant$outboundSchema), label: z.nullable(z.string()).optional(), }); export function targetReleaseProfileGcpToJSON( targetReleaseProfileGcp: TargetReleaseProfileGcp, ): string { return JSON.stringify( TargetReleaseProfileGcp$outboundSchema.parse(targetReleaseProfileGcp), ); } export function targetReleaseProfileGcpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileGcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileGcp' from JSON`, ); } /** @internal */ export const TargetReleaseProfilePlatforms$inboundSchema: z.ZodType< TargetReleaseProfilePlatforms, unknown > = z.object({ aws: z.nullable(z.array(z.lazy(() => TargetReleaseProfileAw$inboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => TargetReleaseProfileAzure$inboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => TargetReleaseProfileGcp$inboundSchema))) .optional(), }); /** @internal */ export type TargetReleaseProfilePlatforms$Outbound = { aws?: Array | null | undefined; azure?: Array | null | undefined; gcp?: Array | null | undefined; }; /** @internal */ export const TargetReleaseProfilePlatforms$outboundSchema: z.ZodType< TargetReleaseProfilePlatforms$Outbound, TargetReleaseProfilePlatforms > = z.object({ aws: z.nullable(z.array(z.lazy(() => TargetReleaseProfileAw$outboundSchema))) .optional(), azure: z.nullable( z.array(z.lazy(() => TargetReleaseProfileAzure$outboundSchema)), ).optional(), gcp: z.nullable(z.array(z.lazy(() => TargetReleaseProfileGcp$outboundSchema))) .optional(), }); export function targetReleaseProfilePlatformsToJSON( targetReleaseProfilePlatforms: TargetReleaseProfilePlatforms, ): string { return JSON.stringify( TargetReleaseProfilePlatforms$outboundSchema.parse( targetReleaseProfilePlatforms, ), ); } export function targetReleaseProfilePlatformsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfilePlatforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfilePlatforms' from JSON`, ); } /** @internal */ export const TargetReleaseProfile$inboundSchema: z.ZodType< TargetReleaseProfile, unknown > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => TargetReleaseProfilePlatforms$inboundSchema), }); /** @internal */ export type TargetReleaseProfile$Outbound = { description: string; id: string; platforms: TargetReleaseProfilePlatforms$Outbound; }; /** @internal */ export const TargetReleaseProfile$outboundSchema: z.ZodType< TargetReleaseProfile$Outbound, TargetReleaseProfile > = z.object({ description: z.string(), id: z.string(), platforms: z.lazy(() => TargetReleaseProfilePlatforms$outboundSchema), }); export function targetReleaseProfileToJSON( targetReleaseProfile: TargetReleaseProfile, ): string { return JSON.stringify( TargetReleaseProfile$outboundSchema.parse(targetReleaseProfile), ); } export function targetReleaseProfileFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfile' from JSON`, ); } /** @internal */ export const TargetReleaseProfileUnion$inboundSchema: z.ZodType< TargetReleaseProfileUnion, unknown > = z.union([z.lazy(() => TargetReleaseProfile$inboundSchema), z.string()]); /** @internal */ export type TargetReleaseProfileUnion$Outbound = | TargetReleaseProfile$Outbound | string; /** @internal */ export const TargetReleaseProfileUnion$outboundSchema: z.ZodType< TargetReleaseProfileUnion$Outbound, TargetReleaseProfileUnion > = z.union([z.lazy(() => TargetReleaseProfile$outboundSchema), z.string()]); export function targetReleaseProfileUnionToJSON( targetReleaseProfileUnion: TargetReleaseProfileUnion, ): string { return JSON.stringify( TargetReleaseProfileUnion$outboundSchema.parse(targetReleaseProfileUnion), ); } export function targetReleaseProfileUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseProfileUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseProfileUnion' from JSON`, ); } /** @internal */ export const TargetReleasePermissions$inboundSchema: z.ZodType< TargetReleasePermissions, unknown > = z.object({ management: z.union([ z.lazy(() => TargetReleaseManagement1$inboundSchema), z.lazy(() => TargetReleaseManagement2$inboundSchema), TargetReleaseManagementEnum$inboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([z.lazy(() => TargetReleaseProfile$inboundSchema), z.string()]), ), ), ), }); /** @internal */ export type TargetReleasePermissions$Outbound = { management?: | TargetReleaseManagement1$Outbound | TargetReleaseManagement2$Outbound | string | undefined; profiles: { [k: string]: { [k: string]: Array }; }; }; /** @internal */ export const TargetReleasePermissions$outboundSchema: z.ZodType< TargetReleasePermissions$Outbound, TargetReleasePermissions > = z.object({ management: z.union([ z.lazy(() => TargetReleaseManagement1$outboundSchema), z.lazy(() => TargetReleaseManagement2$outboundSchema), TargetReleaseManagementEnum$outboundSchema, ]).optional(), profiles: z.record( z.string(), z.record( z.string(), z.array( z.union([ z.lazy(() => TargetReleaseProfile$outboundSchema), z.string(), ]), ), ), ), }); export function targetReleasePermissionsToJSON( targetReleasePermissions: TargetReleasePermissions, ): string { return JSON.stringify( TargetReleasePermissions$outboundSchema.parse(targetReleasePermissions), ); } export function targetReleasePermissionsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleasePermissions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleasePermissions' from JSON`, ); } /** @internal */ export const TargetReleaseConfig$inboundSchema: z.ZodType< TargetReleaseConfig, unknown > = collectExtraKeys$( z.object({ id: z.string(), type: z.string(), }).catchall(z.any()), "additionalProperties", true, ); /** @internal */ export type TargetReleaseConfig$Outbound = { id: string; type: string; [additionalProperties: string]: unknown; }; /** @internal */ export const TargetReleaseConfig$outboundSchema: z.ZodType< TargetReleaseConfig$Outbound, TargetReleaseConfig > = z.object({ id: z.string(), type: z.string(), additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), }).transform((v) => { return { ...v.additionalProperties, ...remap$(v, { additionalProperties: null, }), }; }); export function targetReleaseConfigToJSON( targetReleaseConfig: TargetReleaseConfig, ): string { return JSON.stringify( TargetReleaseConfig$outboundSchema.parse(targetReleaseConfig), ); } export function targetReleaseConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseConfig' from JSON`, ); } /** @internal */ export const TargetReleaseDependency$inboundSchema: z.ZodType< TargetReleaseDependency, unknown > = z.object({ id: z.string(), type: z.string(), }); /** @internal */ export type TargetReleaseDependency$Outbound = { id: string; type: string; }; /** @internal */ export const TargetReleaseDependency$outboundSchema: z.ZodType< TargetReleaseDependency$Outbound, TargetReleaseDependency > = z.object({ id: z.string(), type: z.string(), }); export function targetReleaseDependencyToJSON( targetReleaseDependency: TargetReleaseDependency, ): string { return JSON.stringify( TargetReleaseDependency$outboundSchema.parse(targetReleaseDependency), ); } export function targetReleaseDependencyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseDependency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseDependency' from JSON`, ); } /** @internal */ export const TargetReleaseLifecycle$inboundSchema: z.ZodEnum< typeof TargetReleaseLifecycle > = z.enum(TargetReleaseLifecycle); /** @internal */ export const TargetReleaseLifecycle$outboundSchema: z.ZodEnum< typeof TargetReleaseLifecycle > = TargetReleaseLifecycle$inboundSchema; /** @internal */ export const TargetReleaseResources$inboundSchema: z.ZodType< TargetReleaseResources, unknown > = z.object({ config: z.lazy(() => TargetReleaseConfig$inboundSchema), dependencies: z.array(z.lazy(() => TargetReleaseDependency$inboundSchema)), enabledWhen: z.nullable(z.string()).optional(), lifecycle: TargetReleaseLifecycle$inboundSchema, remoteAccess: z.boolean().optional(), }); /** @internal */ export type TargetReleaseResources$Outbound = { config: TargetReleaseConfig$Outbound; dependencies: Array; enabledWhen?: string | null | undefined; lifecycle: string; remoteAccess?: boolean | undefined; }; /** @internal */ export const TargetReleaseResources$outboundSchema: z.ZodType< TargetReleaseResources$Outbound, TargetReleaseResources > = z.object({ config: z.lazy(() => TargetReleaseConfig$outboundSchema), dependencies: z.array(z.lazy(() => TargetReleaseDependency$outboundSchema)), enabledWhen: z.nullable(z.string()).optional(), lifecycle: TargetReleaseLifecycle$outboundSchema, remoteAccess: z.boolean().optional(), }); export function targetReleaseResourcesToJSON( targetReleaseResources: TargetReleaseResources, ): string { return JSON.stringify( TargetReleaseResources$outboundSchema.parse(targetReleaseResources), ); } export function targetReleaseResourcesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseResources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseResources' from JSON`, ); } /** @internal */ export const TargetReleaseSupportedPlatform$inboundSchema: z.ZodEnum< typeof TargetReleaseSupportedPlatform > = z.enum(TargetReleaseSupportedPlatform); /** @internal */ export const TargetReleaseSupportedPlatform$outboundSchema: z.ZodEnum< typeof TargetReleaseSupportedPlatform > = TargetReleaseSupportedPlatform$inboundSchema; /** @internal */ export const TargetReleaseStack$inboundSchema: z.ZodType< TargetReleaseStack, unknown > = z.object({ id: z.string(), inputs: z.array(z.lazy(() => TargetReleaseInput$inboundSchema)).optional(), permissions: z.lazy(() => TargetReleasePermissions$inboundSchema).optional(), resources: z.record( z.string(), z.lazy(() => TargetReleaseResources$inboundSchema), ), supportedPlatforms: z.nullable( z.array(TargetReleaseSupportedPlatform$inboundSchema), ).optional(), }); /** @internal */ export type TargetReleaseStack$Outbound = { id: string; inputs?: Array | undefined; permissions?: TargetReleasePermissions$Outbound | undefined; resources: { [k: string]: TargetReleaseResources$Outbound }; supportedPlatforms?: Array | null | undefined; }; /** @internal */ export const TargetReleaseStack$outboundSchema: z.ZodType< TargetReleaseStack$Outbound, TargetReleaseStack > = z.object({ id: z.string(), inputs: z.array(z.lazy(() => TargetReleaseInput$outboundSchema)).optional(), permissions: z.lazy(() => TargetReleasePermissions$outboundSchema).optional(), resources: z.record( z.string(), z.lazy(() => TargetReleaseResources$outboundSchema), ), supportedPlatforms: z.nullable( z.array(TargetReleaseSupportedPlatform$outboundSchema), ).optional(), }); export function targetReleaseStackToJSON( targetReleaseStack: TargetReleaseStack, ): string { return JSON.stringify( TargetReleaseStack$outboundSchema.parse(targetReleaseStack), ); } export function targetReleaseStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseStack' from JSON`, ); } /** @internal */ export const TargetRelease$inboundSchema: z.ZodType = z .object({ description: z.nullable(z.string()).optional(), releaseId: z.nullable(z.string()).optional(), stack: z.lazy(() => TargetReleaseStack$inboundSchema), version: z.nullable(z.string()).optional(), }); /** @internal */ export type TargetRelease$Outbound = { description?: string | null | undefined; releaseId?: string | null | undefined; stack: TargetReleaseStack$Outbound; version?: string | null | undefined; }; /** @internal */ export const TargetRelease$outboundSchema: z.ZodType< TargetRelease$Outbound, TargetRelease > = z.object({ description: z.nullable(z.string()).optional(), releaseId: z.nullable(z.string()).optional(), stack: z.lazy(() => TargetReleaseStack$outboundSchema), version: z.nullable(z.string()).optional(), }); export function targetReleaseToJSON(targetRelease: TargetRelease): string { return JSON.stringify(TargetRelease$outboundSchema.parse(targetRelease)); } export function targetReleaseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetRelease$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetRelease' from JSON`, ); } /** @internal */ export const TargetReleaseUnion$inboundSchema: z.ZodType< TargetReleaseUnion, unknown > = z.union([z.lazy(() => TargetRelease$inboundSchema), z.any()]); /** @internal */ export type TargetReleaseUnion$Outbound = TargetRelease$Outbound | any; /** @internal */ export const TargetReleaseUnion$outboundSchema: z.ZodType< TargetReleaseUnion$Outbound, TargetReleaseUnion > = z.union([z.lazy(() => TargetRelease$outboundSchema), z.any()]); export function targetReleaseUnionToJSON( targetReleaseUnion: TargetReleaseUnion, ): string { return JSON.stringify( TargetReleaseUnion$outboundSchema.parse(targetReleaseUnion), ); } export function targetReleaseUnionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TargetReleaseUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TargetReleaseUnion' from JSON`, ); } /** @internal */ export const DeploymentState$inboundSchema: z.ZodType< DeploymentState, unknown > = z.object({ currentRelease: z.nullable( z.union([z.lazy(() => CurrentRelease$inboundSchema), z.any()]), ).optional(), environmentInfo: z.nullable( z.union([ z.lazy(() => DeploymentStateEnvironmentInfoGcp$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAzure$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoLocal$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAws$inboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoTest$inboundSchema), z.any(), ]), ).optional(), error: z.nullable( z.union([z.lazy(() => DeploymentStateError$inboundSchema), z.any()]), ).optional(), platform: DeploymentStatePlatform$inboundSchema, protocolVersion: z.int(), retryRequested: z.boolean().optional(), runtimeMetadata: z.nullable( z.union([ z.lazy(() => DeploymentStateRuntimeMetadata$inboundSchema), z.any(), ]), ).optional(), stackState: z.nullable( z.union([z.lazy(() => DeploymentStateStackState$inboundSchema), z.any()]), ).optional(), status: DeploymentStateStatus$inboundSchema, targetRelease: z.nullable( z.union([z.lazy(() => TargetRelease$inboundSchema), z.any()]), ).optional(), }); /** @internal */ export type DeploymentState$Outbound = { currentRelease?: CurrentRelease$Outbound | any | null | undefined; environmentInfo?: | DeploymentStateEnvironmentInfoGcp$Outbound | DeploymentStateEnvironmentInfoAzure$Outbound | DeploymentStateEnvironmentInfoLocal$Outbound | DeploymentStateEnvironmentInfoAws$Outbound | DeploymentStateEnvironmentInfoTest$Outbound | any | null | undefined; error?: DeploymentStateError$Outbound | any | null | undefined; platform: string; protocolVersion: number; retryRequested?: boolean | undefined; runtimeMetadata?: | DeploymentStateRuntimeMetadata$Outbound | any | null | undefined; stackState?: DeploymentStateStackState$Outbound | any | null | undefined; status: string; targetRelease?: TargetRelease$Outbound | any | null | undefined; }; /** @internal */ export const DeploymentState$outboundSchema: z.ZodType< DeploymentState$Outbound, DeploymentState > = z.object({ currentRelease: z.nullable( z.union([z.lazy(() => CurrentRelease$outboundSchema), z.any()]), ).optional(), environmentInfo: z.nullable( z.union([ z.lazy(() => DeploymentStateEnvironmentInfoGcp$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAzure$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoLocal$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoAws$outboundSchema), z.lazy(() => DeploymentStateEnvironmentInfoTest$outboundSchema), z.any(), ]), ).optional(), error: z.nullable( z.union([z.lazy(() => DeploymentStateError$outboundSchema), z.any()]), ).optional(), platform: DeploymentStatePlatform$outboundSchema, protocolVersion: z.int(), retryRequested: z.boolean().optional(), runtimeMetadata: z.nullable( z.union([ z.lazy(() => DeploymentStateRuntimeMetadata$outboundSchema), z.any(), ]), ).optional(), stackState: z.nullable( z.union([z.lazy(() => DeploymentStateStackState$outboundSchema), z.any()]), ).optional(), status: DeploymentStateStatus$outboundSchema, targetRelease: z.nullable( z.union([z.lazy(() => TargetRelease$outboundSchema), z.any()]), ).optional(), }); export function deploymentStateToJSON( deploymentState: DeploymentState, ): string { return JSON.stringify(DeploymentState$outboundSchema.parse(deploymentState)); } export function deploymentStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentState' from JSON`, ); }