/* * 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 { KubernetesEndpointSubset, KubernetesEndpointSubset$inboundSchema, } from "./kubernetesendpointsubset.js"; export type KubernetesEndpoint = { name?: string | undefined; selfLink?: string | undefined; subsets?: Array | null | undefined; }; /** @internal */ export const KubernetesEndpoint$inboundSchema: z.ZodType< KubernetesEndpoint, z.ZodTypeDef, unknown > = z.object({ name: z.string().optional(), self_link: z.string().optional(), subsets: z.nullable(z.array(KubernetesEndpointSubset$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "self_link": "selfLink", }); }); export function kubernetesEndpointFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => KubernetesEndpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KubernetesEndpoint' from JSON`, ); }