/* * 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 SshKexInitMessage = { /** * A list of ssh cipher algorithm identifiers, named according to section 6 of https://www.ietf.org/rfc/rfc4251.txt; see https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-16 for standard values. */ clientToServerCiphers?: Array | null | undefined; /** * A list of ssh compression algorithm identifiers, named according to section 6 of https://www.ietf.org/rfc/rfc4251.txt; see https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-20 for standard values. */ clientToServerCompression?: Array | null | undefined; /** * A name-list of language tags in order of preference. As Defined in https://www.ietf.org/rfc/rfc3066.txt. */ clientToServerLanguages?: Array | null | undefined; /** * A list of ssh MAC algorithm identifiers, named according to section 6 of https://www.ietf.org/rfc/rfc4251.txt; see https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-18 for standard values. */ clientToServerMacs?: Array | null | undefined; firstKexFollows?: boolean | undefined; /** * Asymmetric key algorithms for the host key supported by the client. */ hostKeyAlgorithms?: Array | null | undefined; /** * Key exchange algorithms used in the handshake. */ kexAlgorithms?: Array | null | undefined; /** * A list of ssh cipher algorithm identifiers, named according to section 6 of https://www.ietf.org/rfc/rfc4251.txt; see https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-16 for standard values. */ serverToClientCiphers?: Array | null | undefined; /** * A list of ssh compression algorithm identifiers, named according to section 6 of https://www.ietf.org/rfc/rfc4251.txt; see https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-20 for standard values. */ serverToClientCompression?: Array | null | undefined; /** * A name-list of language tags in order of preference. As Defined in https://www.ietf.org/rfc/rfc3066.txt. */ serverToClientLanguages?: Array | null | undefined; /** * A list of ssh MAC algorithm identifiers, named according to section 6 of https://www.ietf.org/rfc/rfc4251.txt; see https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-18 for standard values. */ serverToClientMacs?: Array | null | undefined; }; /** @internal */ export const SshKexInitMessage$inboundSchema: z.ZodType< SshKexInitMessage, z.ZodTypeDef, unknown > = z.object({ client_to_server_ciphers: z.nullable(z.array(z.string())).optional(), client_to_server_compression: z.nullable(z.array(z.string())).optional(), client_to_server_languages: z.nullable(z.array(z.string())).optional(), client_to_server_macs: z.nullable(z.array(z.string())).optional(), first_kex_follows: z.boolean().optional(), host_key_algorithms: z.nullable(z.array(z.string())).optional(), kex_algorithms: z.nullable(z.array(z.string())).optional(), server_to_client_ciphers: z.nullable(z.array(z.string())).optional(), server_to_client_compression: z.nullable(z.array(z.string())).optional(), server_to_client_languages: z.nullable(z.array(z.string())).optional(), server_to_client_macs: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "client_to_server_ciphers": "clientToServerCiphers", "client_to_server_compression": "clientToServerCompression", "client_to_server_languages": "clientToServerLanguages", "client_to_server_macs": "clientToServerMacs", "first_kex_follows": "firstKexFollows", "host_key_algorithms": "hostKeyAlgorithms", "kex_algorithms": "kexAlgorithms", "server_to_client_ciphers": "serverToClientCiphers", "server_to_client_compression": "serverToClientCompression", "server_to_client_languages": "serverToClientLanguages", "server_to_client_macs": "serverToClientMacs", }); }); export function sshKexInitMessageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SshKexInitMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SshKexInitMessage' from JSON`, ); }