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

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

export type UpdateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest = {
  scheduleId: string;
  workflowScheduleUpdateRequest: components.WorkflowScheduleUpdateRequest;
};

/** @internal */
export type UpdateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest$Outbound =
  {
    schedule_id: string;
    WorkflowScheduleUpdateRequest:
      components.WorkflowScheduleUpdateRequest$Outbound;
  };

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

export function updateScheduleV1WorkflowsSchedulesScheduleIdPatchRequestToJSON(
  updateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest:
    UpdateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest,
): string {
  return JSON.stringify(
    UpdateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest$outboundSchema
      .parse(updateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest),
  );
}
