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 BadGatewayException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw GatewayTimeoutException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnprocessableEntityException.

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 {
  final $payload = <String, dynamic>{
    'channelClass': channelClass.value,
    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);
}