/* * 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 { PrometheusResponse, PrometheusResponse$inboundSchema, } from "./prometheusresponse.js"; export type Prometheus = { response?: PrometheusResponse | undefined; }; /** @internal */ export const Prometheus$inboundSchema: z.ZodType< Prometheus, z.ZodTypeDef, unknown > = z.object({ response: PrometheusResponse$inboundSchema.optional(), }); export function prometheusFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Prometheus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Prometheus' from JSON`, ); }