/* * 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 Socks = { noAuthenticationRequired?: boolean | undefined; preferredAuthentication?: string | undefined; preferredAuthenticationValue?: number | undefined; socksVersion?: number | undefined; supportedVersions?: Array | null | undefined; }; /** @internal */ export const Socks$inboundSchema: z.ZodType = z .object({ no_authentication_required: z.boolean().optional(), preferred_authentication: z.string().optional(), preferred_authentication_value: z.number().int().optional(), socks_version: z.number().int().optional(), supported_versions: z.nullable(z.array(z.number().int())).optional(), }).transform((v) => { return remap$(v, { "no_authentication_required": "noAuthenticationRequired", "preferred_authentication": "preferredAuthentication", "preferred_authentication_value": "preferredAuthenticationValue", "socks_version": "socksVersion", "supported_versions": "supportedVersions", }); }); export function socksFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Socks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Socks' from JSON`, ); }