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

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

export type GetRunHistoryV1WorkflowsRunsRunIdHistoryGetRequest = {
  runId: string;
  decodePayloads?: boolean | undefined;
};

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

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

export function getRunHistoryV1WorkflowsRunsRunIdHistoryGetRequestToJSON(
  getRunHistoryV1WorkflowsRunsRunIdHistoryGetRequest:
    GetRunHistoryV1WorkflowsRunsRunIdHistoryGetRequest,
): string {
  return JSON.stringify(
    GetRunHistoryV1WorkflowsRunsRunIdHistoryGetRequest$outboundSchema.parse(
      getRunHistoryV1WorkflowsRunsRunIdHistoryGetRequest,
    ),
  );
}
