/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { DebugTrackerStatus, DebugTrackerStatus$inboundSchema, } from "./debug-tracker-status.js"; import { ErrorResponse, ErrorResponse$inboundSchema, } from "./error-response.js"; import { MatchedMeter, MatchedMeter$inboundSchema } from "./matched-meter.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type MeterMatchingResult = { error?: ErrorResponse | undefined; matchedMeters?: Array | undefined; status?: DebugTrackerStatus | undefined; }; /** @internal */ export const MeterMatchingResult$inboundSchema: z.ZodMiniType< MeterMatchingResult, unknown > = z.pipe( z.object({ error: types.optional(ErrorResponse$inboundSchema), matched_meters: types.optional(z.array(MatchedMeter$inboundSchema)), status: types.optional(DebugTrackerStatus$inboundSchema), }), z.transform((v) => { return remap$(v, { "matched_meters": "matchedMeters", }); }), ); export function meterMatchingResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MeterMatchingResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MeterMatchingResult' from JSON`, ); }