/* * 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"; export type UsageLimits = { /** * The number of vCPU hours used up by the organization in the current month. */ monthlyProcessVcpuHoursConsumed: number; /** * The maximum number of monthly process vcpu hours that can be run by the organization * * @remarks * If undefined, the organization has no limit. */ monthlyProcessVcpuHoursLimit?: number | undefined; /** * The maximum number of concurrent processes that have been run by the organization in the last 7 days. */ concurrentProcessVcpus7DayMax: number; /** * The maximum number of concurrent processes that can be run by the organization * * @remarks * If undefined, the organization has no limit. */ concurrentProcessVcpusLimit?: number | undefined; }; /** @internal */ export const UsageLimits$inboundSchema: z.ZodType< UsageLimits, z.ZodTypeDef, unknown > = z.object({ monthlyProcessVcpuHoursConsumed: z.number(), monthlyProcessVcpuHoursLimit: z.number().optional(), concurrentProcessVcpus7DayMax: z.number(), concurrentProcessVcpusLimit: z.number().optional(), }); export function usageLimitsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UsageLimits$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UsageLimits' from JSON`, ); }