/* * 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 { PptpResponseInfo, PptpResponseInfo$inboundSchema, } from "./pptpresponseinfo.js"; import { PptpVersion, PptpVersion$inboundSchema } from "./pptpversion.js"; export type Pptp = { bearerMessage?: PptpResponseInfo | undefined; errorMessage?: PptpResponseInfo | undefined; firmware?: PptpVersion | undefined; framingMessage?: PptpResponseInfo | undefined; hostname?: string | undefined; maximumChannels?: number | undefined; protocol?: PptpVersion | undefined; resultMessage?: PptpResponseInfo | undefined; vendor?: string | undefined; }; /** @internal */ export const Pptp$inboundSchema: z.ZodType = z .object({ bearer_message: PptpResponseInfo$inboundSchema.optional(), error_message: PptpResponseInfo$inboundSchema.optional(), firmware: PptpVersion$inboundSchema.optional(), framing_message: PptpResponseInfo$inboundSchema.optional(), hostname: z.string().optional(), maximum_channels: z.number().int().optional(), protocol: PptpVersion$inboundSchema.optional(), result_message: PptpResponseInfo$inboundSchema.optional(), vendor: z.string().optional(), }).transform((v) => { return remap$(v, { "bearer_message": "bearerMessage", "error_message": "errorMessage", "framing_message": "framingMessage", "maximum_channels": "maximumChannels", "result_message": "resultMessage", }); }); export function pptpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Pptp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pptp' from JSON`, ); }