/* * 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 CPELifeCycle = { endOfLife?: boolean | undefined; endOfLifeDate?: string | undefined; releaseDate?: string | undefined; }; /** @internal */ export const CPELifeCycle$inboundSchema: z.ZodType< CPELifeCycle, z.ZodTypeDef, unknown > = z.object({ end_of_life: z.boolean().optional(), end_of_life_date: z.string().optional(), release_date: z.string().optional(), }).transform((v) => { return remap$(v, { "end_of_life": "endOfLife", "end_of_life_date": "endOfLifeDate", "release_date": "releaseDate", }); }); export function cpeLifeCycleFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CPELifeCycle$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CPELifeCycle' from JSON`, ); }