/* * 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 { OpcUaEndpoint, OpcUaEndpoint$inboundSchema } from "./opcuaendpoint.js"; export type OpcUa = { endpoints?: Array | null | undefined; maxChunkSize?: number | undefined; maxMessageSize?: number | undefined; protocolVersion?: number | undefined; receiveBufferSize?: number | undefined; sendBufferSize?: number | undefined; }; /** @internal */ export const OpcUa$inboundSchema: z.ZodType = z .object({ endpoints: z.nullable(z.array(OpcUaEndpoint$inboundSchema)).optional(), max_chunk_size: z.number().int().optional(), max_message_size: z.number().int().optional(), protocol_version: z.number().int().optional(), receive_buffer_size: z.number().int().optional(), send_buffer_size: z.number().int().optional(), }).transform((v) => { return remap$(v, { "max_chunk_size": "maxChunkSize", "max_message_size": "maxMessageSize", "protocol_version": "protocolVersion", "receive_buffer_size": "receiveBufferSize", "send_buffer_size": "sendBufferSize", }); }); export function opcUaFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OpcUa$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpcUa' from JSON`, ); }