device.m.dart 97 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837
  1. import 'notification.m.dart';
  2. import 'liveConsultation.m.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. class GetDevicePrintersForUploadRequest extends TokenRequest{
  5. String? deviceCode;
  6. GetDevicePrintersForUploadRequest({
  7. this.deviceCode,
  8. String? token,
  9. }) : super(
  10. token: token,
  11. );
  12. factory GetDevicePrintersForUploadRequest.fromJson(Map<String, dynamic> map) {
  13. return GetDevicePrintersForUploadRequest(
  14. deviceCode: map['DeviceCode'],
  15. token: map['Token'],
  16. );
  17. }
  18. Map<String, dynamic> toJson() {
  19. final map = super.toJson();
  20. if(deviceCode != null)
  21. map['DeviceCode'] = deviceCode;
  22. return map;
  23. }
  24. }
  25. class ExistsDevicePrinterRequest extends TokenRequest{
  26. String? name;
  27. ExistsDevicePrinterRequest({
  28. this.name,
  29. String? token,
  30. }) : super(
  31. token: token,
  32. );
  33. factory ExistsDevicePrinterRequest.fromJson(Map<String, dynamic> map) {
  34. return ExistsDevicePrinterRequest(
  35. name: map['Name'],
  36. token: map['Token'],
  37. );
  38. }
  39. Map<String, dynamic> toJson() {
  40. final map = super.toJson();
  41. if(name != null)
  42. map['Name'] = name;
  43. return map;
  44. }
  45. }
  46. class MigrateDevicePrinterInfo extends DevicePrinterDTO{
  47. bool isDelete;
  48. MigrateDevicePrinterInfo({
  49. this.isDelete = false,
  50. DateTime? createTime,
  51. DateTime? updateTime,
  52. String? code,
  53. String? name,
  54. String? driveModelName,
  55. String? description,
  56. String? osVersion,
  57. List<UploadDeviceFileInfoDTO >? fileUploadInfoList,
  58. int fileSize = 0,
  59. String? printerBrands,
  60. List<String >? printerModels,
  61. String? fileName,
  62. }) : super(
  63. code: code,
  64. name: name,
  65. driveModelName: driveModelName,
  66. description: description,
  67. osVersion: osVersion,
  68. fileUploadInfoList: fileUploadInfoList,
  69. fileSize: fileSize,
  70. printerBrands: printerBrands,
  71. printerModels: printerModels,
  72. fileName: fileName,
  73. createTime: createTime,
  74. updateTime: updateTime,
  75. );
  76. factory MigrateDevicePrinterInfo.fromJson(Map<String, dynamic> map) {
  77. return MigrateDevicePrinterInfo(
  78. isDelete: map['IsDelete'],
  79. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  80. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  81. code: map['Code'],
  82. name: map['Name'],
  83. driveModelName: map['DriveModelName'],
  84. description: map['Description'],
  85. osVersion: map['OsVersion'],
  86. fileUploadInfoList: map['FileUploadInfoList'] != null ? (map['FileUploadInfoList'] as List).map((e)=>UploadDeviceFileInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  87. fileSize: map['FileSize'],
  88. printerBrands: map['PrinterBrands'],
  89. printerModels: map['PrinterModels'] != null ? map['PrinterModels'].cast<String>().toList() : null,
  90. fileName: map['FileName'],
  91. );
  92. }
  93. Map<String, dynamic> toJson() {
  94. final map = super.toJson();
  95. map['IsDelete'] = isDelete;
  96. return map;
  97. }
  98. }
  99. class MigrateDevicePrinterRequest extends TokenRequest{
  100. List<MigrateDevicePrinterInfo >? migrateDevicePrinterInfos;
  101. MigrateDevicePrinterRequest({
  102. this.migrateDevicePrinterInfos,
  103. String? token,
  104. }) : super(
  105. token: token,
  106. );
  107. factory MigrateDevicePrinterRequest.fromJson(Map<String, dynamic> map) {
  108. return MigrateDevicePrinterRequest(
  109. migrateDevicePrinterInfos: map['MigrateDevicePrinterInfos'] != null ? (map['MigrateDevicePrinterInfos'] as List).map((e)=>MigrateDevicePrinterInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  110. token: map['Token'],
  111. );
  112. }
  113. Map<String, dynamic> toJson() {
  114. final map = super.toJson();
  115. if(migrateDevicePrinterInfos != null)
  116. map['MigrateDevicePrinterInfos'] = migrateDevicePrinterInfos;
  117. return map;
  118. }
  119. }
  120. class DictionaryLanguageConfigDTO {
  121. String? language;
  122. String? value;
  123. DictionaryLanguageConfigDTO({
  124. this.language,
  125. this.value,
  126. });
  127. factory DictionaryLanguageConfigDTO.fromJson(Map<String, dynamic> map) {
  128. return DictionaryLanguageConfigDTO(
  129. language: map['Language'],
  130. value: map['Value'],
  131. );
  132. }
  133. Map<String, dynamic> toJson() {
  134. final map = Map<String, dynamic>();
  135. if(language != null)
  136. map['Language'] = language;
  137. if(value != null)
  138. map['Value'] = value;
  139. return map;
  140. }
  141. }
  142. class DeviceExtendInfoDTO extends DeviceInfoDTO{
  143. String? organizationName;
  144. String? departmentName;
  145. bool isOnline;
  146. bool isLiving;
  147. String? organizationDirectorCode;
  148. String? organizationDirectorUserName;
  149. String? organizationDirectorFullName;
  150. List<DictionaryLanguageConfigDTO >? languageConfigs;
  151. bool isEmergencyDevice;
  152. DeviceExtendInfoDTO({
  153. this.organizationName,
  154. this.departmentName,
  155. this.isOnline = false,
  156. this.isLiving = false,
  157. this.organizationDirectorCode,
  158. this.organizationDirectorUserName,
  159. this.organizationDirectorFullName,
  160. this.languageConfigs,
  161. this.isEmergencyDevice = false,
  162. String? deviceCode,
  163. String? serialNumber,
  164. String? password,
  165. String? name,
  166. String? description,
  167. String? deviceModel,
  168. String? deviceType,
  169. String? headPicUrl,
  170. String? deviceSoftwareVersion,
  171. String? sDKSoftwareVersion,
  172. String? organizationCode,
  173. String? departmentCode,
  174. String? shortCode,
  175. bool isAutoShared = false,
  176. bool isEncryptedShow = false,
  177. DateTime? lastLoginTime,
  178. String? systemVersion,
  179. String? cPUModel,
  180. String? systemLanguage,
  181. List<String >? diagnosisModules,
  182. List<String >? reportPosterCodes,
  183. bool mergedChannel = false,
  184. int mergedVideoOutputWidth = 0,
  185. int mergedVideoOutputHeight = 0,
  186. List<VideoDeviceDTO >? videoDeviceInfos,
  187. DownloadModeSettingEnum downloadModeSetting = DownloadModeSettingEnum.Auto,
  188. bool liveOpened = false,
  189. String? displayName,
  190. DateTime? createTime,
  191. DateTime? updateTime,
  192. }) : super(
  193. deviceCode: deviceCode,
  194. serialNumber: serialNumber,
  195. password: password,
  196. name: name,
  197. description: description,
  198. deviceModel: deviceModel,
  199. deviceType: deviceType,
  200. headPicUrl: headPicUrl,
  201. deviceSoftwareVersion: deviceSoftwareVersion,
  202. sDKSoftwareVersion: sDKSoftwareVersion,
  203. organizationCode: organizationCode,
  204. departmentCode: departmentCode,
  205. shortCode: shortCode,
  206. isAutoShared: isAutoShared,
  207. isEncryptedShow: isEncryptedShow,
  208. lastLoginTime: lastLoginTime,
  209. systemVersion: systemVersion,
  210. cPUModel: cPUModel,
  211. systemLanguage: systemLanguage,
  212. diagnosisModules: diagnosisModules,
  213. reportPosterCodes: reportPosterCodes,
  214. mergedChannel: mergedChannel,
  215. mergedVideoOutputWidth: mergedVideoOutputWidth,
  216. mergedVideoOutputHeight: mergedVideoOutputHeight,
  217. videoDeviceInfos: videoDeviceInfos,
  218. downloadModeSetting: downloadModeSetting,
  219. liveOpened: liveOpened,
  220. displayName: displayName,
  221. createTime: createTime,
  222. updateTime: updateTime,
  223. );
  224. factory DeviceExtendInfoDTO.fromJson(Map<String, dynamic> map) {
  225. return DeviceExtendInfoDTO(
  226. organizationName: map['OrganizationName'],
  227. departmentName: map['DepartmentName'],
  228. isOnline: map['IsOnline'],
  229. isLiving: map['IsLiving'],
  230. organizationDirectorCode: map['OrganizationDirectorCode'],
  231. organizationDirectorUserName: map['OrganizationDirectorUserName'],
  232. organizationDirectorFullName: map['OrganizationDirectorFullName'],
  233. languageConfigs: map['LanguageConfigs'] != null ? (map['LanguageConfigs'] as List).map((e)=>DictionaryLanguageConfigDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  234. isEmergencyDevice: map['IsEmergencyDevice'],
  235. deviceCode: map['DeviceCode'],
  236. serialNumber: map['SerialNumber'],
  237. password: map['Password'],
  238. name: map['Name'],
  239. description: map['Description'],
  240. deviceModel: map['DeviceModel'],
  241. deviceType: map['DeviceType'],
  242. headPicUrl: map['HeadPicUrl'],
  243. deviceSoftwareVersion: map['DeviceSoftwareVersion'],
  244. sDKSoftwareVersion: map['SDKSoftwareVersion'],
  245. organizationCode: map['OrganizationCode'],
  246. departmentCode: map['DepartmentCode'],
  247. shortCode: map['ShortCode'],
  248. isAutoShared: map['IsAutoShared'],
  249. isEncryptedShow: map['IsEncryptedShow'],
  250. lastLoginTime: map['LastLoginTime'] != null ? DateTime.parse(map['LastLoginTime']) : null,
  251. systemVersion: map['SystemVersion'],
  252. cPUModel: map['CPUModel'],
  253. systemLanguage: map['SystemLanguage'],
  254. diagnosisModules: map['DiagnosisModules'] != null ? map['DiagnosisModules'].cast<String>().toList() : null,
  255. reportPosterCodes: map['ReportPosterCodes'] != null ? map['ReportPosterCodes'].cast<String>().toList() : null,
  256. mergedChannel: map['MergedChannel'],
  257. mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
  258. mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
  259. videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  260. downloadModeSetting: DownloadModeSettingEnum.values.firstWhere((e) => e.index == map['DownloadModeSetting']),
  261. liveOpened: map['LiveOpened'],
  262. displayName: map['DisplayName'],
  263. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  264. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  265. );
  266. }
  267. Map<String, dynamic> toJson() {
  268. final map = super.toJson();
  269. if(organizationName != null)
  270. map['OrganizationName'] = organizationName;
  271. if(departmentName != null)
  272. map['DepartmentName'] = departmentName;
  273. map['IsOnline'] = isOnline;
  274. map['IsLiving'] = isLiving;
  275. if(organizationDirectorCode != null)
  276. map['OrganizationDirectorCode'] = organizationDirectorCode;
  277. if(organizationDirectorUserName != null)
  278. map['OrganizationDirectorUserName'] = organizationDirectorUserName;
  279. if(organizationDirectorFullName != null)
  280. map['OrganizationDirectorFullName'] = organizationDirectorFullName;
  281. if(languageConfigs != null)
  282. map['LanguageConfigs'] = languageConfigs;
  283. map['IsEmergencyDevice'] = isEmergencyDevice;
  284. return map;
  285. }
  286. }
  287. class PageCollection<T> {
  288. int currentPage;
  289. int pageSize;
  290. int dataCount;
  291. List<T>? pageData;
  292. PageCollection({
  293. this.currentPage = 0,
  294. this.pageSize = 0,
  295. this.dataCount = 0,
  296. this.pageData,
  297. });
  298. factory PageCollection.fromJson(Map<String, dynamic> map) {
  299. List<T> pageDataList = [];
  300. if (map['PageData'] != null) {
  301. pageDataList.addAll(
  302. (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
  303. }
  304. return PageCollection(
  305. currentPage: map['CurrentPage'],
  306. pageSize: map['PageSize'],
  307. dataCount: map['DataCount'],
  308. pageData: pageDataList,
  309. );
  310. }
  311. Map<String, dynamic> toJson() {
  312. final map = Map<String, dynamic>();
  313. map['CurrentPage'] = currentPage;
  314. map['PageSize'] = pageSize;
  315. map['DataCount'] = dataCount;
  316. if(pageData != null)
  317. map['PageData'] = pageData;
  318. return map;
  319. }
  320. }
  321. class GetPersonDeviceRequest extends PageRequest{
  322. String? keyWord;
  323. String? deviceType;
  324. String? deviceModel;
  325. List<String >? organizationCodes;
  326. bool? isOnline;
  327. GetPersonDeviceRequest({
  328. this.keyWord,
  329. this.deviceType,
  330. this.deviceModel,
  331. this.organizationCodes,
  332. this.isOnline,
  333. int pageIndex = 0,
  334. int pageSize = 0,
  335. String? token,
  336. }) : super(
  337. pageIndex: pageIndex,
  338. pageSize: pageSize,
  339. token: token,
  340. );
  341. factory GetPersonDeviceRequest.fromJson(Map<String, dynamic> map) {
  342. return GetPersonDeviceRequest(
  343. keyWord: map['KeyWord'],
  344. deviceType: map['DeviceType'],
  345. deviceModel: map['DeviceModel'],
  346. organizationCodes: map['OrganizationCodes'] != null ? map['OrganizationCodes'].cast<String>().toList() : null,
  347. isOnline: map['IsOnline'],
  348. pageIndex: map['PageIndex'],
  349. pageSize: map['PageSize'],
  350. token: map['Token'],
  351. );
  352. }
  353. Map<String, dynamic> toJson() {
  354. final map = super.toJson();
  355. if(keyWord != null)
  356. map['KeyWord'] = keyWord;
  357. if(deviceType != null)
  358. map['DeviceType'] = deviceType;
  359. if(deviceModel != null)
  360. map['DeviceModel'] = deviceModel;
  361. if(organizationCodes != null)
  362. map['OrganizationCodes'] = organizationCodes;
  363. if(isOnline != null)
  364. map['IsOnline'] = isOnline;
  365. return map;
  366. }
  367. }
  368. class SelectItemDTO {
  369. String? key;
  370. String? value;
  371. SelectItemDTO({
  372. this.key,
  373. this.value,
  374. });
  375. factory SelectItemDTO.fromJson(Map<String, dynamic> map) {
  376. return SelectItemDTO(
  377. key: map['Key'],
  378. value: map['Value'],
  379. );
  380. }
  381. Map<String, dynamic> toJson() {
  382. final map = Map<String, dynamic>();
  383. if(key != null)
  384. map['Key'] = key;
  385. if(value != null)
  386. map['Value'] = value;
  387. return map;
  388. }
  389. }
  390. class GetPersonDeviceDropdownPageRequest extends PageRequest{
  391. String? keyWord;
  392. List<String >? restrictOrgCodes;
  393. GetPersonDeviceDropdownPageRequest({
  394. this.keyWord,
  395. this.restrictOrgCodes,
  396. int pageIndex = 0,
  397. int pageSize = 0,
  398. String? token,
  399. }) : super(
  400. pageIndex: pageIndex,
  401. pageSize: pageSize,
  402. token: token,
  403. );
  404. factory GetPersonDeviceDropdownPageRequest.fromJson(Map<String, dynamic> map) {
  405. return GetPersonDeviceDropdownPageRequest(
  406. keyWord: map['KeyWord'],
  407. restrictOrgCodes: map['RestrictOrgCodes'] != null ? map['RestrictOrgCodes'].cast<String>().toList() : null,
  408. pageIndex: map['PageIndex'],
  409. pageSize: map['PageSize'],
  410. token: map['Token'],
  411. );
  412. }
  413. Map<String, dynamic> toJson() {
  414. final map = super.toJson();
  415. if(keyWord != null)
  416. map['KeyWord'] = keyWord;
  417. if(restrictOrgCodes != null)
  418. map['RestrictOrgCodes'] = restrictOrgCodes;
  419. return map;
  420. }
  421. }
  422. class UploadDeviceDTO extends BaseDTO{
  423. String? serialNumber;
  424. String? deviceModel;
  425. String? deviceType;
  426. String? deviceSoftwareVersion;
  427. String? sDKSoftwareVersion;
  428. UploadDeviceDTO({
  429. this.serialNumber,
  430. this.deviceModel,
  431. this.deviceType,
  432. this.deviceSoftwareVersion,
  433. this.sDKSoftwareVersion,
  434. DateTime? createTime,
  435. DateTime? updateTime,
  436. }) : super(
  437. createTime: createTime,
  438. updateTime: updateTime,
  439. );
  440. factory UploadDeviceDTO.fromJson(Map<String, dynamic> map) {
  441. return UploadDeviceDTO(
  442. serialNumber: map['SerialNumber'],
  443. deviceModel: map['DeviceModel'],
  444. deviceType: map['DeviceType'],
  445. deviceSoftwareVersion: map['DeviceSoftwareVersion'],
  446. sDKSoftwareVersion: map['SDKSoftwareVersion'],
  447. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  448. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  449. );
  450. }
  451. Map<String, dynamic> toJson() {
  452. final map = super.toJson();
  453. if(serialNumber != null)
  454. map['SerialNumber'] = serialNumber;
  455. if(deviceModel != null)
  456. map['DeviceModel'] = deviceModel;
  457. if(deviceType != null)
  458. map['DeviceType'] = deviceType;
  459. if(deviceSoftwareVersion != null)
  460. map['DeviceSoftwareVersion'] = deviceSoftwareVersion;
  461. if(sDKSoftwareVersion != null)
  462. map['SDKSoftwareVersion'] = sDKSoftwareVersion;
  463. return map;
  464. }
  465. }
  466. class CreateDeviceRequest extends UploadDeviceDTO{
  467. CreateDeviceRequest({
  468. String? serialNumber,
  469. String? deviceModel,
  470. String? deviceType,
  471. String? deviceSoftwareVersion,
  472. String? sDKSoftwareVersion,
  473. DateTime? createTime,
  474. DateTime? updateTime,
  475. }) : super(
  476. serialNumber: serialNumber,
  477. deviceModel: deviceModel,
  478. deviceType: deviceType,
  479. deviceSoftwareVersion: deviceSoftwareVersion,
  480. sDKSoftwareVersion: sDKSoftwareVersion,
  481. createTime: createTime,
  482. updateTime: updateTime,
  483. );
  484. factory CreateDeviceRequest.fromJson(Map<String, dynamic> map) {
  485. return CreateDeviceRequest(
  486. serialNumber: map['SerialNumber'],
  487. deviceModel: map['DeviceModel'],
  488. deviceType: map['DeviceType'],
  489. deviceSoftwareVersion: map['DeviceSoftwareVersion'],
  490. sDKSoftwareVersion: map['SDKSoftwareVersion'],
  491. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  492. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  493. );
  494. }
  495. Map<String, dynamic> toJson() {
  496. final map = super.toJson();
  497. return map;
  498. }
  499. }
  500. class GetDeviceRequest extends TokenRequest{
  501. String? deviceCode;
  502. bool isNeedSyn;
  503. GetDeviceRequest({
  504. this.deviceCode,
  505. this.isNeedSyn = false,
  506. String? token,
  507. }) : super(
  508. token: token,
  509. );
  510. factory GetDeviceRequest.fromJson(Map<String, dynamic> map) {
  511. return GetDeviceRequest(
  512. deviceCode: map['DeviceCode'],
  513. isNeedSyn: map['IsNeedSyn'],
  514. token: map['Token'],
  515. );
  516. }
  517. Map<String, dynamic> toJson() {
  518. final map = super.toJson();
  519. if(deviceCode != null)
  520. map['DeviceCode'] = deviceCode;
  521. map['IsNeedSyn'] = isNeedSyn;
  522. return map;
  523. }
  524. }
  525. class GetDeviceByShortCodeRequest extends TokenRequest{
  526. String? shortCode;
  527. GetDeviceByShortCodeRequest({
  528. this.shortCode,
  529. String? token,
  530. }) : super(
  531. token: token,
  532. );
  533. factory GetDeviceByShortCodeRequest.fromJson(Map<String, dynamic> map) {
  534. return GetDeviceByShortCodeRequest(
  535. shortCode: map['ShortCode'],
  536. token: map['Token'],
  537. );
  538. }
  539. Map<String, dynamic> toJson() {
  540. final map = super.toJson();
  541. if(shortCode != null)
  542. map['ShortCode'] = shortCode;
  543. return map;
  544. }
  545. }
  546. class PageFilterRequest extends BaseRequest{
  547. int currentPage;
  548. int pageSize;
  549. Map<String,String>? filter;
  550. bool isFuzzy;
  551. PageFilterRequest({
  552. this.currentPage = 0,
  553. this.pageSize = 0,
  554. this.filter,
  555. this.isFuzzy = false,
  556. }) : super(
  557. );
  558. factory PageFilterRequest.fromJson(Map<String, dynamic> map) {
  559. return PageFilterRequest(
  560. currentPage: map['CurrentPage'],
  561. pageSize: map['PageSize'],
  562. filter: map['Filter'] != null ? map['Filter'].cast<String,String>() : null,
  563. isFuzzy: map['IsFuzzy'],
  564. );
  565. }
  566. Map<String, dynamic> toJson() {
  567. final map = super.toJson();
  568. map['CurrentPage'] = currentPage;
  569. map['PageSize'] = pageSize;
  570. if(filter != null)
  571. map['Filter'] = filter;
  572. map['IsFuzzy'] = isFuzzy;
  573. return map;
  574. }
  575. }
  576. class BindDeviceRequest extends TokenRequest{
  577. String? serialNumber;
  578. String? name;
  579. String? description;
  580. String? headPicUrl;
  581. String? organizationCode;
  582. String? departmentCode;
  583. String? shortCode;
  584. bool isAutoShared;
  585. BindDeviceRequest({
  586. this.serialNumber,
  587. this.name,
  588. this.description,
  589. this.headPicUrl,
  590. this.organizationCode,
  591. this.departmentCode,
  592. this.shortCode,
  593. this.isAutoShared = false,
  594. String? token,
  595. }) : super(
  596. token: token,
  597. );
  598. factory BindDeviceRequest.fromJson(Map<String, dynamic> map) {
  599. return BindDeviceRequest(
  600. serialNumber: map['SerialNumber'],
  601. name: map['Name'],
  602. description: map['Description'],
  603. headPicUrl: map['HeadPicUrl'],
  604. organizationCode: map['OrganizationCode'],
  605. departmentCode: map['DepartmentCode'],
  606. shortCode: map['ShortCode'],
  607. isAutoShared: map['IsAutoShared'],
  608. token: map['Token'],
  609. );
  610. }
  611. Map<String, dynamic> toJson() {
  612. final map = super.toJson();
  613. if(serialNumber != null)
  614. map['SerialNumber'] = serialNumber;
  615. if(name != null)
  616. map['Name'] = name;
  617. if(description != null)
  618. map['Description'] = description;
  619. if(headPicUrl != null)
  620. map['HeadPicUrl'] = headPicUrl;
  621. if(organizationCode != null)
  622. map['OrganizationCode'] = organizationCode;
  623. if(departmentCode != null)
  624. map['DepartmentCode'] = departmentCode;
  625. if(shortCode != null)
  626. map['ShortCode'] = shortCode;
  627. map['IsAutoShared'] = isAutoShared;
  628. return map;
  629. }
  630. }
  631. class ModifyDeviceRequest extends TokenRequest{
  632. String? deviceCode;
  633. String? name;
  634. String? headPicUrl;
  635. String? departmentCode;
  636. bool isAutoShared;
  637. String? description;
  638. ModifyDeviceRequest({
  639. this.deviceCode,
  640. this.name,
  641. this.headPicUrl,
  642. this.departmentCode,
  643. this.isAutoShared = false,
  644. this.description,
  645. String? token,
  646. }) : super(
  647. token: token,
  648. );
  649. factory ModifyDeviceRequest.fromJson(Map<String, dynamic> map) {
  650. return ModifyDeviceRequest(
  651. deviceCode: map['DeviceCode'],
  652. name: map['Name'],
  653. headPicUrl: map['HeadPicUrl'],
  654. departmentCode: map['DepartmentCode'],
  655. isAutoShared: map['IsAutoShared'],
  656. description: map['Description'],
  657. token: map['Token'],
  658. );
  659. }
  660. Map<String, dynamic> toJson() {
  661. final map = super.toJson();
  662. if(deviceCode != null)
  663. map['DeviceCode'] = deviceCode;
  664. if(name != null)
  665. map['Name'] = name;
  666. if(headPicUrl != null)
  667. map['HeadPicUrl'] = headPicUrl;
  668. if(departmentCode != null)
  669. map['DepartmentCode'] = departmentCode;
  670. map['IsAutoShared'] = isAutoShared;
  671. if(description != null)
  672. map['Description'] = description;
  673. return map;
  674. }
  675. }
  676. enum DictionaryTypeEnum {
  677. DeviceModel,
  678. DeviceType,
  679. }
  680. class CreateDictionaryItemRequest extends TokenRequest{
  681. DictionaryTypeEnum dictionaryType;
  682. String? dictionaryItemValue;
  683. String? parentCode;
  684. CreateDictionaryItemRequest({
  685. this.dictionaryType = DictionaryTypeEnum.DeviceModel,
  686. this.dictionaryItemValue,
  687. this.parentCode,
  688. String? token,
  689. }) : super(
  690. token: token,
  691. );
  692. factory CreateDictionaryItemRequest.fromJson(Map<String, dynamic> map) {
  693. return CreateDictionaryItemRequest(
  694. dictionaryType: DictionaryTypeEnum.values.firstWhere((e) => e.index == map['DictionaryType']),
  695. dictionaryItemValue: map['DictionaryItemValue'],
  696. parentCode: map['ParentCode'],
  697. token: map['Token'],
  698. );
  699. }
  700. Map<String, dynamic> toJson() {
  701. final map = super.toJson();
  702. map['DictionaryType'] = dictionaryType.index;
  703. if(dictionaryItemValue != null)
  704. map['DictionaryItemValue'] = dictionaryItemValue;
  705. if(parentCode != null)
  706. map['ParentCode'] = parentCode;
  707. return map;
  708. }
  709. }
  710. class DictionaryDTO extends BaseDTO{
  711. String? dictionaryCode;
  712. DictionaryTypeEnum dictionaryType;
  713. String? value;
  714. String? parentCode;
  715. List<DictionaryLanguageConfigDTO >? languageConfigs;
  716. DictionaryDTO({
  717. this.dictionaryCode,
  718. this.dictionaryType = DictionaryTypeEnum.DeviceModel,
  719. this.value,
  720. this.parentCode,
  721. this.languageConfigs,
  722. DateTime? createTime,
  723. DateTime? updateTime,
  724. }) : super(
  725. createTime: createTime,
  726. updateTime: updateTime,
  727. );
  728. factory DictionaryDTO.fromJson(Map<String, dynamic> map) {
  729. return DictionaryDTO(
  730. dictionaryCode: map['DictionaryCode'],
  731. dictionaryType: DictionaryTypeEnum.values.firstWhere((e) => e.index == map['DictionaryType']),
  732. value: map['Value'],
  733. parentCode: map['ParentCode'],
  734. languageConfigs: map['LanguageConfigs'] != null ? (map['LanguageConfigs'] as List).map((e)=>DictionaryLanguageConfigDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  735. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  736. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  737. );
  738. }
  739. Map<String, dynamic> toJson() {
  740. final map = super.toJson();
  741. if(dictionaryCode != null)
  742. map['DictionaryCode'] = dictionaryCode;
  743. map['DictionaryType'] = dictionaryType.index;
  744. if(value != null)
  745. map['Value'] = value;
  746. if(parentCode != null)
  747. map['ParentCode'] = parentCode;
  748. if(languageConfigs != null)
  749. map['LanguageConfigs'] = languageConfigs;
  750. return map;
  751. }
  752. }
  753. class FindDeviceModelItemsRequest extends TokenRequest{
  754. DictionaryTypeEnum dictionaryType;
  755. String? deviceTypeCode;
  756. FindDeviceModelItemsRequest({
  757. this.dictionaryType = DictionaryTypeEnum.DeviceModel,
  758. this.deviceTypeCode,
  759. String? token,
  760. }) : super(
  761. token: token,
  762. );
  763. factory FindDeviceModelItemsRequest.fromJson(Map<String, dynamic> map) {
  764. return FindDeviceModelItemsRequest(
  765. dictionaryType: DictionaryTypeEnum.values.firstWhere((e) => e.index == map['DictionaryType']),
  766. deviceTypeCode: map['DeviceTypeCode'],
  767. token: map['Token'],
  768. );
  769. }
  770. Map<String, dynamic> toJson() {
  771. final map = super.toJson();
  772. map['DictionaryType'] = dictionaryType.index;
  773. if(deviceTypeCode != null)
  774. map['DeviceTypeCode'] = deviceTypeCode;
  775. return map;
  776. }
  777. }
  778. class FindDeviceTypeItemsRequest extends TokenRequest{
  779. DictionaryTypeEnum dictionaryType;
  780. FindDeviceTypeItemsRequest({
  781. this.dictionaryType = DictionaryTypeEnum.DeviceModel,
  782. String? token,
  783. }) : super(
  784. token: token,
  785. );
  786. factory FindDeviceTypeItemsRequest.fromJson(Map<String, dynamic> map) {
  787. return FindDeviceTypeItemsRequest(
  788. dictionaryType: DictionaryTypeEnum.values.firstWhere((e) => e.index == map['DictionaryType']),
  789. token: map['Token'],
  790. );
  791. }
  792. Map<String, dynamic> toJson() {
  793. final map = super.toJson();
  794. map['DictionaryType'] = dictionaryType.index;
  795. return map;
  796. }
  797. }
  798. class CreateShareDeviceToUserRequest extends TokenRequest{
  799. List<String >? userCodes;
  800. String? deviceCode;
  801. CreateShareDeviceToUserRequest({
  802. this.userCodes,
  803. this.deviceCode,
  804. String? token,
  805. }) : super(
  806. token: token,
  807. );
  808. factory CreateShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
  809. return CreateShareDeviceToUserRequest(
  810. userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
  811. deviceCode: map['DeviceCode'],
  812. token: map['Token'],
  813. );
  814. }
  815. Map<String, dynamic> toJson() {
  816. final map = super.toJson();
  817. if(userCodes != null)
  818. map['UserCodes'] = userCodes;
  819. if(deviceCode != null)
  820. map['DeviceCode'] = deviceCode;
  821. return map;
  822. }
  823. }
  824. class DeleteShareDeviceToUserRequest extends TokenRequest{
  825. List<String >? userCodes;
  826. String? deviceCode;
  827. DeleteShareDeviceToUserRequest({
  828. this.userCodes,
  829. this.deviceCode,
  830. String? token,
  831. }) : super(
  832. token: token,
  833. );
  834. factory DeleteShareDeviceToUserRequest.fromJson(Map<String, dynamic> map) {
  835. return DeleteShareDeviceToUserRequest(
  836. userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
  837. deviceCode: map['DeviceCode'],
  838. token: map['Token'],
  839. );
  840. }
  841. Map<String, dynamic> toJson() {
  842. final map = super.toJson();
  843. if(userCodes != null)
  844. map['UserCodes'] = userCodes;
  845. if(deviceCode != null)
  846. map['DeviceCode'] = deviceCode;
  847. return map;
  848. }
  849. }
  850. class RemoveDeviceRelevancyRequest extends TokenRequest{
  851. String? organizationCode;
  852. String? departmentCode;
  853. String? deviceCode;
  854. RemoveDeviceRelevancyRequest({
  855. this.organizationCode,
  856. this.departmentCode,
  857. this.deviceCode,
  858. String? token,
  859. }) : super(
  860. token: token,
  861. );
  862. factory RemoveDeviceRelevancyRequest.fromJson(Map<String, dynamic> map) {
  863. return RemoveDeviceRelevancyRequest(
  864. organizationCode: map['OrganizationCode'],
  865. departmentCode: map['DepartmentCode'],
  866. deviceCode: map['DeviceCode'],
  867. token: map['Token'],
  868. );
  869. }
  870. Map<String, dynamic> toJson() {
  871. final map = super.toJson();
  872. if(organizationCode != null)
  873. map['OrganizationCode'] = organizationCode;
  874. if(departmentCode != null)
  875. map['DepartmentCode'] = departmentCode;
  876. if(deviceCode != null)
  877. map['DeviceCode'] = deviceCode;
  878. return map;
  879. }
  880. }
  881. class GetPersonRoleDeviceRequest extends PageRequest{
  882. String? keyWord;
  883. String? deviceType;
  884. String? deviceModel;
  885. GetPersonRoleDeviceRequest({
  886. this.keyWord,
  887. this.deviceType,
  888. this.deviceModel,
  889. int pageIndex = 0,
  890. int pageSize = 0,
  891. String? token,
  892. }) : super(
  893. pageIndex: pageIndex,
  894. pageSize: pageSize,
  895. token: token,
  896. );
  897. factory GetPersonRoleDeviceRequest.fromJson(Map<String, dynamic> map) {
  898. return GetPersonRoleDeviceRequest(
  899. keyWord: map['KeyWord'],
  900. deviceType: map['DeviceType'],
  901. deviceModel: map['DeviceModel'],
  902. pageIndex: map['PageIndex'],
  903. pageSize: map['PageSize'],
  904. token: map['Token'],
  905. );
  906. }
  907. Map<String, dynamic> toJson() {
  908. final map = super.toJson();
  909. if(keyWord != null)
  910. map['KeyWord'] = keyWord;
  911. if(deviceType != null)
  912. map['DeviceType'] = deviceType;
  913. if(deviceModel != null)
  914. map['DeviceModel'] = deviceModel;
  915. return map;
  916. }
  917. }
  918. class FindDevicesByOrganizationCodeRequest extends TokenRequest{
  919. String? organizationCode;
  920. FindDevicesByOrganizationCodeRequest({
  921. this.organizationCode,
  922. String? token,
  923. }) : super(
  924. token: token,
  925. );
  926. factory FindDevicesByOrganizationCodeRequest.fromJson(Map<String, dynamic> map) {
  927. return FindDevicesByOrganizationCodeRequest(
  928. organizationCode: map['OrganizationCode'],
  929. token: map['Token'],
  930. );
  931. }
  932. Map<String, dynamic> toJson() {
  933. final map = super.toJson();
  934. if(organizationCode != null)
  935. map['OrganizationCode'] = organizationCode;
  936. return map;
  937. }
  938. }
  939. class DeviceServerSettingResult {
  940. Map<String,String>? serverConfigList;
  941. bool isUploadThumbnail;
  942. OrganizationPatientTypeEnum patientType;
  943. int heartRateSeconds;
  944. String? notificationUrl;
  945. bool mergedChannel;
  946. int liveConsultationRateSeconds;
  947. int mergedVideoOutputWidth;
  948. int mergedVideoOutputHeight;
  949. bool isSelfRtcService;
  950. int remoteControlAskTimeoutSec;
  951. String? liveProtocol;
  952. TransactionStatusEnum liveProtocolType;
  953. DeviceServerSettingResult({
  954. this.serverConfigList,
  955. this.isUploadThumbnail = false,
  956. this.patientType = OrganizationPatientTypeEnum.Person,
  957. this.heartRateSeconds = 0,
  958. this.notificationUrl,
  959. this.mergedChannel = false,
  960. this.liveConsultationRateSeconds = 0,
  961. this.mergedVideoOutputWidth = 0,
  962. this.mergedVideoOutputHeight = 0,
  963. this.isSelfRtcService = false,
  964. this.remoteControlAskTimeoutSec = 0,
  965. this.liveProtocol,
  966. this.liveProtocolType = TransactionStatusEnum.Applied,
  967. });
  968. factory DeviceServerSettingResult.fromJson(Map<String, dynamic> map) {
  969. return DeviceServerSettingResult(
  970. serverConfigList: map['ServerConfigList'] != null ? map['ServerConfigList'].cast<String,String>() : null,
  971. isUploadThumbnail: map['IsUploadThumbnail'],
  972. patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
  973. heartRateSeconds: map['HeartRateSeconds'],
  974. notificationUrl: map['NotificationUrl'],
  975. mergedChannel: map['MergedChannel'],
  976. liveConsultationRateSeconds: map['LiveConsultationRateSeconds'],
  977. mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
  978. mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
  979. isSelfRtcService: map['IsSelfRtcService'],
  980. remoteControlAskTimeoutSec: map['RemoteControlAskTimeoutSec'],
  981. liveProtocol: map['LiveProtocol'],
  982. liveProtocolType: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocolType']),
  983. );
  984. }
  985. Map<String, dynamic> toJson() {
  986. final map = Map<String, dynamic>();
  987. if(serverConfigList != null)
  988. map['ServerConfigList'] = serverConfigList;
  989. map['IsUploadThumbnail'] = isUploadThumbnail;
  990. map['PatientType'] = patientType.index;
  991. map['HeartRateSeconds'] = heartRateSeconds;
  992. if(notificationUrl != null)
  993. map['NotificationUrl'] = notificationUrl;
  994. map['MergedChannel'] = mergedChannel;
  995. map['LiveConsultationRateSeconds'] = liveConsultationRateSeconds;
  996. map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
  997. map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
  998. map['IsSelfRtcService'] = isSelfRtcService;
  999. map['RemoteControlAskTimeoutSec'] = remoteControlAskTimeoutSec;
  1000. if(liveProtocol != null)
  1001. map['LiveProtocol'] = liveProtocol;
  1002. map['LiveProtocolType'] = liveProtocolType.index;
  1003. return map;
  1004. }
  1005. }
  1006. class AddDeviceToOrgRequest extends TokenRequest{
  1007. String? uniqueCode;
  1008. AddDeviceToOrgRequest({
  1009. this.uniqueCode,
  1010. String? token,
  1011. }) : super(
  1012. token: token,
  1013. );
  1014. factory AddDeviceToOrgRequest.fromJson(Map<String, dynamic> map) {
  1015. return AddDeviceToOrgRequest(
  1016. uniqueCode: map['UniqueCode'],
  1017. token: map['Token'],
  1018. );
  1019. }
  1020. Map<String, dynamic> toJson() {
  1021. final map = super.toJson();
  1022. if(uniqueCode != null)
  1023. map['UniqueCode'] = uniqueCode;
  1024. return map;
  1025. }
  1026. }
  1027. class DiagnosisModuleDTO extends BaseDTO{
  1028. String? diagnosisModuleCode;
  1029. String? diagnosisModule;
  1030. bool enabled;
  1031. DiagnosisModuleDTO({
  1032. this.diagnosisModuleCode,
  1033. this.diagnosisModule,
  1034. this.enabled = false,
  1035. DateTime? createTime,
  1036. DateTime? updateTime,
  1037. }) : super(
  1038. createTime: createTime,
  1039. updateTime: updateTime,
  1040. );
  1041. factory DiagnosisModuleDTO.fromJson(Map<String, dynamic> map) {
  1042. return DiagnosisModuleDTO(
  1043. diagnosisModuleCode: map['DiagnosisModuleCode'],
  1044. diagnosisModule: map['DiagnosisModule'],
  1045. enabled: map['Enabled'],
  1046. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1047. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1048. );
  1049. }
  1050. Map<String, dynamic> toJson() {
  1051. final map = super.toJson();
  1052. if(diagnosisModuleCode != null)
  1053. map['DiagnosisModuleCode'] = diagnosisModuleCode;
  1054. if(diagnosisModule != null)
  1055. map['DiagnosisModule'] = diagnosisModule;
  1056. map['Enabled'] = enabled;
  1057. return map;
  1058. }
  1059. }
  1060. class FindDeviceDiagnosisModulesRequest extends TokenRequest{
  1061. String? deviceCode;
  1062. FindDeviceDiagnosisModulesRequest({
  1063. this.deviceCode,
  1064. String? token,
  1065. }) : super(
  1066. token: token,
  1067. );
  1068. factory FindDeviceDiagnosisModulesRequest.fromJson(Map<String, dynamic> map) {
  1069. return FindDeviceDiagnosisModulesRequest(
  1070. deviceCode: map['DeviceCode'],
  1071. token: map['Token'],
  1072. );
  1073. }
  1074. Map<String, dynamic> toJson() {
  1075. final map = super.toJson();
  1076. if(deviceCode != null)
  1077. map['DeviceCode'] = deviceCode;
  1078. return map;
  1079. }
  1080. }
  1081. class ModifyDeviceDiagnosisModuleStateRequest extends TokenRequest{
  1082. String? deviceCode;
  1083. String? diagnosisModule;
  1084. bool enabled;
  1085. ModifyDeviceDiagnosisModuleStateRequest({
  1086. this.deviceCode,
  1087. this.diagnosisModule,
  1088. this.enabled = false,
  1089. String? token,
  1090. }) : super(
  1091. token: token,
  1092. );
  1093. factory ModifyDeviceDiagnosisModuleStateRequest.fromJson(Map<String, dynamic> map) {
  1094. return ModifyDeviceDiagnosisModuleStateRequest(
  1095. deviceCode: map['DeviceCode'],
  1096. diagnosisModule: map['DiagnosisModule'],
  1097. enabled: map['Enabled'],
  1098. token: map['Token'],
  1099. );
  1100. }
  1101. Map<String, dynamic> toJson() {
  1102. final map = super.toJson();
  1103. if(deviceCode != null)
  1104. map['DeviceCode'] = deviceCode;
  1105. if(diagnosisModule != null)
  1106. map['DiagnosisModule'] = diagnosisModule;
  1107. map['Enabled'] = enabled;
  1108. return map;
  1109. }
  1110. }
  1111. class ReportVideoDeviceInfoResult {
  1112. bool success;
  1113. List<VideoDeviceDTO >? videoDeviceOutputInfos;
  1114. ReportVideoDeviceInfoResult({
  1115. this.success = false,
  1116. this.videoDeviceOutputInfos,
  1117. });
  1118. factory ReportVideoDeviceInfoResult.fromJson(Map<String, dynamic> map) {
  1119. return ReportVideoDeviceInfoResult(
  1120. success: map['Success'],
  1121. videoDeviceOutputInfos: map['VideoDeviceOutputInfos'] != null ? (map['VideoDeviceOutputInfos'] as List).map((e)=>VideoDeviceDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1122. );
  1123. }
  1124. Map<String, dynamic> toJson() {
  1125. final map = Map<String, dynamic>();
  1126. map['Success'] = success;
  1127. if(videoDeviceOutputInfos != null)
  1128. map['VideoDeviceOutputInfos'] = videoDeviceOutputInfos;
  1129. return map;
  1130. }
  1131. }
  1132. class VideoDeviceInfo {
  1133. String? videoDeviceId;
  1134. VideoDeviceSourceTypeEnum videoDeviceSourceType;
  1135. int width;
  1136. int height;
  1137. int videoFps;
  1138. int videoBitrate;
  1139. int minVideoBitrate;
  1140. VideoDeviceInfo({
  1141. this.videoDeviceId,
  1142. this.videoDeviceSourceType = VideoDeviceSourceTypeEnum.Desktop,
  1143. this.width = 0,
  1144. this.height = 0,
  1145. this.videoFps = 0,
  1146. this.videoBitrate = 0,
  1147. this.minVideoBitrate = 0,
  1148. });
  1149. factory VideoDeviceInfo.fromJson(Map<String, dynamic> map) {
  1150. return VideoDeviceInfo(
  1151. videoDeviceId: map['VideoDeviceId'],
  1152. videoDeviceSourceType: VideoDeviceSourceTypeEnum.values.firstWhere((e) => e.index == map['VideoDeviceSourceType']),
  1153. width: map['Width'],
  1154. height: map['Height'],
  1155. videoFps: map['VideoFps'],
  1156. videoBitrate: map['VideoBitrate'],
  1157. minVideoBitrate: map['MinVideoBitrate'],
  1158. );
  1159. }
  1160. Map<String, dynamic> toJson() {
  1161. final map = Map<String, dynamic>();
  1162. if(videoDeviceId != null)
  1163. map['VideoDeviceId'] = videoDeviceId;
  1164. map['VideoDeviceSourceType'] = videoDeviceSourceType.index;
  1165. map['Width'] = width;
  1166. map['Height'] = height;
  1167. map['VideoFps'] = videoFps;
  1168. map['VideoBitrate'] = videoBitrate;
  1169. map['MinVideoBitrate'] = minVideoBitrate;
  1170. return map;
  1171. }
  1172. }
  1173. class ReportVideoDeviceInfoRequest extends TokenRequest{
  1174. bool liveOpened;
  1175. List<VideoDeviceInfo >? videoDeviceInfos;
  1176. ReportVideoDeviceInfoRequest({
  1177. this.liveOpened = false,
  1178. this.videoDeviceInfos,
  1179. String? token,
  1180. }) : super(
  1181. token: token,
  1182. );
  1183. factory ReportVideoDeviceInfoRequest.fromJson(Map<String, dynamic> map) {
  1184. return ReportVideoDeviceInfoRequest(
  1185. liveOpened: map['LiveOpened'],
  1186. videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  1187. token: map['Token'],
  1188. );
  1189. }
  1190. Map<String, dynamic> toJson() {
  1191. final map = super.toJson();
  1192. map['LiveOpened'] = liveOpened;
  1193. if(videoDeviceInfos != null)
  1194. map['VideoDeviceInfos'] = videoDeviceInfos;
  1195. return map;
  1196. }
  1197. }
  1198. class ApplicationSettingInfoDTO {
  1199. String? id;
  1200. String? name;
  1201. bool isPreferred;
  1202. bool isUserDefined;
  1203. bool isHidden;
  1204. ApplicationSettingInfoDTO({
  1205. this.id,
  1206. this.name,
  1207. this.isPreferred = false,
  1208. this.isUserDefined = false,
  1209. this.isHidden = false,
  1210. });
  1211. factory ApplicationSettingInfoDTO.fromJson(Map<String, dynamic> map) {
  1212. return ApplicationSettingInfoDTO(
  1213. id: map['Id'],
  1214. name: map['Name'],
  1215. isPreferred: map['IsPreferred'],
  1216. isUserDefined: map['IsUserDefined'],
  1217. isHidden: map['IsHidden'],
  1218. );
  1219. }
  1220. Map<String, dynamic> toJson() {
  1221. final map = Map<String, dynamic>();
  1222. if(id != null)
  1223. map['Id'] = id;
  1224. if(name != null)
  1225. map['Name'] = name;
  1226. map['IsPreferred'] = isPreferred;
  1227. map['IsUserDefined'] = isUserDefined;
  1228. map['IsHidden'] = isHidden;
  1229. return map;
  1230. }
  1231. }
  1232. class ProbeInfoDTO {
  1233. String? name;
  1234. List<String >? applications;
  1235. List<ApplicationSettingInfoDTO >? applicationInfos;
  1236. ProbeInfoDTO({
  1237. this.name,
  1238. this.applications,
  1239. this.applicationInfos,
  1240. });
  1241. factory ProbeInfoDTO.fromJson(Map<String, dynamic> map) {
  1242. return ProbeInfoDTO(
  1243. name: map['Name'],
  1244. applications: map['Applications'] != null ? map['Applications'].cast<String>().toList() : null,
  1245. applicationInfos: map['ApplicationInfos'] != null ? (map['ApplicationInfos'] as List).map((e)=>ApplicationSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1246. );
  1247. }
  1248. Map<String, dynamic> toJson() {
  1249. final map = Map<String, dynamic>();
  1250. if(name != null)
  1251. map['Name'] = name;
  1252. if(applications != null)
  1253. map['Applications'] = applications;
  1254. if(applicationInfos != null)
  1255. map['ApplicationInfos'] = applicationInfos;
  1256. return map;
  1257. }
  1258. }
  1259. class ProbeApplicationInfoDTO {
  1260. List<ProbeInfoDTO >? probes;
  1261. String? activeProbe;
  1262. String? activeApplication;
  1263. ProbeApplicationInfoDTO({
  1264. this.probes,
  1265. this.activeProbe,
  1266. this.activeApplication,
  1267. });
  1268. factory ProbeApplicationInfoDTO.fromJson(Map<String, dynamic> map) {
  1269. return ProbeApplicationInfoDTO(
  1270. probes: map['Probes'] != null ? (map['Probes'] as List).map((e)=>ProbeInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1271. activeProbe: map['ActiveProbe'],
  1272. activeApplication: map['ActiveApplication'],
  1273. );
  1274. }
  1275. Map<String, dynamic> toJson() {
  1276. final map = Map<String, dynamic>();
  1277. if(probes != null)
  1278. map['Probes'] = probes;
  1279. if(activeProbe != null)
  1280. map['ActiveProbe'] = activeProbe;
  1281. if(activeApplication != null)
  1282. map['ActiveApplication'] = activeApplication;
  1283. return map;
  1284. }
  1285. }
  1286. class ControlParameterDTO {
  1287. bool canExecute;
  1288. List<ControlParameterDTO >? children;
  1289. String? description;
  1290. String? displayValue;
  1291. String? parentDescription;
  1292. String? valuesMapString;
  1293. ControlParameterDTO({
  1294. this.canExecute = false,
  1295. this.children,
  1296. this.description,
  1297. this.displayValue,
  1298. this.parentDescription,
  1299. this.valuesMapString,
  1300. });
  1301. factory ControlParameterDTO.fromJson(Map<String, dynamic> map) {
  1302. return ControlParameterDTO(
  1303. canExecute: map['CanExecute'],
  1304. children: map['Children'] != null ? (map['Children'] as List).map((e)=>ControlParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1305. description: map['Description'],
  1306. displayValue: map['DisplayValue'],
  1307. parentDescription: map['ParentDescription'],
  1308. valuesMapString: map['ValuesMapString'],
  1309. );
  1310. }
  1311. Map<String, dynamic> toJson() {
  1312. final map = Map<String, dynamic>();
  1313. map['CanExecute'] = canExecute;
  1314. if(children != null)
  1315. map['Children'] = children;
  1316. if(description != null)
  1317. map['Description'] = description;
  1318. if(displayValue != null)
  1319. map['DisplayValue'] = displayValue;
  1320. if(parentDescription != null)
  1321. map['ParentDescription'] = parentDescription;
  1322. if(valuesMapString != null)
  1323. map['ValuesMapString'] = valuesMapString;
  1324. return map;
  1325. }
  1326. }
  1327. class SendControlParameterByDeviceRequest extends TokenRequest{
  1328. String? controlUserCode;
  1329. ProbeApplicationInfoDTO? probeApplication;
  1330. ControlParameterDTO? parameter;
  1331. SendControlParameterByDeviceRequest({
  1332. this.controlUserCode,
  1333. this.probeApplication,
  1334. this.parameter,
  1335. String? token,
  1336. }) : super(
  1337. token: token,
  1338. );
  1339. factory SendControlParameterByDeviceRequest.fromJson(Map<String, dynamic> map) {
  1340. return SendControlParameterByDeviceRequest(
  1341. controlUserCode: map['ControlUserCode'],
  1342. probeApplication: map['ProbeApplication'] != null ? ProbeApplicationInfoDTO.fromJson(map['ProbeApplication']) : null,
  1343. parameter: map['Parameter'] != null ? ControlParameterDTO.fromJson(map['Parameter']) : null,
  1344. token: map['Token'],
  1345. );
  1346. }
  1347. Map<String, dynamic> toJson() {
  1348. final map = super.toJson();
  1349. if(controlUserCode != null)
  1350. map['ControlUserCode'] = controlUserCode;
  1351. if(probeApplication != null)
  1352. map['ProbeApplication'] = probeApplication;
  1353. if(parameter != null)
  1354. map['Parameter'] = parameter;
  1355. return map;
  1356. }
  1357. }
  1358. class VideoDeviceInfoDTO {
  1359. String? videoDeviceId;
  1360. VideoDeviceSourceTypeEnum videoDeviceSourceType;
  1361. LiveDataDTO? liveData;
  1362. VideoDeviceInfoDTO({
  1363. this.videoDeviceId,
  1364. this.videoDeviceSourceType = VideoDeviceSourceTypeEnum.Desktop,
  1365. this.liveData,
  1366. });
  1367. factory VideoDeviceInfoDTO.fromJson(Map<String, dynamic> map) {
  1368. return VideoDeviceInfoDTO(
  1369. videoDeviceId: map['VideoDeviceId'],
  1370. videoDeviceSourceType: VideoDeviceSourceTypeEnum.values.firstWhere((e) => e.index == map['VideoDeviceSourceType']),
  1371. liveData: map['LiveData'] != null ? LiveDataDTO.fromJson(map['LiveData']) : null,
  1372. );
  1373. }
  1374. Map<String, dynamic> toJson() {
  1375. final map = Map<String, dynamic>();
  1376. if(videoDeviceId != null)
  1377. map['VideoDeviceId'] = videoDeviceId;
  1378. map['VideoDeviceSourceType'] = videoDeviceSourceType.index;
  1379. if(liveData != null)
  1380. map['LiveData'] = liveData;
  1381. return map;
  1382. }
  1383. }
  1384. class JoinDeviceLiveRoomResult extends TokenRequest{
  1385. int roomNo;
  1386. TransactionStatusEnum liveProtocol;
  1387. String? deviceCode;
  1388. bool mergedChannel;
  1389. int mergedVideoOutputWidth;
  1390. int mergedVideoOutputHeight;
  1391. List<VideoDeviceInfoDTO >? videoDeviceInfos;
  1392. int reportStateIntervalSeconds;
  1393. JoinDeviceLiveRoomResult({
  1394. this.roomNo = 0,
  1395. this.liveProtocol = TransactionStatusEnum.Applied,
  1396. this.deviceCode,
  1397. this.mergedChannel = false,
  1398. this.mergedVideoOutputWidth = 0,
  1399. this.mergedVideoOutputHeight = 0,
  1400. this.videoDeviceInfos,
  1401. this.reportStateIntervalSeconds = 0,
  1402. String? token,
  1403. }) : super(
  1404. token: token,
  1405. );
  1406. factory JoinDeviceLiveRoomResult.fromJson(Map<String, dynamic> map) {
  1407. return JoinDeviceLiveRoomResult(
  1408. roomNo: map['RoomNo'],
  1409. liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
  1410. deviceCode: map['DeviceCode'],
  1411. mergedChannel: map['MergedChannel'],
  1412. mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
  1413. mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
  1414. videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1415. reportStateIntervalSeconds: map['ReportStateIntervalSeconds'],
  1416. token: map['Token'],
  1417. );
  1418. }
  1419. Map<String, dynamic> toJson() {
  1420. final map = super.toJson();
  1421. map['RoomNo'] = roomNo;
  1422. map['LiveProtocol'] = liveProtocol.index;
  1423. if(deviceCode != null)
  1424. map['DeviceCode'] = deviceCode;
  1425. map['MergedChannel'] = mergedChannel;
  1426. map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
  1427. map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
  1428. if(videoDeviceInfos != null)
  1429. map['VideoDeviceInfos'] = videoDeviceInfos;
  1430. map['ReportStateIntervalSeconds'] = reportStateIntervalSeconds;
  1431. return map;
  1432. }
  1433. }
  1434. class JoinDeviceLiveRoomRequest extends TokenRequest{
  1435. String? deviceCode;
  1436. JoinDeviceLiveRoomRequest({
  1437. this.deviceCode,
  1438. String? token,
  1439. }) : super(
  1440. token: token,
  1441. );
  1442. factory JoinDeviceLiveRoomRequest.fromJson(Map<String, dynamic> map) {
  1443. return JoinDeviceLiveRoomRequest(
  1444. deviceCode: map['DeviceCode'],
  1445. token: map['Token'],
  1446. );
  1447. }
  1448. Map<String, dynamic> toJson() {
  1449. final map = super.toJson();
  1450. if(deviceCode != null)
  1451. map['DeviceCode'] = deviceCode;
  1452. return map;
  1453. }
  1454. }
  1455. class LeaveDeviceLiveRoomRequest extends TokenRequest{
  1456. String? deviceCode;
  1457. LeaveDeviceLiveRoomRequest({
  1458. this.deviceCode,
  1459. String? token,
  1460. }) : super(
  1461. token: token,
  1462. );
  1463. factory LeaveDeviceLiveRoomRequest.fromJson(Map<String, dynamic> map) {
  1464. return LeaveDeviceLiveRoomRequest(
  1465. deviceCode: map['DeviceCode'],
  1466. token: map['Token'],
  1467. );
  1468. }
  1469. Map<String, dynamic> toJson() {
  1470. final map = super.toJson();
  1471. if(deviceCode != null)
  1472. map['DeviceCode'] = deviceCode;
  1473. return map;
  1474. }
  1475. }
  1476. class ReportLiveViewStateRequest extends TokenRequest{
  1477. String? deviceCode;
  1478. ReportLiveViewStateRequest({
  1479. this.deviceCode,
  1480. String? token,
  1481. }) : super(
  1482. token: token,
  1483. );
  1484. factory ReportLiveViewStateRequest.fromJson(Map<String, dynamic> map) {
  1485. return ReportLiveViewStateRequest(
  1486. deviceCode: map['DeviceCode'],
  1487. token: map['Token'],
  1488. );
  1489. }
  1490. Map<String, dynamic> toJson() {
  1491. final map = super.toJson();
  1492. if(deviceCode != null)
  1493. map['DeviceCode'] = deviceCode;
  1494. return map;
  1495. }
  1496. }
  1497. class CreateLiveShareInfoResult extends TokenRequest{
  1498. String? shareUrl;
  1499. CreateLiveShareInfoResult({
  1500. this.shareUrl,
  1501. String? token,
  1502. }) : super(
  1503. token: token,
  1504. );
  1505. factory CreateLiveShareInfoResult.fromJson(Map<String, dynamic> map) {
  1506. return CreateLiveShareInfoResult(
  1507. shareUrl: map['ShareUrl'],
  1508. token: map['Token'],
  1509. );
  1510. }
  1511. Map<String, dynamic> toJson() {
  1512. final map = super.toJson();
  1513. if(shareUrl != null)
  1514. map['ShareUrl'] = shareUrl;
  1515. return map;
  1516. }
  1517. }
  1518. class CreateLiveShareInfoRequest extends TokenRequest{
  1519. String? deviceCode;
  1520. CreateLiveShareInfoRequest({
  1521. this.deviceCode,
  1522. String? token,
  1523. }) : super(
  1524. token: token,
  1525. );
  1526. factory CreateLiveShareInfoRequest.fromJson(Map<String, dynamic> map) {
  1527. return CreateLiveShareInfoRequest(
  1528. deviceCode: map['DeviceCode'],
  1529. token: map['Token'],
  1530. );
  1531. }
  1532. Map<String, dynamic> toJson() {
  1533. final map = super.toJson();
  1534. if(deviceCode != null)
  1535. map['DeviceCode'] = deviceCode;
  1536. return map;
  1537. }
  1538. }
  1539. class JoinDeviceLiveRoomByShareResult {
  1540. int roomNo;
  1541. TransactionStatusEnum liveProtocol;
  1542. String? deviceCode;
  1543. bool mergedChannel;
  1544. int mergedVideoOutputWidth;
  1545. int mergedVideoOutputHeight;
  1546. List<VideoDeviceInfoDTO >? videoDeviceInfos;
  1547. int reportStateIntervalSeconds;
  1548. JoinDeviceLiveRoomByShareResult({
  1549. this.roomNo = 0,
  1550. this.liveProtocol = TransactionStatusEnum.Applied,
  1551. this.deviceCode,
  1552. this.mergedChannel = false,
  1553. this.mergedVideoOutputWidth = 0,
  1554. this.mergedVideoOutputHeight = 0,
  1555. this.videoDeviceInfos,
  1556. this.reportStateIntervalSeconds = 0,
  1557. });
  1558. factory JoinDeviceLiveRoomByShareResult.fromJson(Map<String, dynamic> map) {
  1559. return JoinDeviceLiveRoomByShareResult(
  1560. roomNo: map['RoomNo'],
  1561. liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
  1562. deviceCode: map['DeviceCode'],
  1563. mergedChannel: map['MergedChannel'],
  1564. mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
  1565. mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
  1566. videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1567. reportStateIntervalSeconds: map['ReportStateIntervalSeconds'],
  1568. );
  1569. }
  1570. Map<String, dynamic> toJson() {
  1571. final map = Map<String, dynamic>();
  1572. map['RoomNo'] = roomNo;
  1573. map['LiveProtocol'] = liveProtocol.index;
  1574. if(deviceCode != null)
  1575. map['DeviceCode'] = deviceCode;
  1576. map['MergedChannel'] = mergedChannel;
  1577. map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
  1578. map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
  1579. if(videoDeviceInfos != null)
  1580. map['VideoDeviceInfos'] = videoDeviceInfos;
  1581. map['ReportStateIntervalSeconds'] = reportStateIntervalSeconds;
  1582. return map;
  1583. }
  1584. }
  1585. class JoinDeviceLiveRoomByShareRequest {
  1586. String? shareCode;
  1587. JoinDeviceLiveRoomByShareRequest({
  1588. this.shareCode,
  1589. });
  1590. factory JoinDeviceLiveRoomByShareRequest.fromJson(Map<String, dynamic> map) {
  1591. return JoinDeviceLiveRoomByShareRequest(
  1592. shareCode: map['ShareCode'],
  1593. );
  1594. }
  1595. Map<String, dynamic> toJson() {
  1596. final map = Map<String, dynamic>();
  1597. if(shareCode != null)
  1598. map['ShareCode'] = shareCode;
  1599. return map;
  1600. }
  1601. }
  1602. class LeaveDeviceLiveRoomByShareRequest {
  1603. String? deviceCode;
  1604. String? viewerUniqueId;
  1605. LeaveDeviceLiveRoomByShareRequest({
  1606. this.deviceCode,
  1607. this.viewerUniqueId,
  1608. });
  1609. factory LeaveDeviceLiveRoomByShareRequest.fromJson(Map<String, dynamic> map) {
  1610. return LeaveDeviceLiveRoomByShareRequest(
  1611. deviceCode: map['DeviceCode'],
  1612. viewerUniqueId: map['ViewerUniqueId'],
  1613. );
  1614. }
  1615. Map<String, dynamic> toJson() {
  1616. final map = Map<String, dynamic>();
  1617. if(deviceCode != null)
  1618. map['DeviceCode'] = deviceCode;
  1619. if(viewerUniqueId != null)
  1620. map['ViewerUniqueId'] = viewerUniqueId;
  1621. return map;
  1622. }
  1623. }
  1624. class ReportLiveViewStateByShareRequest {
  1625. String? deviceCode;
  1626. String? viewerUniqueId;
  1627. ReportLiveViewStateByShareRequest({
  1628. this.deviceCode,
  1629. this.viewerUniqueId,
  1630. });
  1631. factory ReportLiveViewStateByShareRequest.fromJson(Map<String, dynamic> map) {
  1632. return ReportLiveViewStateByShareRequest(
  1633. deviceCode: map['DeviceCode'],
  1634. viewerUniqueId: map['ViewerUniqueId'],
  1635. );
  1636. }
  1637. Map<String, dynamic> toJson() {
  1638. final map = Map<String, dynamic>();
  1639. if(deviceCode != null)
  1640. map['DeviceCode'] = deviceCode;
  1641. if(viewerUniqueId != null)
  1642. map['ViewerUniqueId'] = viewerUniqueId;
  1643. return map;
  1644. }
  1645. }
  1646. enum DeviceLiveStateEnum {
  1647. Default,
  1648. Pushing,
  1649. Closed,
  1650. Error,
  1651. Warning,
  1652. }
  1653. class ReportLiveStateRequest extends TokenRequest{
  1654. int roomNo;
  1655. DeviceLiveStateEnum liveState;
  1656. String? message;
  1657. ReportLiveStateRequest({
  1658. this.roomNo = 0,
  1659. this.liveState = DeviceLiveStateEnum.Default,
  1660. this.message,
  1661. String? token,
  1662. }) : super(
  1663. token: token,
  1664. );
  1665. factory ReportLiveStateRequest.fromJson(Map<String, dynamic> map) {
  1666. return ReportLiveStateRequest(
  1667. roomNo: map['RoomNo'],
  1668. liveState: DeviceLiveStateEnum.values.firstWhere((e) => e.index == map['LiveState']),
  1669. message: map['Message'],
  1670. token: map['Token'],
  1671. );
  1672. }
  1673. Map<String, dynamic> toJson() {
  1674. final map = super.toJson();
  1675. map['RoomNo'] = roomNo;
  1676. map['LiveState'] = liveState.index;
  1677. if(message != null)
  1678. map['Message'] = message;
  1679. return map;
  1680. }
  1681. }
  1682. class CreateLiveRoomInfoResult {
  1683. String? userCode;
  1684. String? userSign;
  1685. int roomNo;
  1686. int appId;
  1687. bool isTrtc;
  1688. TransactionStatusEnum liveProtocol;
  1689. LiveDataDTO? liveData;
  1690. CreateLiveRoomInfoResult({
  1691. this.userCode,
  1692. this.userSign,
  1693. this.roomNo = 0,
  1694. this.appId = 0,
  1695. this.isTrtc = false,
  1696. this.liveProtocol = TransactionStatusEnum.Applied,
  1697. this.liveData,
  1698. });
  1699. factory CreateLiveRoomInfoResult.fromJson(Map<String, dynamic> map) {
  1700. return CreateLiveRoomInfoResult(
  1701. userCode: map['UserCode'],
  1702. userSign: map['UserSign'],
  1703. roomNo: map['RoomNo'],
  1704. appId: map['AppId'],
  1705. isTrtc: map['IsTrtc'],
  1706. liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
  1707. liveData: map['LiveData'] != null ? LiveDataDTO.fromJson(map['LiveData']) : null,
  1708. );
  1709. }
  1710. Map<String, dynamic> toJson() {
  1711. final map = Map<String, dynamic>();
  1712. if(userCode != null)
  1713. map['UserCode'] = userCode;
  1714. if(userSign != null)
  1715. map['UserSign'] = userSign;
  1716. map['RoomNo'] = roomNo;
  1717. map['AppId'] = appId;
  1718. map['IsTrtc'] = isTrtc;
  1719. map['LiveProtocol'] = liveProtocol.index;
  1720. if(liveData != null)
  1721. map['LiveData'] = liveData;
  1722. return map;
  1723. }
  1724. }
  1725. class CreateLiveRoomInfoRequest {
  1726. String? deviceUniqueCode;
  1727. String? deviceModel;
  1728. String? deviceType;
  1729. String? softwareVersion;
  1730. CreateLiveRoomInfoRequest({
  1731. this.deviceUniqueCode,
  1732. this.deviceModel,
  1733. this.deviceType,
  1734. this.softwareVersion,
  1735. });
  1736. factory CreateLiveRoomInfoRequest.fromJson(Map<String, dynamic> map) {
  1737. return CreateLiveRoomInfoRequest(
  1738. deviceUniqueCode: map['DeviceUniqueCode'],
  1739. deviceModel: map['DeviceModel'],
  1740. deviceType: map['DeviceType'],
  1741. softwareVersion: map['SoftwareVersion'],
  1742. );
  1743. }
  1744. Map<String, dynamic> toJson() {
  1745. final map = Map<String, dynamic>();
  1746. if(deviceUniqueCode != null)
  1747. map['DeviceUniqueCode'] = deviceUniqueCode;
  1748. if(deviceModel != null)
  1749. map['DeviceModel'] = deviceModel;
  1750. if(deviceType != null)
  1751. map['DeviceType'] = deviceType;
  1752. if(softwareVersion != null)
  1753. map['SoftwareVersion'] = softwareVersion;
  1754. return map;
  1755. }
  1756. }
  1757. class UploadConsultationDataRequest extends TokenRequest{
  1758. String? consultationCode;
  1759. String? previewFileToken;
  1760. String? fileToken;
  1761. int fileSize;
  1762. String? coverImageToken;
  1763. String? applicationCategory;
  1764. String? application;
  1765. RemedicalFileDataTypeEnum fileDataType;
  1766. MeasuredResultsDTO? measuredResult;
  1767. ScanImageDTO? commentResult;
  1768. UploadConsultationDataRequest({
  1769. this.consultationCode,
  1770. this.previewFileToken,
  1771. this.fileToken,
  1772. this.fileSize = 0,
  1773. this.coverImageToken,
  1774. this.applicationCategory,
  1775. this.application,
  1776. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1777. this.measuredResult,
  1778. this.commentResult,
  1779. String? token,
  1780. }) : super(
  1781. token: token,
  1782. );
  1783. factory UploadConsultationDataRequest.fromJson(Map<String, dynamic> map) {
  1784. return UploadConsultationDataRequest(
  1785. consultationCode: map['ConsultationCode'],
  1786. previewFileToken: map['PreviewFileToken'],
  1787. fileToken: map['FileToken'],
  1788. fileSize: map['FileSize'],
  1789. coverImageToken: map['CoverImageToken'],
  1790. applicationCategory: map['ApplicationCategory'],
  1791. application: map['Application'],
  1792. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1793. measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
  1794. commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
  1795. token: map['Token'],
  1796. );
  1797. }
  1798. Map<String, dynamic> toJson() {
  1799. final map = super.toJson();
  1800. if(consultationCode != null)
  1801. map['ConsultationCode'] = consultationCode;
  1802. if(previewFileToken != null)
  1803. map['PreviewFileToken'] = previewFileToken;
  1804. if(fileToken != null)
  1805. map['FileToken'] = fileToken;
  1806. map['FileSize'] = fileSize;
  1807. if(coverImageToken != null)
  1808. map['CoverImageToken'] = coverImageToken;
  1809. if(applicationCategory != null)
  1810. map['ApplicationCategory'] = applicationCategory;
  1811. if(application != null)
  1812. map['Application'] = application;
  1813. map['FileDataType'] = fileDataType.index;
  1814. if(measuredResult != null)
  1815. map['MeasuredResult'] = measuredResult;
  1816. if(commentResult != null)
  1817. map['CommentResult'] = commentResult;
  1818. return map;
  1819. }
  1820. }
  1821. class DeviceControlParameterDataDTO {
  1822. String? deviceCode;
  1823. String? probeApplication;
  1824. String? parameter;
  1825. DeviceControlParameterDataDTO({
  1826. this.deviceCode,
  1827. this.probeApplication,
  1828. this.parameter,
  1829. });
  1830. factory DeviceControlParameterDataDTO.fromJson(Map<String, dynamic> map) {
  1831. return DeviceControlParameterDataDTO(
  1832. deviceCode: map['DeviceCode'],
  1833. probeApplication: map['ProbeApplication'],
  1834. parameter: map['Parameter'],
  1835. );
  1836. }
  1837. Map<String, dynamic> toJson() {
  1838. final map = Map<String, dynamic>();
  1839. if(deviceCode != null)
  1840. map['DeviceCode'] = deviceCode;
  1841. if(probeApplication != null)
  1842. map['ProbeApplication'] = probeApplication;
  1843. if(parameter != null)
  1844. map['Parameter'] = parameter;
  1845. return map;
  1846. }
  1847. }
  1848. class GetControlParametersRequest extends TokenRequest{
  1849. String? deviceCode;
  1850. GetControlParametersRequest({
  1851. this.deviceCode,
  1852. String? token,
  1853. }) : super(
  1854. token: token,
  1855. );
  1856. factory GetControlParametersRequest.fromJson(Map<String, dynamic> map) {
  1857. return GetControlParametersRequest(
  1858. deviceCode: map['DeviceCode'],
  1859. token: map['Token'],
  1860. );
  1861. }
  1862. Map<String, dynamic> toJson() {
  1863. final map = super.toJson();
  1864. if(deviceCode != null)
  1865. map['DeviceCode'] = deviceCode;
  1866. return map;
  1867. }
  1868. }
  1869. class ControlDeviceConnectRequest extends BaseControlDeviceRequest{
  1870. String? deviceCode;
  1871. String? roomCode;
  1872. ControlDeviceConnectRequest({
  1873. this.deviceCode,
  1874. this.roomCode,
  1875. ControlDeviceParameterEnum controlType = ControlDeviceParameterEnum.Start,
  1876. bool isNeedSyn = false,
  1877. String? token,
  1878. }) : super(
  1879. controlType: controlType,
  1880. isNeedSyn: isNeedSyn,
  1881. token: token,
  1882. );
  1883. factory ControlDeviceConnectRequest.fromJson(Map<String, dynamic> map) {
  1884. return ControlDeviceConnectRequest(
  1885. deviceCode: map['DeviceCode'],
  1886. roomCode: map['RoomCode'],
  1887. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  1888. isNeedSyn: map['IsNeedSyn'],
  1889. token: map['Token'],
  1890. );
  1891. }
  1892. Map<String, dynamic> toJson() {
  1893. final map = super.toJson();
  1894. if(deviceCode != null)
  1895. map['DeviceCode'] = deviceCode;
  1896. if(roomCode != null)
  1897. map['RoomCode'] = roomCode;
  1898. return map;
  1899. }
  1900. }
  1901. class ControlDeviceParameterRequest extends BaseControlDeviceParameterRequest{
  1902. String? deviceCode;
  1903. String? consultationCode;
  1904. ControlDeviceParameterRequest({
  1905. this.deviceCode,
  1906. this.consultationCode,
  1907. List<AdditionParameterDTO >? parameters,
  1908. ControlDeviceParameterEnum controlType = ControlDeviceParameterEnum.Start,
  1909. bool isNeedSyn = false,
  1910. String? token,
  1911. }) : super(
  1912. parameters: parameters,
  1913. controlType: controlType,
  1914. isNeedSyn: isNeedSyn,
  1915. token: token,
  1916. );
  1917. factory ControlDeviceParameterRequest.fromJson(Map<String, dynamic> map) {
  1918. return ControlDeviceParameterRequest(
  1919. deviceCode: map['DeviceCode'],
  1920. consultationCode: map['ConsultationCode'],
  1921. parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>AdditionParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1922. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  1923. isNeedSyn: map['IsNeedSyn'],
  1924. token: map['Token'],
  1925. );
  1926. }
  1927. Map<String, dynamic> toJson() {
  1928. final map = super.toJson();
  1929. if(deviceCode != null)
  1930. map['DeviceCode'] = deviceCode;
  1931. if(consultationCode != null)
  1932. map['ConsultationCode'] = consultationCode;
  1933. return map;
  1934. }
  1935. }
  1936. enum LogTimeEnum {
  1937. All,
  1938. Today,
  1939. OneWeek,
  1940. OneMonth,
  1941. OneYear,
  1942. }
  1943. class GetRemoteLogRequest extends TokenRequest{
  1944. String? deviceCode;
  1945. LogTimeEnum logTime;
  1946. GetRemoteLogRequest({
  1947. this.deviceCode,
  1948. this.logTime = LogTimeEnum.All,
  1949. String? token,
  1950. }) : super(
  1951. token: token,
  1952. );
  1953. factory GetRemoteLogRequest.fromJson(Map<String, dynamic> map) {
  1954. return GetRemoteLogRequest(
  1955. deviceCode: map['DeviceCode'],
  1956. logTime: LogTimeEnum.values.firstWhere((e) => e.index == map['LogTime']),
  1957. token: map['Token'],
  1958. );
  1959. }
  1960. Map<String, dynamic> toJson() {
  1961. final map = super.toJson();
  1962. if(deviceCode != null)
  1963. map['DeviceCode'] = deviceCode;
  1964. map['LogTime'] = logTime.index;
  1965. return map;
  1966. }
  1967. }
  1968. class RemoteLogResponseRequest extends TokenRequest{
  1969. String? userCode;
  1970. String? logFileToken;
  1971. int rate;
  1972. RemoteDeviceStateEnum remoteDeviceState;
  1973. RemoteLogResponseRequest({
  1974. this.userCode,
  1975. this.logFileToken,
  1976. this.rate = 0,
  1977. this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
  1978. String? token,
  1979. }) : super(
  1980. token: token,
  1981. );
  1982. factory RemoteLogResponseRequest.fromJson(Map<String, dynamic> map) {
  1983. return RemoteLogResponseRequest(
  1984. userCode: map['UserCode'],
  1985. logFileToken: map['LogFileToken'],
  1986. rate: map['Rate'],
  1987. remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
  1988. token: map['Token'],
  1989. );
  1990. }
  1991. Map<String, dynamic> toJson() {
  1992. final map = super.toJson();
  1993. if(userCode != null)
  1994. map['UserCode'] = userCode;
  1995. if(logFileToken != null)
  1996. map['LogFileToken'] = logFileToken;
  1997. map['Rate'] = rate;
  1998. map['RemoteDeviceState'] = remoteDeviceState.index;
  1999. return map;
  2000. }
  2001. }
  2002. class ScanBindDeviceRequest extends TokenRequest{
  2003. String? shortCode;
  2004. ScanBindDeviceRequest({
  2005. this.shortCode,
  2006. String? token,
  2007. }) : super(
  2008. token: token,
  2009. );
  2010. factory ScanBindDeviceRequest.fromJson(Map<String, dynamic> map) {
  2011. return ScanBindDeviceRequest(
  2012. shortCode: map['ShortCode'],
  2013. token: map['Token'],
  2014. );
  2015. }
  2016. Map<String, dynamic> toJson() {
  2017. final map = super.toJson();
  2018. if(shortCode != null)
  2019. map['ShortCode'] = shortCode;
  2020. return map;
  2021. }
  2022. }
  2023. class ReportBrandModelOutputConfigRequest extends TokenRequest{
  2024. String? brand;
  2025. String? model;
  2026. String? shortCode;
  2027. int videoWidth;
  2028. int videoHeight;
  2029. ReportBrandModelOutputConfigRequest({
  2030. this.brand,
  2031. this.model,
  2032. this.shortCode,
  2033. this.videoWidth = 0,
  2034. this.videoHeight = 0,
  2035. String? token,
  2036. }) : super(
  2037. token: token,
  2038. );
  2039. factory ReportBrandModelOutputConfigRequest.fromJson(Map<String, dynamic> map) {
  2040. return ReportBrandModelOutputConfigRequest(
  2041. brand: map['Brand'],
  2042. model: map['Model'],
  2043. shortCode: map['ShortCode'],
  2044. videoWidth: map['VideoWidth'],
  2045. videoHeight: map['VideoHeight'],
  2046. token: map['Token'],
  2047. );
  2048. }
  2049. Map<String, dynamic> toJson() {
  2050. final map = super.toJson();
  2051. if(brand != null)
  2052. map['Brand'] = brand;
  2053. if(model != null)
  2054. map['Model'] = model;
  2055. if(shortCode != null)
  2056. map['ShortCode'] = shortCode;
  2057. map['VideoWidth'] = videoWidth;
  2058. map['VideoHeight'] = videoHeight;
  2059. return map;
  2060. }
  2061. }
  2062. class BrandModelOutputConfigDTO {
  2063. bool isSelect;
  2064. int videoWidth;
  2065. int videoHeight;
  2066. BrandModelOutputConfigDTO({
  2067. this.isSelect = false,
  2068. this.videoWidth = 0,
  2069. this.videoHeight = 0,
  2070. });
  2071. factory BrandModelOutputConfigDTO.fromJson(Map<String, dynamic> map) {
  2072. return BrandModelOutputConfigDTO(
  2073. isSelect: map['IsSelect'],
  2074. videoWidth: map['VideoWidth'],
  2075. videoHeight: map['VideoHeight'],
  2076. );
  2077. }
  2078. Map<String, dynamic> toJson() {
  2079. final map = Map<String, dynamic>();
  2080. map['IsSelect'] = isSelect;
  2081. map['VideoWidth'] = videoWidth;
  2082. map['VideoHeight'] = videoHeight;
  2083. return map;
  2084. }
  2085. }
  2086. class SyncBrandModelOutputConfigRequest extends TokenRequest{
  2087. String? brand;
  2088. String? model;
  2089. String? shortCode;
  2090. SyncBrandModelOutputConfigRequest({
  2091. this.brand,
  2092. this.model,
  2093. this.shortCode,
  2094. String? token,
  2095. }) : super(
  2096. token: token,
  2097. );
  2098. factory SyncBrandModelOutputConfigRequest.fromJson(Map<String, dynamic> map) {
  2099. return SyncBrandModelOutputConfigRequest(
  2100. brand: map['Brand'],
  2101. model: map['Model'],
  2102. shortCode: map['ShortCode'],
  2103. token: map['Token'],
  2104. );
  2105. }
  2106. Map<String, dynamic> toJson() {
  2107. final map = super.toJson();
  2108. if(brand != null)
  2109. map['Brand'] = brand;
  2110. if(model != null)
  2111. map['Model'] = model;
  2112. if(shortCode != null)
  2113. map['ShortCode'] = shortCode;
  2114. return map;
  2115. }
  2116. }
  2117. class GetBrandsRequest extends TokenRequest{
  2118. GetBrandsRequest({
  2119. String? token,
  2120. }) : super(
  2121. token: token,
  2122. );
  2123. factory GetBrandsRequest.fromJson(Map<String, dynamic> map) {
  2124. return GetBrandsRequest(
  2125. token: map['Token'],
  2126. );
  2127. }
  2128. Map<String, dynamic> toJson() {
  2129. final map = super.toJson();
  2130. return map;
  2131. }
  2132. }
  2133. class GetModelsRequest extends TokenRequest{
  2134. String? brand;
  2135. GetModelsRequest({
  2136. this.brand,
  2137. String? token,
  2138. }) : super(
  2139. token: token,
  2140. );
  2141. factory GetModelsRequest.fromJson(Map<String, dynamic> map) {
  2142. return GetModelsRequest(
  2143. brand: map['Brand'],
  2144. token: map['Token'],
  2145. );
  2146. }
  2147. Map<String, dynamic> toJson() {
  2148. final map = super.toJson();
  2149. if(brand != null)
  2150. map['Brand'] = brand;
  2151. return map;
  2152. }
  2153. }
  2154. class AddDevicePatchRequest extends TokenRequest{
  2155. String? name;
  2156. String? description;
  2157. String? deviceType;
  2158. String? softwareVersion;
  2159. String? osVersion;
  2160. List<UploadDeviceFileInfoDTO >? fileUploadInfoList;
  2161. int fileSize;
  2162. String? fileName;
  2163. AddDevicePatchRequest({
  2164. this.name,
  2165. this.description,
  2166. this.deviceType,
  2167. this.softwareVersion,
  2168. this.osVersion,
  2169. this.fileUploadInfoList,
  2170. this.fileSize = 0,
  2171. this.fileName,
  2172. String? token,
  2173. }) : super(
  2174. token: token,
  2175. );
  2176. factory AddDevicePatchRequest.fromJson(Map<String, dynamic> map) {
  2177. return AddDevicePatchRequest(
  2178. name: map['Name'],
  2179. description: map['Description'],
  2180. deviceType: map['DeviceType'],
  2181. softwareVersion: map['SoftwareVersion'],
  2182. osVersion: map['OsVersion'],
  2183. fileUploadInfoList: map['FileUploadInfoList'] != null ? (map['FileUploadInfoList'] as List).map((e)=>UploadDeviceFileInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2184. fileSize: map['FileSize'],
  2185. fileName: map['FileName'],
  2186. token: map['Token'],
  2187. );
  2188. }
  2189. Map<String, dynamic> toJson() {
  2190. final map = super.toJson();
  2191. if(name != null)
  2192. map['Name'] = name;
  2193. if(description != null)
  2194. map['Description'] = description;
  2195. if(deviceType != null)
  2196. map['DeviceType'] = deviceType;
  2197. if(softwareVersion != null)
  2198. map['SoftwareVersion'] = softwareVersion;
  2199. if(osVersion != null)
  2200. map['OsVersion'] = osVersion;
  2201. if(fileUploadInfoList != null)
  2202. map['FileUploadInfoList'] = fileUploadInfoList;
  2203. map['FileSize'] = fileSize;
  2204. if(fileName != null)
  2205. map['FileName'] = fileName;
  2206. return map;
  2207. }
  2208. }
  2209. class DevicePatchDTO extends BaseDTO{
  2210. String? code;
  2211. String? name;
  2212. String? description;
  2213. String? deviceType;
  2214. String? softwareVersion;
  2215. String? osVersion;
  2216. List<UploadDeviceFileInfoDTO >? deviceFileInfoList;
  2217. int fileSize;
  2218. String? fileName;
  2219. DevicePatchDTO({
  2220. this.code,
  2221. this.name,
  2222. this.description,
  2223. this.deviceType,
  2224. this.softwareVersion,
  2225. this.osVersion,
  2226. this.deviceFileInfoList,
  2227. this.fileSize = 0,
  2228. this.fileName,
  2229. DateTime? createTime,
  2230. DateTime? updateTime,
  2231. }) : super(
  2232. createTime: createTime,
  2233. updateTime: updateTime,
  2234. );
  2235. factory DevicePatchDTO.fromJson(Map<String, dynamic> map) {
  2236. return DevicePatchDTO(
  2237. code: map['Code'],
  2238. name: map['Name'],
  2239. description: map['Description'],
  2240. deviceType: map['DeviceType'],
  2241. softwareVersion: map['SoftwareVersion'],
  2242. osVersion: map['OsVersion'],
  2243. deviceFileInfoList: map['DeviceFileInfoList'] != null ? (map['DeviceFileInfoList'] as List).map((e)=>UploadDeviceFileInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2244. fileSize: map['FileSize'],
  2245. fileName: map['FileName'],
  2246. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2247. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2248. );
  2249. }
  2250. Map<String, dynamic> toJson() {
  2251. final map = super.toJson();
  2252. if(code != null)
  2253. map['Code'] = code;
  2254. if(name != null)
  2255. map['Name'] = name;
  2256. if(description != null)
  2257. map['Description'] = description;
  2258. if(deviceType != null)
  2259. map['DeviceType'] = deviceType;
  2260. if(softwareVersion != null)
  2261. map['SoftwareVersion'] = softwareVersion;
  2262. if(osVersion != null)
  2263. map['OsVersion'] = osVersion;
  2264. if(deviceFileInfoList != null)
  2265. map['DeviceFileInfoList'] = deviceFileInfoList;
  2266. map['FileSize'] = fileSize;
  2267. if(fileName != null)
  2268. map['FileName'] = fileName;
  2269. return map;
  2270. }
  2271. }
  2272. class FindDevicePatchPageRequest extends PageRequest{
  2273. String? keyword;
  2274. FindDevicePatchPageRequest({
  2275. this.keyword,
  2276. int pageIndex = 0,
  2277. int pageSize = 0,
  2278. String? token,
  2279. }) : super(
  2280. pageIndex: pageIndex,
  2281. pageSize: pageSize,
  2282. token: token,
  2283. );
  2284. factory FindDevicePatchPageRequest.fromJson(Map<String, dynamic> map) {
  2285. return FindDevicePatchPageRequest(
  2286. keyword: map['Keyword'],
  2287. pageIndex: map['PageIndex'],
  2288. pageSize: map['PageSize'],
  2289. token: map['Token'],
  2290. );
  2291. }
  2292. Map<String, dynamic> toJson() {
  2293. final map = super.toJson();
  2294. if(keyword != null)
  2295. map['Keyword'] = keyword;
  2296. return map;
  2297. }
  2298. }
  2299. class DeleteDevicePatchByCodeRequest extends TokenRequest{
  2300. String? code;
  2301. DeleteDevicePatchByCodeRequest({
  2302. this.code,
  2303. String? token,
  2304. }) : super(
  2305. token: token,
  2306. );
  2307. factory DeleteDevicePatchByCodeRequest.fromJson(Map<String, dynamic> map) {
  2308. return DeleteDevicePatchByCodeRequest(
  2309. code: map['Code'],
  2310. token: map['Token'],
  2311. );
  2312. }
  2313. Map<String, dynamic> toJson() {
  2314. final map = super.toJson();
  2315. if(code != null)
  2316. map['Code'] = code;
  2317. return map;
  2318. }
  2319. }
  2320. class UpdateDevicePatchRequest extends TokenRequest{
  2321. String? code;
  2322. String? name;
  2323. String? description;
  2324. String? softwareVersion;
  2325. String? osVersion;
  2326. UpdateDevicePatchRequest({
  2327. this.code,
  2328. this.name,
  2329. this.description,
  2330. this.softwareVersion,
  2331. this.osVersion,
  2332. String? token,
  2333. }) : super(
  2334. token: token,
  2335. );
  2336. factory UpdateDevicePatchRequest.fromJson(Map<String, dynamic> map) {
  2337. return UpdateDevicePatchRequest(
  2338. code: map['Code'],
  2339. name: map['Name'],
  2340. description: map['Description'],
  2341. softwareVersion: map['SoftwareVersion'],
  2342. osVersion: map['OsVersion'],
  2343. token: map['Token'],
  2344. );
  2345. }
  2346. Map<String, dynamic> toJson() {
  2347. final map = super.toJson();
  2348. if(code != null)
  2349. map['Code'] = code;
  2350. if(name != null)
  2351. map['Name'] = name;
  2352. if(description != null)
  2353. map['Description'] = description;
  2354. if(softwareVersion != null)
  2355. map['SoftwareVersion'] = softwareVersion;
  2356. if(osVersion != null)
  2357. map['OsVersion'] = osVersion;
  2358. return map;
  2359. }
  2360. }
  2361. class PushDevicePatchRequest extends TokenRequest{
  2362. String? deviceCode;
  2363. String? patchCode;
  2364. PushDevicePatchEnum pushEnum;
  2365. PushDevicePatchRequest({
  2366. this.deviceCode,
  2367. this.patchCode,
  2368. this.pushEnum = PushDevicePatchEnum.Start,
  2369. String? token,
  2370. }) : super(
  2371. token: token,
  2372. );
  2373. factory PushDevicePatchRequest.fromJson(Map<String, dynamic> map) {
  2374. return PushDevicePatchRequest(
  2375. deviceCode: map['DeviceCode'],
  2376. patchCode: map['PatchCode'],
  2377. pushEnum: PushDevicePatchEnum.values.firstWhere((e) => e.index == map['PushEnum']),
  2378. token: map['Token'],
  2379. );
  2380. }
  2381. Map<String, dynamic> toJson() {
  2382. final map = super.toJson();
  2383. if(deviceCode != null)
  2384. map['DeviceCode'] = deviceCode;
  2385. if(patchCode != null)
  2386. map['PatchCode'] = patchCode;
  2387. map['PushEnum'] = pushEnum.index;
  2388. return map;
  2389. }
  2390. }
  2391. class FindPushDevicePatchPageRequest extends PageRequest{
  2392. String? keyword;
  2393. String? deviceCode;
  2394. List<String >? findOnlyDeviceTypes;
  2395. FindPushDevicePatchPageRequest({
  2396. this.keyword,
  2397. this.deviceCode,
  2398. this.findOnlyDeviceTypes,
  2399. int pageIndex = 0,
  2400. int pageSize = 0,
  2401. String? token,
  2402. }) : super(
  2403. pageIndex: pageIndex,
  2404. pageSize: pageSize,
  2405. token: token,
  2406. );
  2407. factory FindPushDevicePatchPageRequest.fromJson(Map<String, dynamic> map) {
  2408. return FindPushDevicePatchPageRequest(
  2409. keyword: map['Keyword'],
  2410. deviceCode: map['DeviceCode'],
  2411. findOnlyDeviceTypes: map['FindOnlyDeviceTypes'] != null ? map['FindOnlyDeviceTypes'].cast<String>().toList() : null,
  2412. pageIndex: map['PageIndex'],
  2413. pageSize: map['PageSize'],
  2414. token: map['Token'],
  2415. );
  2416. }
  2417. Map<String, dynamic> toJson() {
  2418. final map = super.toJson();
  2419. if(keyword != null)
  2420. map['Keyword'] = keyword;
  2421. if(deviceCode != null)
  2422. map['DeviceCode'] = deviceCode;
  2423. if(findOnlyDeviceTypes != null)
  2424. map['FindOnlyDeviceTypes'] = findOnlyDeviceTypes;
  2425. return map;
  2426. }
  2427. }
  2428. class UploadDeviceDownloadPatchProgressToUserRequest extends TokenRequest{
  2429. int progress;
  2430. String? userCode;
  2431. String? patchCode;
  2432. RemoteDeviceStateEnum remoteDeviceState;
  2433. UploadDeviceDownloadPatchProgressToUserRequest({
  2434. this.progress = 0,
  2435. this.userCode,
  2436. this.patchCode,
  2437. this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
  2438. String? token,
  2439. }) : super(
  2440. token: token,
  2441. );
  2442. factory UploadDeviceDownloadPatchProgressToUserRequest.fromJson(Map<String, dynamic> map) {
  2443. return UploadDeviceDownloadPatchProgressToUserRequest(
  2444. progress: map['Progress'],
  2445. userCode: map['UserCode'],
  2446. patchCode: map['PatchCode'],
  2447. remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
  2448. token: map['Token'],
  2449. );
  2450. }
  2451. Map<String, dynamic> toJson() {
  2452. final map = super.toJson();
  2453. map['Progress'] = progress;
  2454. if(userCode != null)
  2455. map['UserCode'] = userCode;
  2456. if(patchCode != null)
  2457. map['PatchCode'] = patchCode;
  2458. map['RemoteDeviceState'] = remoteDeviceState.index;
  2459. return map;
  2460. }
  2461. }
  2462. enum DeviceVersionEnum {
  2463. All,
  2464. SoftwareVersion,
  2465. OsVersion,
  2466. }
  2467. class AddDevicePatchVersionRequest extends TokenRequest{
  2468. String? version;
  2469. DeviceVersionEnum versionTypeEnum;
  2470. String? deviceType;
  2471. AddDevicePatchVersionRequest({
  2472. this.version,
  2473. this.versionTypeEnum = DeviceVersionEnum.All,
  2474. this.deviceType,
  2475. String? token,
  2476. }) : super(
  2477. token: token,
  2478. );
  2479. factory AddDevicePatchVersionRequest.fromJson(Map<String, dynamic> map) {
  2480. return AddDevicePatchVersionRequest(
  2481. version: map['Version'],
  2482. versionTypeEnum: DeviceVersionEnum.values.firstWhere((e) => e.index == map['VersionTypeEnum']),
  2483. deviceType: map['DeviceType'],
  2484. token: map['Token'],
  2485. );
  2486. }
  2487. Map<String, dynamic> toJson() {
  2488. final map = super.toJson();
  2489. if(version != null)
  2490. map['Version'] = version;
  2491. map['VersionTypeEnum'] = versionTypeEnum.index;
  2492. if(deviceType != null)
  2493. map['DeviceType'] = deviceType;
  2494. return map;
  2495. }
  2496. }
  2497. class DevicePatchVersionDTO extends BaseDTO{
  2498. String? version;
  2499. DeviceVersionEnum versionTypeEnum;
  2500. String? deviceType;
  2501. String? code;
  2502. DevicePatchVersionDTO({
  2503. this.version,
  2504. this.versionTypeEnum = DeviceVersionEnum.All,
  2505. this.deviceType,
  2506. this.code,
  2507. DateTime? createTime,
  2508. DateTime? updateTime,
  2509. }) : super(
  2510. createTime: createTime,
  2511. updateTime: updateTime,
  2512. );
  2513. factory DevicePatchVersionDTO.fromJson(Map<String, dynamic> map) {
  2514. return DevicePatchVersionDTO(
  2515. version: map['Version'],
  2516. versionTypeEnum: DeviceVersionEnum.values.firstWhere((e) => e.index == map['VersionTypeEnum']),
  2517. deviceType: map['DeviceType'],
  2518. code: map['Code'],
  2519. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2520. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2521. );
  2522. }
  2523. Map<String, dynamic> toJson() {
  2524. final map = super.toJson();
  2525. if(version != null)
  2526. map['Version'] = version;
  2527. map['VersionTypeEnum'] = versionTypeEnum.index;
  2528. if(deviceType != null)
  2529. map['DeviceType'] = deviceType;
  2530. if(code != null)
  2531. map['Code'] = code;
  2532. return map;
  2533. }
  2534. }
  2535. class FindDevicePatchListRequest extends TokenRequest{
  2536. String? deviceType;
  2537. DeviceVersionEnum versionTypeEnum;
  2538. FindDevicePatchListRequest({
  2539. this.deviceType,
  2540. this.versionTypeEnum = DeviceVersionEnum.All,
  2541. String? token,
  2542. }) : super(
  2543. token: token,
  2544. );
  2545. factory FindDevicePatchListRequest.fromJson(Map<String, dynamic> map) {
  2546. return FindDevicePatchListRequest(
  2547. deviceType: map['DeviceType'],
  2548. versionTypeEnum: DeviceVersionEnum.values.firstWhere((e) => e.index == map['VersionTypeEnum']),
  2549. token: map['Token'],
  2550. );
  2551. }
  2552. Map<String, dynamic> toJson() {
  2553. final map = super.toJson();
  2554. if(deviceType != null)
  2555. map['DeviceType'] = deviceType;
  2556. map['VersionTypeEnum'] = versionTypeEnum.index;
  2557. return map;
  2558. }
  2559. }
  2560. class DeleteDevicePatchVersionRequest extends TokenRequest{
  2561. String? code;
  2562. DeleteDevicePatchVersionRequest({
  2563. this.code,
  2564. String? token,
  2565. }) : super(
  2566. token: token,
  2567. );
  2568. factory DeleteDevicePatchVersionRequest.fromJson(Map<String, dynamic> map) {
  2569. return DeleteDevicePatchVersionRequest(
  2570. code: map['Code'],
  2571. token: map['Token'],
  2572. );
  2573. }
  2574. Map<String, dynamic> toJson() {
  2575. final map = super.toJson();
  2576. if(code != null)
  2577. map['Code'] = code;
  2578. return map;
  2579. }
  2580. }
  2581. class AddDevicePrinterVersionRequest extends TokenRequest{
  2582. String? version;
  2583. DeviceVersionEnum versionTypeEnum;
  2584. AddDevicePrinterVersionRequest({
  2585. this.version,
  2586. this.versionTypeEnum = DeviceVersionEnum.All,
  2587. String? token,
  2588. }) : super(
  2589. token: token,
  2590. );
  2591. factory AddDevicePrinterVersionRequest.fromJson(Map<String, dynamic> map) {
  2592. return AddDevicePrinterVersionRequest(
  2593. version: map['Version'],
  2594. versionTypeEnum: DeviceVersionEnum.values.firstWhere((e) => e.index == map['VersionTypeEnum']),
  2595. token: map['Token'],
  2596. );
  2597. }
  2598. Map<String, dynamic> toJson() {
  2599. final map = super.toJson();
  2600. if(version != null)
  2601. map['Version'] = version;
  2602. map['VersionTypeEnum'] = versionTypeEnum.index;
  2603. return map;
  2604. }
  2605. }
  2606. class DevicePrinterVersionDTO extends BaseDTO{
  2607. String? version;
  2608. DeviceVersionEnum versionTypeEnum;
  2609. String? code;
  2610. DevicePrinterVersionDTO({
  2611. this.version,
  2612. this.versionTypeEnum = DeviceVersionEnum.All,
  2613. this.code,
  2614. DateTime? createTime,
  2615. DateTime? updateTime,
  2616. }) : super(
  2617. createTime: createTime,
  2618. updateTime: updateTime,
  2619. );
  2620. factory DevicePrinterVersionDTO.fromJson(Map<String, dynamic> map) {
  2621. return DevicePrinterVersionDTO(
  2622. version: map['Version'],
  2623. versionTypeEnum: DeviceVersionEnum.values.firstWhere((e) => e.index == map['VersionTypeEnum']),
  2624. code: map['Code'],
  2625. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2626. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2627. );
  2628. }
  2629. Map<String, dynamic> toJson() {
  2630. final map = super.toJson();
  2631. if(version != null)
  2632. map['Version'] = version;
  2633. map['VersionTypeEnum'] = versionTypeEnum.index;
  2634. if(code != null)
  2635. map['Code'] = code;
  2636. return map;
  2637. }
  2638. }
  2639. class FindDevicePrinterVersionListRequest extends TokenRequest{
  2640. DeviceVersionEnum versionTypeEnum;
  2641. FindDevicePrinterVersionListRequest({
  2642. this.versionTypeEnum = DeviceVersionEnum.All,
  2643. String? token,
  2644. }) : super(
  2645. token: token,
  2646. );
  2647. factory FindDevicePrinterVersionListRequest.fromJson(Map<String, dynamic> map) {
  2648. return FindDevicePrinterVersionListRequest(
  2649. versionTypeEnum: DeviceVersionEnum.values.firstWhere((e) => e.index == map['VersionTypeEnum']),
  2650. token: map['Token'],
  2651. );
  2652. }
  2653. Map<String, dynamic> toJson() {
  2654. final map = super.toJson();
  2655. map['VersionTypeEnum'] = versionTypeEnum.index;
  2656. return map;
  2657. }
  2658. }
  2659. class DeleteDevicePrinterVersionRequest extends TokenRequest{
  2660. String? code;
  2661. DeleteDevicePrinterVersionRequest({
  2662. this.code,
  2663. String? token,
  2664. }) : super(
  2665. token: token,
  2666. );
  2667. factory DeleteDevicePrinterVersionRequest.fromJson(Map<String, dynamic> map) {
  2668. return DeleteDevicePrinterVersionRequest(
  2669. code: map['Code'],
  2670. token: map['Token'],
  2671. );
  2672. }
  2673. Map<String, dynamic> toJson() {
  2674. final map = super.toJson();
  2675. if(code != null)
  2676. map['Code'] = code;
  2677. return map;
  2678. }
  2679. }
  2680. class AddDevicePrinterRequest extends TokenRequest{
  2681. String? name;
  2682. String? description;
  2683. String? osVersion;
  2684. List<UploadDeviceFileInfoDTO >? fileUploadInfoList;
  2685. int fileSize;
  2686. String? printerBrands;
  2687. List<String >? printerModels;
  2688. String? fileName;
  2689. AddDevicePrinterRequest({
  2690. this.name,
  2691. this.description,
  2692. this.osVersion,
  2693. this.fileUploadInfoList,
  2694. this.fileSize = 0,
  2695. this.printerBrands,
  2696. this.printerModels,
  2697. this.fileName,
  2698. String? token,
  2699. }) : super(
  2700. token: token,
  2701. );
  2702. factory AddDevicePrinterRequest.fromJson(Map<String, dynamic> map) {
  2703. return AddDevicePrinterRequest(
  2704. name: map['Name'],
  2705. description: map['Description'],
  2706. osVersion: map['OsVersion'],
  2707. fileUploadInfoList: map['FileUploadInfoList'] != null ? (map['FileUploadInfoList'] as List).map((e)=>UploadDeviceFileInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2708. fileSize: map['FileSize'],
  2709. printerBrands: map['PrinterBrands'],
  2710. printerModels: map['PrinterModels'] != null ? map['PrinterModels'].cast<String>().toList() : null,
  2711. fileName: map['FileName'],
  2712. token: map['Token'],
  2713. );
  2714. }
  2715. Map<String, dynamic> toJson() {
  2716. final map = super.toJson();
  2717. if(name != null)
  2718. map['Name'] = name;
  2719. if(description != null)
  2720. map['Description'] = description;
  2721. if(osVersion != null)
  2722. map['OsVersion'] = osVersion;
  2723. if(fileUploadInfoList != null)
  2724. map['FileUploadInfoList'] = fileUploadInfoList;
  2725. map['FileSize'] = fileSize;
  2726. if(printerBrands != null)
  2727. map['PrinterBrands'] = printerBrands;
  2728. if(printerModels != null)
  2729. map['PrinterModels'] = printerModels;
  2730. if(fileName != null)
  2731. map['FileName'] = fileName;
  2732. return map;
  2733. }
  2734. }
  2735. class FindDevicePrinterPageRequest extends PageRequest{
  2736. String? keyword;
  2737. FindDevicePrinterPageRequest({
  2738. this.keyword,
  2739. int pageIndex = 0,
  2740. int pageSize = 0,
  2741. String? token,
  2742. }) : super(
  2743. pageIndex: pageIndex,
  2744. pageSize: pageSize,
  2745. token: token,
  2746. );
  2747. factory FindDevicePrinterPageRequest.fromJson(Map<String, dynamic> map) {
  2748. return FindDevicePrinterPageRequest(
  2749. keyword: map['Keyword'],
  2750. pageIndex: map['PageIndex'],
  2751. pageSize: map['PageSize'],
  2752. token: map['Token'],
  2753. );
  2754. }
  2755. Map<String, dynamic> toJson() {
  2756. final map = super.toJson();
  2757. if(keyword != null)
  2758. map['Keyword'] = keyword;
  2759. return map;
  2760. }
  2761. }
  2762. class DeleteDevicePrinterByCodeRequest extends TokenRequest{
  2763. String? code;
  2764. DeleteDevicePrinterByCodeRequest({
  2765. this.code,
  2766. String? token,
  2767. }) : super(
  2768. token: token,
  2769. );
  2770. factory DeleteDevicePrinterByCodeRequest.fromJson(Map<String, dynamic> map) {
  2771. return DeleteDevicePrinterByCodeRequest(
  2772. code: map['Code'],
  2773. token: map['Token'],
  2774. );
  2775. }
  2776. Map<String, dynamic> toJson() {
  2777. final map = super.toJson();
  2778. if(code != null)
  2779. map['Code'] = code;
  2780. return map;
  2781. }
  2782. }
  2783. class UpdateDevicePrinterRequest extends TokenRequest{
  2784. String? name;
  2785. String? description;
  2786. String? osVersion;
  2787. String? code;
  2788. UpdateDevicePrinterRequest({
  2789. this.name,
  2790. this.description,
  2791. this.osVersion,
  2792. this.code,
  2793. String? token,
  2794. }) : super(
  2795. token: token,
  2796. );
  2797. factory UpdateDevicePrinterRequest.fromJson(Map<String, dynamic> map) {
  2798. return UpdateDevicePrinterRequest(
  2799. name: map['Name'],
  2800. description: map['Description'],
  2801. osVersion: map['OsVersion'],
  2802. code: map['Code'],
  2803. token: map['Token'],
  2804. );
  2805. }
  2806. Map<String, dynamic> toJson() {
  2807. final map = super.toJson();
  2808. if(name != null)
  2809. map['Name'] = name;
  2810. if(description != null)
  2811. map['Description'] = description;
  2812. if(osVersion != null)
  2813. map['OsVersion'] = osVersion;
  2814. if(code != null)
  2815. map['Code'] = code;
  2816. return map;
  2817. }
  2818. }
  2819. class SetDevicePrinterRequest extends TokenRequest{
  2820. String? deviceCode;
  2821. DevicePrinterEnum setPrinterEnum;
  2822. List<DevicePrinterParameter >? parameters;
  2823. SetDevicePrinterRequest({
  2824. this.deviceCode,
  2825. this.setPrinterEnum = DevicePrinterEnum.GetInstalledPrinters,
  2826. this.parameters,
  2827. String? token,
  2828. }) : super(
  2829. token: token,
  2830. );
  2831. factory SetDevicePrinterRequest.fromJson(Map<String, dynamic> map) {
  2832. return SetDevicePrinterRequest(
  2833. deviceCode: map['DeviceCode'],
  2834. setPrinterEnum: DevicePrinterEnum.values.firstWhere((e) => e.index == map['SetPrinterEnum']),
  2835. parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>DevicePrinterParameter.fromJson(e as Map<String,dynamic>)).toList() : null,
  2836. token: map['Token'],
  2837. );
  2838. }
  2839. Map<String, dynamic> toJson() {
  2840. final map = super.toJson();
  2841. if(deviceCode != null)
  2842. map['DeviceCode'] = deviceCode;
  2843. map['SetPrinterEnum'] = setPrinterEnum.index;
  2844. if(parameters != null)
  2845. map['Parameters'] = parameters;
  2846. return map;
  2847. }
  2848. }
  2849. class UploadDevicePrinterRequest extends TokenRequest{
  2850. String? userCode;
  2851. DevicePrinterEnum setPrinterEnum;
  2852. List<DevicePrinterParameterDTO >? devicePrinterList;
  2853. RemoteDeviceStateEnum remoteDeviceState;
  2854. UploadDevicePrinterRequest({
  2855. this.userCode,
  2856. this.setPrinterEnum = DevicePrinterEnum.GetInstalledPrinters,
  2857. this.devicePrinterList,
  2858. this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
  2859. String? token,
  2860. }) : super(
  2861. token: token,
  2862. );
  2863. factory UploadDevicePrinterRequest.fromJson(Map<String, dynamic> map) {
  2864. return UploadDevicePrinterRequest(
  2865. userCode: map['UserCode'],
  2866. setPrinterEnum: DevicePrinterEnum.values.firstWhere((e) => e.index == map['SetPrinterEnum']),
  2867. devicePrinterList: map['DevicePrinterList'] != null ? (map['DevicePrinterList'] as List).map((e)=>DevicePrinterParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2868. remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
  2869. token: map['Token'],
  2870. );
  2871. }
  2872. Map<String, dynamic> toJson() {
  2873. final map = super.toJson();
  2874. if(userCode != null)
  2875. map['UserCode'] = userCode;
  2876. map['SetPrinterEnum'] = setPrinterEnum.index;
  2877. if(devicePrinterList != null)
  2878. map['DevicePrinterList'] = devicePrinterList;
  2879. map['RemoteDeviceState'] = remoteDeviceState.index;
  2880. return map;
  2881. }
  2882. }
  2883. class RestartDeviceRequest extends TokenRequest{
  2884. String? deviceCode;
  2885. bool isNeedSyn;
  2886. RestartDeviceRequest({
  2887. this.deviceCode,
  2888. this.isNeedSyn = false,
  2889. String? token,
  2890. }) : super(
  2891. token: token,
  2892. );
  2893. factory RestartDeviceRequest.fromJson(Map<String, dynamic> map) {
  2894. return RestartDeviceRequest(
  2895. deviceCode: map['DeviceCode'],
  2896. isNeedSyn: map['IsNeedSyn'],
  2897. token: map['Token'],
  2898. );
  2899. }
  2900. Map<String, dynamic> toJson() {
  2901. final map = super.toJson();
  2902. if(deviceCode != null)
  2903. map['DeviceCode'] = deviceCode;
  2904. map['IsNeedSyn'] = isNeedSyn;
  2905. return map;
  2906. }
  2907. }
  2908. class ModifyEmergencyDeviceCodeRequest extends TokenRequest{
  2909. String? emergencyDeviceCode;
  2910. ModifyEmergencyDeviceCodeRequest({
  2911. this.emergencyDeviceCode,
  2912. String? token,
  2913. }) : super(
  2914. token: token,
  2915. );
  2916. factory ModifyEmergencyDeviceCodeRequest.fromJson(Map<String, dynamic> map) {
  2917. return ModifyEmergencyDeviceCodeRequest(
  2918. emergencyDeviceCode: map['EmergencyDeviceCode'],
  2919. token: map['Token'],
  2920. );
  2921. }
  2922. Map<String, dynamic> toJson() {
  2923. final map = super.toJson();
  2924. if(emergencyDeviceCode != null)
  2925. map['EmergencyDeviceCode'] = emergencyDeviceCode;
  2926. return map;
  2927. }
  2928. }
  2929. class SendCommandToDeviceRequest extends TokenRequest{
  2930. String? deviceCode;
  2931. String? actionType;
  2932. String? settings;
  2933. SendCommandToDeviceRequest({
  2934. this.deviceCode,
  2935. this.actionType,
  2936. this.settings,
  2937. String? token,
  2938. }) : super(
  2939. token: token,
  2940. );
  2941. factory SendCommandToDeviceRequest.fromJson(Map<String, dynamic> map) {
  2942. return SendCommandToDeviceRequest(
  2943. deviceCode: map['DeviceCode'],
  2944. actionType: map['ActionType'],
  2945. settings: map['Settings'],
  2946. token: map['Token'],
  2947. );
  2948. }
  2949. Map<String, dynamic> toJson() {
  2950. final map = super.toJson();
  2951. if(deviceCode != null)
  2952. map['DeviceCode'] = deviceCode;
  2953. if(actionType != null)
  2954. map['ActionType'] = actionType;
  2955. if(settings != null)
  2956. map['Settings'] = settings;
  2957. return map;
  2958. }
  2959. }
  2960. class SendResultToClientRequest extends TokenRequest{
  2961. String? userCode;
  2962. String? settings;
  2963. SendResultToClientRequest({
  2964. this.userCode,
  2965. this.settings,
  2966. String? token,
  2967. }) : super(
  2968. token: token,
  2969. );
  2970. factory SendResultToClientRequest.fromJson(Map<String, dynamic> map) {
  2971. return SendResultToClientRequest(
  2972. userCode: map['UserCode'],
  2973. settings: map['Settings'],
  2974. token: map['Token'],
  2975. );
  2976. }
  2977. Map<String, dynamic> toJson() {
  2978. final map = super.toJson();
  2979. if(userCode != null)
  2980. map['UserCode'] = userCode;
  2981. if(settings != null)
  2982. map['Settings'] = settings;
  2983. return map;
  2984. }
  2985. }
  2986. class GetResultFromServerRequest extends TokenRequest{
  2987. String? resultCode;
  2988. GetResultFromServerRequest({
  2989. this.resultCode,
  2990. String? token,
  2991. }) : super(
  2992. token: token,
  2993. );
  2994. factory GetResultFromServerRequest.fromJson(Map<String, dynamic> map) {
  2995. return GetResultFromServerRequest(
  2996. resultCode: map['ResultCode'],
  2997. token: map['Token'],
  2998. );
  2999. }
  3000. Map<String, dynamic> toJson() {
  3001. final map = super.toJson();
  3002. if(resultCode != null)
  3003. map['ResultCode'] = resultCode;
  3004. return map;
  3005. }
  3006. }
  3007. class RemoteConnectStautsRequest extends TokenRequest{
  3008. String? userCode;
  3009. LoginSource loginSource;
  3010. bool isNeedSyn;
  3011. RemoteConnectStautsRequest({
  3012. this.userCode,
  3013. this.loginSource = LoginSource.PC,
  3014. this.isNeedSyn = false,
  3015. String? token,
  3016. }) : super(
  3017. token: token,
  3018. );
  3019. factory RemoteConnectStautsRequest.fromJson(Map<String, dynamic> map) {
  3020. return RemoteConnectStautsRequest(
  3021. userCode: map['UserCode'],
  3022. loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
  3023. isNeedSyn: map['IsNeedSyn'],
  3024. token: map['Token'],
  3025. );
  3026. }
  3027. Map<String, dynamic> toJson() {
  3028. final map = super.toJson();
  3029. if(userCode != null)
  3030. map['UserCode'] = userCode;
  3031. map['LoginSource'] = loginSource.index;
  3032. map['IsNeedSyn'] = isNeedSyn;
  3033. return map;
  3034. }
  3035. }
  3036. class RemoteConnectHeartRateRequest extends TokenRequest{
  3037. TransactionTypeEnum transactionType;
  3038. bool isNeedSyn;
  3039. RemoteConnectHeartRateRequest({
  3040. this.transactionType = TransactionTypeEnum.Consultion,
  3041. this.isNeedSyn = false,
  3042. String? token,
  3043. }) : super(
  3044. token: token,
  3045. );
  3046. factory RemoteConnectHeartRateRequest.fromJson(Map<String, dynamic> map) {
  3047. return RemoteConnectHeartRateRequest(
  3048. transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
  3049. isNeedSyn: map['IsNeedSyn'],
  3050. token: map['Token'],
  3051. );
  3052. }
  3053. Map<String, dynamic> toJson() {
  3054. final map = super.toJson();
  3055. map['TransactionType'] = transactionType.index;
  3056. map['IsNeedSyn'] = isNeedSyn;
  3057. return map;
  3058. }
  3059. }
  3060. enum ConnectStatusEnum {
  3061. UnConnect,
  3062. WaitConnect,
  3063. CompleteConnect,
  3064. WaitDisconnect,
  3065. CompleteDisconnect,
  3066. }
  3067. class AddUserRemoteConnectRequest extends GetDeviceRequest{
  3068. String? roomId;
  3069. ConnectStatusEnum statusEnum;
  3070. AddUserRemoteConnectRequest({
  3071. this.roomId,
  3072. this.statusEnum = ConnectStatusEnum.UnConnect,
  3073. String? deviceCode,
  3074. bool isNeedSyn = false,
  3075. String? token,
  3076. }) : super(
  3077. deviceCode: deviceCode,
  3078. isNeedSyn: isNeedSyn,
  3079. token: token,
  3080. );
  3081. factory AddUserRemoteConnectRequest.fromJson(Map<String, dynamic> map) {
  3082. return AddUserRemoteConnectRequest(
  3083. roomId: map['RoomId'],
  3084. statusEnum: ConnectStatusEnum.values.firstWhere((e) => e.index == map['StatusEnum']),
  3085. deviceCode: map['DeviceCode'],
  3086. isNeedSyn: map['IsNeedSyn'],
  3087. token: map['Token'],
  3088. );
  3089. }
  3090. Map<String, dynamic> toJson() {
  3091. final map = super.toJson();
  3092. if(roomId != null)
  3093. map['RoomId'] = roomId;
  3094. map['StatusEnum'] = statusEnum.index;
  3095. return map;
  3096. }
  3097. }
  3098. class DeviceConnectStateResult {
  3099. String? deviceCode;
  3100. ConnectStatusEnum connectStatus;
  3101. DeviceConnectStateResult({
  3102. this.deviceCode,
  3103. this.connectStatus = ConnectStatusEnum.UnConnect,
  3104. });
  3105. factory DeviceConnectStateResult.fromJson(Map<String, dynamic> map) {
  3106. return DeviceConnectStateResult(
  3107. deviceCode: map['DeviceCode'],
  3108. connectStatus: ConnectStatusEnum.values.firstWhere((e) => e.index == map['ConnectStatus']),
  3109. );
  3110. }
  3111. Map<String, dynamic> toJson() {
  3112. final map = Map<String, dynamic>();
  3113. if(deviceCode != null)
  3114. map['DeviceCode'] = deviceCode;
  3115. map['ConnectStatus'] = connectStatus.index;
  3116. return map;
  3117. }
  3118. }
  3119. class GetDeviceStateListRequest extends TokenRequest{
  3120. List<String >? deviceCodes;
  3121. GetDeviceStateListRequest({
  3122. this.deviceCodes,
  3123. String? token,
  3124. }) : super(
  3125. token: token,
  3126. );
  3127. factory GetDeviceStateListRequest.fromJson(Map<String, dynamic> map) {
  3128. return GetDeviceStateListRequest(
  3129. deviceCodes: map['DeviceCodes'] != null ? map['DeviceCodes'].cast<String>().toList() : null,
  3130. token: map['Token'],
  3131. );
  3132. }
  3133. Map<String, dynamic> toJson() {
  3134. final map = super.toJson();
  3135. if(deviceCodes != null)
  3136. map['DeviceCodes'] = deviceCodes;
  3137. return map;
  3138. }
  3139. }
  3140. class DeivceCancelLogDownloadRequest extends TokenRequest{
  3141. String? userCode;
  3142. DeivceCancelLogDownloadRequest({
  3143. this.userCode,
  3144. String? token,
  3145. }) : super(
  3146. token: token,
  3147. );
  3148. factory DeivceCancelLogDownloadRequest.fromJson(Map<String, dynamic> map) {
  3149. return DeivceCancelLogDownloadRequest(
  3150. userCode: map['UserCode'],
  3151. token: map['Token'],
  3152. );
  3153. }
  3154. Map<String, dynamic> toJson() {
  3155. final map = super.toJson();
  3156. if(userCode != null)
  3157. map['UserCode'] = userCode;
  3158. return map;
  3159. }
  3160. }
  3161. class ProbeSettingInfoDTO {
  3162. String? name;
  3163. List<ApplicationSettingInfoDTO >? applications;
  3164. ProbeSettingInfoDTO({
  3165. this.name,
  3166. this.applications,
  3167. });
  3168. factory ProbeSettingInfoDTO.fromJson(Map<String, dynamic> map) {
  3169. return ProbeSettingInfoDTO(
  3170. name: map['Name'],
  3171. applications: map['Applications'] != null ? (map['Applications'] as List).map((e)=>ApplicationSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3172. );
  3173. }
  3174. Map<String, dynamic> toJson() {
  3175. final map = Map<String, dynamic>();
  3176. if(name != null)
  3177. map['Name'] = name;
  3178. if(applications != null)
  3179. map['Applications'] = applications;
  3180. return map;
  3181. }
  3182. }
  3183. class ProbeApplicationSettingInfoDTO {
  3184. List<ProbeSettingInfoDTO >? probes;
  3185. String? activeProbe;
  3186. String? activeApplication;
  3187. int maxNumberForApplication;
  3188. int maxNumberForApplicationOfUserDefine;
  3189. ProbeApplicationSettingInfoDTO({
  3190. this.probes,
  3191. this.activeProbe,
  3192. this.activeApplication,
  3193. this.maxNumberForApplication = 0,
  3194. this.maxNumberForApplicationOfUserDefine = 0,
  3195. });
  3196. factory ProbeApplicationSettingInfoDTO.fromJson(Map<String, dynamic> map) {
  3197. return ProbeApplicationSettingInfoDTO(
  3198. probes: map['Probes'] != null ? (map['Probes'] as List).map((e)=>ProbeSettingInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3199. activeProbe: map['ActiveProbe'],
  3200. activeApplication: map['ActiveApplication'],
  3201. maxNumberForApplication: map['MaxNumberForApplication'],
  3202. maxNumberForApplicationOfUserDefine: map['MaxNumberForApplicationOfUserDefine'],
  3203. );
  3204. }
  3205. Map<String, dynamic> toJson() {
  3206. final map = Map<String, dynamic>();
  3207. if(probes != null)
  3208. map['Probes'] = probes;
  3209. if(activeProbe != null)
  3210. map['ActiveProbe'] = activeProbe;
  3211. if(activeApplication != null)
  3212. map['ActiveApplication'] = activeApplication;
  3213. map['MaxNumberForApplication'] = maxNumberForApplication;
  3214. map['MaxNumberForApplicationOfUserDefine'] = maxNumberForApplicationOfUserDefine;
  3215. return map;
  3216. }
  3217. }
  3218. class ProbeApplicationSettingRequest extends TokenRequest{
  3219. String? deviceCode;
  3220. ProbeApplicationSettingInfoDTO? probeApplicationSetting;
  3221. ControlDeviceParameterEnum controlType;
  3222. ProbeApplicationSettingRequest({
  3223. this.deviceCode,
  3224. this.probeApplicationSetting,
  3225. this.controlType = ControlDeviceParameterEnum.Start,
  3226. String? token,
  3227. }) : super(
  3228. token: token,
  3229. );
  3230. factory ProbeApplicationSettingRequest.fromJson(Map<String, dynamic> map) {
  3231. return ProbeApplicationSettingRequest(
  3232. deviceCode: map['DeviceCode'],
  3233. probeApplicationSetting: map['ProbeApplicationSetting'] != null ? ProbeApplicationSettingInfoDTO.fromJson(map['ProbeApplicationSetting']) : null,
  3234. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  3235. token: map['Token'],
  3236. );
  3237. }
  3238. Map<String, dynamic> toJson() {
  3239. final map = super.toJson();
  3240. if(deviceCode != null)
  3241. map['DeviceCode'] = deviceCode;
  3242. if(probeApplicationSetting != null)
  3243. map['ProbeApplicationSetting'] = probeApplicationSetting;
  3244. map['ControlType'] = controlType.index;
  3245. return map;
  3246. }
  3247. }
  3248. class ProbeApplicationSettingResultRequest extends TokenRequest{
  3249. String? userCode;
  3250. ProbeApplicationSettingInfoDTO? probeApplicationSetting;
  3251. ControlDeviceParameterEnum controlType;
  3252. ProbeApplicationSettingResultRequest({
  3253. this.userCode,
  3254. this.probeApplicationSetting,
  3255. this.controlType = ControlDeviceParameterEnum.Start,
  3256. String? token,
  3257. }) : super(
  3258. token: token,
  3259. );
  3260. factory ProbeApplicationSettingResultRequest.fromJson(Map<String, dynamic> map) {
  3261. return ProbeApplicationSettingResultRequest(
  3262. userCode: map['UserCode'],
  3263. probeApplicationSetting: map['ProbeApplicationSetting'] != null ? ProbeApplicationSettingInfoDTO.fromJson(map['ProbeApplicationSetting']) : null,
  3264. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  3265. token: map['Token'],
  3266. );
  3267. }
  3268. Map<String, dynamic> toJson() {
  3269. final map = super.toJson();
  3270. if(userCode != null)
  3271. map['UserCode'] = userCode;
  3272. if(probeApplicationSetting != null)
  3273. map['ProbeApplicationSetting'] = probeApplicationSetting;
  3274. map['ControlType'] = controlType.index;
  3275. return map;
  3276. }
  3277. }
  3278. class UserRemoteConnectRequest {
  3279. TransactionTypeEnum transactionType;
  3280. ConnectStatusEnum statusEnum;
  3281. String? userToken;
  3282. String? deviceToken;
  3283. String? userCode;
  3284. String? roomId;
  3285. String? deviceCode;
  3286. LoginSource loginSource;
  3287. bool isNeedSyn;
  3288. UserRemoteConnectRequest({
  3289. this.transactionType = TransactionTypeEnum.Consultion,
  3290. this.statusEnum = ConnectStatusEnum.UnConnect,
  3291. this.userToken,
  3292. this.deviceToken,
  3293. this.userCode,
  3294. this.roomId,
  3295. this.deviceCode,
  3296. this.loginSource = LoginSource.PC,
  3297. this.isNeedSyn = false,
  3298. });
  3299. factory UserRemoteConnectRequest.fromJson(Map<String, dynamic> map) {
  3300. return UserRemoteConnectRequest(
  3301. transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
  3302. statusEnum: ConnectStatusEnum.values.firstWhere((e) => e.index == map['StatusEnum']),
  3303. userToken: map['UserToken'],
  3304. deviceToken: map['DeviceToken'],
  3305. userCode: map['UserCode'],
  3306. roomId: map['RoomId'],
  3307. deviceCode: map['DeviceCode'],
  3308. loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
  3309. isNeedSyn: map['IsNeedSyn'],
  3310. );
  3311. }
  3312. Map<String, dynamic> toJson() {
  3313. final map = Map<String, dynamic>();
  3314. map['TransactionType'] = transactionType.index;
  3315. map['StatusEnum'] = statusEnum.index;
  3316. if(userToken != null)
  3317. map['UserToken'] = userToken;
  3318. if(deviceToken != null)
  3319. map['DeviceToken'] = deviceToken;
  3320. if(userCode != null)
  3321. map['UserCode'] = userCode;
  3322. if(roomId != null)
  3323. map['RoomId'] = roomId;
  3324. if(deviceCode != null)
  3325. map['DeviceCode'] = deviceCode;
  3326. map['LoginSource'] = loginSource.index;
  3327. map['IsNeedSyn'] = isNeedSyn;
  3328. return map;
  3329. }
  3330. }
  3331. class DeviceRemoteConnectRequest {
  3332. TransactionTypeEnum transactionType;
  3333. ConnectStatusEnum statusEnum;
  3334. String? userToken;
  3335. String? deviceToken;
  3336. String? userCode;
  3337. String? roomId;
  3338. String? deviceCode;
  3339. bool isNeedSyn;
  3340. LoginSource loginSource;
  3341. DeviceRemoteConnectRequest({
  3342. this.transactionType = TransactionTypeEnum.Consultion,
  3343. this.statusEnum = ConnectStatusEnum.UnConnect,
  3344. this.userToken,
  3345. this.deviceToken,
  3346. this.userCode,
  3347. this.roomId,
  3348. this.deviceCode,
  3349. this.isNeedSyn = false,
  3350. this.loginSource = LoginSource.PC,
  3351. });
  3352. factory DeviceRemoteConnectRequest.fromJson(Map<String, dynamic> map) {
  3353. return DeviceRemoteConnectRequest(
  3354. transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
  3355. statusEnum: ConnectStatusEnum.values.firstWhere((e) => e.index == map['StatusEnum']),
  3356. userToken: map['UserToken'],
  3357. deviceToken: map['DeviceToken'],
  3358. userCode: map['UserCode'],
  3359. roomId: map['RoomId'],
  3360. deviceCode: map['DeviceCode'],
  3361. isNeedSyn: map['IsNeedSyn'],
  3362. loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
  3363. );
  3364. }
  3365. Map<String, dynamic> toJson() {
  3366. final map = Map<String, dynamic>();
  3367. map['TransactionType'] = transactionType.index;
  3368. map['StatusEnum'] = statusEnum.index;
  3369. if(userToken != null)
  3370. map['UserToken'] = userToken;
  3371. if(deviceToken != null)
  3372. map['DeviceToken'] = deviceToken;
  3373. if(userCode != null)
  3374. map['UserCode'] = userCode;
  3375. if(roomId != null)
  3376. map['RoomId'] = roomId;
  3377. if(deviceCode != null)
  3378. map['DeviceCode'] = deviceCode;
  3379. map['IsNeedSyn'] = isNeedSyn;
  3380. map['LoginSource'] = loginSource.index;
  3381. return map;
  3382. }
  3383. }
  3384. class RemoteConnectsRequest {
  3385. List<UserRemoteConnectRequest >? userRemoteConnect;
  3386. List<DeviceRemoteConnectRequest >? deviceRemoteConnect;
  3387. RemoteConnectsRequest({
  3388. this.userRemoteConnect,
  3389. this.deviceRemoteConnect,
  3390. });
  3391. factory RemoteConnectsRequest.fromJson(Map<String, dynamic> map) {
  3392. return RemoteConnectsRequest(
  3393. userRemoteConnect: map['UserRemoteConnect'] != null ? (map['UserRemoteConnect'] as List).map((e)=>UserRemoteConnectRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3394. deviceRemoteConnect: map['DeviceRemoteConnect'] != null ? (map['DeviceRemoteConnect'] as List).map((e)=>DeviceRemoteConnectRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3395. );
  3396. }
  3397. Map<String, dynamic> toJson() {
  3398. final map = Map<String, dynamic>();
  3399. if(userRemoteConnect != null)
  3400. map['UserRemoteConnect'] = userRemoteConnect;
  3401. if(deviceRemoteConnect != null)
  3402. map['DeviceRemoteConnect'] = deviceRemoteConnect;
  3403. return map;
  3404. }
  3405. }