/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ContainerPort, ContainerPort$Outbound, ContainerPort$outboundSchema, } from "./containerport.js"; import { TransportType, TransportType$outboundSchema, } from "./transporttype.js"; export type DeploymentConfigV3Env = { value: string; name: string; }; export type DeploymentConfigV3 = { /** * The id of the fleet. */ fleetId?: string | undefined; /** * Arbitrary metadata associated with a deployment. */ deploymentTag?: string | undefined; /** * Option to shut down processes that have had no new connections or rooms * * @remarks * for five minutes. */ idleTimeoutEnabled: boolean; /** * The environment variable that our process will have access to at runtime. */ env: Array; /** * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. */ roomsPerProcess: number; /** * Additional ports your server listens on. */ additionalContainerPorts?: Array | undefined; /** * Transport type specifies the underlying communication protocol to the exposed port. */ transportType: TransportType; /** * Default port the server listens on. */ containerPort: number; /** * The number of GPUs allocated to your process. Must be an integer. * * @remarks * If not provided, the requested GPU is 0. */ requestedGPU?: number | undefined; /** * EXPERIMENTAL - this feature is in closed beta. * * @remarks * The number of GPUs allocated to your process. Must be an integer. * If not provided, the requested GPU is 0. */ experimentalRequestedGPU?: number | undefined; /** * The amount of memory allocated to your process. */ requestedMemoryMB: number; /** * The number of cores allocated to your process. */ requestedCPU: number; /** * System generated id for a build. Can also be user defined when creating a build. */ buildId: string; }; /** @internal */ export type DeploymentConfigV3Env$Outbound = { value: string; name: string; }; /** @internal */ export const DeploymentConfigV3Env$outboundSchema: z.ZodType< DeploymentConfigV3Env$Outbound, z.ZodTypeDef, DeploymentConfigV3Env > = z.object({ value: z.string(), name: z.string(), }); export function deploymentConfigV3EnvToJSON( deploymentConfigV3Env: DeploymentConfigV3Env, ): string { return JSON.stringify( DeploymentConfigV3Env$outboundSchema.parse(deploymentConfigV3Env), ); } /** @internal */ export type DeploymentConfigV3$Outbound = { fleetId?: string | undefined; deploymentTag?: string | undefined; idleTimeoutEnabled: boolean; env: Array; roomsPerProcess: number; additionalContainerPorts?: Array | undefined; transportType: string; containerPort: number; requestedGPU?: number | undefined; experimentalRequestedGPU?: number | undefined; requestedMemoryMB: number; requestedCPU: number; buildId: string; }; /** @internal */ export const DeploymentConfigV3$outboundSchema: z.ZodType< DeploymentConfigV3$Outbound, z.ZodTypeDef, DeploymentConfigV3 > = z.object({ fleetId: z.string().optional(), deploymentTag: z.string().optional(), idleTimeoutEnabled: z.boolean(), env: z.array(z.lazy(() => DeploymentConfigV3Env$outboundSchema)), roomsPerProcess: z.number().int(), additionalContainerPorts: z.array(ContainerPort$outboundSchema).optional(), transportType: TransportType$outboundSchema, containerPort: z.number().int(), requestedGPU: z.number().optional(), experimentalRequestedGPU: z.number().optional(), requestedMemoryMB: z.number(), requestedCPU: z.number(), buildId: z.string(), }); export function deploymentConfigV3ToJSON( deploymentConfigV3: DeploymentConfigV3, ): string { return JSON.stringify( DeploymentConfigV3$outboundSchema.parse(deploymentConfigV3), ); }