/* * 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 { KubernetesEndpoint, KubernetesEndpoint$inboundSchema, } from "./kubernetesendpoint.js"; import { KubernetesNode, KubernetesNode$inboundSchema, } from "./kubernetesnode.js"; import { KubernetesRole, KubernetesRole$inboundSchema, } from "./kubernetesrole.js"; import { KubernetesVersionInfo, KubernetesVersionInfo$inboundSchema, } from "./kubernetesversioninfo.js"; export type Kubernetes = { endpoints?: Array | null | undefined; /** * True if the dashboard is running and accessible */ kubernetesDashboardFound?: boolean | undefined; nodes?: Array | null | undefined; podNames?: Array | null | undefined; roles?: Array | null | undefined; versionInfo?: KubernetesVersionInfo | undefined; }; /** @internal */ export const Kubernetes$inboundSchema: z.ZodType< Kubernetes, z.ZodTypeDef, unknown > = z.object({ endpoints: z.nullable(z.array(KubernetesEndpoint$inboundSchema)).optional(), kubernetes_dashboard_found: z.boolean().optional(), nodes: z.nullable(z.array(KubernetesNode$inboundSchema)).optional(), pod_names: z.nullable(z.array(z.string())).optional(), roles: z.nullable(z.array(KubernetesRole$inboundSchema)).optional(), version_info: KubernetesVersionInfo$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "kubernetes_dashboard_found": "kubernetesDashboardFound", "pod_names": "podNames", "version_info": "versionInfo", }); }); export function kubernetesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Kubernetes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Kubernetes' from JSON`, ); }