/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { Region, Region$outboundSchema } from "./region.js"; export type StaticProcessAllocationConfigWrite = { /** * Whether autoscaling is enabled in this region. When enabled, `targetProcesses` is managed by the Process Autoscaler * * @remarks * in accordance with the `processAutoscalerConfig` field set on the application's `serviceConfig`. * There MUST be a `processAutoscalerConfig` for the application in order to enable autoscaling. * EXPERIMENTAL - this feature is in closed beta. */ autoscalingEnabled?: boolean | undefined; /** * The maximum number of running processes. * * @remarks * When maxProcesses is null, will be set to a system-defined maximum value. */ maxProcesses: number | null; /** * The target number of running processes. * * @remarks * When using process autoscaling, targetProcesses MUST NOT be set in this object. * targetProcesses will be managed by the ProcessAutoscaler */ targetProcesses?: number | undefined; /** * The minimum number of running processes. * * @remarks * Invariant: 0 <= minProcesses < targetProcesses */ minProcesses: number; region: Region; }; /** @internal */ export type StaticProcessAllocationConfigWrite$Outbound = { autoscalingEnabled?: boolean | undefined; maxProcesses: number | null; targetProcesses?: number | undefined; minProcesses: number; region: string; }; /** @internal */ export const StaticProcessAllocationConfigWrite$outboundSchema: z.ZodType< StaticProcessAllocationConfigWrite$Outbound, z.ZodTypeDef, StaticProcessAllocationConfigWrite > = z.object({ autoscalingEnabled: z.boolean().optional(), maxProcesses: z.nullable(z.number().int()), targetProcesses: z.number().int().optional(), minProcesses: z.number().int(), region: Region$outboundSchema, }); export function staticProcessAllocationConfigWriteToJSON( staticProcessAllocationConfigWrite: StaticProcessAllocationConfigWrite, ): string { return JSON.stringify( StaticProcessAllocationConfigWrite$outboundSchema.parse( staticProcessAllocationConfigWrite, ), ); }