/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { EnvironmentType, EnvironmentType$outboundSchema, } from "./environment-type.js"; export type CloneEnvironmentRequest = { /** * Name of the new environment (required when target_environment_id is not provided) */ name?: string | undefined; /** * TargetEnvironmentID is the ID of an existing environment to clone into (optional). * * @remarks * When provided, Name and Type are ignored. When omitted, Name and Type are required. */ targetEnvironmentId?: string | undefined; type?: EnvironmentType | undefined; }; /** @internal */ export type CloneEnvironmentRequest$Outbound = { name?: string | undefined; target_environment_id?: string | undefined; type?: string | undefined; }; /** @internal */ export const CloneEnvironmentRequest$outboundSchema: z.ZodMiniType< CloneEnvironmentRequest$Outbound, CloneEnvironmentRequest > = z.pipe( z.object({ name: z.optional(z.string()), targetEnvironmentId: z.optional(z.string()), type: z.optional(EnvironmentType$outboundSchema), }), z.transform((v) => { return remap$(v, { targetEnvironmentId: "target_environment_id", }); }), ); export function cloneEnvironmentRequestToJSON( cloneEnvironmentRequest: CloneEnvironmentRequest, ): string { return JSON.stringify( CloneEnvironmentRequest$outboundSchema.parse(cloneEnvironmentRequest), ); }