/* * 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 { DSACryptographicKey, DSACryptographicKey$inboundSchema, } from "./dsacryptographickey.js"; import { ECDSACryptographicKey, ECDSACryptographicKey$inboundSchema, } from "./ecdsacryptographickey.js"; import { Ed25519CryptographicKey, Ed25519CryptographicKey$inboundSchema, } from "./ed25519cryptographickey.js"; import { RSACryptographicKey, RSACryptographicKey$inboundSchema, } from "./rsacryptographickey.js"; export type SshServerHostKey = { certkeyPublicKey?: string | undefined; dsaPublicKey?: DSACryptographicKey | undefined; ecdsaPublicKey?: ECDSACryptographicKey | undefined; ed25519PublicKey?: Ed25519CryptographicKey | undefined; fingerprintSha256?: string | undefined; rsaPublicKey?: RSACryptographicKey | undefined; }; /** @internal */ export const SshServerHostKey$inboundSchema: z.ZodType< SshServerHostKey, z.ZodTypeDef, unknown > = z.object({ certkey_public_key: z.string().optional(), dsa_public_key: DSACryptographicKey$inboundSchema.optional(), ecdsa_public_key: ECDSACryptographicKey$inboundSchema.optional(), ed25519_public_key: Ed25519CryptographicKey$inboundSchema.optional(), fingerprint_sha256: z.string().optional(), rsa_public_key: RSACryptographicKey$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "certkey_public_key": "certkeyPublicKey", "dsa_public_key": "dsaPublicKey", "ecdsa_public_key": "ecdsaPublicKey", "ed25519_public_key": "ed25519PublicKey", "fingerprint_sha256": "fingerprintSha256", "rsa_public_key": "rsaPublicKey", }); }); export function sshServerHostKeyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SshServerHostKey$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SshServerHostKey' from JSON`, ); }