/* * 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 KeyAlgorithm = { /** * Name of public key type, such as RSA or ECDSA. Information specific to the key type is available in the named sub-record. */ name?: string | undefined; oid?: string | undefined; }; /** @internal */ export const KeyAlgorithm$inboundSchema: z.ZodType< KeyAlgorithm, z.ZodTypeDef, unknown > = z.object({ name: z.string().optional(), oid: z.string().optional(), }); export function keyAlgorithmFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => KeyAlgorithm$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KeyAlgorithm' from JSON`, ); }