import 'notification.m.dart'; import 'package:fis_jsonrpc/utils.dart'; class DeployPlatServerInfoDTO extends BaseDTO{ String? id; String? serverID; String? ip; String? name; bool isMaster; String? masterServerId; String? logs; String? remoteServerIp; DeployPlatServerInfoDTO({ this.id, this.serverID, this.ip, this.name, this.isMaster = false, this.masterServerId, this.logs, this.remoteServerIp, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory DeployPlatServerInfoDTO.fromJson(Map map) { return DeployPlatServerInfoDTO( id: map['Id'], serverID: map['ServerID'], ip: map['Ip'], name: map['Name'], isMaster: map['IsMaster'], masterServerId: map['MasterServerId'], logs: map['Logs'], remoteServerIp: map['RemoteServerIp'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if (id != null) map['Id'] = id; if (serverID != null) map['ServerID'] = serverID; if (ip != null) map['Ip'] = ip; if (name != null) map['Name'] = name; map['IsMaster'] = isMaster; if (masterServerId != null) map['MasterServerId'] = masterServerId; if (logs != null) map['Logs'] = logs; if (remoteServerIp != null) map['RemoteServerIp'] = remoteServerIp; return map; } } class AddServerRequest { String? serverID; String? ip; String? name; bool isMaster; String? masterServerId; String? remoteServerIp; AddServerRequest({ this.serverID, this.ip, this.name, this.isMaster = false, this.masterServerId, this.remoteServerIp, }); factory AddServerRequest.fromJson(Map map) { return AddServerRequest( serverID: map['ServerID'], ip: map['Ip'], name: map['Name'], isMaster: map['IsMaster'], masterServerId: map['MasterServerId'], remoteServerIp: map['RemoteServerIp'], ); } Map toJson() { final map = Map(); if (serverID != null) { map['ServerID'] = serverID; } if (ip != null) { map['Ip'] = ip; } if (name != null) { map['Name'] = name; } map['IsMaster'] = isMaster; if (masterServerId != null) { map['MasterServerId'] = masterServerId; } if (remoteServerIp != null) { map['RemoteServerIp'] = remoteServerIp; } return map; } } class UpdateServerRequest { String? id; String? serverID; String? ip; String? name; bool isMaster; String? masterServerId; String? remoteServerIp; UpdateServerRequest({ this.id, this.serverID, this.ip, this.name, this.isMaster = false, this.masterServerId, this.remoteServerIp, }); factory UpdateServerRequest.fromJson(Map map) { return UpdateServerRequest( id: map['Id'], serverID: map['ServerID'], ip: map['Ip'], name: map['Name'], isMaster: map['IsMaster'], masterServerId: map['MasterServerId'], remoteServerIp: map['RemoteServerIp'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (serverID != null) { map['ServerID'] = serverID; } if (ip != null) { map['Ip'] = ip; } if (name != null) { map['Name'] = name; } map['IsMaster'] = isMaster; if (masterServerId != null) { map['MasterServerId'] = masterServerId; } if (remoteServerIp != null) { map['RemoteServerIp'] = remoteServerIp; } return map; } } class SaveLogsRequest { String? id; String? logs; SaveLogsRequest({ this.id, this.logs, }); factory SaveLogsRequest.fromJson(Map map) { return SaveLogsRequest( id: map['Id'], logs: map['Logs'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (logs != null) { map['Logs'] = logs; } return map; } } class GetServerRequest { String? id; GetServerRequest({ this.id, }); factory GetServerRequest.fromJson(Map map) { return GetServerRequest( id: map['Id'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } return map; } } enum DeployPlatOperatorStatusEnum { Inactive, Active, } class DeployPlatOperatorDTO extends BaseDTO{ String? id; String? name; DeployPlatOperatorStatusEnum status; DeployPlatOperatorDTO({ this.id, this.name, this.status = DeployPlatOperatorStatusEnum.Inactive, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory DeployPlatOperatorDTO.fromJson(Map map) { return DeployPlatOperatorDTO( id: map['Id'], name: map['Name'], status: DeployPlatOperatorStatusEnum.values.firstWhere((e) => e.index == map['Status']), createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if (id != null) map['Id'] = id; if (name != null) map['Name'] = name; map['Status'] = status.index; return map; } } enum DeployDeviceEnum { PC, Android, Mac, } class DeployRecordUpgradeInfoDTO extends BaseDTO{ String? id; DeployDeviceEnum deviceType; String? language; String? describe; DeployRecordUpgradeInfoDTO({ this.id, this.deviceType = DeployDeviceEnum.PC, this.language, this.describe, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory DeployRecordUpgradeInfoDTO.fromJson(Map map) { return DeployRecordUpgradeInfoDTO( id: map['Id'], deviceType: DeployDeviceEnum.values.firstWhere((e) => e.index == map['DeviceType']), language: map['Language'], describe: map['Describe'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if (id != null) map['Id'] = id; map['DeviceType'] = deviceType.index; if (language != null) map['Language'] = language; if (describe != null) map['Describe'] = describe; return map; } } class DeployRecordInfoDTO extends BaseDTO{ String? id; String? version; String? releasedBy; String? internalRecord; bool inProcess; String? generatePackageJson; String? packageLogs; DateTime? lastPackageTime; List? upgradeInfos; String? deployToolDownloadUrl; String? ugradeFilesDownloadUrl; DeployRecordInfoDTO({ this.id, this.version, this.releasedBy, this.internalRecord, this.inProcess = false, this.generatePackageJson, this.packageLogs, this.lastPackageTime, this.upgradeInfos, this.deployToolDownloadUrl, this.ugradeFilesDownloadUrl, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory DeployRecordInfoDTO.fromJson(Map map) { return DeployRecordInfoDTO( id: map['Id'], version: map['Version'], releasedBy: map['ReleasedBy'], internalRecord: map['InternalRecord'], inProcess: map['InProcess'], generatePackageJson: map['GeneratePackageJson'], packageLogs: map['PackageLogs'], lastPackageTime: map['LastPackageTime'] != null ? DateTime.parse(map['LastPackageTime']) : null, upgradeInfos: map['UpgradeInfos'] != null ? (map['UpgradeInfos'] as List).map((e)=>DeployRecordUpgradeInfoDTO.fromJson(e as Map)).toList() : null, deployToolDownloadUrl: map['DeployToolDownloadUrl'], ugradeFilesDownloadUrl: map['UgradeFilesDownloadUrl'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if (id != null) map['Id'] = id; if (version != null) map['Version'] = version; if (releasedBy != null) map['ReleasedBy'] = releasedBy; if (internalRecord != null) map['InternalRecord'] = internalRecord; map['InProcess'] = inProcess; if (generatePackageJson != null) map['GeneratePackageJson'] = generatePackageJson; if (packageLogs != null) map['PackageLogs'] = packageLogs; if (lastPackageTime != null) map['LastPackageTime'] = JsonRpcUtils.dateFormat(lastPackageTime!); if (upgradeInfos != null) map['UpgradeInfos'] = upgradeInfos; if (deployToolDownloadUrl != null) map['DeployToolDownloadUrl'] = deployToolDownloadUrl; if (ugradeFilesDownloadUrl != null) map['UgradeFilesDownloadUrl'] = ugradeFilesDownloadUrl; return map; } } class GetDeployRecordRequest { int deployYear; GetDeployRecordRequest({ this.deployYear = 0, }); factory GetDeployRecordRequest.fromJson(Map map) { return GetDeployRecordRequest( deployYear: map['DeployYear'], ); } Map toJson() { final map = Map(); map['DeployYear'] = deployYear; return map; } } class SaveDeployRecordRequest { String? id; String? version; String? releasedBy; String? internalRecord; List? upgradeInfos; SaveDeployRecordRequest({ this.id, this.version, this.releasedBy, this.internalRecord, this.upgradeInfos, }); factory SaveDeployRecordRequest.fromJson(Map map) { return SaveDeployRecordRequest( id: map['Id'], version: map['Version'], releasedBy: map['ReleasedBy'], internalRecord: map['InternalRecord'], upgradeInfos: map['UpgradeInfos'] != null ? (map['UpgradeInfos'] as List).map((e)=>DeployRecordUpgradeInfoDTO.fromJson(e as Map)).toList() : null, ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (version != null) { map['Version'] = version; } if (releasedBy != null) { map['ReleasedBy'] = releasedBy; } if (internalRecord != null) { map['InternalRecord'] = internalRecord; } if (upgradeInfos != null) { map['UpgradeInfos'] = upgradeInfos; } return map; } } class RemoveDeployRecordRequest { String? id; RemoveDeployRecordRequest({ this.id, }); factory RemoveDeployRecordRequest.fromJson(Map map) { return RemoveDeployRecordRequest( id: map['Id'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } return map; } } class AddDeployPlatOperatorRequest { String? name; DeployPlatOperatorStatusEnum status; AddDeployPlatOperatorRequest({ this.name, this.status = DeployPlatOperatorStatusEnum.Inactive, }); factory AddDeployPlatOperatorRequest.fromJson(Map map) { return AddDeployPlatOperatorRequest( name: map['Name'], status: DeployPlatOperatorStatusEnum.values.firstWhere((e) => e.index == map['Status']), ); } Map toJson() { final map = Map(); if (name != null) { map['Name'] = name; } map['Status'] = status.index; return map; } } class ModifyDeployPlatOperatorRequest { String? id; String? name; DeployPlatOperatorStatusEnum status; ModifyDeployPlatOperatorRequest({ this.id, this.name, this.status = DeployPlatOperatorStatusEnum.Inactive, }); factory ModifyDeployPlatOperatorRequest.fromJson(Map map) { return ModifyDeployPlatOperatorRequest( id: map['Id'], name: map['Name'], status: DeployPlatOperatorStatusEnum.values.firstWhere((e) => e.index == map['Status']), ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } if (name != null) { map['Name'] = name; } map['Status'] = status.index; return map; } } class DeleteDeployPlatOperatorRequest { String? id; DeleteDeployPlatOperatorRequest({ this.id, }); factory DeleteDeployPlatOperatorRequest.fromJson(Map map) { return DeleteDeployPlatOperatorRequest( id: map['Id'], ); } Map toJson() { final map = Map(); if (id != null) { map['Id'] = id; } return map; } } enum DeployPlatLoginResultEnum { Ok, WrongAccountName, WrongPassword, AccountInActive, Unknown, } class OperatorLoginRequest { String? name; String? password; OperatorLoginRequest({ this.name, this.password, }); factory OperatorLoginRequest.fromJson(Map map) { return OperatorLoginRequest( name: map['Name'], password: map['Password'], ); } Map toJson() { final map = Map(); if (name != null) { map['Name'] = name; } if (password != null) { map['Password'] = password; } return map; } } class FindTextWithUrlAndPrefixRequest { String? url; String? prefix; FindTextWithUrlAndPrefixRequest({ this.url, this.prefix, }); factory FindTextWithUrlAndPrefixRequest.fromJson(Map map) { return FindTextWithUrlAndPrefixRequest( url: map['Url'], prefix: map['Prefix'], ); } Map toJson() { final map = Map(); if (url != null) { map['Url'] = url; } if (prefix != null) { map['Prefix'] = prefix; } return map; } } class GeneratePackageRequest { String? deployRecordId; bool isCreateDeployTool; bool isIncludeLocalPackage; bool isServerSelected; bool isPCClientSelected; bool isAndroidClientSelected; bool isSonoPostSelected; bool isWindowsFISSDKSelected; String? selectedServerZipUrl; String? selectedPCClientZipUrl; String? selectedAndroidClientZipUrl; String? selectedSonoPostZipUrl; String? selectedWindowsFISSDKZipUrl; String? language; GeneratePackageRequest({ this.deployRecordId, this.isCreateDeployTool = false, this.isIncludeLocalPackage = false, this.isServerSelected = false, this.isPCClientSelected = false, this.isAndroidClientSelected = false, this.isSonoPostSelected = false, this.isWindowsFISSDKSelected = false, this.selectedServerZipUrl, this.selectedPCClientZipUrl, this.selectedAndroidClientZipUrl, this.selectedSonoPostZipUrl, this.selectedWindowsFISSDKZipUrl, this.language, }); factory GeneratePackageRequest.fromJson(Map map) { return GeneratePackageRequest( deployRecordId: map['DeployRecordId'], isCreateDeployTool: map['IsCreateDeployTool'], isIncludeLocalPackage: map['IsIncludeLocalPackage'], isServerSelected: map['IsServerSelected'], isPCClientSelected: map['IsPCClientSelected'], isAndroidClientSelected: map['IsAndroidClientSelected'], isSonoPostSelected: map['IsSonoPostSelected'], isWindowsFISSDKSelected: map['IsWindowsFISSDKSelected'], selectedServerZipUrl: map['SelectedServerZipUrl'], selectedPCClientZipUrl: map['SelectedPCClientZipUrl'], selectedAndroidClientZipUrl: map['SelectedAndroidClientZipUrl'], selectedSonoPostZipUrl: map['SelectedSonoPostZipUrl'], selectedWindowsFISSDKZipUrl: map['SelectedWindowsFISSDKZipUrl'], language: map['Language'], ); } Map toJson() { final map = Map(); if (deployRecordId != null) { map['DeployRecordId'] = deployRecordId; } map['IsCreateDeployTool'] = isCreateDeployTool; map['IsIncludeLocalPackage'] = isIncludeLocalPackage; map['IsServerSelected'] = isServerSelected; map['IsPCClientSelected'] = isPCClientSelected; map['IsAndroidClientSelected'] = isAndroidClientSelected; map['IsSonoPostSelected'] = isSonoPostSelected; map['IsWindowsFISSDKSelected'] = isWindowsFISSDKSelected; if (selectedServerZipUrl != null) { map['SelectedServerZipUrl'] = selectedServerZipUrl; } if (selectedPCClientZipUrl != null) { map['SelectedPCClientZipUrl'] = selectedPCClientZipUrl; } if (selectedAndroidClientZipUrl != null) { map['SelectedAndroidClientZipUrl'] = selectedAndroidClientZipUrl; } if (selectedSonoPostZipUrl != null) { map['SelectedSonoPostZipUrl'] = selectedSonoPostZipUrl; } if (selectedWindowsFISSDKZipUrl != null) { map['SelectedWindowsFISSDKZipUrl'] = selectedWindowsFISSDKZipUrl; } if (language != null) { map['Language'] = language; } return map; } } class UploadTotargetServerRequest { String? serverInfoId; String? recordId; UploadTotargetServerRequest({ this.serverInfoId, this.recordId, }); factory UploadTotargetServerRequest.fromJson(Map map) { return UploadTotargetServerRequest( serverInfoId: map['ServerInfoId'], recordId: map['RecordId'], ); } Map toJson() { final map = Map(); if (serverInfoId != null) { map['ServerInfoId'] = serverInfoId; } if (recordId != null) { map['RecordId'] = recordId; } return map; } } class GetPackageRequest { String? deployRecordId; GetPackageRequest({ this.deployRecordId, }); factory GetPackageRequest.fromJson(Map map) { return GetPackageRequest( deployRecordId: map['DeployRecordId'], ); } Map toJson() { final map = Map(); if (deployRecordId != null) { map['DeployRecordId'] = deployRecordId; } return map; } } class CancelPackagingRequest { String? deployRecordId; CancelPackagingRequest({ this.deployRecordId, }); factory CancelPackagingRequest.fromJson(Map map) { return CancelPackagingRequest( deployRecordId: map['DeployRecordId'], ); } Map toJson() { final map = Map(); if (deployRecordId != null) { map['DeployRecordId'] = deployRecordId; } return map; } } class ReadAppSettingsJsonRequest { int settingType; ReadAppSettingsJsonRequest({ this.settingType = 0, }); factory ReadAppSettingsJsonRequest.fromJson(Map map) { return ReadAppSettingsJsonRequest( settingType: map['SettingType'], ); } Map toJson() { final map = Map(); map['SettingType'] = settingType; return map; } } class ModifyAppSettingsJsonRequest { int settingType; String? json; ModifyAppSettingsJsonRequest({ this.settingType = 0, this.json, }); factory ModifyAppSettingsJsonRequest.fromJson(Map map) { return ModifyAppSettingsJsonRequest( settingType: map['SettingType'], json: map['Json'], ); } Map toJson() { final map = Map(); map['SettingType'] = settingType; if (json != null) { map['Json'] = json; } return map; } } class DeployRequest { bool isUpgradeServer; String? serverZipUrl; bool isUpgradeClient; String? openWebUrl; String? clientWebUrl; String? upgradeSettings; DeployRequest({ this.isUpgradeServer = false, this.serverZipUrl, this.isUpgradeClient = false, this.openWebUrl, this.clientWebUrl, this.upgradeSettings, }); factory DeployRequest.fromJson(Map map) { return DeployRequest( isUpgradeServer: map['IsUpgradeServer'], serverZipUrl: map['ServerZipUrl'], isUpgradeClient: map['IsUpgradeClient'], openWebUrl: map['OpenWebUrl'], clientWebUrl: map['ClientWebUrl'], upgradeSettings: map['UpgradeSettings'], ); } Map toJson() { final map = Map(); map['IsUpgradeServer'] = isUpgradeServer; if (serverZipUrl != null) { map['ServerZipUrl'] = serverZipUrl; } map['IsUpgradeClient'] = isUpgradeClient; if (openWebUrl != null) { map['OpenWebUrl'] = openWebUrl; } if (clientWebUrl != null) { map['ClientWebUrl'] = clientWebUrl; } if (upgradeSettings != null) { map['UpgradeSettings'] = upgradeSettings; } return map; } }