batchUpdateSchedule method

Future<BatchUpdateScheduleResponse> batchUpdateSchedule({
  1. required String channelId,
  2. BatchScheduleActionCreateRequest? creates,
  3. BatchScheduleActionDeleteRequest? deletes,
})

Update a channel schedule

May throw BadRequestException. May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw BadGatewayException. May throw NotFoundException. May throw GatewayTimeoutException. May throw TooManyRequestsException.

Parameter channelId : Id of the channel whose schedule is being updated.

Parameter creates : Schedule actions to create in the schedule.

Parameter deletes : Schedule actions to delete from the schedule.

Implementation

Future<BatchUpdateScheduleResponse> batchUpdateSchedule({
  required String channelId,
  BatchScheduleActionCreateRequest? creates,
  BatchScheduleActionDeleteRequest? deletes,
}) async {
  ArgumentError.checkNotNull(channelId, 'channelId');
  final $payload = <String, dynamic>{
    if (creates != null) 'creates': creates,
    if (deletes != null) 'deletes': deletes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/prod/channels/${Uri.encodeComponent(channelId)}/schedule',
    exceptionFnMap: _exceptionFns,
  );
  return BatchUpdateScheduleResponse.fromJson(response);
}