/* * 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"; /** * A fleet region is a region in which a fleet can be deployed. * * @remarks * You can update cloudMinVcpus once every five minutes. It must be a multiple of * scaleIncrementVcpus */ export type FleetRegion = { cloudMinVcpusUpdatedAt: Date; /** * The minimum number of nodes that should be running. */ nodeBaseline: number; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ cloudMinVcpus: number; /** * This field is deprecated and may contain the value -1. For node increment values, refer to nodeShape on the Fleet. * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ scaleIncrementVcpus: number; }; /** @internal */ export const FleetRegion$inboundSchema: z.ZodType< FleetRegion, z.ZodTypeDef, unknown > = z.object({ cloudMinVcpusUpdatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v) ), nodeBaseline: z.number().int(), cloudMinVcpus: z.number().int(), scaleIncrementVcpus: z.number().int(), }); export function fleetRegionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FleetRegion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FleetRegion' from JSON`, ); }