/* * 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 VolumeShareByCustomerTypeError = { business?: string | undefined; consumer?: string | undefined; p2p?: string | undefined; }; /** @internal */ export const VolumeShareByCustomerTypeError$inboundSchema: z.ZodType< VolumeShareByCustomerTypeError, z.ZodTypeDef, unknown > = z.object({ business: z.string().optional(), consumer: z.string().optional(), p2p: z.string().optional(), }); /** @internal */ export type VolumeShareByCustomerTypeError$Outbound = { business?: string | undefined; consumer?: string | undefined; p2p?: string | undefined; }; /** @internal */ export const VolumeShareByCustomerTypeError$outboundSchema: z.ZodType< VolumeShareByCustomerTypeError$Outbound, z.ZodTypeDef, VolumeShareByCustomerTypeError > = z.object({ business: z.string().optional(), consumer: z.string().optional(), p2p: z.string().optional(), }); export function volumeShareByCustomerTypeErrorToJSON( volumeShareByCustomerTypeError: VolumeShareByCustomerTypeError, ): string { return JSON.stringify( VolumeShareByCustomerTypeError$outboundSchema.parse( volumeShareByCustomerTypeError, ), ); } export function volumeShareByCustomerTypeErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VolumeShareByCustomerTypeError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VolumeShareByCustomerTypeError' from JSON`, ); }