/* * 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"; import { UserNotice, UserNotice$inboundSchema } from "./usernotice.js"; export type CertificatePolicy = { cps?: Array | null | undefined; id?: string | undefined; userNotice?: Array | null | undefined; }; /** @internal */ export const CertificatePolicy$inboundSchema: z.ZodType< CertificatePolicy, z.ZodTypeDef, unknown > = z.object({ cps: z.nullable(z.array(z.string())).optional(), id: z.string().optional(), user_notice: z.nullable(z.array(UserNotice$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "user_notice": "userNotice", }); }); export function certificatePolicyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CertificatePolicy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CertificatePolicy' from JSON`, ); }