import 'package:mohem_flutter_app/models/chat/get_search_user_chat_model.dart'; class CreateGroupRequest { String? groupName; int? adminUserId; List? groupUserList; bool? canAttach; bool? canAudioC; bool? canShareS; bool? canVideoC; bool? isMeeting; bool? canArchive; int? groupId; CreateGroupRequest( {this.groupName, this.adminUserId, this.groupUserList, this.canAttach, this.canAudioC, this.canShareS, this.canVideoC, this.isMeeting, this.canArchive, this.groupId }); CreateGroupRequest.fromJson(Map json) { groupName = json['groupName']; adminUserId = json['adminUserId']; if (json['groupUserList'] != null) { groupUserList = []; json['groupUserList'].forEach((v) { groupUserList!.add(new ChatUser.fromJson(v)); }); } canAttach = json['canAttach']; canAudioC = json['canAudioC']; canShareS = json['canShareS']; canVideoC = json['canVideoC']; isMeeting = json['isMeeting']; canArchive = json['canArchive']; groupId = json['groupId']; } Map toJson() { Map data = new Map(); data['groupName'] = this.groupName; data['adminUserId'] = this.adminUserId; if (this.groupUserList != null) { data['groupUserList'] = this.groupUserList!.map((v) => v.toJson()).toList(); } data['canAttach'] = this.canAttach; data['canAudioC'] = this.canAudioC; data['canShareS'] = this.canShareS; data['canVideoC'] = this.canVideoC; data['isMeeting'] = this.isMeeting; data['canArchive'] = this.canArchive; data['groupId'] = this.groupId; return data; } } class GroupUserList { int? id; String? userName; String? email; dynamic? phone; String? title; int? userStatus; String? image; int? unreadMessageCount; int? userAction; bool? isPin; bool? isFav; bool? isAdmin; Null? rKey; int? totalCount; bool? isHuaweiDevice; Null? deviceToken; String? token; bool? isDomainUser; bool? isActiveCode; String? encryptedUserId; String? encryptedUserName; GroupUserList( {this.id, this.userName, this.email, this.phone, this.title, this.userStatus, this.image, this.unreadMessageCount, this.userAction, this.isPin, this.isFav, this.isAdmin, this.rKey, this.totalCount, this.isHuaweiDevice, this.deviceToken, this.token, this.isDomainUser, this.isActiveCode, this.encryptedUserId, this.encryptedUserName}); GroupUserList.fromJson(Map json) { id = json['id']; userName = json['userName']; email = json['email']; phone = json['phone']; title = json['title']; userStatus = json['userStatus']; image = json['image']; unreadMessageCount = json['unreadMessageCount']; userAction = json['userAction']; isPin = json['isPin']; isFav = json['isFav']; isAdmin = json['isAdmin']; rKey = json['rKey']; totalCount = json['totalCount']; isHuaweiDevice = json['isHuaweiDevice']; deviceToken = json['deviceToken']; token = json['token']; isDomainUser = json['isDomainUser']; isActiveCode = json['isActiveCode']; encryptedUserId = json['encryptedUserId']; encryptedUserName = json['encryptedUserName']; } Map toJson() { Map data = new Map(); data['id'] = this.id; data['userName'] = this.userName; data['email'] = this.email; data['phone'] = this.phone; data['title'] = this.title; data['userStatus'] = this.userStatus; data['image'] = this.image; data['unreadMessageCount'] = this.unreadMessageCount; data['userAction'] = this.userAction; data['isPin'] = this.isPin; data['isFav'] = this.isFav; data['isAdmin'] = this.isAdmin; data['rKey'] = this.rKey; data['totalCount'] = this.totalCount; data['isHuaweiDevice'] = this.isHuaweiDevice; data['deviceToken'] = this.deviceToken; data['token'] = this.token; data['isDomainUser'] = this.isDomainUser; data['isActiveCode'] = this.isActiveCode; data['encryptedUserId'] = this.encryptedUserId; data['encryptedUserName'] = this.encryptedUserName; return data; } }