/* * 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 ClusterCurrencyResponse = { currency: string | null; }; /** @internal */ export const ClusterCurrencyResponse$inboundSchema: z.ZodType< ClusterCurrencyResponse, z.ZodTypeDef, unknown > = z.object({ currency: z.nullable(z.string()), }); /** @internal */ export type ClusterCurrencyResponse$Outbound = { currency: string | null; }; /** @internal */ export const ClusterCurrencyResponse$outboundSchema: z.ZodType< ClusterCurrencyResponse$Outbound, z.ZodTypeDef, ClusterCurrencyResponse > = z.object({ currency: z.nullable(z.string()), }); export function clusterCurrencyResponseToJSON( clusterCurrencyResponse: ClusterCurrencyResponse, ): string { return JSON.stringify( ClusterCurrencyResponse$outboundSchema.parse(clusterCurrencyResponse), ); } export function clusterCurrencyResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ClusterCurrencyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ClusterCurrencyResponse' from JSON`, ); }