/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4f3369598b10 */ import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; import { DeploymentSetupMethod, DeploymentSetupMethod$outboundSchema, } from "./deploymentsetupmethod.js"; import { DeploymentSetupStackSettingsPolicy, DeploymentSetupStackSettingsPolicy$Outbound, DeploymentSetupStackSettingsPolicy$outboundSchema, } from "./deploymentsetupstacksettingspolicy.js"; import { EnvironmentVariableConfig, EnvironmentVariableConfig$Outbound, EnvironmentVariableConfig$outboundSchema, } from "./environmentvariableconfig.js"; import { KubernetesClusterSource, KubernetesClusterSource$outboundSchema, } from "./kubernetesclustersource.js"; /** * Represents the target cloud platform. */ export const DeploymentSetupConfigInputAllowedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentSetupConfigInputAllowedPlatform = ClosedEnum< typeof DeploymentSetupConfigInputAllowedPlatform >; export const DeploymentSetupConfigInputAllowedAIProvider = { AwsBedrock: "aws-bedrock", GcpVertex: "gcp-vertex", AzureFoundry: "azure-foundry", Anthropic: "anthropic", Databricks: "databricks", Openai: "openai", } as const; export type DeploymentSetupConfigInputAllowedAIProvider = ClosedEnum< typeof DeploymentSetupConfigInputAllowedAIProvider >; export const DeploymentSetupConfigInputAllowedKubernetesBasePlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", OnPrem: "on-prem", } as const; export type DeploymentSetupConfigInputAllowedKubernetesBasePlatform = ClosedEnum; export type Policy = { allowedPlatforms?: | Array | undefined; /** * AI providers the recipient may connect. Omit to allow every provider supported by the Project. */ allowedAIProviders?: | Array | undefined; /** * Kubernetes base environments the recipient may target. */ allowedKubernetesBasePlatforms?: | Array | undefined; /** * Whether recipients may create a cluster, use an existing cluster, or both. */ allowedKubernetesClusterSources?: Array | undefined; allowedSetupMethods?: Array | undefined; allowReleasePinning?: boolean | undefined; stackSettings?: DeploymentSetupStackSettingsPolicy | undefined; }; export type DeploymentSetupConfigInput = { metadata?: { [k: string]: any | null } | undefined; policy?: Policy | undefined; environmentVariables?: Array | undefined; /** * Operator-pinned deployment subdomain for this setup token. */ publicSubdomain?: string | undefined; }; /** @internal */ export const DeploymentSetupConfigInputAllowedPlatform$outboundSchema: z.ZodEnum = z.enum( DeploymentSetupConfigInputAllowedPlatform, ); /** @internal */ export const DeploymentSetupConfigInputAllowedAIProvider$outboundSchema: z.ZodEnum = z.enum( DeploymentSetupConfigInputAllowedAIProvider, ); /** @internal */ export const DeploymentSetupConfigInputAllowedKubernetesBasePlatform$outboundSchema: z.ZodEnum = z .enum(DeploymentSetupConfigInputAllowedKubernetesBasePlatform); /** @internal */ export type Policy$Outbound = { allowedPlatforms?: Array | undefined; allowedAIProviders?: Array | undefined; allowedKubernetesBasePlatforms?: Array | undefined; allowedKubernetesClusterSources?: Array | undefined; allowedSetupMethods?: Array | undefined; allowReleasePinning?: boolean | undefined; stackSettings?: DeploymentSetupStackSettingsPolicy$Outbound | undefined; }; /** @internal */ export const Policy$outboundSchema: z.ZodType = z .object({ allowedPlatforms: z.array( DeploymentSetupConfigInputAllowedPlatform$outboundSchema, ).optional(), allowedAIProviders: z.array( DeploymentSetupConfigInputAllowedAIProvider$outboundSchema, ).optional(), allowedKubernetesBasePlatforms: z.array( DeploymentSetupConfigInputAllowedKubernetesBasePlatform$outboundSchema, ).optional(), allowedKubernetesClusterSources: z.array( KubernetesClusterSource$outboundSchema, ).optional(), allowedSetupMethods: z.array(DeploymentSetupMethod$outboundSchema) .optional(), allowReleasePinning: z.boolean().optional(), stackSettings: DeploymentSetupStackSettingsPolicy$outboundSchema.optional(), }); export function policyToJSON(policy: Policy): string { return JSON.stringify(Policy$outboundSchema.parse(policy)); } /** @internal */ export type DeploymentSetupConfigInput$Outbound = { metadata?: { [k: string]: any | null } | undefined; policy?: Policy$Outbound | undefined; environmentVariables?: Array | undefined; publicSubdomain?: string | undefined; }; /** @internal */ export const DeploymentSetupConfigInput$outboundSchema: z.ZodType< DeploymentSetupConfigInput$Outbound, DeploymentSetupConfigInput > = z.object({ metadata: z.record(z.string(), z.nullable(z.any())).optional(), policy: z.lazy(() => Policy$outboundSchema).optional(), environmentVariables: z.array(EnvironmentVariableConfig$outboundSchema) .optional(), publicSubdomain: z.string().optional(), }); export function deploymentSetupConfigInputToJSON( deploymentSetupConfigInput: DeploymentSetupConfigInput, ): string { return JSON.stringify( DeploymentSetupConfigInput$outboundSchema.parse(deploymentSetupConfigInput), ); }