/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type V3EnrollIdentityResponse = { httpMeta: components.HTTPMetadata; /** * V3EnrollIdentityResponse */ v3EnrollIdentityResponse?: components.V3EnrollIdentityResponse | undefined; }; /** @internal */ export const V3EnrollIdentityResponse$inboundSchema: z.ZodType< V3EnrollIdentityResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3EnrollIdentityResponse: components.V3EnrollIdentityResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3EnrollIdentityResponse": "v3EnrollIdentityResponse", }); }); /** @internal */ export type V3EnrollIdentityResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3EnrollIdentityResponse?: | components.V3EnrollIdentityResponse$Outbound | undefined; }; /** @internal */ export const V3EnrollIdentityResponse$outboundSchema: z.ZodType< V3EnrollIdentityResponse$Outbound, z.ZodTypeDef, V3EnrollIdentityResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3EnrollIdentityResponse: components.V3EnrollIdentityResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3EnrollIdentityResponse: "V3EnrollIdentityResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3EnrollIdentityResponse$ { /** @deprecated use `V3EnrollIdentityResponse$inboundSchema` instead. */ export const inboundSchema = V3EnrollIdentityResponse$inboundSchema; /** @deprecated use `V3EnrollIdentityResponse$outboundSchema` instead. */ export const outboundSchema = V3EnrollIdentityResponse$outboundSchema; /** @deprecated use `V3EnrollIdentityResponse$Outbound` instead. */ export type Outbound = V3EnrollIdentityResponse$Outbound; } export function v3EnrollIdentityResponseToJSON( v3EnrollIdentityResponse: V3EnrollIdentityResponse, ): string { return JSON.stringify( V3EnrollIdentityResponse$outboundSchema.parse(v3EnrollIdentityResponse), ); } export function v3EnrollIdentityResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3EnrollIdentityResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3EnrollIdentityResponse' from JSON`, ); }