/* * 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 { SignedCertificateTimestampSignature, SignedCertificateTimestampSignature$inboundSchema, } from "./signedcertificatetimestampsignature.js"; export type SignedCertificateTimestamp = { logId?: string | undefined; signature?: SignedCertificateTimestampSignature | undefined; timestamp?: string | undefined; version?: number | undefined; }; /** @internal */ export const SignedCertificateTimestamp$inboundSchema: z.ZodType< SignedCertificateTimestamp, z.ZodTypeDef, unknown > = z.object({ log_id: z.string().optional(), signature: SignedCertificateTimestampSignature$inboundSchema.optional(), timestamp: z.string().optional(), version: z.number().int().optional(), }).transform((v) => { return remap$(v, { "log_id": "logId", }); }); export function signedCertificateTimestampFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SignedCertificateTimestamp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SignedCertificateTimestamp' from JSON`, ); }