/* * 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 IkeV1 = { /** * Did the host accept our security proposal? When false, the host responded with an error. */ acceptedProposal?: boolean | undefined; /** * Which types of NOTIFY messages did the host send us? */ notifyMessageTypes?: Array | null | undefined; /** * The list of Vendor ID "extensions" the host claimed to support in its handshake */ vendorIds?: Array | null | undefined; }; /** @internal */ export const IkeV1$inboundSchema: z.ZodType = z .object({ accepted_proposal: z.boolean().optional(), notify_message_types: z.nullable(z.array(z.number().int())).optional(), vendor_ids: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "accepted_proposal": "acceptedProposal", "notify_message_types": "notifyMessageTypes", "vendor_ids": "vendorIds", }); }); export function ikeV1FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IkeV1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IkeV1' from JSON`, ); }