/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 6793db8cefbb
 */
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 ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest$outboundSchema = z.object({
    workflowRegistrationId: z.string(),
    workflowExecutionRequest: components.WorkflowExecutionRequest$outboundSchema,
}).transform((v) => {
    return remap$(v, {
        workflowRegistrationId: "workflow_registration_id",
        workflowExecutionRequest: "WorkflowExecutionRequest",
    });
});
export function executeWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequestToJSON(executeWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest) {
    return JSON.stringify(ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest$outboundSchema
        .parse(executeWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest));
}
/** @internal */
export const ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePost$inboundSchema = smartUnion([
    components.WorkflowExecutionResponse$inboundSchema,
    components.WorkflowExecutionSyncResponse$inboundSchema,
]);
export function responseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePost$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePost' from JSON`);
}
//# sourceMappingURL=executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.js.map