/* * 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 { AutonomousSystem, AutonomousSystem$inboundSchema, } from "./autonomoussystem.js"; import { FieldDiff, FieldDiff$inboundSchema } from "./fielddiff.js"; export type RouteUpdated = { diff?: { [k: string]: FieldDiff } | undefined; route?: AutonomousSystem | undefined; }; /** @internal */ export const RouteUpdated$inboundSchema: z.ZodType< RouteUpdated, z.ZodTypeDef, unknown > = z.object({ diff: z.record(FieldDiff$inboundSchema).optional(), route: AutonomousSystem$inboundSchema.optional(), }); export function routeUpdatedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RouteUpdated$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RouteUpdated' from JSON`, ); }