/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { EnvironmentVariableValueDto, EnvironmentVariableValueDto$Outbound, EnvironmentVariableValueDto$outboundSchema, } from "./environmentvariablevaluedto.js"; /** * The type of the variable */ export const UpdateEnvironmentVariableRequestDtoType = { String: "string", } as const; /** * The type of the variable */ export type UpdateEnvironmentVariableRequestDtoType = ClosedEnum< typeof UpdateEnvironmentVariableRequestDtoType >; export type UpdateEnvironmentVariableRequestDto = { /** * Unique key for the variable. Must start with a letter and contain only letters, digits, and underscores. */ key?: string | undefined; /** * The type of the variable */ type?: UpdateEnvironmentVariableRequestDtoType | undefined; isSecret?: boolean | undefined; values?: Array | undefined; }; /** @internal */ export const UpdateEnvironmentVariableRequestDtoType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(UpdateEnvironmentVariableRequestDtoType); /** @internal */ export type UpdateEnvironmentVariableRequestDto$Outbound = { key?: string | undefined; type?: string | undefined; isSecret?: boolean | undefined; values?: Array | undefined; }; /** @internal */ export const UpdateEnvironmentVariableRequestDto$outboundSchema: z.ZodType< UpdateEnvironmentVariableRequestDto$Outbound, z.ZodTypeDef, UpdateEnvironmentVariableRequestDto > = z.object({ key: z.string().optional(), type: UpdateEnvironmentVariableRequestDtoType$outboundSchema.optional(), isSecret: z.boolean().optional(), values: z.array(EnvironmentVariableValueDto$outboundSchema).optional(), }); export function updateEnvironmentVariableRequestDtoToJSON( updateEnvironmentVariableRequestDto: UpdateEnvironmentVariableRequestDto, ): string { return JSON.stringify( UpdateEnvironmentVariableRequestDto$outboundSchema.parse( updateEnvironmentVariableRequestDto, ), ); }