/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { OnvifHostname, OnvifHostname$inboundSchema } from "./onvifhostname.js"; import { OnvifService, OnvifService$inboundSchema } from "./onvifservice.js"; export type Onvif = { hostname?: OnvifHostname | undefined; services?: Array | null | undefined; }; /** @internal */ export const Onvif$inboundSchema: z.ZodType = z .object({ hostname: OnvifHostname$inboundSchema.optional(), services: z.nullable(z.array(OnvifService$inboundSchema)).optional(), }); export function onvifFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Onvif$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Onvif' from JSON`, ); }