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

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

export type GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest =
  {
    executionId: string;
    decodePayloads?: boolean | undefined;
  };

/** @internal */
export type GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest$Outbound =
  {
    execution_id: string;
    decode_payloads: boolean;
  };

/** @internal */
export const GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest$outboundSchema:
  z.ZodType<
    GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest$Outbound,
    GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest
  > = z.object({
    executionId: z.string(),
    decodePayloads: z.boolean().default(true),
  }).transform((v) => {
    return remap$(v, {
      executionId: "execution_id",
      decodePayloads: "decode_payloads",
    });
  });

export function getWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequestToJSON(
  getWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest:
    GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest,
): string {
  return JSON.stringify(
    GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest$outboundSchema
      .parse(
        getWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest,
      ),
  );
}
