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

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

export type TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest = {
  scheduleId: string;
  workflowScheduleTriggerRequest?:
    | components.WorkflowScheduleTriggerRequest
    | null
    | undefined;
};

/** @internal */
export type TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest$Outbound =
  {
    schedule_id: string;
    WorkflowScheduleTriggerRequest?:
      | components.WorkflowScheduleTriggerRequest$Outbound
      | null
      | undefined;
  };

/** @internal */
export const TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest$outboundSchema:
  z.ZodType<
    TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest$Outbound,
    TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest
  > = z.object({
    scheduleId: z.string(),
    workflowScheduleTriggerRequest: z.nullable(
      components.WorkflowScheduleTriggerRequest$outboundSchema,
    ).optional(),
  }).transform((v) => {
    return remap$(v, {
      scheduleId: "schedule_id",
      workflowScheduleTriggerRequest: "WorkflowScheduleTriggerRequest",
    });
  });

export function triggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequestToJSON(
  triggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest:
    TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest,
): string {
  return JSON.stringify(
    TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest$outboundSchema
      .parse(triggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest),
  );
}
