/* * 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 ListCustomVoicesRequest = { /** * Number of items per page (default: 20, min: 10, max: 100) */ pageSize?: number | undefined; /** * Token for pagination (obtained from the previous page's response) */ nextPageToken?: string | undefined; }; /** @internal */ export const ListCustomVoicesRequest$inboundSchema: z.ZodType< ListCustomVoicesRequest, z.ZodTypeDef, unknown > = z.object({ page_size: z.number().optional(), next_page_token: z.string().optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", "next_page_token": "nextPageToken", }); }); /** @internal */ export type ListCustomVoicesRequest$Outbound = { page_size?: number | undefined; next_page_token?: string | undefined; }; /** @internal */ export const ListCustomVoicesRequest$outboundSchema: z.ZodType< ListCustomVoicesRequest$Outbound, z.ZodTypeDef, ListCustomVoicesRequest > = z.object({ pageSize: z.number().optional(), nextPageToken: z.string().optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", nextPageToken: "next_page_token", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCustomVoicesRequest$ { /** @deprecated use `ListCustomVoicesRequest$inboundSchema` instead. */ export const inboundSchema = ListCustomVoicesRequest$inboundSchema; /** @deprecated use `ListCustomVoicesRequest$outboundSchema` instead. */ export const outboundSchema = ListCustomVoicesRequest$outboundSchema; /** @deprecated use `ListCustomVoicesRequest$Outbound` instead. */ export type Outbound = ListCustomVoicesRequest$Outbound; } export function listCustomVoicesRequestToJSON( listCustomVoicesRequest: ListCustomVoicesRequest, ): string { return JSON.stringify( ListCustomVoicesRequest$outboundSchema.parse(listCustomVoicesRequest), ); } export function listCustomVoicesRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListCustomVoicesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListCustomVoicesRequest' from JSON`, ); }