/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 5c7721db418a
 */

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import * as components from "../components/index.js";

export type QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest =
  {
    executionId: string;
    queryInvocationBody: components.QueryInvocationBody;
  };

/** @internal */
export type QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest$Outbound =
  {
    execution_id: string;
    QueryInvocationBody: components.QueryInvocationBody$Outbound;
  };

/** @internal */
export const QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest$outboundSchema:
  z.ZodType<
    QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest$Outbound,
    QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest
  > = z.object({
    executionId: z.string(),
    queryInvocationBody: components.QueryInvocationBody$outboundSchema,
  }).transform((v) => {
    return remap$(v, {
      executionId: "execution_id",
      queryInvocationBody: "QueryInvocationBody",
    });
  });

export function queryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequestToJSON(
  queryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest:
    QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest,
): string {
  return JSON.stringify(
    QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest$outboundSchema
      .parse(
        queryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest,
      ),
  );
}
