/* * 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 UpnpService = { controlUrl?: string | undefined; eventSubUrl?: string | undefined; scpdUrl?: string | undefined; serviceId?: string | undefined; serviceType?: string | undefined; }; /** @internal */ export const UpnpService$inboundSchema: z.ZodType< UpnpService, z.ZodTypeDef, unknown > = z.object({ control_url: z.string().optional(), event_sub_url: z.string().optional(), scpd_url: z.string().optional(), service_id: z.string().optional(), service_type: z.string().optional(), }).transform((v) => { return remap$(v, { "control_url": "controlUrl", "event_sub_url": "eventSubUrl", "scpd_url": "scpdUrl", "service_id": "serviceId", "service_type": "serviceType", }); }); export function upnpServiceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpnpService$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpnpService' from JSON`, ); }