/* * 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 { NodeFamilyId, NodeFamilyId$inboundSchema } from "./nodefamilyid.js"; import { NodeShapeId, NodeShapeId$inboundSchema } from "./nodeshapeid.js"; export type NodeShapeV2 = { /** * The minimum MB of memory that will be in any node with this shape. * * @remarks * Note: this number may change as new providers are added. */ minMemoryMB: number; /** * The minimum number of CPUs that will be in any node with this shape. * * @remarks * Note: this number may change as new providers are added. */ minCPU: number; /** * The minimum number of GPUs that will be in any node with this shape. * * @remarks * Note: this number may change as new providers are added. */ minGPU: number; /** * A human readable name for this node's family. */ familyName: string; familyId: NodeFamilyId; /** * A human readable name for this node shape. */ name: string; nodeShapeId: NodeShapeId; }; /** @internal */ export const NodeShapeV2$inboundSchema: z.ZodType< NodeShapeV2, z.ZodTypeDef, unknown > = z.object({ minMemoryMB: z.number(), minCPU: z.number(), minGPU: z.number(), familyName: z.string(), familyId: NodeFamilyId$inboundSchema, name: z.string(), nodeShapeId: NodeShapeId$inboundSchema, }); export function nodeShapeV2FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => NodeShapeV2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NodeShapeV2' from JSON`, ); }