/* * 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 StunTurnAllocateErrorResponse = { errorCode?: number | undefined; errorReason?: string | undefined; hasFingerprint?: boolean | undefined; nonce?: string | undefined; realm?: string | undefined; software?: string | undefined; }; /** @internal */ export const StunTurnAllocateErrorResponse$inboundSchema: z.ZodType< StunTurnAllocateErrorResponse, z.ZodTypeDef, unknown > = z.object({ error_code: z.number().int().optional(), error_reason: z.string().optional(), has_fingerprint: z.boolean().optional(), nonce: z.string().optional(), realm: z.string().optional(), software: z.string().optional(), }).transform((v) => { return remap$(v, { "error_code": "errorCode", "error_reason": "errorReason", "has_fingerprint": "hasFingerprint", }); }); export function stunTurnAllocateErrorResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StunTurnAllocateErrorResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StunTurnAllocateErrorResponse' from JSON`, ); }