/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Status = { availableWorkers?: number | undefined; function?: string | undefined; running?: number | undefined; total?: number | undefined; }; /** @internal */ export const Status$inboundSchema: z.ZodType = z .object({ available_workers: z.number().int().optional(), function: z.string().optional(), running: z.number().int().optional(), total: z.number().int().optional(), }).transform((v) => { return remap$(v, { "available_workers": "availableWorkers", }); }); export function statusFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Status$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Status' from JSON`, ); }