/* * 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 { IkeV1, IkeV1$inboundSchema } from "./ikev1.js"; import { IkeV2, IkeV2$inboundSchema } from "./ikev2.js"; export type Ike = { v1?: IkeV1 | undefined; v2?: IkeV2 | undefined; }; /** @internal */ export const Ike$inboundSchema: z.ZodType = z .object({ v1: IkeV1$inboundSchema.optional(), v2: IkeV2$inboundSchema.optional(), }); export function ikeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Ike$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Ike' from JSON`, ); }