/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 43fe5b441a63
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { EventProgressStatus$inboundSchema, } from "./eventprogressstatus.js";
import { EventType$inboundSchema } from "./eventtype.js";
import { WorkflowExecutionTraceSummaryAttributesValues$inboundSchema, } from "./workflowexecutiontracesummaryattributesvalues.js";
/** @internal */
export const WorkflowExecutionProgressTraceEvent$inboundSchema = z.object({
    type: EventType$inboundSchema.optional(),
    name: z.string(),
    id: z.string(),
    timestamp_unix_nano: z.int(),
    attributes: z.record(z.string(), z.nullable(WorkflowExecutionTraceSummaryAttributesValues$inboundSchema)),
    internal: z.boolean().default(false),
    status: EventProgressStatus$inboundSchema.optional(),
    start_time_unix_ms: z.int(),
    end_time_unix_ms: z.nullable(z.int()).optional(),
    error: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "timestamp_unix_nano": "timestampUnixNano",
        "start_time_unix_ms": "startTimeUnixMs",
        "end_time_unix_ms": "endTimeUnixMs",
    });
});
export function workflowExecutionProgressTraceEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WorkflowExecutionProgressTraceEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkflowExecutionProgressTraceEvent' from JSON`);
}
//# sourceMappingURL=workflowexecutionprogresstraceevent.js.map