/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ComputeSecretCreate = { data: { [k: string]: string }; name: string; }; /** @internal */ export const ComputeSecretCreate$inboundSchema: z.ZodType< ComputeSecretCreate, z.ZodTypeDef, unknown > = z.object({ data: z.record(z.string()), name: z.string(), }); /** @internal */ export type ComputeSecretCreate$Outbound = { data: { [k: string]: string }; name: string; }; /** @internal */ export const ComputeSecretCreate$outboundSchema: z.ZodType< ComputeSecretCreate$Outbound, z.ZodTypeDef, ComputeSecretCreate > = z.object({ data: z.record(z.string()), name: z.string(), }); export function computeSecretCreateToJSON( computeSecretCreate: ComputeSecretCreate, ): string { return JSON.stringify( ComputeSecretCreate$outboundSchema.parse(computeSecretCreate), ); } export function computeSecretCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ComputeSecretCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ComputeSecretCreate' from JSON`, ); }