/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 250c868597d7
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { TempoGetTraceResponse$inboundSchema, } from "./tempogettraceresponse.js";
import { WorkflowExecutionStatus$inboundSchema, } from "./workflowexecutionstatus.js";
/** @internal */
export const WorkflowExecutionTraceOTelResponse$inboundSchema = z.object({
    workflow_name: z.string(),
    execution_id: z.string(),
    parent_execution_id: z.nullable(z.string()).optional(),
    root_execution_id: z.string(),
    run_id: z.nullable(z.string()).optional(),
    status: z.nullable(WorkflowExecutionStatus$inboundSchema),
    start_time: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    end_time: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))),
    total_duration_ms: z.nullable(z.int()).optional(),
    result: z.nullable(z.any()),
    data_source: z.string(),
    otel_trace_id: z.nullable(z.string()).optional(),
    otel_trace_data: z.nullable(TempoGetTraceResponse$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "workflow_name": "workflowName",
        "execution_id": "executionId",
        "parent_execution_id": "parentExecutionId",
        "root_execution_id": "rootExecutionId",
        "run_id": "runId",
        "start_time": "startTime",
        "end_time": "endTime",
        "total_duration_ms": "totalDurationMs",
        "data_source": "dataSource",
        "otel_trace_id": "otelTraceId",
        "otel_trace_data": "otelTraceData",
    });
});
export function workflowExecutionTraceOTelResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WorkflowExecutionTraceOTelResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkflowExecutionTraceOTelResponse' from JSON`);
}
//# sourceMappingURL=workflowexecutiontraceotelresponse.js.map