pauseSchedule method

  1. @override
Future<void> pauseSchedule(
  1. PauseScheduleRequest request
)
override

Pauses a Schedule. Will mark Schedule.state to 'PAUSED'. If the schedule is paused, no new runs will be created. Already created runs will NOT be paused or canceled.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<void> pauseSchedule(PauseScheduleRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_pauseSchedule case final pauseSchedule?) {
    return pauseSchedule(request);
  }
  throw UnsupportedError('pauseSchedule');
}