class LockMainEntity { int? errorCode; String? description; String? errorMsg; LockInfoEntity? data; LockMainEntity( {this.errorCode, this.description, this.errorMsg, this.data}); LockMainEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; data = json['data'] != null ? LockInfoEntity.fromJson(json['data']) : null; } Map toJson() { final Map data = {}; data['errorCode'] = errorCode; data['description'] = description; data['errorMsg'] = errorMsg; if (this.data != null) { data['data'] = this.data!.toJson(); } return data; } } class LockInfoEntity { UserSettings? userSettings; bool? hasXmeyeLock; bool? hasMoreService; int? pages; List? keyGroups; bool? isReply; int? paidUserStatus; bool? hasAdvert; bool? hasAlexa; bool? isUserSettingCompleted; List? keyInfos; bool? hasPaidFeature; bool? hasCameraLock; bool? hasGoogleHome; int? pageNo; int? lastUpdateDate; LockInfoEntity( {this.userSettings, this.hasXmeyeLock, this.hasMoreService, this.pages, this.keyGroups, this.isReply, this.paidUserStatus, this.hasAdvert, this.hasAlexa, this.isUserSettingCompleted, this.keyInfos, this.hasPaidFeature, this.hasCameraLock, this.hasGoogleHome, this.pageNo, this.lastUpdateDate}); LockInfoEntity.fromJson(Map json) { userSettings = json['userSettings'] != null ? UserSettings.fromJson(json['userSettings']) : null; hasXmeyeLock = json['hasXmeyeLock']; hasMoreService = json['hasMoreService']; pages = json['pages']; if (json['keyGroups'] != null) { keyGroups = []; json['keyGroups'].forEach((v) { keyGroups!.add(KeyGroups.fromJson(v)); }); } isReply = json['isReply']; paidUserStatus = json['paidUserStatus']; hasAdvert = json['hasAdvert']; hasAlexa = json['hasAlexa']; isUserSettingCompleted = json['isUserSettingCompleted']; if (json['keyInfos'] != null) { keyInfos = []; json['keyInfos'].forEach((v) { keyInfos!.add(KeyInfos.fromJson(v)); }); } hasPaidFeature = json['hasPaidFeature']; hasCameraLock = json['hasCameraLock']; hasGoogleHome = json['hasGoogleHome']; pageNo = json['pageNo']; lastUpdateDate = json['lastUpdateDate']; } Map toJson() { final Map data = {}; if (userSettings != null) { data['userSettings'] = userSettings!.toJson(); } data['hasXmeyeLock'] = hasXmeyeLock; data['hasMoreService'] = hasMoreService; data['pages'] = pages; if (keyGroups != null) { data['keyGroups'] = keyGroups!.map((v) => v.toJson()).toList(); } data['isReply'] = isReply; data['paidUserStatus'] = paidUserStatus; data['hasAdvert'] = hasAdvert; data['hasAlexa'] = hasAlexa; data['isUserSettingCompleted'] = isUserSettingCompleted; if (keyInfos != null) { data['keyInfos'] = keyInfos!.map((v) => v.toJson()).toList(); } data['hasPaidFeature'] = hasPaidFeature; data['hasCameraLock'] = hasCameraLock; data['hasGoogleHome'] = hasGoogleHome; data['pageNo'] = pageNo; data['lastUpdateDate'] = lastUpdateDate; return data; } } class UserSettings { int? touchUnlockFlag; int? modifyManagePwdFlag; String? gesturePassword; int? resetFlag; int? delManagerFlag; int? hideExpiredAccessFlag; int? sendKeyFlag; int? viberateFlag; int? lockScreen; int? authorizeFlag; int? sendPwdFlag; int? alertToneFlag; int? status; UserSettings( {this.touchUnlockFlag, this.modifyManagePwdFlag, this.gesturePassword, this.resetFlag, this.delManagerFlag, this.hideExpiredAccessFlag, this.sendKeyFlag, this.viberateFlag, this.lockScreen, this.authorizeFlag, this.sendPwdFlag, this.alertToneFlag, this.status}); UserSettings.fromJson(Map json) { touchUnlockFlag = json['touchUnlockFlag']; modifyManagePwdFlag = json['modifyManagePwdFlag']; gesturePassword = json['gesturePassword']; resetFlag = json['resetFlag']; delManagerFlag = json['delManagerFlag']; hideExpiredAccessFlag = json['hideExpiredAccessFlag']; sendKeyFlag = json['sendKeyFlag']; viberateFlag = json['viberateFlag']; lockScreen = json['lockScreen']; authorizeFlag = json['authorizeFlag']; sendPwdFlag = json['sendPwdFlag']; alertToneFlag = json['alertToneFlag']; status = json['status']; } Map toJson() { final Map data = {}; data['touchUnlockFlag'] = touchUnlockFlag; data['modifyManagePwdFlag'] = modifyManagePwdFlag; data['gesturePassword'] = gesturePassword; data['resetFlag'] = resetFlag; data['delManagerFlag'] = delManagerFlag; data['hideExpiredAccessFlag'] = hideExpiredAccessFlag; data['sendKeyFlag'] = sendKeyFlag; data['viberateFlag'] = viberateFlag; data['lockScreen'] = lockScreen; data['authorizeFlag'] = authorizeFlag; data['sendPwdFlag'] = sendPwdFlag; data['alertToneFlag'] = alertToneFlag; data['status'] = status; return data; } } class KeyGroups { String? groupName; int? groupId; KeyGroups({this.groupName, this.groupId}); KeyGroups.fromJson(Map json) { groupName = json['groupName']; groupId = json['groupId']; } Map toJson() { final Map data = {}; data['groupName'] = groupName; data['groupId'] = groupId; return data; } } class KeyInfos { int? lightingTime; int? privacyLock; int? keyGroupId; String? remarks; int? autoUnlock; String? noKeyPwd; int? isAttendance; int? keyStatus; int? faceAuthentication; int? sensitivity; int? date; int? appUnlockMustOnline; String? lockKey; int? resetButton; int? endDate; int? keyRight; int? electricQuantity; int? lockSound; int? volume; int? specialValue; int? displayPasscode; int? lockId; int? doubleVerification; String? keyName; LockVersion? lockVersion; Bluetooth? bluetooth; String? lockName; int? monitorFlag; String? bondPassword; String? lockAlias; int? isFrozen; int? remoteEnable; int? lockFlagPos; int? autoLockTime; int? unlockDirection; int? isCameraEnable; int? startDate; String? keyGroupName; String? aesKeyStr; int? uid; int? passageMode; String? admin; int? keyId; String? adminPwd; String? deletePwd; int? timezoneRawOffSet; int? userType; int? validPwdNum; String? featureValue; int? adminUid; String? lockMac; String? wirelessKeypadFeatureValue; int? tamperAlert; int? roomStatus; KeyInfos( {this.lightingTime, this.privacyLock, this.keyGroupId, this.remarks, this.autoUnlock, this.noKeyPwd, this.isAttendance, this.keyStatus, this.faceAuthentication, this.sensitivity, this.date, this.appUnlockMustOnline, this.lockKey, this.resetButton, this.endDate, this.keyRight, this.electricQuantity, this.lockSound, this.volume, this.specialValue, this.displayPasscode, this.lockId, this.doubleVerification, this.keyName, this.lockVersion, this.lockName, this.monitorFlag, this.bondPassword, this.lockAlias, this.isFrozen, this.remoteEnable, this.lockFlagPos, this.autoLockTime, this.unlockDirection, this.isCameraEnable, this.startDate, this.keyGroupName, this.aesKeyStr, this.uid, this.passageMode, this.admin, this.keyId, this.adminPwd, this.deletePwd, this.timezoneRawOffSet, this.userType, this.validPwdNum, this.featureValue, this.adminUid, this.lockMac, this.wirelessKeypadFeatureValue, this.tamperAlert, this.roomStatus, this.bluetooth}); KeyInfos.fromJson(Map json) { lightingTime = json['lightingTime']; privacyLock = json['privacyLock']; keyGroupId = json['keyGroupId']; remarks = json['remarks']; autoUnlock = json['autoUnlock']; noKeyPwd = json['noKeyPwd']; isAttendance = json['isAttendance']; keyStatus = json['keyStatus']; faceAuthentication = json['faceAuthentication']; sensitivity = json['sensitivity']; date = json['date']; appUnlockMustOnline = json['appUnlockMustOnline']; lockKey = json['lockKey']; resetButton = json['resetButton']; endDate = json['endDate']; keyRight = json['keyRight']; electricQuantity = json['electricQuantity']; lockSound = json['lockSound']; volume = json['volume']; specialValue = json['specialValue']; displayPasscode = json['displayPasscode']; lockId = json['lockId']; doubleVerification = json['doubleVerification']; keyName = json['keyName']; lockVersion = json['lockVersion'] != null ? LockVersion.fromJson(json['lockVersion']) : null; lockName = json['lockName']; monitorFlag = json['monitorFlag']; bondPassword = json['bondPassword']; lockAlias = json['lockAlias']; isFrozen = json['isFrozen']; remoteEnable = json['remoteEnable']; lockFlagPos = json['lockFlagPos']; autoLockTime = json['autoLockTime']; unlockDirection = json['unlockDirection']; isCameraEnable = json['isCameraEnable']; startDate = json['startDate']; keyGroupName = json['keyGroupName']; aesKeyStr = json['aesKeyStr']; uid = json['uid']; passageMode = json['passageMode']; admin = json['admin']; keyId = json['keyId']; adminPwd = json['adminPwd']; deletePwd = json['deletePwd']; timezoneRawOffSet = json['timezoneRawOffSet']; userType = json['userType']; validPwdNum = json['validPwdNum']; featureValue = json['featureValue']; adminUid = json['adminUid']; lockMac = json['lockMac']; wirelessKeypadFeatureValue = json['wirelessKeypadFeatureValue']; tamperAlert = json['tamperAlert']; roomStatus = json['roomStatus']; bluetooth = json['bluetooth'] != null ? Bluetooth.fromJson(json['bluetooth']) : null; } Map toJson() { final Map data = {}; data['lightingTime'] = lightingTime; data['privacyLock'] = privacyLock; data['keyGroupId'] = keyGroupId; data['remarks'] = remarks; data['autoUnlock'] = autoUnlock; data['noKeyPwd'] = noKeyPwd; data['isAttendance'] = isAttendance; data['keyStatus'] = keyStatus; data['faceAuthentication'] = faceAuthentication; data['sensitivity'] = sensitivity; data['date'] = date; data['appUnlockMustOnline'] = appUnlockMustOnline; data['lockKey'] = lockKey; data['resetButton'] = resetButton; data['endDate'] = endDate; data['keyRight'] = keyRight; data['electricQuantity'] = electricQuantity; data['lockSound'] = lockSound; data['volume'] = volume; data['specialValue'] = specialValue; data['displayPasscode'] = displayPasscode; data['lockId'] = lockId; data['doubleVerification'] = doubleVerification; data['keyName'] = keyName; if (lockVersion != null) { data['lockVersion'] = lockVersion!.toJson(); } data['lockName'] = lockName; data['monitorFlag'] = monitorFlag; data['bondPassword'] = bondPassword; data['lockAlias'] = lockAlias; data['isFrozen'] = isFrozen; data['remoteEnable'] = remoteEnable; data['lockFlagPos'] = lockFlagPos; data['unlockDirection'] = unlockDirection; data['isCameraEnable'] = isCameraEnable; data['startDate'] = startDate; data['keyGroupName'] = keyGroupName; data['aesKeyStr'] = aesKeyStr; data['uid'] = uid; data['passageMode'] = passageMode; data['admin'] = admin; data['keyId'] = keyId; data['adminPwd'] = adminPwd; data['deletePwd'] = deletePwd; data['timezoneRawOffSet'] = timezoneRawOffSet; data['userType'] = userType; data['validPwdNum'] = validPwdNum; data['featureValue'] = featureValue; data['adminUid'] = adminUid; data['lockMac'] = lockMac; data['wirelessKeypadFeatureValue'] = wirelessKeypadFeatureValue; data['autoLockTime'] = autoLockTime; data['tamperAlert'] = tamperAlert; data['roomStatus'] = roomStatus; if (bluetooth != null) { data['bluetooth'] = bluetooth!.toJson(); } return data; } } class LockVersion { int? scene; int? protocolVersion; String? logoUrl; int? orgId; bool? showAdminKbpwdFlag; int? protocolType; int? groupId; LockVersion( {this.scene, this.protocolVersion, this.logoUrl, this.orgId, this.showAdminKbpwdFlag, this.protocolType, this.groupId}); LockVersion.fromJson(Map json) { scene = json['scene']; protocolVersion = json['protocolVersion']; logoUrl = json['logoUrl']; orgId = json['orgId']; showAdminKbpwdFlag = json['showAdminKbpwdFlag']; protocolType = json['protocolType']; groupId = json['groupId']; } Map toJson() { final Map data = {}; data['scene'] = scene; data['protocolVersion'] = protocolVersion; data['logoUrl'] = logoUrl; data['orgId'] = orgId; data['showAdminKbpwdFlag'] = showAdminKbpwdFlag; data['protocolType'] = protocolType; data['groupId'] = groupId; return data; } } class Bluetooth { String? bluetoothDeviceId; String? bluetoothDeviceName; List? publicKey; List? privateKey; List? signKey; Bluetooth( {this.bluetoothDeviceId, this.bluetoothDeviceName, this.publicKey, this.privateKey, this.signKey}); Bluetooth.fromJson(Map json) { bluetoothDeviceId = json['bluetoothDeviceId']; bluetoothDeviceName = json['bluetoothDeviceName']; publicKey = json['publicKey']; privateKey = json['privateKey']; signKey = json['signKey']; } Map toJson() { final Map data = {}; data['bluetoothDeviceId'] = bluetoothDeviceId; data['bluetoothDeviceName'] = bluetoothDeviceName; data['publicKey'] = publicKey; data['privateKey'] = privateKey; data['signKey'] = signKey; return data; } }