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

import * as z from "zod/v4";
import {
  PartialScheduleDefinition,
  PartialScheduleDefinition$Outbound,
  PartialScheduleDefinition$outboundSchema,
} from "./partialscheduledefinition.js";

export type WorkflowScheduleUpdateRequest = {
  /**
   * Schedule definition for partial updates.
   *
   * @remarks
   *
   * All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set
   * fields are applied during an update; unset fields preserve the existing schedule values.
   */
  schedule: PartialScheduleDefinition;
};

/** @internal */
export type WorkflowScheduleUpdateRequest$Outbound = {
  schedule: PartialScheduleDefinition$Outbound;
};

/** @internal */
export const WorkflowScheduleUpdateRequest$outboundSchema: z.ZodType<
  WorkflowScheduleUpdateRequest$Outbound,
  WorkflowScheduleUpdateRequest
> = z.object({
  schedule: PartialScheduleDefinition$outboundSchema,
});

export function workflowScheduleUpdateRequestToJSON(
  workflowScheduleUpdateRequest: WorkflowScheduleUpdateRequest,
): string {
  return JSON.stringify(
    WorkflowScheduleUpdateRequest$outboundSchema.parse(
      workflowScheduleUpdateRequest,
    ),
  );
}
