/* * 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 ComputeSSH = { command: string; host: string; port: number; user: string; }; /** @internal */ export const ComputeSSH$inboundSchema: z.ZodType< ComputeSSH, z.ZodTypeDef, unknown > = z.object({ command: z.string(), host: z.string(), port: z.number().int(), user: z.string(), }); /** @internal */ export type ComputeSSH$Outbound = { command: string; host: string; port: number; user: string; }; /** @internal */ export const ComputeSSH$outboundSchema: z.ZodType< ComputeSSH$Outbound, z.ZodTypeDef, ComputeSSH > = z.object({ command: z.string(), host: z.string(), port: z.number().int(), user: z.string(), }); export function computeSSHToJSON(computeSSH: ComputeSSH): string { return JSON.stringify(ComputeSSH$outboundSchema.parse(computeSSH)); } export function computeSSHFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ComputeSSH$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ComputeSSH' from JSON`, ); }