/* * 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 KubernetesVersionInfo = { /** * Date version was built. */ buildDate?: string | undefined; /** * Go Compiler used */ compiler?: string | undefined; /** * Git commit version built from. */ gitCommit?: string | undefined; /** * State of the tree when built. */ gitTreeState?: string | undefined; gitVersion?: string | undefined; /** * Version of GO used to build version. */ goVersion?: string | undefined; /** * Kubernetes major version */ major?: string | undefined; /** * Kubernetes minor version */ minor?: string | undefined; /** * Platform compiled for */ platform?: string | undefined; }; /** @internal */ export const KubernetesVersionInfo$inboundSchema: z.ZodType< KubernetesVersionInfo, z.ZodTypeDef, unknown > = z.object({ build_date: z.string().optional(), compiler: z.string().optional(), git_commit: z.string().optional(), git_tree_state: z.string().optional(), git_version: z.string().optional(), go_version: z.string().optional(), major: z.string().optional(), minor: z.string().optional(), platform: z.string().optional(), }).transform((v) => { return remap$(v, { "build_date": "buildDate", "git_commit": "gitCommit", "git_tree_state": "gitTreeState", "git_version": "gitVersion", "go_version": "goVersion", }); }); export function kubernetesVersionInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => KubernetesVersionInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KubernetesVersionInfo' from JSON`, ); }