/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 17e3f9f36173
 */
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 * as components from "../components/index.js";
/** @internal */
export const ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest$outboundSchema = z.object({
    workflowIdentifier: z.string(),
    workflowExecutionRequest: components.WorkflowExecutionRequest$outboundSchema,
}).transform((v) => {
    return remap$(v, {
        workflowIdentifier: "workflow_identifier",
        workflowExecutionRequest: "WorkflowExecutionRequest",
    });
});
export function executeWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequestToJSON(executeWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest) {
    return JSON.stringify(ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest$outboundSchema
        .parse(executeWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest));
}
/** @internal */
export const ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost$inboundSchema = smartUnion([
    components.WorkflowExecutionResponse$inboundSchema,
    components.WorkflowExecutionSyncResponse$inboundSchema,
]);
export function responseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost' from JSON`);
}
//# sourceMappingURL=executeworkflowv1workflowsworkflowidentifierexecutepost.js.map