destructureSelf method
Implementation
void destructureSelf() {
final parts = this._api._destructureMemberPermission(this._box.borrow());
switch (parts.tag) {
case 0:
this._tag = MemberPermissionTag.CanSendChatMessages;
break;
case 1:
this._tag = MemberPermissionTag.CanToggleReaction;
break;
case 2:
this._tag = MemberPermissionTag.CanSendSticker;
break;
case 3:
this._tag = MemberPermissionTag.CanPostNews;
break;
case 4:
this._tag = MemberPermissionTag.CanPostPin;
break;
case 5:
this._tag = MemberPermissionTag.CanPostEvent;
break;
case 6:
this._tag = MemberPermissionTag.CanPostTaskList;
break;
case 7:
this._tag = MemberPermissionTag.CanPostTask;
break;
case 8:
this._tag = MemberPermissionTag.CanBan;
break;
case 9:
this._tag = MemberPermissionTag.CanKick;
break;
case 10:
this._tag = MemberPermissionTag.CanInvite;
break;
case 11:
this._tag = MemberPermissionTag.CanRedactOwn;
break;
case 12:
this._tag = MemberPermissionTag.CanRedactOther;
break;
case 13:
this._tag = MemberPermissionTag.CanTriggerRoomNotification;
break;
case 14:
this._tag = MemberPermissionTag.CanUpgradeToActerSpace;
break;
case 15:
this._tag = MemberPermissionTag.CanSetName;
break;
case 16:
this._tag = MemberPermissionTag.CanUpdateAvatar;
break;
case 17:
this._tag = MemberPermissionTag.CanUpdateJoinRule;
break;
case 18:
this._tag = MemberPermissionTag.CanSetTopic;
break;
case 19:
this._tag = MemberPermissionTag.CanLinkSpaces;
break;
case 20:
this._tag = MemberPermissionTag.CanUpdatePowerLevels;
break;
case 21:
this._tag = MemberPermissionTag.CanSetParentSpace;
break;
case 22:
this._tag = MemberPermissionTag.CanChangeAppSettings;
break;
default:
throw new StateError(
"Destructuring enum gave back an invalid tag: ${parts.tag}");
}
}