/* * 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 Pprof = { allocs?: number | undefined; block?: number | undefined; cmdline?: string | undefined; goroutine?: number | undefined; heap?: number | undefined; mutex?: number | undefined; profile?: number | undefined; threadcreate?: number | undefined; trace?: number | undefined; }; /** @internal */ export const Pprof$inboundSchema: z.ZodType = z .object({ allocs: z.number().int().optional(), block: z.number().int().optional(), cmdline: z.string().optional(), goroutine: z.number().int().optional(), heap: z.number().int().optional(), mutex: z.number().int().optional(), profile: z.number().int().optional(), threadcreate: z.number().int().optional(), trace: z.number().int().optional(), }); export function pprofFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Pprof$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pprof' from JSON`, ); }