/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetCustomVoiceRequest = { voiceId: string; }; /** @internal */ export const GetCustomVoiceRequest$inboundSchema: z.ZodType< GetCustomVoiceRequest, z.ZodTypeDef, unknown > = z.object({ voice_id: z.string(), }).transform((v) => { return remap$(v, { "voice_id": "voiceId", }); }); /** @internal */ export type GetCustomVoiceRequest$Outbound = { voice_id: string; }; /** @internal */ export const GetCustomVoiceRequest$outboundSchema: z.ZodType< GetCustomVoiceRequest$Outbound, z.ZodTypeDef, GetCustomVoiceRequest > = z.object({ voiceId: z.string(), }).transform((v) => { return remap$(v, { voiceId: "voice_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCustomVoiceRequest$ { /** @deprecated use `GetCustomVoiceRequest$inboundSchema` instead. */ export const inboundSchema = GetCustomVoiceRequest$inboundSchema; /** @deprecated use `GetCustomVoiceRequest$outboundSchema` instead. */ export const outboundSchema = GetCustomVoiceRequest$outboundSchema; /** @deprecated use `GetCustomVoiceRequest$Outbound` instead. */ export type Outbound = GetCustomVoiceRequest$Outbound; } export function getCustomVoiceRequestToJSON( getCustomVoiceRequest: GetCustomVoiceRequest, ): string { return JSON.stringify( GetCustomVoiceRequest$outboundSchema.parse(getCustomVoiceRequest), ); } export function getCustomVoiceRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetCustomVoiceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCustomVoiceRequest' from JSON`, ); }