/* * 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 { Status, Status$inboundSchema } from "./status.js"; import { Worker, Worker$inboundSchema } from "./worker.js"; export type Gearman = { status?: Array | null | undefined; version?: string | undefined; workers?: Array | null | undefined; }; /** @internal */ export const Gearman$inboundSchema: z.ZodType = z.object({ status: z.nullable(z.array(Status$inboundSchema)).optional(), version: z.string().optional(), workers: z.nullable(z.array(Worker$inboundSchema)).optional(), }); export function gearmanFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Gearman$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Gearman' from JSON`, ); }