/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 3ad311fe40cc
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ScalarMetric$inboundSchema } from "./scalarmetric.js";
import { TimeSeriesMetric$inboundSchema, } from "./timeseriesmetric.js";
/** @internal */
export const WorkflowMetrics$inboundSchema = z.object({
    execution_count: ScalarMetric$inboundSchema,
    success_count: ScalarMetric$inboundSchema,
    error_count: ScalarMetric$inboundSchema,
    average_latency_ms: ScalarMetric$inboundSchema,
    latency_over_time: TimeSeriesMetric$inboundSchema,
    retry_rate: ScalarMetric$inboundSchema,
}).transform((v) => {
    return remap$(v, {
        "execution_count": "executionCount",
        "success_count": "successCount",
        "error_count": "errorCount",
        "average_latency_ms": "averageLatencyMs",
        "latency_over_time": "latencyOverTime",
        "retry_rate": "retryRate",
    });
});
export function workflowMetricsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WorkflowMetrics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkflowMetrics' from JSON`);
}
//# sourceMappingURL=workflowmetrics.js.map