/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CertificateRevocationRevocationInfo, CertificateRevocationRevocationInfo$inboundSchema, } from "./certificaterevocationrevocationinfo.js"; export type CertificateRevocation = { crl?: CertificateRevocationRevocationInfo | undefined; ocsp?: CertificateRevocationRevocationInfo | undefined; }; /** @internal */ export const CertificateRevocation$inboundSchema: z.ZodType< CertificateRevocation, z.ZodTypeDef, unknown > = z.object({ crl: CertificateRevocationRevocationInfo$inboundSchema.optional(), ocsp: CertificateRevocationRevocationInfo$inboundSchema.optional(), }); export function certificateRevocationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CertificateRevocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CertificateRevocation' from JSON`, ); }