/* * 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"; import { StunMappedAddress, StunMappedAddress$inboundSchema, } from "./stunmappedaddress.js"; export type StunBindingSuccessResponse = { hasFingerprint?: boolean | undefined; otherAddress?: StunMappedAddress | undefined; software?: string | undefined; }; /** @internal */ export const StunBindingSuccessResponse$inboundSchema: z.ZodType< StunBindingSuccessResponse, z.ZodTypeDef, unknown > = z.object({ has_fingerprint: z.boolean().optional(), other_address: StunMappedAddress$inboundSchema.optional(), software: z.string().optional(), }).transform((v) => { return remap$(v, { "has_fingerprint": "hasFingerprint", "other_address": "otherAddress", }); }); export function stunBindingSuccessResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StunBindingSuccessResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StunBindingSuccessResponse' from JSON`, ); }