updateChannelClass method

Future<UpdateChannelClassResponse> updateChannelClass({
  1. required ChannelClass channelClass,
  2. required String channelId,
  3. List<OutputDestination>? destinations,
})

Changes the class of the channel.

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

Parameter channelClass : The channel class that you wish to update this channel to use.

Parameter channelId : Channel Id of the channel whose class should be updated.

Parameter destinations : A list of output destinations for this channel.

Implementation

Future<UpdateChannelClassResponse> updateChannelClass({
  required ChannelClass channelClass,
  required String channelId,
  List<OutputDestination>? destinations,
}) async {
  ArgumentError.checkNotNull(channelClass, 'channelClass');
  ArgumentError.checkNotNull(channelId, 'channelId');
  final $payload = <String, dynamic>{
    'channelClass': channelClass.toValue(),
    if (destinations != null) 'destinations': destinations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/prod/channels/${Uri.encodeComponent(channelId)}/channelClass',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateChannelClassResponse.fromJson(response);
}