/* * 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 { SnmpEngine, SnmpEngine$inboundSchema } from "./snmpengine.js"; import { SnmpInterfaces, SnmpInterfaces$inboundSchema, } from "./snmpinterfaces.js"; import { SnmpPhysical, SnmpPhysical$inboundSchema } from "./snmpphysical.js"; import { SnmpSystem, SnmpSystem$inboundSchema } from "./snmpsystem.js"; export type Snmp = { engine?: SnmpEngine | undefined; oidInterfaces?: SnmpInterfaces | undefined; oidPhysical?: SnmpPhysical | undefined; oidSystem?: SnmpSystem | undefined; versions?: Array | null | undefined; }; /** @internal */ export const Snmp$inboundSchema: z.ZodType = z .object({ engine: SnmpEngine$inboundSchema.optional(), oid_interfaces: SnmpInterfaces$inboundSchema.optional(), oid_physical: SnmpPhysical$inboundSchema.optional(), oid_system: SnmpSystem$inboundSchema.optional(), versions: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "oid_interfaces": "oidInterfaces", "oid_physical": "oidPhysical", "oid_system": "oidSystem", }); }); export function snmpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Snmp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Snmp' from JSON`, ); }