/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a1eec974bf66 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { EnvironmentVariableType, EnvironmentVariableType$inboundSchema, } from "./environmentvariabletype.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type APIKeyDeploymentSetupEnvironmentVariable = { /** * Variable name */ name: string; /** * Variable type (plain or secret) */ type: EnvironmentVariableType; /** * Target resource patterns (null = all resources, array = wildcard patterns) */ targetResources: Array | null; }; /** @internal */ export const APIKeyDeploymentSetupEnvironmentVariable$inboundSchema: z.ZodType< APIKeyDeploymentSetupEnvironmentVariable, unknown > = z.object({ name: z.string(), type: EnvironmentVariableType$inboundSchema, targetResources: z.nullable(z.array(z.string())), }); export function apiKeyDeploymentSetupEnvironmentVariableFromJSON( jsonString: string, ): SafeParseResult< APIKeyDeploymentSetupEnvironmentVariable, SDKValidationError > { return safeParse( jsonString, (x) => APIKeyDeploymentSetupEnvironmentVariable$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'APIKeyDeploymentSetupEnvironmentVariable' from JSON`, ); }