/* * 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 AnyConnect = { /** * Version number indicated by the response for config-auth exchange */ aggregateAuthVersion?: number | undefined; /** * Supported methods for users to enter credentials for this VPN */ authMethods?: Array | null | undefined; /** * List of groups a user can authenticate with to use this VPN */ groups?: Array | null | undefined; /** * XML content of the config-auth response */ raw?: string | undefined; /** * Type of the response packet received after initializing the config-auth exchange */ responseType?: string | undefined; }; /** @internal */ export const AnyConnect$inboundSchema: z.ZodType< AnyConnect, z.ZodTypeDef, unknown > = z.object({ aggregate_auth_version: z.number().int().optional(), auth_methods: z.nullable(z.array(z.string())).optional(), groups: z.nullable(z.array(z.string())).optional(), raw: z.string().optional(), response_type: z.string().optional(), }).transform((v) => { return remap$(v, { "aggregate_auth_version": "aggregateAuthVersion", "auth_methods": "authMethods", "response_type": "responseType", }); }); export function anyConnectFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AnyConnect$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnyConnect' from JSON`, ); }