/* * 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"; export type RsaPublicKey = { /** * The RSA key's public exponent (e). */ exponent?: number | undefined; /** * Bit-length of the RSA modulus. */ length?: number | undefined; /** * The RSA key's modulus (n) in big-endian encoding. */ modulus?: string | undefined; }; /** @internal */ export const RsaPublicKey$inboundSchema: z.ZodType< RsaPublicKey, z.ZodTypeDef, unknown > = z.object({ exponent: z.number().int().optional(), length: z.number().int().optional(), modulus: z.string().optional(), }); export function rsaPublicKeyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RsaPublicKey$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RsaPublicKey' from JSON`, ); }