/* * 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 TlsChain = { /** * SHA 256 fingerprint of the certificate in the certificate chain. */ fingerprintSha256?: string | undefined; /** * Distinguished name of the entity that has signed and issued the certificate. */ issuerDn?: string | undefined; /** * Distinguished name of the entity that the certificate belongs to. */ subjectDn?: string | undefined; }; /** @internal */ export const TlsChain$inboundSchema: z.ZodType< TlsChain, z.ZodTypeDef, unknown > = z.object({ fingerprint_sha256: z.string().optional(), issuer_dn: z.string().optional(), subject_dn: z.string().optional(), }).transform((v) => { return remap$(v, { "fingerprint_sha256": "fingerprintSha256", "issuer_dn": "issuerDn", "subject_dn": "subjectDn", }); }); export function tlsChainFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TlsChain$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TlsChain' from JSON`, ); }