/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 6c11d9689192
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { WorkflowExecutionTraceEvent$inboundSchema, } from "./workflowexecutiontraceevent.js";
import { WorkflowExecutionTraceSummaryAttributesValues$inboundSchema, } from "./workflowexecutiontracesummaryattributesvalues.js";
/** @internal */
export const WorkflowExecutionTraceSummarySpan$inboundSchema = z.object({
    span_id: z.string(),
    name: z.string(),
    start_time_unix_nano: z.int(),
    end_time_unix_nano: z.nullable(z.int()),
    attributes: z.record(z.string(), z.nullable(WorkflowExecutionTraceSummaryAttributesValues$inboundSchema)),
    events: z.array(WorkflowExecutionTraceEvent$inboundSchema),
    children: z.array(z.lazy(() => WorkflowExecutionTraceSummarySpan$inboundSchema)).optional(),
}).transform((v) => {
    return remap$(v, {
        "span_id": "spanId",
        "start_time_unix_nano": "startTimeUnixNano",
        "end_time_unix_nano": "endTimeUnixNano",
    });
});
export function workflowExecutionTraceSummarySpanFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WorkflowExecutionTraceSummarySpan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkflowExecutionTraceSummarySpan' from JSON`);
}
//# sourceMappingURL=workflowexecutiontracesummaryspan.js.map