/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: b18e8aa0c881
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { smartUnion } from "../../types/smartUnion.js";
import { ActivityTaskCompletedResponse$inboundSchema, } from "./activitytaskcompletedresponse.js";
import { ActivityTaskFailedResponse$inboundSchema, } from "./activitytaskfailedresponse.js";
import { ActivityTaskRetryingResponse$inboundSchema, } from "./activitytaskretryingresponse.js";
import { ActivityTaskStartedResponse$inboundSchema, } from "./activitytaskstartedresponse.js";
import { CustomTaskCanceledResponse$inboundSchema, } from "./customtaskcanceledresponse.js";
import { CustomTaskCompletedResponse$inboundSchema, } from "./customtaskcompletedresponse.js";
import { CustomTaskFailedResponse$inboundSchema, } from "./customtaskfailedresponse.js";
import { CustomTaskInProgressResponse$inboundSchema, } from "./customtaskinprogressresponse.js";
import { CustomTaskStartedResponse$inboundSchema, } from "./customtaskstartedresponse.js";
import { CustomTaskTimedOutResponse$inboundSchema, } from "./customtasktimedoutresponse.js";
import { WorkflowExecutionCanceledResponse$inboundSchema, } from "./workflowexecutioncanceledresponse.js";
import { WorkflowExecutionCompletedResponse$inboundSchema, } from "./workflowexecutioncompletedresponse.js";
import { WorkflowExecutionContinuedAsNewResponse$inboundSchema, } from "./workflowexecutioncontinuedasnewresponse.js";
import { WorkflowExecutionFailedResponse$inboundSchema, } from "./workflowexecutionfailedresponse.js";
import { WorkflowExecutionStartedResponse$inboundSchema, } from "./workflowexecutionstartedresponse.js";
import { WorkflowTaskFailedResponse$inboundSchema, } from "./workflowtaskfailedresponse.js";
import { WorkflowTaskTimedOutResponse$inboundSchema, } from "./workflowtasktimedoutresponse.js";
/** @internal */
export const ListWorkflowEventResponseEvent$inboundSchema = smartUnion([
    WorkflowExecutionStartedResponse$inboundSchema,
    WorkflowExecutionCompletedResponse$inboundSchema,
    WorkflowExecutionFailedResponse$inboundSchema,
    WorkflowExecutionCanceledResponse$inboundSchema,
    WorkflowExecutionContinuedAsNewResponse$inboundSchema,
    WorkflowTaskTimedOutResponse$inboundSchema,
    WorkflowTaskFailedResponse$inboundSchema,
    CustomTaskStartedResponse$inboundSchema,
    CustomTaskInProgressResponse$inboundSchema,
    CustomTaskCompletedResponse$inboundSchema,
    CustomTaskFailedResponse$inboundSchema,
    CustomTaskTimedOutResponse$inboundSchema,
    CustomTaskCanceledResponse$inboundSchema,
    ActivityTaskStartedResponse$inboundSchema,
    ActivityTaskCompletedResponse$inboundSchema,
    ActivityTaskRetryingResponse$inboundSchema,
    ActivityTaskFailedResponse$inboundSchema,
]);
export function listWorkflowEventResponseEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListWorkflowEventResponseEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkflowEventResponseEvent' from JSON`);
}
/** @internal */
export const ListWorkflowEventResponse$inboundSchema = z.object({
    events: z.array(smartUnion([
        WorkflowExecutionStartedResponse$inboundSchema,
        WorkflowExecutionCompletedResponse$inboundSchema,
        WorkflowExecutionFailedResponse$inboundSchema,
        WorkflowExecutionCanceledResponse$inboundSchema,
        WorkflowExecutionContinuedAsNewResponse$inboundSchema,
        WorkflowTaskTimedOutResponse$inboundSchema,
        WorkflowTaskFailedResponse$inboundSchema,
        CustomTaskStartedResponse$inboundSchema,
        CustomTaskInProgressResponse$inboundSchema,
        CustomTaskCompletedResponse$inboundSchema,
        CustomTaskFailedResponse$inboundSchema,
        CustomTaskTimedOutResponse$inboundSchema,
        CustomTaskCanceledResponse$inboundSchema,
        ActivityTaskStartedResponse$inboundSchema,
        ActivityTaskCompletedResponse$inboundSchema,
        ActivityTaskRetryingResponse$inboundSchema,
        ActivityTaskFailedResponse$inboundSchema,
    ])),
    next_cursor: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "next_cursor": "nextCursor",
    });
});
export function listWorkflowEventResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListWorkflowEventResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkflowEventResponse' from JSON`);
}
//# sourceMappingURL=listworkfloweventresponse.js.map