/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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 DeleteSpeechToTextHistoryRequest = { sttId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; }; /** @internal */ export const DeleteSpeechToTextHistoryRequest$inboundSchema: z.ZodType< DeleteSpeechToTextHistoryRequest, z.ZodTypeDef, unknown > = z.object({ stt_id: z.string(), "X-On-Behalf-Of": z.string().optional(), }).transform((v) => { return remap$(v, { "stt_id": "sttId", "X-On-Behalf-Of": "xOnBehalfOf", }); }); /** @internal */ export type DeleteSpeechToTextHistoryRequest$Outbound = { stt_id: string; "X-On-Behalf-Of"?: string | undefined; }; /** @internal */ export const DeleteSpeechToTextHistoryRequest$outboundSchema: z.ZodType< DeleteSpeechToTextHistoryRequest$Outbound, z.ZodTypeDef, DeleteSpeechToTextHistoryRequest > = z.object({ sttId: z.string(), xOnBehalfOf: z.string().optional(), }).transform((v) => { return remap$(v, { sttId: "stt_id", xOnBehalfOf: "X-On-Behalf-Of", }); }); export function deleteSpeechToTextHistoryRequestToJSON( deleteSpeechToTextHistoryRequest: DeleteSpeechToTextHistoryRequest, ): string { return JSON.stringify( DeleteSpeechToTextHistoryRequest$outboundSchema.parse( deleteSpeechToTextHistoryRequest, ), ); } export function deleteSpeechToTextHistoryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteSpeechToTextHistoryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteSpeechToTextHistoryRequest' from JSON`, ); }