batchRemoveChannelRoleFromAccessors method

Future<BatchRemoveChannelRoleFromAccessorsOutput> batchRemoveChannelRoleFromAccessors({
  1. required List<String> accessorIds,
  2. required String channelId,
  3. required ChannelRole channelRole,
  4. required String spaceId,
})

Remove a role from multiple users or groups in a private re:Post channel.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter accessorIds : The users or groups identifiers to remove the role from.

Parameter channelId : The unique ID of the private re:Post channel.

Parameter channelRole : The channel role to remove from the users or groups.

Parameter spaceId : The unique ID of the private re:Post.

Implementation

Future<BatchRemoveChannelRoleFromAccessorsOutput>
    batchRemoveChannelRoleFromAccessors({
  required List<String> accessorIds,
  required String channelId,
  required ChannelRole channelRole,
  required String spaceId,
}) async {
  final $payload = <String, dynamic>{
    'accessorIds': accessorIds,
    'channelRole': channelRole.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/spaces/${Uri.encodeComponent(spaceId)}/channels/${Uri.encodeComponent(channelId)}/roles',
    exceptionFnMap: _exceptionFns,
  );
  return BatchRemoveChannelRoleFromAccessorsOutput.fromJson(response);
}