/* * 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"; import { AutoscalerConfig, AutoscalerConfig$inboundSchema, } from "./autoscalerconfig.js"; import { NodeShape, NodeShape$inboundSchema } from "./nodeshape.js"; /** * A fleet is a collection of nodes across your regions that can scale up and down based on demand. */ export type Fleet = { nodeShape: NodeShape; autoscalerConfig?: AutoscalerConfig | undefined; /** * Readable name for a fleet. Must be unique within an organization. */ name: string; /** * System generated unique identifier for an organization. Not guaranteed to have a specific format. */ orgId: string; /** * The id of the fleet. */ fleetId: string; }; /** @internal */ export const Fleet$inboundSchema: z.ZodType = z .object({ nodeShape: NodeShape$inboundSchema, autoscalerConfig: AutoscalerConfig$inboundSchema.optional(), name: z.string(), orgId: z.string(), fleetId: z.string(), }); export function fleetFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Fleet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Fleet' from JSON`, ); }