123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553 |
- import 'package:fis_jsonrpc/utils.dart';
- enum NotificationTypeEnum {
- Unknown,
- ChatMsgNotification,
- TokenReplacedNotification,
- DisconnectNotification,
- ConnectionNotification,
- ExamRecordsFinishedNotification,
- RejectApplyConsultationNotification,
- CancelInvitingInLiveConsultationNotification,
- InviteInLiveConsultationNotification,
- ConsultationRemindNotification,
- PasswordExpiredWarningNotification,
- InviteLiveConsultationNotification,
- AcceptLiveConsultationNotification,
- RejectLiveConsultationNotification,
- InviteLiveConsultationToDeviceNotification,
- CancelLiveConsultationNotification,
- CloseLiveConsultationNotification,
- JoinLiveConsultationNotification,
- NetworkErrConsultationNotification,
- LeaveConsultationNotification,
- JoinInLiveConsultationNotification,
- RejectInviteLiveConsultationNotification,
- ApplyConsultationNotification,
- ApprovalApplyConsultationNotification,
- InviteeConsultationNotification,
- InviteeApproveApplyConsultationNotification,
- InviteeRejectApplyConsultationNotification,
- MuteLiveConsultationNotification,
- SwitchLiveConsultationVideoNotification,
- HeartRateJoinConsultationNotification,
- HeartRateLeaveConsultationNotification,
- CloseLiveConsultationToDeviceNotification,
- CancelLiveConsultationToDeviceNotification,
- AnnouncementPublishNotification,
- SendInteractiveBoardDataNotification,
- DeviceParametersNotification,
- DeviceControlledParametersNotification,
- EmergencyCallNotification,
- EmergencyCallFailedNotification,
- InviteLiveCourseNotification,
- JoinLiveCourseNotification,
- InviteLiveCourseToDeviceNotification,
- HeartRateJoinCoNotification,
- NetworkErrCourseNotification,
- CancelLiveCourseNotification,
- MuteLiveCourseNotification,
- CancelLiveCourseToDeviceNotification,
- CloseLiveCourseNotification,
- CloseLiveCourseToDeviceNotification,
- HeartRateLeaveCourseNotification,
- LeaveCoursenNotification,
- SwitchLiveCourseVideoNotification,
- ChangeConsultationNotification,
- ChangeConsultationToDeviceNotification,
- CourcePaySuccessNotification,
- CloseConsultationDueToChangeNotification,
- CloseConsultationDueToChangeToDeviceNotification,
- CourseStatusNotification,
- UpgradeNotification,
- EducationReStartNotification,
- ConsultationReStartNotification,
- VersionUpgradeNotification,
- StartLiveToDeviceNotification,
- CloseLiveToDeviceNotification,
- DeviceLiveFinishedNotification,
- ModifyDeviceMergedVideoSizeNotification,
- DeviceRejectRemoteControlNotification,
- DeviceDisconnectRemoteControlNotification,
- CancelInvitingInLiveCourseNotification,
- StartConsolutionHeartRateToDeviceNotification,
- CloseConsolutionHeartRateToDeviceNotification,
- ConnectStatusToDeviceNotification,
- ConnectStatusToClientNotification,
- GetRemoteLogToDeviceNotification,
- GetRemoteLogToClientNotification,
- StartCourseHeartRateToDeviceNotification,
- ExecuteResultNotification,
- ProgressBarNotification,
- SendCommandToDeviceNotification,
- SendResultToClientNotification,
- PushDevicePatchToDeviceNotification,
- DeviceDownloadPatchProgressToUserNotification,
- DevicePrinterResultNotification,
- DevicePrinterRequestNotification,
- GetRemoteConnectStatusToDeviceNotification,
- RestartDeviceNotification,
- CancelLogDownloadNotification,
- ApplyProbeApplicationSettingNotification,
- ProbeApplicationSettingResponseNotification,
- MeetingMemberNotification,
- MeetingHangupNotification,
- RejectMeetingNotification,
- StartEducationHeartRateToDeviceNotification,
- AcceptMeetingNotification,
- SendLiveInteractiveBoardDataNotification,
- DeviceJoinLiveCourseNotification,
- CloseCourseHeartRateToDeviceNotification,
- ChangeShareInLiveCourseNotification,
- CourseEntryNotification,
- MeetingPendingMemberTimeoutNotification,
- ConsultationAnswerTimeout,
- SystemSettingSaveAndExitToClientNotification,
- RealtimeConsultationMembersNotification,
- UploadConsultationDataNotification,
- }
- class NotificationDTO {
- NotificationTypeEnum notificationType;
- String? code;
- bool isResponse;
- NotificationDTO({
- this.notificationType = NotificationTypeEnum.Unknown,
- this.code,
- this.isResponse = false,
- });
- factory NotificationDTO.fromJson(Map<String, dynamic> map) {
- return NotificationDTO(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['NotificationType'] = notificationType.index;
- if (code != null) {
- map['Code'] = code;
- }
- map['IsResponse'] = isResponse;
- return map;
- }
- }
- enum ControlDeviceParameterEnum {
- Start,
- End,
- RunExecuteApi,
- ExecuteProbeApplicationSetting,
- RejectConnect,
- EndRunExecuteApi,
- Get,
- UserTimeout,
- UpdateProbeApplication,
- UpdateAndExitProbeApplication,
- ExitProbeApplication,
- GetProbeApplication,
- }
- enum LoginSource {
- PC,
- Mobile,
- Pad,
- Web,
- US,
- }
- class ApplyProbeApplicationSettingNotification extends NotificationDTO{
- String? userCode;
- ControlDeviceParameterEnum controlType;
- LoginSource loginSource;
- String? deviceCode;
- String? controlUserName;
- ApplyProbeApplicationSettingNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.userCode,
- this.controlType = ControlDeviceParameterEnum.Start,
- this.loginSource = LoginSource.PC,
- this.deviceCode,
- this.controlUserName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ApplyProbeApplicationSettingNotification.fromJson(Map<String, dynamic> map) {
- return ApplyProbeApplicationSettingNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- userCode: map['UserCode'],
- controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- deviceCode: map['DeviceCode'],
- controlUserName: map['ControlUserName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCode != null)
- map['UserCode'] = userCode;
- map['ControlType'] = controlType.index;
- map['LoginSource'] = loginSource.index;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (controlUserName != null)
- map['ControlUserName'] = controlUserName;
- return map;
- }
- }
- class SendCommandToDeviceNotification extends NotificationDTO{
- String? actionType;
- String? resultCode;
- String? sender;
- String? deviceCode;
- String? operatorCode;
- SendCommandToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.actionType,
- this.resultCode,
- this.sender,
- this.deviceCode,
- this.operatorCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SendCommandToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return SendCommandToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- actionType: map['ActionType'],
- resultCode: map['ResultCode'],
- sender: map['Sender'],
- deviceCode: map['DeviceCode'],
- operatorCode: map['OperatorCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (actionType != null)
- map['ActionType'] = actionType;
- if (resultCode != null)
- map['ResultCode'] = resultCode;
- if (sender != null)
- map['Sender'] = sender;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (operatorCode != null)
- map['OperatorCode'] = operatorCode;
- return map;
- }
- }
- class SendResultToClientNotification extends NotificationDTO{
- String? resultCode;
- String? sender;
- SendResultToClientNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.resultCode,
- this.sender,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SendResultToClientNotification.fromJson(Map<String, dynamic> map) {
- return SendResultToClientNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- resultCode: map['ResultCode'],
- sender: map['Sender'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (resultCode != null)
- map['ResultCode'] = resultCode;
- if (sender != null)
- map['Sender'] = sender;
- return map;
- }
- }
- class SystemSettingSaveAndExitToClientNotification extends NotificationDTO{
- String? resultCode;
- String? sender;
- SystemSettingSaveAndExitToClientNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.resultCode,
- this.sender,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SystemSettingSaveAndExitToClientNotification.fromJson(Map<String, dynamic> map) {
- return SystemSettingSaveAndExitToClientNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- resultCode: map['ResultCode'],
- sender: map['Sender'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (resultCode != null)
- map['ResultCode'] = resultCode;
- if (sender != null)
- map['Sender'] = sender;
- return map;
- }
- }
- enum AnnouncementTypeEnum {
- placeHolder_0,
- Broadcast,
- Maintenance,
- Carousel,
- Information,
- OperateVideo,
- Question,
- WXOfficialAccountCarousel,
- }
- class AnnouncementLanguageConfigDTO {
- String? language;
- String? title;
- String? content;
- AnnouncementLanguageConfigDTO({
- this.language,
- this.title,
- this.content,
- });
- factory AnnouncementLanguageConfigDTO.fromJson(Map<String, dynamic> map) {
- return AnnouncementLanguageConfigDTO(
- language: map['Language'],
- title: map['Title'],
- content: map['Content'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (language != null) {
- map['Language'] = language;
- }
- if (title != null) {
- map['Title'] = title;
- }
- if (content != null) {
- map['Content'] = content;
- }
- return map;
- }
- }
- class AnnouncementNotification extends NotificationDTO{
- AnnouncementTypeEnum announcementType;
- List<AnnouncementLanguageConfigDTO>? announcementLanguageConfigs;
- AnnouncementNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.announcementType = AnnouncementTypeEnum.Broadcast,
- this.announcementLanguageConfigs,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory AnnouncementNotification.fromJson(Map<String, dynamic> map) {
- return AnnouncementNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- announcementType: AnnouncementTypeEnum.values.firstWhere((e) => e.index == map['AnnouncementType']),
- announcementLanguageConfigs: map['AnnouncementLanguageConfigs'] != null ? (map['AnnouncementLanguageConfigs'] as List).map((e)=>AnnouncementLanguageConfigDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['AnnouncementType'] = announcementType.index;
- if (announcementLanguageConfigs != null)
- map['AnnouncementLanguageConfigs'] = announcementLanguageConfigs;
- return map;
- }
- }
- enum ChatCmdEnum {
- Txt,
- Image,
- MP4,
- Voice,
- Cases,
- ShareLive,
- VideoCall,
- VoiceCall,
- }
- class ChatMsgNotification extends NotificationDTO{
- String? userCode;
- String? displayName;
- String? headImg;
- ChatCmdEnum chatCmd;
- DateTime? sendTime;
- String? message;
- ChatMsgNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.userCode,
- this.displayName,
- this.headImg,
- this.chatCmd = ChatCmdEnum.Txt,
- this.sendTime,
- this.message,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ChatMsgNotification.fromJson(Map<String, dynamic> map) {
- return ChatMsgNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- userCode: map['UserCode'],
- displayName: map['DisplayName'],
- headImg: map['HeadImg'],
- chatCmd: ChatCmdEnum.values.firstWhere((e) => e.index == map['ChatCmd']),
- sendTime: map['SendTime'] != null ? DateTime.parse(map['SendTime']) : null,
- message: map['Message'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCode != null)
- map['UserCode'] = userCode;
- if (displayName != null)
- map['DisplayName'] = displayName;
- if (headImg != null)
- map['HeadImg'] = headImg;
- map['ChatCmd'] = chatCmd.index;
- if (sendTime != null)
- map['SendTime'] = JsonRpcUtils.dateFormat(sendTime!);
- if (message != null)
- map['Message'] = message;
- return map;
- }
- }
- class ConnectionNotification extends NotificationDTO{
- ConnectionNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ConnectionNotification.fromJson(Map<String, dynamic> map) {
- return ConnectionNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class AdditionParameterDTO {
- String? parameterName;
- String? parameterType;
- String? parameterValue;
- AdditionParameterDTO({
- this.parameterName,
- this.parameterType,
- this.parameterValue,
- });
- factory AdditionParameterDTO.fromJson(Map<String, dynamic> map) {
- return AdditionParameterDTO(
- parameterName: map['ParameterName'],
- parameterType: map['ParameterType'],
- parameterValue: map['ParameterValue'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (parameterName != null) {
- map['ParameterName'] = parameterName;
- }
- if (parameterType != null) {
- map['ParameterType'] = parameterType;
- }
- if (parameterValue != null) {
- map['ParameterValue'] = parameterValue;
- }
- return map;
- }
- }
- class DeviceControlledParametersNotification extends NotificationDTO{
- String? controlUserCode;
- String? controlUserName;
- ControlDeviceParameterEnum controlType;
- List<AdditionParameterDTO>? parameters;
- LoginSource loginSource;
- String? deviceCode;
- DeviceControlledParametersNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.controlUserCode,
- this.controlUserName,
- this.controlType = ControlDeviceParameterEnum.Start,
- this.parameters,
- this.loginSource = LoginSource.PC,
- this.deviceCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceControlledParametersNotification.fromJson(Map<String, dynamic> map) {
- return DeviceControlledParametersNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- controlUserCode: map['ControlUserCode'],
- controlUserName: map['ControlUserName'],
- controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
- parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>AdditionParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- deviceCode: map['DeviceCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (controlUserCode != null)
- map['ControlUserCode'] = controlUserCode;
- if (controlUserName != null)
- map['ControlUserName'] = controlUserName;
- map['ControlType'] = controlType.index;
- if (parameters != null)
- map['Parameters'] = parameters;
- map['LoginSource'] = loginSource.index;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- enum RemoteDeviceStateEnum {
- Unknown,
- Success,
- Fail,
- DownloadPatchFail,
- CancelDownloadPatch,
- LogDownloaddFail,
- DeviceCancelLogDownload,
- DeviceDisconnect,
- DeviceTimeOutDisconnect,
- DownloadPatching,
- UserTimeOutDisconnect,
- ProbeApplicationSettingFail,
- ChangeDeviceOrganization,
- }
- class DeviceDisconnectRemoteControlNotification extends NotificationDTO{
- String? deviceCode;
- RemoteDeviceStateEnum remoteDeviceState;
- DeviceDisconnectRemoteControlNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceDisconnectRemoteControlNotification.fromJson(Map<String, dynamic> map) {
- return DeviceDisconnectRemoteControlNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- map['RemoteDeviceState'] = remoteDeviceState.index;
- return map;
- }
- }
- class DeviceParametersNotification extends NotificationDTO{
- String? deviceCode;
- DeviceParametersNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceParametersNotification.fromJson(Map<String, dynamic> map) {
- return DeviceParametersNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class DeviceRejectRemoteControlNotification extends NotificationDTO{
- String? deviceCode;
- DeviceRejectRemoteControlNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceRejectRemoteControlNotification.fromJson(Map<String, dynamic> map) {
- return DeviceRejectRemoteControlNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class DisconnectNotification extends NotificationDTO{
- DisconnectNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DisconnectNotification.fromJson(Map<String, dynamic> map) {
- return DisconnectNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class ExamRecordsFinishedNotification extends NotificationDTO{
- List<String>? codes;
- ExamRecordsFinishedNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.codes,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ExamRecordsFinishedNotification.fromJson(Map<String, dynamic> map) {
- return ExamRecordsFinishedNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- codes: map['Codes']?.cast<String>().toList(),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (codes != null)
- map['Codes'] = codes;
- return map;
- }
- }
- class ExecuteResultNotification extends NotificationDTO{
- bool isSuccess;
- String? exportFileToken;
- ExecuteResultNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.isSuccess = false,
- this.exportFileToken,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ExecuteResultNotification.fromJson(Map<String, dynamic> map) {
- return ExecuteResultNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- isSuccess: map['IsSuccess'],
- exportFileToken: map['ExportFileToken'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['IsSuccess'] = isSuccess;
- if (exportFileToken != null)
- map['ExportFileToken'] = exportFileToken;
- return map;
- }
- }
- enum VideoDeviceSourceTypeEnum {
- Desktop,
- Camera,
- }
- class VideoDeviceDTO {
- String? videoDeviceId;
- VideoDeviceSourceTypeEnum videoDeviceSourceType;
- int width;
- int height;
- int outputWidth;
- int outputHeight;
- int videoFps;
- int videoBitrate;
- int minVideoBitrate;
- VideoDeviceDTO({
- this.videoDeviceId,
- this.videoDeviceSourceType = VideoDeviceSourceTypeEnum.Desktop,
- this.width = 0,
- this.height = 0,
- this.outputWidth = 0,
- this.outputHeight = 0,
- this.videoFps = 0,
- this.videoBitrate = 0,
- this.minVideoBitrate = 0,
- });
- factory VideoDeviceDTO.fromJson(Map<String, dynamic> map) {
- return VideoDeviceDTO(
- videoDeviceId: map['VideoDeviceId'],
- videoDeviceSourceType: VideoDeviceSourceTypeEnum.values.firstWhere((e) => e.index == map['VideoDeviceSourceType']),
- width: map['Width'],
- height: map['Height'],
- outputWidth: map['OutputWidth'],
- outputHeight: map['OutputHeight'],
- videoFps: map['VideoFps'],
- videoBitrate: map['VideoBitrate'],
- minVideoBitrate: map['MinVideoBitrate'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (videoDeviceId != null) {
- map['VideoDeviceId'] = videoDeviceId;
- }
- map['VideoDeviceSourceType'] = videoDeviceSourceType.index;
- map['Width'] = width;
- map['Height'] = height;
- map['OutputWidth'] = outputWidth;
- map['OutputHeight'] = outputHeight;
- map['VideoFps'] = videoFps;
- map['VideoBitrate'] = videoBitrate;
- map['MinVideoBitrate'] = minVideoBitrate;
- return map;
- }
- }
- class ModifyDeviceMergedVideoSizeNotification extends NotificationDTO{
- bool mergedChannel;
- String? deviceCode;
- int mergedVideoOutputWidth;
- int mergedVideoOutputHeight;
- List<VideoDeviceDTO>? videoDeviceInfos;
- ModifyDeviceMergedVideoSizeNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.mergedChannel = false,
- this.deviceCode,
- this.mergedVideoOutputWidth = 0,
- this.mergedVideoOutputHeight = 0,
- this.videoDeviceInfos,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ModifyDeviceMergedVideoSizeNotification.fromJson(Map<String, dynamic> map) {
- return ModifyDeviceMergedVideoSizeNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- mergedChannel: map['MergedChannel'],
- deviceCode: map['DeviceCode'],
- mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
- mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
- videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['MergedChannel'] = mergedChannel;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
- map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
- if (videoDeviceInfos != null)
- map['VideoDeviceInfos'] = videoDeviceInfos;
- return map;
- }
- }
- class PasswordExpiredWarningNotification extends NotificationDTO{
- double surplusTime;
- PasswordExpiredWarningNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.surplusTime = 0,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory PasswordExpiredWarningNotification.fromJson(Map<String, dynamic> map) {
- return PasswordExpiredWarningNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- surplusTime: double.parse(map['SurplusTime'].toString()),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['SurplusTime'] = surplusTime;
- return map;
- }
- }
- class ProgressBarNotification extends NotificationDTO{
- int rate;
- ProgressBarNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.rate = 0,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ProgressBarNotification.fromJson(Map<String, dynamic> map) {
- return ProgressBarNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- rate: map['Rate'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['Rate'] = rate;
- return map;
- }
- }
- class TokenReplacedNotification extends NotificationDTO{
- String? userCode;
- TokenReplacedNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.userCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory TokenReplacedNotification.fromJson(Map<String, dynamic> map) {
- return TokenReplacedNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- userCode: map['UserCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCode != null)
- map['UserCode'] = userCode;
- return map;
- }
- }
- enum UpgradeTypeEnum {
- NoUpgrade,
- Normal,
- Force,
- AutoAfterRestart,
- }
- enum UpgradeUpdateTypeEnum {
- Part,
- All,
- }
- class DescriptionInfoDTO {
- String? description;
- String? languageCode;
- DescriptionInfoDTO({
- this.description,
- this.languageCode,
- });
- factory DescriptionInfoDTO.fromJson(Map<String, dynamic> map) {
- return DescriptionInfoDTO(
- description: map['Description'],
- languageCode: map['LanguageCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (description != null) {
- map['Description'] = description;
- }
- if (languageCode != null) {
- map['LanguageCode'] = languageCode;
- }
- return map;
- }
- }
- class UpgradeVersionNotification extends NotificationDTO{
- UpgradeTypeEnum upgradeType;
- String? upgradeCDNUrl;
- String? upgradeSourceUrl;
- String? backUpCDNUrl;
- String? backUpSourceUrl;
- UpgradeUpdateTypeEnum upgradeUpdateType;
- String? newVersion;
- List<DescriptionInfoDTO>? descriptions;
- UpgradeVersionNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.upgradeType = UpgradeTypeEnum.NoUpgrade,
- this.upgradeCDNUrl,
- this.upgradeSourceUrl,
- this.backUpCDNUrl,
- this.backUpSourceUrl,
- this.upgradeUpdateType = UpgradeUpdateTypeEnum.Part,
- this.newVersion,
- this.descriptions,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory UpgradeVersionNotification.fromJson(Map<String, dynamic> map) {
- return UpgradeVersionNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- upgradeType: UpgradeTypeEnum.values.firstWhere((e) => e.index == map['UpgradeType']),
- upgradeCDNUrl: map['UpgradeCDNUrl'],
- upgradeSourceUrl: map['UpgradeSourceUrl'],
- backUpCDNUrl: map['BackUpCDNUrl'],
- backUpSourceUrl: map['BackUpSourceUrl'],
- upgradeUpdateType: UpgradeUpdateTypeEnum.values.firstWhere((e) => e.index == map['UpgradeUpdateType']),
- newVersion: map['NewVersion'],
- descriptions: map['Descriptions'] != null ? (map['Descriptions'] as List).map((e)=>DescriptionInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['UpgradeType'] = upgradeType.index;
- if (upgradeCDNUrl != null)
- map['UpgradeCDNUrl'] = upgradeCDNUrl;
- if (upgradeSourceUrl != null)
- map['UpgradeSourceUrl'] = upgradeSourceUrl;
- if (backUpCDNUrl != null)
- map['BackUpCDNUrl'] = backUpCDNUrl;
- if (backUpSourceUrl != null)
- map['BackUpSourceUrl'] = backUpSourceUrl;
- map['UpgradeUpdateType'] = upgradeUpdateType.index;
- if (newVersion != null)
- map['NewVersion'] = newVersion;
- if (descriptions != null)
- map['Descriptions'] = descriptions;
- return map;
- }
- }
- class CloseLiveToDeviceNotification extends NotificationDTO{
- String? liveRoomCode;
- String? deviceCode;
- String? userCode;
- CloseLiveToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- this.deviceCode,
- this.userCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CloseLiveToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return CloseLiveToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- deviceCode: map['DeviceCode'],
- userCode: map['UserCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- return map;
- }
- }
- class ConnectStatusToClientNotification extends NotificationDTO{
- String? deviceCode;
- String? deviceName;
- ControlDeviceParameterEnum controlType;
- RemoteDeviceStateEnum remoteDeviceState;
- ConnectStatusToClientNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- this.deviceName,
- this.controlType = ControlDeviceParameterEnum.Start,
- this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ConnectStatusToClientNotification.fromJson(Map<String, dynamic> map) {
- return ConnectStatusToClientNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- deviceName: map['DeviceName'],
- controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
- remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (deviceName != null)
- map['DeviceName'] = deviceName;
- map['ControlType'] = controlType.index;
- map['RemoteDeviceState'] = remoteDeviceState.index;
- return map;
- }
- }
- enum TransactionTypeEnum {
- placeHolder_0,
- Consultion,
- Chat,
- Announcement,
- Session,
- RemoteDia,
- ControlParameter,
- Education,
- Upgrade,
- Live,
- AfterSales,
- }
- class ConnectStatusToDeviceNotification extends NotificationDTO{
- String? controlUserCode;
- String? controlUserName;
- ControlDeviceParameterEnum controlType;
- TransactionTypeEnum transactionType;
- LoginSource loginSource;
- String? deviceCode;
- ConnectStatusToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.controlUserCode,
- this.controlUserName,
- this.controlType = ControlDeviceParameterEnum.Start,
- this.transactionType = TransactionTypeEnum.Consultion,
- this.loginSource = LoginSource.PC,
- this.deviceCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ConnectStatusToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return ConnectStatusToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- controlUserCode: map['ControlUserCode'],
- controlUserName: map['ControlUserName'],
- controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
- transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- deviceCode: map['DeviceCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (controlUserCode != null)
- map['ControlUserCode'] = controlUserCode;
- if (controlUserName != null)
- map['ControlUserName'] = controlUserName;
- map['ControlType'] = controlType.index;
- map['TransactionType'] = transactionType.index;
- map['LoginSource'] = loginSource.index;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class DeviceLiveFinishedNotification extends NotificationDTO{
- String? liveRoomCode;
- DeviceLiveFinishedNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceLiveFinishedNotification.fromJson(Map<String, dynamic> map) {
- return DeviceLiveFinishedNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- return map;
- }
- }
- enum TransactionStatusEnum {
- placeHolder_0,
- Applied,
- Withdrawn,
- Rejected,
- ToStart,
- InProgress,
- PendingReport,
- End,
- Embedded,
- Common,
- Tencent,
- TRTC,
- VRTC,
- Expired,
- }
- class LiveData {
- int height;
- int width;
- String? rtmpPushUrl;
- String? rtmpPullUrl;
- String? httpPullUrl;
- String? hlsPullUrl;
- LiveData({
- this.height = 0,
- this.width = 0,
- this.rtmpPushUrl,
- this.rtmpPullUrl,
- this.httpPullUrl,
- this.hlsPullUrl,
- });
- factory LiveData.fromJson(Map<String, dynamic> map) {
- return LiveData(
- height: map['Height'],
- width: map['Width'],
- rtmpPushUrl: map['RtmpPushUrl'],
- rtmpPullUrl: map['RtmpPullUrl'],
- httpPullUrl: map['HttpPullUrl'],
- hlsPullUrl: map['HlsPullUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['Height'] = height;
- map['Width'] = width;
- if (rtmpPushUrl != null) {
- map['RtmpPushUrl'] = rtmpPushUrl;
- }
- if (rtmpPullUrl != null) {
- map['RtmpPullUrl'] = rtmpPullUrl;
- }
- if (httpPullUrl != null) {
- map['HttpPullUrl'] = httpPullUrl;
- }
- if (hlsPullUrl != null) {
- map['HlsPullUrl'] = hlsPullUrl;
- }
- return map;
- }
- }
- class VideoDeviceOutputInfo {
- String? videoDeviceId;
- VideoDeviceSourceTypeEnum videoDeviceSourceType;
- int outputWidth;
- int outputHeight;
- int videoFps;
- int videoBitrate;
- int minVideoBitrate;
- String? videoDeviceSign;
- LiveData? liveData;
- VideoDeviceOutputInfo({
- this.videoDeviceId,
- this.videoDeviceSourceType = VideoDeviceSourceTypeEnum.Desktop,
- this.outputWidth = 0,
- this.outputHeight = 0,
- this.videoFps = 0,
- this.videoBitrate = 0,
- this.minVideoBitrate = 0,
- this.videoDeviceSign,
- this.liveData,
- });
- factory VideoDeviceOutputInfo.fromJson(Map<String, dynamic> map) {
- return VideoDeviceOutputInfo(
- videoDeviceId: map['VideoDeviceId'],
- videoDeviceSourceType: VideoDeviceSourceTypeEnum.values.firstWhere((e) => e.index == map['VideoDeviceSourceType']),
- outputWidth: map['OutputWidth'],
- outputHeight: map['OutputHeight'],
- videoFps: map['VideoFps'],
- videoBitrate: map['VideoBitrate'],
- minVideoBitrate: map['MinVideoBitrate'],
- videoDeviceSign: map['VideoDeviceSign'],
- liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (videoDeviceId != null) {
- map['VideoDeviceId'] = videoDeviceId;
- }
- map['VideoDeviceSourceType'] = videoDeviceSourceType.index;
- map['OutputWidth'] = outputWidth;
- map['OutputHeight'] = outputHeight;
- map['VideoFps'] = videoFps;
- map['VideoBitrate'] = videoBitrate;
- map['MinVideoBitrate'] = minVideoBitrate;
- if (videoDeviceSign != null) {
- map['VideoDeviceSign'] = videoDeviceSign;
- }
- if (liveData != null) {
- map['LiveData'] = liveData;
- }
- return map;
- }
- }
- class StartLiveToDeviceNotification extends NotificationDTO{
- String? liveRoomCode;
- int roomNo;
- TransactionStatusEnum liveProtocol;
- int appId;
- bool mergedChannel;
- int mergedVideoOutputWidth;
- int mergedVideoOutputHeight;
- List<VideoDeviceOutputInfo>? videoDeviceOutputList;
- String? deviceCode;
- String? deviceSign;
- String? initiatorCode;
- StartLiveToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- this.roomNo = 0,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.appId = 0,
- this.mergedChannel = false,
- this.mergedVideoOutputWidth = 0,
- this.mergedVideoOutputHeight = 0,
- this.videoDeviceOutputList,
- this.deviceCode,
- this.deviceSign,
- this.initiatorCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory StartLiveToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return StartLiveToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- roomNo: map['RoomNo'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- appId: map['AppId'],
- mergedChannel: map['MergedChannel'],
- mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
- mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
- videoDeviceOutputList: map['VideoDeviceOutputList'] != null ? (map['VideoDeviceOutputList'] as List).map((e)=>VideoDeviceOutputInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- deviceCode: map['DeviceCode'],
- deviceSign: map['DeviceSign'],
- initiatorCode: map['InitiatorCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- map['RoomNo'] = roomNo;
- map['LiveProtocol'] = liveProtocol.index;
- map['AppId'] = appId;
- map['MergedChannel'] = mergedChannel;
- map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
- map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
- if (videoDeviceOutputList != null)
- map['VideoDeviceOutputList'] = videoDeviceOutputList;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (deviceSign != null)
- map['DeviceSign'] = deviceSign;
- if (initiatorCode != null)
- map['InitiatorCode'] = initiatorCode;
- return map;
- }
- }
- class CancelInvitingInLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- CancelInvitingInLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CancelInvitingInLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return CancelInvitingInLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class CancelLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- String? teacherCode;
- CancelLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.teacherCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CancelLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return CancelLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- teacherCode: map['TeacherCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- return map;
- }
- }
- enum CourseShareStates {
- Opened,
- Closed,
- }
- enum CourseShareType {
- Window,
- US,
- }
- class ShareInfoDTO {
- CourseShareStates currentShareState;
- CourseShareType currentShareType;
- String? currentShareMemberCode;
- String? currentShareMemberName;
- ShareInfoDTO({
- this.currentShareState = CourseShareStates.Opened,
- this.currentShareType = CourseShareType.Window,
- this.currentShareMemberCode,
- this.currentShareMemberName,
- });
- factory ShareInfoDTO.fromJson(Map<String, dynamic> map) {
- return ShareInfoDTO(
- currentShareState: CourseShareStates.values.firstWhere((e) => e.index == map['CurrentShareState']),
- currentShareType: CourseShareType.values.firstWhere((e) => e.index == map['CurrentShareType']),
- currentShareMemberCode: map['CurrentShareMemberCode'],
- currentShareMemberName: map['CurrentShareMemberName'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['CurrentShareState'] = currentShareState.index;
- map['CurrentShareType'] = currentShareType.index;
- if (currentShareMemberCode != null) {
- map['CurrentShareMemberCode'] = currentShareMemberCode;
- }
- if (currentShareMemberName != null) {
- map['CurrentShareMemberName'] = currentShareMemberName;
- }
- return map;
- }
- }
- class ChangeShareInLiveCourseNotification extends NotificationDTO{
- ShareInfoDTO? shareInfo;
- String? courseCode;
- ChangeShareInLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.shareInfo,
- this.courseCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ChangeShareInLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return ChangeShareInLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- shareInfo: map['ShareInfo'] != null ? ShareInfoDTO.fromJson(map['ShareInfo']) : null,
- courseCode: map['CourseCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (shareInfo != null)
- map['ShareInfo'] = shareInfo;
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class CloseLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- String? teacherCode;
- CloseLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.teacherCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CloseLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return CloseLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- teacherCode: map['TeacherCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- return map;
- }
- }
- class CloseCourseHeartRateToDeviceNotification extends NotificationDTO{
- String? liveRoomCode;
- CloseCourseHeartRateToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CloseCourseHeartRateToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return CloseCourseHeartRateToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- return map;
- }
- }
- class StartEducationHeartRateToDeviceNotification extends NotificationDTO{
- String? liveRoomCode;
- TransactionStatusEnum liveProtocol;
- int intervalSeconds;
- StartEducationHeartRateToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.intervalSeconds = 0,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory StartEducationHeartRateToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return StartEducationHeartRateToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- intervalSeconds: map['IntervalSeconds'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- map['LiveProtocol'] = liveProtocol.index;
- map['IntervalSeconds'] = intervalSeconds;
- return map;
- }
- }
- class CourcePaySuccessNotification extends NotificationDTO{
- String? paymentOrderCode;
- String? orderTitle;
- double orderAmount;
- DateTime? payTime;
- CourcePaySuccessNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.paymentOrderCode,
- this.orderTitle,
- this.orderAmount = 0,
- this.payTime,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CourcePaySuccessNotification.fromJson(Map<String, dynamic> map) {
- return CourcePaySuccessNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- paymentOrderCode: map['PaymentOrderCode'],
- orderTitle: map['OrderTitle'],
- orderAmount: double.parse(map['OrderAmount'].toString()),
- payTime: map['PayTime'] != null ? DateTime.parse(map['PayTime']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (paymentOrderCode != null)
- map['PaymentOrderCode'] = paymentOrderCode;
- if (orderTitle != null)
- map['OrderTitle'] = orderTitle;
- map['OrderAmount'] = orderAmount;
- if (payTime != null)
- map['PayTime'] = JsonRpcUtils.dateFormat(payTime!);
- return map;
- }
- }
- class CourseEntryNotification extends NotificationDTO{
- String? noticeData;
- CourseEntryNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.noticeData,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CourseEntryNotification.fromJson(Map<String, dynamic> map) {
- return CourseEntryNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- noticeData: map['NoticeData'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (noticeData != null)
- map['NoticeData'] = noticeData;
- return map;
- }
- }
- enum CourseStatusEnum {
- Unknown,
- NoApproval,
- Approved,
- RejectApproval,
- Started,
- HasEnded,
- HasCancelled,
- Overdue,
- Offline,
- }
- class CourseStatusNotification extends NotificationDTO{
- CourseStatusEnum status;
- String? courseCode;
- String? courseName;
- CourseStatusNotification({
- this.status = CourseStatusEnum.Unknown,
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.courseName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CourseStatusNotification.fromJson(Map<String, dynamic> map) {
- return CourseStatusNotification(
- status: CourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- courseName: map['CourseName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['Status'] = status.index;
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (courseName != null)
- map['CourseName'] = courseName;
- return map;
- }
- }
- enum LiveMemberEnum {
- placeHolder_0,
- User,
- Device,
- }
- enum UserStatusEnum {
- placeHolder_0,
- NotOnline,
- IsBusy,
- Idle,
- }
- enum LiveMemberStatus {
- Default,
- Accepted,
- Rejected,
- Joined,
- Left,
- }
- class LiveDataDTO {
- int width;
- int height;
- String? rtmpPushUrl;
- String? rtmpPullUrl;
- String? httpPullUrl;
- String? hlsPullUrl;
- LiveDataDTO({
- this.width = 0,
- this.height = 0,
- this.rtmpPushUrl,
- this.rtmpPullUrl,
- this.httpPullUrl,
- this.hlsPullUrl,
- });
- factory LiveDataDTO.fromJson(Map<String, dynamic> map) {
- return LiveDataDTO(
- width: map['Width'],
- height: map['Height'],
- rtmpPushUrl: map['RtmpPushUrl'],
- rtmpPullUrl: map['RtmpPullUrl'],
- httpPullUrl: map['HttpPullUrl'],
- hlsPullUrl: map['HlsPullUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['Width'] = width;
- map['Height'] = height;
- if (rtmpPushUrl != null) {
- map['RtmpPushUrl'] = rtmpPushUrl;
- }
- if (rtmpPullUrl != null) {
- map['RtmpPullUrl'] = rtmpPullUrl;
- }
- if (httpPullUrl != null) {
- map['HttpPullUrl'] = httpPullUrl;
- }
- if (hlsPullUrl != null) {
- map['HlsPullUrl'] = hlsPullUrl;
- }
- return map;
- }
- }
- class LiveCourseMember {
- String? id;
- String? name;
- LiveMemberEnum memberType;
- String? headImageToken;
- UserStatusEnum userStatusType;
- bool mute;
- bool videoOpend;
- bool isTeacher;
- bool isExpertUser;
- bool isAssistantUser;
- LiveMemberStatus status;
- String? loginServerUrl;
- LoginSource loginSource;
- LiveDataDTO? liveData;
- List<VideoDeviceOutputInfo>? videoDeviceInfos;
- bool isControllingParameter;
- bool mergedChannel;
- int mergedVideoOutputWidth;
- int mergedVideoOutputHeight;
- TransactionStatusEnum liveProtocol;
- bool backgroundRole;
- LiveCourseMember({
- this.id,
- this.name,
- this.memberType = LiveMemberEnum.User,
- this.headImageToken,
- this.userStatusType = UserStatusEnum.NotOnline,
- this.mute = false,
- this.videoOpend = false,
- this.isTeacher = false,
- this.isExpertUser = false,
- this.isAssistantUser = false,
- this.status = LiveMemberStatus.Default,
- this.loginServerUrl,
- this.loginSource = LoginSource.PC,
- this.liveData,
- this.videoDeviceInfos,
- this.isControllingParameter = false,
- this.mergedChannel = false,
- this.mergedVideoOutputWidth = 0,
- this.mergedVideoOutputHeight = 0,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.backgroundRole = false,
- });
- factory LiveCourseMember.fromJson(Map<String, dynamic> map) {
- return LiveCourseMember(
- id: map['Id'],
- name: map['Name'],
- memberType: LiveMemberEnum.values.firstWhere((e) => e.index == map['MemberType']),
- headImageToken: map['HeadImageToken'],
- userStatusType: UserStatusEnum.values.firstWhere((e) => e.index == map['UserStatusType']),
- mute: map['Mute'],
- videoOpend: map['VideoOpend'],
- isTeacher: map['IsTeacher'],
- isExpertUser: map['IsExpertUser'],
- isAssistantUser: map['IsAssistantUser'],
- status: LiveMemberStatus.values.firstWhere((e) => e.index == map['Status']),
- loginServerUrl: map['LoginServerUrl'],
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- liveData: map['LiveData'] != null ? LiveDataDTO.fromJson(map['LiveData']) : null,
- videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceOutputInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- isControllingParameter: map['IsControllingParameter'],
- mergedChannel: map['MergedChannel'],
- mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
- mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- backgroundRole: map['BackgroundRole'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (id != null) {
- map['Id'] = id;
- }
- if (name != null) {
- map['Name'] = name;
- }
- map['MemberType'] = memberType.index;
- if (headImageToken != null) {
- map['HeadImageToken'] = headImageToken;
- }
- map['UserStatusType'] = userStatusType.index;
- map['Mute'] = mute;
- map['VideoOpend'] = videoOpend;
- map['IsTeacher'] = isTeacher;
- map['IsExpertUser'] = isExpertUser;
- map['IsAssistantUser'] = isAssistantUser;
- map['Status'] = status.index;
- if (loginServerUrl != null) {
- map['LoginServerUrl'] = loginServerUrl;
- }
- map['LoginSource'] = loginSource.index;
- if (liveData != null) {
- map['LiveData'] = liveData;
- }
- if (videoDeviceInfos != null) {
- map['VideoDeviceInfos'] = videoDeviceInfos;
- }
- map['IsControllingParameter'] = isControllingParameter;
- map['MergedChannel'] = mergedChannel;
- map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
- map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
- map['LiveProtocol'] = liveProtocol.index;
- map['BackgroundRole'] = backgroundRole;
- return map;
- }
- }
- class HeartRateJoinCourseNotification extends NotificationDTO{
- String? courseCode;
- LiveCourseMember? joiner;
- HeartRateJoinCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.joiner,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory HeartRateJoinCourseNotification.fromJson(Map<String, dynamic> map) {
- return HeartRateJoinCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- joiner: map['Joiner'] != null ? LiveCourseMember.fromJson(map['Joiner']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (joiner != null)
- map['Joiner'] = joiner;
- return map;
- }
- }
- class HeartRateLeaveCourseNotification extends NotificationDTO{
- String? courseCode;
- LiveCourseMember? leaverInfo;
- HeartRateLeaveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.leaverInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory HeartRateLeaveCourseNotification.fromJson(Map<String, dynamic> map) {
- return HeartRateLeaveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- leaverInfo: map['LeaverInfo'] != null ? LiveCourseMember.fromJson(map['LeaverInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (leaverInfo != null)
- map['LeaverInfo'] = leaverInfo;
- return map;
- }
- }
- class InviteLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- int roomNo;
- TransactionStatusEnum liveProtocol;
- LiveCourseMember? initiator;
- InviteLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.roomNo = 0,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.initiator,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory InviteLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return InviteLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- roomNo: map['RoomNo'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- initiator: map['Initiator'] != null ? LiveCourseMember.fromJson(map['Initiator']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- map['RoomNo'] = roomNo;
- map['LiveProtocol'] = liveProtocol.index;
- if (initiator != null)
- map['Initiator'] = initiator;
- return map;
- }
- }
- class JoinLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- LiveCourseMember? joiner;
- bool isOldPlatform;
- JoinLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.joiner,
- this.isOldPlatform = false,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory JoinLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return JoinLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- joiner: map['Joiner'] != null ? LiveCourseMember.fromJson(map['Joiner']) : null,
- isOldPlatform: map['IsOldPlatform'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (joiner != null)
- map['Joiner'] = joiner;
- map['IsOldPlatform'] = isOldPlatform;
- return map;
- }
- }
- class DeviceJoinLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- LiveCourseMember? joiner;
- bool isOldPlatform;
- DeviceJoinLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.joiner,
- this.isOldPlatform = false,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceJoinLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return DeviceJoinLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- joiner: map['Joiner'] != null ? LiveCourseMember.fromJson(map['Joiner']) : null,
- isOldPlatform: map['IsOldPlatform'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (joiner != null)
- map['Joiner'] = joiner;
- map['IsOldPlatform'] = isOldPlatform;
- return map;
- }
- }
- class LeaveLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- LiveCourseMember? leaverInfo;
- LeaveLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.leaverInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory LeaveLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return LeaveLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- leaverInfo: map['LeaverInfo'] != null ? LiveCourseMember.fromJson(map['LeaverInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (leaverInfo != null)
- map['LeaverInfo'] = leaverInfo;
- return map;
- }
- }
- class MuteLiveCourseNotification extends NotificationDTO{
- String? courseCode;
- bool mute;
- LiveCourseMember? muterInfo;
- MuteLiveCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.mute = false,
- this.muterInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory MuteLiveCourseNotification.fromJson(Map<String, dynamic> map) {
- return MuteLiveCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- mute: map['Mute'],
- muterInfo: map['MuterInfo'] != null ? LiveCourseMember.fromJson(map['MuterInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- map['Mute'] = mute;
- if (muterInfo != null)
- map['MuterInfo'] = muterInfo;
- return map;
- }
- }
- class NetworkErrCourseNotification extends NotificationDTO{
- String? courseCode;
- LiveCourseMember? networkErrMemberInfo;
- NetworkErrCourseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.networkErrMemberInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory NetworkErrCourseNotification.fromJson(Map<String, dynamic> map) {
- return NetworkErrCourseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- networkErrMemberInfo: map['NetworkErrMemberInfo'] != null ? LiveCourseMember.fromJson(map['NetworkErrMemberInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- if (networkErrMemberInfo != null)
- map['NetworkErrMemberInfo'] = networkErrMemberInfo;
- return map;
- }
- }
- class SendLiveInteractiveBoardDataNotification extends NotificationDTO{
- String? courseCode;
- bool isClear;
- String? userCode;
- String? boardData;
- SendLiveInteractiveBoardDataNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.isClear = false,
- this.userCode,
- this.boardData,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SendLiveInteractiveBoardDataNotification.fromJson(Map<String, dynamic> map) {
- return SendLiveInteractiveBoardDataNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- isClear: map['IsClear'],
- userCode: map['UserCode'],
- boardData: map['BoardData'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- map['IsClear'] = isClear;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (boardData != null)
- map['BoardData'] = boardData;
- return map;
- }
- }
- class SwitchLiveCourseVideoNotification extends NotificationDTO{
- String? courseCode;
- bool opened;
- LiveCourseMember? switcherInfo;
- SwitchLiveCourseVideoNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.courseCode,
- this.opened = false,
- this.switcherInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SwitchLiveCourseVideoNotification.fromJson(Map<String, dynamic> map) {
- return SwitchLiveCourseVideoNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- courseCode: map['CourseCode'],
- opened: map['Opened'],
- switcherInfo: map['SwitcherInfo'] != null ? LiveCourseMember.fromJson(map['SwitcherInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- map['Opened'] = opened;
- if (switcherInfo != null)
- map['SwitcherInfo'] = switcherInfo;
- return map;
- }
- }
- class UpgradeNotification extends NotificationDTO{
- UpgradeTypeEnum upgadeType;
- String? upgradeCDNUrl;
- String? upgradeUrl;
- UpgradeUpdateTypeEnum upgradeUpdateType;
- String? newVersion;
- String? description;
- UpgradeNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.upgadeType = UpgradeTypeEnum.NoUpgrade,
- this.upgradeCDNUrl,
- this.upgradeUrl,
- this.upgradeUpdateType = UpgradeUpdateTypeEnum.Part,
- this.newVersion,
- this.description,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory UpgradeNotification.fromJson(Map<String, dynamic> map) {
- return UpgradeNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- upgadeType: UpgradeTypeEnum.values.firstWhere((e) => e.index == map['UpgadeType']),
- upgradeCDNUrl: map['UpgradeCDNUrl'],
- upgradeUrl: map['UpgradeUrl'],
- upgradeUpdateType: UpgradeUpdateTypeEnum.values.firstWhere((e) => e.index == map['UpgradeUpdateType']),
- newVersion: map['NewVersion'],
- description: map['Description'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['UpgadeType'] = upgadeType.index;
- if (upgradeCDNUrl != null)
- map['UpgradeCDNUrl'] = upgradeCDNUrl;
- if (upgradeUrl != null)
- map['UpgradeUrl'] = upgradeUrl;
- map['UpgradeUpdateType'] = upgradeUpdateType.index;
- if (newVersion != null)
- map['NewVersion'] = newVersion;
- if (description != null)
- map['Description'] = description;
- return map;
- }
- }
- class ApplyConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? operatorName;
- String? patientName;
- DateTime? applicationTime;
- String? applyOrganizationName;
- DateTime? consultationTime;
- ApplyConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.operatorName,
- this.patientName,
- this.applicationTime,
- this.applyOrganizationName,
- this.consultationTime,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ApplyConsultationNotification.fromJson(Map<String, dynamic> map) {
- return ApplyConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- operatorName: map['OperatorName'],
- patientName: map['PatientName'],
- applicationTime: map['ApplicationTime'] != null ? DateTime.parse(map['ApplicationTime']) : null,
- applyOrganizationName: map['ApplyOrganizationName'],
- consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (operatorName != null)
- map['OperatorName'] = operatorName;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (applicationTime != null)
- map['ApplicationTime'] = JsonRpcUtils.dateFormat(applicationTime!);
- if (applyOrganizationName != null)
- map['ApplyOrganizationName'] = applyOrganizationName;
- if (consultationTime != null)
- map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
- return map;
- }
- }
- class ApprovalApplyConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? operatorName;
- String? patientName;
- DateTime? consultationTime;
- DateTime? consultationTimeEnd;
- String? expertName;
- ApprovalApplyConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.operatorName,
- this.patientName,
- this.consultationTime,
- this.consultationTimeEnd,
- this.expertName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ApprovalApplyConsultationNotification.fromJson(Map<String, dynamic> map) {
- return ApprovalApplyConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- operatorName: map['OperatorName'],
- patientName: map['PatientName'],
- consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
- consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
- expertName: map['ExpertName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (operatorName != null)
- map['OperatorName'] = operatorName;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (consultationTime != null)
- map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
- if (consultationTimeEnd != null)
- map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
- if (expertName != null)
- map['ExpertName'] = expertName;
- return map;
- }
- }
- class CloseConsolutionHeartRateToDeviceNotification extends NotificationDTO{
- String? liveRoomCode;
- CloseConsolutionHeartRateToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CloseConsolutionHeartRateToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return CloseConsolutionHeartRateToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- return map;
- }
- }
- class ConsultationAnswerTimeoutNotification extends NotificationDTO{
- String? consultationCode;
- String? userCode;
- String? userName;
- ConsultationAnswerTimeoutNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.userCode,
- this.userName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ConsultationAnswerTimeoutNotification.fromJson(Map<String, dynamic> map) {
- return ConsultationAnswerTimeoutNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- userCode: map['UserCode'],
- userName: map['UserName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (userName != null)
- map['UserName'] = userName;
- return map;
- }
- }
- class ConsultationRemindNotification extends NotificationDTO{
- String? consultationCode;
- int countdownTime;
- String? patientName;
- DateTime? consultationTime;
- DateTime? consultationTimeEnd;
- String? expertName;
- ConsultationRemindNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.countdownTime = 0,
- this.patientName,
- this.consultationTime,
- this.consultationTimeEnd,
- this.expertName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ConsultationRemindNotification.fromJson(Map<String, dynamic> map) {
- return ConsultationRemindNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- countdownTime: map['CountdownTime'],
- patientName: map['PatientName'],
- consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
- consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
- expertName: map['ExpertName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['CountdownTime'] = countdownTime;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (consultationTime != null)
- map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
- if (consultationTimeEnd != null)
- map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
- if (expertName != null)
- map['ExpertName'] = expertName;
- return map;
- }
- }
- class InviteeApproveApplyConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? operatorName;
- String? patientName;
- DateTime? consultationTime;
- DateTime? consultationTimeEnd;
- InviteeApproveApplyConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.operatorName,
- this.patientName,
- this.consultationTime,
- this.consultationTimeEnd,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory InviteeApproveApplyConsultationNotification.fromJson(Map<String, dynamic> map) {
- return InviteeApproveApplyConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- operatorName: map['OperatorName'],
- patientName: map['PatientName'],
- consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
- consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (operatorName != null)
- map['OperatorName'] = operatorName;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (consultationTime != null)
- map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
- if (consultationTimeEnd != null)
- map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
- return map;
- }
- }
- class InviteeConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? operatorName;
- String? patientName;
- DateTime? consultationTime;
- DateTime? consultationTimeEnd;
- InviteeConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.operatorName,
- this.patientName,
- this.consultationTime,
- this.consultationTimeEnd,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory InviteeConsultationNotification.fromJson(Map<String, dynamic> map) {
- return InviteeConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- operatorName: map['OperatorName'],
- patientName: map['PatientName'],
- consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
- consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (operatorName != null)
- map['OperatorName'] = operatorName;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (consultationTime != null)
- map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
- if (consultationTimeEnd != null)
- map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
- return map;
- }
- }
- class InviteeRejectApplyConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? operatorName;
- String? patientName;
- DateTime? consultationTime;
- DateTime? consultationTimeEnd;
- String? rejectReason;
- InviteeRejectApplyConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.operatorName,
- this.patientName,
- this.consultationTime,
- this.consultationTimeEnd,
- this.rejectReason,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory InviteeRejectApplyConsultationNotification.fromJson(Map<String, dynamic> map) {
- return InviteeRejectApplyConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- operatorName: map['OperatorName'],
- patientName: map['PatientName'],
- consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
- consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
- rejectReason: map['RejectReason'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (operatorName != null)
- map['OperatorName'] = operatorName;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (consultationTime != null)
- map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
- if (consultationTimeEnd != null)
- map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
- if (rejectReason != null)
- map['RejectReason'] = rejectReason;
- return map;
- }
- }
- class RejectApplyConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? patientName;
- String? operatorName;
- String? rejectReason;
- RejectApplyConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.patientName,
- this.operatorName,
- this.rejectReason,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory RejectApplyConsultationNotification.fromJson(Map<String, dynamic> map) {
- return RejectApplyConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- patientName: map['PatientName'],
- operatorName: map['OperatorName'],
- rejectReason: map['RejectReason'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (patientName != null)
- map['PatientName'] = patientName;
- if (operatorName != null)
- map['OperatorName'] = operatorName;
- if (rejectReason != null)
- map['RejectReason'] = rejectReason;
- return map;
- }
- }
- class StartConsolutionHeartRateToDeviceNotification extends NotificationDTO{
- String? liveRoomCode;
- TransactionStatusEnum liveProtocol;
- int intervalSeconds;
- StartConsolutionHeartRateToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.liveRoomCode,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.intervalSeconds = 0,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory StartConsolutionHeartRateToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return StartConsolutionHeartRateToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- liveRoomCode: map['LiveRoomCode'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- intervalSeconds: map['IntervalSeconds'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (liveRoomCode != null)
- map['LiveRoomCode'] = liveRoomCode;
- map['LiveProtocol'] = liveProtocol.index;
- map['IntervalSeconds'] = intervalSeconds;
- return map;
- }
- }
- enum LiveStates {
- OK,
- TerminalRequestPush,
- TerminalIsLiving,
- TerminalPushTimeout,
- ServiceIsBusy,
- AccountUnauthenticated,
- FriendsAccountIsNotExsiting,
- TerminalIsLivingInOtherRoom,
- TerminalNotExist,
- TerminalOffLine,
- RtcUrlIsEmpty,
- FriendsAccountIsOffline,
- OtherIsBusy,
- Ignore,
- TalkIsBusy,
- TerminalRequestError,
- TerminalRequestTimeout,
- Cancelled,
- NotFoundTerminal,
- ShareTerminalVideoExpired,
- TerminalIsPushing,
- TerminalPushFailed,
- NotOnline,
- placeHolder_23,
- placeHolder_24,
- placeHolder_25,
- placeHolder_26,
- placeHolder_27,
- placeHolder_28,
- placeHolder_29,
- placeHolder_30,
- placeHolder_31,
- placeHolder_32,
- placeHolder_33,
- placeHolder_34,
- placeHolder_35,
- placeHolder_36,
- placeHolder_37,
- placeHolder_38,
- placeHolder_39,
- placeHolder_40,
- placeHolder_41,
- placeHolder_42,
- placeHolder_43,
- placeHolder_44,
- placeHolder_45,
- placeHolder_46,
- placeHolder_47,
- placeHolder_48,
- placeHolder_49,
- placeHolder_50,
- placeHolder_51,
- placeHolder_52,
- placeHolder_53,
- placeHolder_54,
- placeHolder_55,
- placeHolder_56,
- placeHolder_57,
- placeHolder_58,
- placeHolder_59,
- placeHolder_60,
- placeHolder_61,
- placeHolder_62,
- placeHolder_63,
- placeHolder_64,
- placeHolder_65,
- placeHolder_66,
- placeHolder_67,
- placeHolder_68,
- placeHolder_69,
- placeHolder_70,
- placeHolder_71,
- placeHolder_72,
- placeHolder_73,
- placeHolder_74,
- placeHolder_75,
- placeHolder_76,
- placeHolder_77,
- placeHolder_78,
- placeHolder_79,
- placeHolder_80,
- placeHolder_81,
- placeHolder_82,
- placeHolder_83,
- placeHolder_84,
- placeHolder_85,
- placeHolder_86,
- placeHolder_87,
- placeHolder_88,
- placeHolder_89,
- placeHolder_90,
- placeHolder_91,
- placeHolder_92,
- placeHolder_93,
- placeHolder_94,
- placeHolder_95,
- placeHolder_96,
- placeHolder_97,
- placeHolder_98,
- placeHolder_99,
- RequestChat,
- ChatRequestArrived,
- LiveRequestHandledInOldService,
- ExitTerminalLiveRequestFailed,
- TerminalStartPushing,
- InitiatorRequestingChat,
- RecipientAnswerred,
- RecipientRejected,
- RecipientAcceptted,
- ChatHangup,
- Idle,
- AcceptedInOtherDevice,
- Disconnected,
- LiveTalkingInProgressInOtherDevice,
- DeviceIsNotConnected,
- RecipientAcceptting,
- IsLivingOnTrainning,
- TrainningTerminalRoomIsOff,
- InitiatorChargeGroupNotAvailable,
- HeartBeatWarning,
- HeartBeatDown,
- TerminalOnLocalCapture,
- Failed,
- LowVersion,
- NoImagePushed,
- InitiativeExit,
- SessionReplaced,
- NoSupport,
- RoomNoExist,
- MemberNotExist,
- IsShared,
- }
- class MeetingMemberInfo {
- String? roomId;
- LiveStates state;
- String? id;
- String? displayName;
- String? avatar;
- String? userSign;
- MeetingMemberInfo({
- this.roomId,
- this.state = LiveStates.OK,
- this.id,
- this.displayName,
- this.avatar,
- this.userSign,
- });
- factory MeetingMemberInfo.fromJson(Map<String, dynamic> map) {
- return MeetingMemberInfo(
- roomId: map['RoomId'],
- state: LiveStates.values.firstWhere((e) => e.index == map['State']),
- id: map['Id'],
- displayName: map['DisplayName'],
- avatar: map['Avatar'],
- userSign: map['UserSign'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (roomId != null) {
- map['RoomId'] = roomId;
- }
- map['State'] = state.index;
- if (id != null) {
- map['Id'] = id;
- }
- if (displayName != null) {
- map['DisplayName'] = displayName;
- }
- if (avatar != null) {
- map['Avatar'] = avatar;
- }
- if (userSign != null) {
- map['UserSign'] = userSign;
- }
- return map;
- }
- }
- class PullChannelUrl {
- String? rtmpUrl;
- String? flvUrl;
- String? hlsUrl;
- int width;
- int height;
- String? name;
- bool enable;
- String? userId;
- PullChannelUrl({
- this.rtmpUrl,
- this.flvUrl,
- this.hlsUrl,
- this.width = 0,
- this.height = 0,
- this.name,
- this.enable = false,
- this.userId,
- });
- factory PullChannelUrl.fromJson(Map<String, dynamic> map) {
- return PullChannelUrl(
- rtmpUrl: map['RtmpUrl'],
- flvUrl: map['FlvUrl'],
- hlsUrl: map['HlsUrl'],
- width: map['Width'],
- height: map['Height'],
- name: map['Name'],
- enable: map['Enable'],
- userId: map['UserId'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (rtmpUrl != null) {
- map['RtmpUrl'] = rtmpUrl;
- }
- if (flvUrl != null) {
- map['FlvUrl'] = flvUrl;
- }
- if (hlsUrl != null) {
- map['HlsUrl'] = hlsUrl;
- }
- map['Width'] = width;
- map['Height'] = height;
- if (name != null) {
- map['Name'] = name;
- }
- map['Enable'] = enable;
- if (userId != null) {
- map['UserId'] = userId;
- }
- return map;
- }
- }
- class LiveTerminalInfo {
- String? id;
- String? roomId;
- int integerRoomId;
- LiveStates state;
- String? terminalUrl;
- String? cameraUrl;
- bool terminalLiveEnabled;
- bool cameraLiveEnabled;
- bool isMergeChannel;
- int terminalWidth;
- int terminalHeight;
- int cameraWidth;
- int cameraHeight;
- int terminalIntegerRoomId;
- bool isMultiChannels;
- List<PullChannelUrl>? channels;
- LiveTerminalInfo({
- this.id,
- this.roomId,
- this.integerRoomId = 0,
- this.state = LiveStates.OK,
- this.terminalUrl,
- this.cameraUrl,
- this.terminalLiveEnabled = false,
- this.cameraLiveEnabled = false,
- this.isMergeChannel = false,
- this.terminalWidth = 0,
- this.terminalHeight = 0,
- this.cameraWidth = 0,
- this.cameraHeight = 0,
- this.terminalIntegerRoomId = 0,
- this.isMultiChannels = false,
- this.channels,
- });
- factory LiveTerminalInfo.fromJson(Map<String, dynamic> map) {
- return LiveTerminalInfo(
- id: map['Id'],
- roomId: map['RoomId'],
- integerRoomId: map['IntegerRoomId'],
- state: LiveStates.values.firstWhere((e) => e.index == map['State']),
- terminalUrl: map['TerminalUrl'],
- cameraUrl: map['CameraUrl'],
- terminalLiveEnabled: map['TerminalLiveEnabled'],
- cameraLiveEnabled: map['CameraLiveEnabled'],
- isMergeChannel: map['IsMergeChannel'],
- terminalWidth: map['TerminalWidth'],
- terminalHeight: map['TerminalHeight'],
- cameraWidth: map['CameraWidth'],
- cameraHeight: map['CameraHeight'],
- terminalIntegerRoomId: map['TerminalIntegerRoomId'],
- isMultiChannels: map['IsMultiChannels'],
- channels: map['Channels'] != null ? (map['Channels'] as List).map((e)=>PullChannelUrl.fromJson(e as Map<String,dynamic>)).toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (id != null) {
- map['Id'] = id;
- }
- if (roomId != null) {
- map['RoomId'] = roomId;
- }
- map['IntegerRoomId'] = integerRoomId;
- map['State'] = state.index;
- if (terminalUrl != null) {
- map['TerminalUrl'] = terminalUrl;
- }
- if (cameraUrl != null) {
- map['CameraUrl'] = cameraUrl;
- }
- map['TerminalLiveEnabled'] = terminalLiveEnabled;
- map['CameraLiveEnabled'] = cameraLiveEnabled;
- map['IsMergeChannel'] = isMergeChannel;
- map['TerminalWidth'] = terminalWidth;
- map['TerminalHeight'] = terminalHeight;
- map['CameraWidth'] = cameraWidth;
- map['CameraHeight'] = cameraHeight;
- map['TerminalIntegerRoomId'] = terminalIntegerRoomId;
- map['IsMultiChannels'] = isMultiChannels;
- if (channels != null) {
- map['Channels'] = channels;
- }
- return map;
- }
- }
- class MeetingMemberNotification extends NotificationDTO{
- String? roomId;
- List<MeetingMemberInfo>? members;
- List<LiveTerminalInfo>? liveTerminals;
- MeetingMemberNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.roomId,
- this.members,
- this.liveTerminals,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory MeetingMemberNotification.fromJson(Map<String, dynamic> map) {
- return MeetingMemberNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- roomId: map['RoomId'],
- members: map['Members'] != null ? (map['Members'] as List).map((e)=>MeetingMemberInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- liveTerminals: map['LiveTerminals'] != null ? (map['LiveTerminals'] as List).map((e)=>LiveTerminalInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (roomId != null)
- map['RoomId'] = roomId;
- if (members != null)
- map['Members'] = members;
- if (liveTerminals != null)
- map['LiveTerminals'] = liveTerminals;
- return map;
- }
- }
- class MeetingHangupNotification extends NotificationDTO{
- LiveStates hangupReason;
- String? roomId;
- MeetingHangupNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.hangupReason = LiveStates.OK,
- this.roomId,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory MeetingHangupNotification.fromJson(Map<String, dynamic> map) {
- return MeetingHangupNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- hangupReason: LiveStates.values.firstWhere((e) => e.index == map['HangupReason']),
- roomId: map['RoomId'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['HangupReason'] = hangupReason.index;
- if (roomId != null)
- map['RoomId'] = roomId;
- return map;
- }
- }
- class RejectMeetingNotification extends NotificationDTO{
- String? userId;
- String? roomId;
- RejectMeetingNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.userId,
- this.roomId,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory RejectMeetingNotification.fromJson(Map<String, dynamic> map) {
- return RejectMeetingNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- userId: map['UserId'],
- roomId: map['RoomId'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userId != null)
- map['UserId'] = userId;
- if (roomId != null)
- map['RoomId'] = roomId;
- return map;
- }
- }
- class AcceptMeetingNotification extends NotificationDTO{
- String? subscriberId;
- String? roomId;
- LiveStates pushLiveState;
- AcceptMeetingNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.subscriberId,
- this.roomId,
- this.pushLiveState = LiveStates.OK,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory AcceptMeetingNotification.fromJson(Map<String, dynamic> map) {
- return AcceptMeetingNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- subscriberId: map['SubscriberId'],
- roomId: map['RoomId'],
- pushLiveState: LiveStates.values.firstWhere((e) => e.index == map['PushLiveState']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (subscriberId != null)
- map['SubscriberId'] = subscriberId;
- if (roomId != null)
- map['RoomId'] = roomId;
- map['PushLiveState'] = pushLiveState.index;
- return map;
- }
- }
- class MeetingPendingMemberTimeoutNotification extends NotificationDTO{
- String? roomId;
- List<String>? userIds;
- MeetingPendingMemberTimeoutNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.roomId,
- this.userIds,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory MeetingPendingMemberTimeoutNotification.fromJson(Map<String, dynamic> map) {
- return MeetingPendingMemberTimeoutNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- roomId: map['RoomId'],
- userIds: map['UserIds']?.cast<String>().toList(),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (roomId != null)
- map['RoomId'] = roomId;
- if (userIds != null)
- map['UserIds'] = userIds;
- return map;
- }
- }
- class ProbeApplicationSettingResponseNotification extends NotificationDTO{
- String? deviceCode;
- ControlDeviceParameterEnum controlType;
- RemoteDeviceStateEnum remoteDeviceState;
- ProbeApplicationSettingResponseNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- this.controlType = ControlDeviceParameterEnum.Start,
- this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ProbeApplicationSettingResponseNotification.fromJson(Map<String, dynamic> map) {
- return ProbeApplicationSettingResponseNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
- remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- map['ControlType'] = controlType.index;
- map['RemoteDeviceState'] = remoteDeviceState.index;
- return map;
- }
- }
- class CancelLogDownloadNotification extends NotificationDTO{
- String? controlUserCode;
- LoginSource loginSource;
- String? deviceCode;
- String? controlUserName;
- CancelLogDownloadNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.controlUserCode,
- this.loginSource = LoginSource.PC,
- this.deviceCode,
- this.controlUserName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CancelLogDownloadNotification.fromJson(Map<String, dynamic> map) {
- return CancelLogDownloadNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- controlUserCode: map['ControlUserCode'],
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- deviceCode: map['DeviceCode'],
- controlUserName: map['ControlUserName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (controlUserCode != null)
- map['ControlUserCode'] = controlUserCode;
- map['LoginSource'] = loginSource.index;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (controlUserName != null)
- map['ControlUserName'] = controlUserName;
- return map;
- }
- }
- class DeviceDownloadPatchProgressToUserNotification extends NotificationDTO{
- int progress;
- String? patchCode;
- String? deviceCode;
- String? patchName;
- RemoteDeviceStateEnum remoteDeviceState;
- DeviceDownloadPatchProgressToUserNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.progress = 0,
- this.patchCode,
- this.deviceCode,
- this.patchName,
- this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DeviceDownloadPatchProgressToUserNotification.fromJson(Map<String, dynamic> map) {
- return DeviceDownloadPatchProgressToUserNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- progress: map['Progress'],
- patchCode: map['PatchCode'],
- deviceCode: map['DeviceCode'],
- patchName: map['PatchName'],
- remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['Progress'] = progress;
- if (patchCode != null)
- map['PatchCode'] = patchCode;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (patchName != null)
- map['PatchName'] = patchName;
- map['RemoteDeviceState'] = remoteDeviceState.index;
- return map;
- }
- }
- enum DevicePrinterEnum {
- GetInstalledPrinters,
- PrintTestPage,
- UpdatePrinterConfiguration,
- GetUninstalledPrinters,
- InstallPrinterDrive,
- DeletePrinter,
- CancelSearchPrinter,
- SearchPrinter,
- CancelInstallPrinter,
- InstallPrinterProgress,
- }
- enum DevicePrinterParameterEnum {
- PrinterName,
- IPAddress,
- Port,
- PrinterModel,
- DevicePrinterPatchCode,
- PageSize,
- PageOrientation,
- IsNormalSearchType,
- }
- class DevicePrinterParameter {
- DevicePrinterParameterEnum setPrinterEnum;
- String? parameterValue;
- DevicePrinterParameter({
- this.setPrinterEnum = DevicePrinterParameterEnum.PrinterName,
- this.parameterValue,
- });
- factory DevicePrinterParameter.fromJson(Map<String, dynamic> map) {
- return DevicePrinterParameter(
- setPrinterEnum: DevicePrinterParameterEnum.values.firstWhere((e) => e.index == map['SetPrinterEnum']),
- parameterValue: map['ParameterValue'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['SetPrinterEnum'] = setPrinterEnum.index;
- if (parameterValue != null) {
- map['ParameterValue'] = parameterValue;
- }
- return map;
- }
- }
- class BaseDTO {
- DateTime? createTime;
- DateTime? updateTime;
- BaseDTO({
- this.createTime,
- this.updateTime,
- });
- factory BaseDTO.fromJson(Map<String, dynamic> map) {
- return BaseDTO(
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (createTime != null) {
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- }
- if (updateTime != null) {
- map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
- }
- return map;
- }
- }
- class UploadDeviceFileInfoDTO {
- int partNum;
- String? fileUrl;
- UploadDeviceFileInfoDTO({
- this.partNum = 0,
- this.fileUrl,
- });
- factory UploadDeviceFileInfoDTO.fromJson(Map<String, dynamic> map) {
- return UploadDeviceFileInfoDTO(
- partNum: map['PartNum'],
- fileUrl: map['FileUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['PartNum'] = partNum;
- if (fileUrl != null) {
- map['FileUrl'] = fileUrl;
- }
- return map;
- }
- }
- class DevicePrinterDTO extends BaseDTO{
- String? code;
- String? name;
- String? driveModelName;
- String? description;
- String? osVersion;
- List<UploadDeviceFileInfoDTO>? fileUploadInfoList;
- int fileSize;
- String? printerBrands;
- List<String>? printerModels;
- String? fileName;
- DevicePrinterDTO({
- this.code,
- this.name,
- this.driveModelName,
- this.description,
- this.osVersion,
- this.fileUploadInfoList,
- this.fileSize = 0,
- this.printerBrands,
- this.printerModels,
- this.fileName,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory DevicePrinterDTO.fromJson(Map<String, dynamic> map) {
- return DevicePrinterDTO(
- code: map['Code'],
- name: map['Name'],
- driveModelName: map['DriveModelName'],
- description: map['Description'],
- osVersion: map['OsVersion'],
- fileUploadInfoList: map['FileUploadInfoList'] != null ? (map['FileUploadInfoList'] as List).map((e)=>UploadDeviceFileInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- fileSize: map['FileSize'],
- printerBrands: map['PrinterBrands'],
- printerModels: map['PrinterModels']?.cast<String>().toList(),
- fileName: map['FileName'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (name != null)
- map['Name'] = name;
- if (driveModelName != null)
- map['DriveModelName'] = driveModelName;
- if (description != null)
- map['Description'] = description;
- if (osVersion != null)
- map['OsVersion'] = osVersion;
- if (fileUploadInfoList != null)
- map['FileUploadInfoList'] = fileUploadInfoList;
- map['FileSize'] = fileSize;
- if (printerBrands != null)
- map['PrinterBrands'] = printerBrands;
- if (printerModels != null)
- map['PrinterModels'] = printerModels;
- if (fileName != null)
- map['FileName'] = fileName;
- return map;
- }
- }
- class DevicePrinterRequestNotification extends NotificationDTO{
- DevicePrinterEnum setPrinterEnum;
- List<DevicePrinterParameter>? parameters;
- DevicePrinterDTO? devicePrinter;
- String? deviceCode;
- String? operatorCode;
- DevicePrinterRequestNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.setPrinterEnum = DevicePrinterEnum.GetInstalledPrinters,
- this.parameters,
- this.devicePrinter,
- this.deviceCode,
- this.operatorCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DevicePrinterRequestNotification.fromJson(Map<String, dynamic> map) {
- return DevicePrinterRequestNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- setPrinterEnum: DevicePrinterEnum.values.firstWhere((e) => e.index == map['SetPrinterEnum']),
- parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>DevicePrinterParameter.fromJson(e as Map<String,dynamic>)).toList() : null,
- devicePrinter: map['DevicePrinter'] != null ? DevicePrinterDTO.fromJson(map['DevicePrinter']) : null,
- deviceCode: map['DeviceCode'],
- operatorCode: map['OperatorCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['SetPrinterEnum'] = setPrinterEnum.index;
- if (parameters != null)
- map['Parameters'] = parameters;
- if (devicePrinter != null)
- map['DevicePrinter'] = devicePrinter;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (operatorCode != null)
- map['OperatorCode'] = operatorCode;
- return map;
- }
- }
- class DevicePrinterParameterDTO {
- String? name;
- String? pageSize;
- String? pageOrientation;
- List<String>? pageOrientationList;
- List<String>? pageSizeList;
- String? brand;
- int installPrinterProgress;
- String? iPAddress;
- DevicePrinterParameterDTO({
- this.name,
- this.pageSize,
- this.pageOrientation,
- this.pageOrientationList,
- this.pageSizeList,
- this.brand,
- this.installPrinterProgress = 0,
- this.iPAddress,
- });
- factory DevicePrinterParameterDTO.fromJson(Map<String, dynamic> map) {
- return DevicePrinterParameterDTO(
- name: map['Name'],
- pageSize: map['PageSize'],
- pageOrientation: map['PageOrientation'],
- pageOrientationList: map['PageOrientationList']?.cast<String>().toList(),
- pageSizeList: map['PageSizeList']?.cast<String>().toList(),
- brand: map['Brand'],
- installPrinterProgress: map['InstallPrinterProgress'],
- iPAddress: map['IPAddress'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (name != null) {
- map['Name'] = name;
- }
- if (pageSize != null) {
- map['PageSize'] = pageSize;
- }
- if (pageOrientation != null) {
- map['PageOrientation'] = pageOrientation;
- }
- if (pageOrientationList != null) {
- map['PageOrientationList'] = pageOrientationList;
- }
- if (pageSizeList != null) {
- map['PageSizeList'] = pageSizeList;
- }
- if (brand != null) {
- map['Brand'] = brand;
- }
- map['InstallPrinterProgress'] = installPrinterProgress;
- if (iPAddress != null) {
- map['IPAddress'] = iPAddress;
- }
- return map;
- }
- }
- class DevicePrinterResultNotification extends NotificationDTO{
- String? deviceCode;
- DevicePrinterEnum setPrinterEnum;
- List<DevicePrinterParameterDTO>? devicePrinterList;
- RemoteDeviceStateEnum remoteDeviceState;
- DevicePrinterResultNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- this.setPrinterEnum = DevicePrinterEnum.GetInstalledPrinters,
- this.devicePrinterList,
- this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory DevicePrinterResultNotification.fromJson(Map<String, dynamic> map) {
- return DevicePrinterResultNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- setPrinterEnum: DevicePrinterEnum.values.firstWhere((e) => e.index == map['SetPrinterEnum']),
- devicePrinterList: map['DevicePrinterList'] != null ? (map['DevicePrinterList'] as List).map((e)=>DevicePrinterParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- map['SetPrinterEnum'] = setPrinterEnum.index;
- if (devicePrinterList != null)
- map['DevicePrinterList'] = devicePrinterList;
- map['RemoteDeviceState'] = remoteDeviceState.index;
- return map;
- }
- }
- class GetRemoteLogToClientNotification extends NotificationDTO{
- String? deviceCode;
- String? logFileToken;
- int rate;
- RemoteDeviceStateEnum remoteDeviceState;
- String? fileName;
- GetRemoteLogToClientNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- this.logFileToken,
- this.rate = 0,
- this.remoteDeviceState = RemoteDeviceStateEnum.Unknown,
- this.fileName,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory GetRemoteLogToClientNotification.fromJson(Map<String, dynamic> map) {
- return GetRemoteLogToClientNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- logFileToken: map['LogFileToken'],
- rate: map['Rate'],
- remoteDeviceState: RemoteDeviceStateEnum.values.firstWhere((e) => e.index == map['RemoteDeviceState']),
- fileName: map['FileName'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (logFileToken != null)
- map['LogFileToken'] = logFileToken;
- map['Rate'] = rate;
- map['RemoteDeviceState'] = remoteDeviceState.index;
- if (fileName != null)
- map['FileName'] = fileName;
- return map;
- }
- }
- class GetRemoteLogToDeviceNotification extends NotificationDTO{
- String? controlUserCode;
- DateTime? startTime;
- DateTime? endTime;
- LoginSource loginSource;
- String? deviceCode;
- String? controlUserName;
- String? scriptVersion;
- GetRemoteLogToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.controlUserCode,
- this.startTime,
- this.endTime,
- this.loginSource = LoginSource.PC,
- this.deviceCode,
- this.controlUserName,
- this.scriptVersion,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory GetRemoteLogToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return GetRemoteLogToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- controlUserCode: map['ControlUserCode'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- deviceCode: map['DeviceCode'],
- controlUserName: map['ControlUserName'],
- scriptVersion: map['ScriptVersion'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (controlUserCode != null)
- map['ControlUserCode'] = controlUserCode;
- if (startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if (endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- map['LoginSource'] = loginSource.index;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (controlUserName != null)
- map['ControlUserName'] = controlUserName;
- if (scriptVersion != null)
- map['ScriptVersion'] = scriptVersion;
- return map;
- }
- }
- enum PushDevicePatchEnum {
- Start,
- Cancel,
- }
- class PushDevicePatchToDeviceNotification extends NotificationDTO{
- String? patchName;
- String? patchCode;
- List<UploadDeviceFileInfoDTO>? deviceFileInfoList;
- int fileSize;
- PushDevicePatchEnum pushEnum;
- String? fileName;
- String? deviceType;
- String? deviceCode;
- String? userCode;
- PushDevicePatchToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.patchName,
- this.patchCode,
- this.deviceFileInfoList,
- this.fileSize = 0,
- this.pushEnum = PushDevicePatchEnum.Start,
- this.fileName,
- this.deviceType,
- this.deviceCode,
- this.userCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory PushDevicePatchToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return PushDevicePatchToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- patchName: map['PatchName'],
- patchCode: map['PatchCode'],
- deviceFileInfoList: map['DeviceFileInfoList'] != null ? (map['DeviceFileInfoList'] as List).map((e)=>UploadDeviceFileInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- fileSize: map['FileSize'],
- pushEnum: PushDevicePatchEnum.values.firstWhere((e) => e.index == map['PushEnum']),
- fileName: map['FileName'],
- deviceType: map['DeviceType'],
- deviceCode: map['DeviceCode'],
- userCode: map['UserCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (patchName != null)
- map['PatchName'] = patchName;
- if (patchCode != null)
- map['PatchCode'] = patchCode;
- if (deviceFileInfoList != null)
- map['DeviceFileInfoList'] = deviceFileInfoList;
- map['FileSize'] = fileSize;
- map['PushEnum'] = pushEnum.index;
- if (fileName != null)
- map['FileName'] = fileName;
- if (deviceType != null)
- map['DeviceType'] = deviceType;
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- return map;
- }
- }
- class RestartDeviceNotification extends NotificationDTO{
- String? deviceCode;
- String? controlUserCode;
- RestartDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.deviceCode,
- this.controlUserCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory RestartDeviceNotification.fromJson(Map<String, dynamic> map) {
- return RestartDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- deviceCode: map['DeviceCode'],
- controlUserCode: map['ControlUserCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if (controlUserCode != null)
- map['ControlUserCode'] = controlUserCode;
- return map;
- }
- }
- class LiveConsultationMemberInfo {
- String? id;
- String? name;
- String? headImageUrl;
- LiveConsultationMemberInfo({
- this.id,
- this.name,
- this.headImageUrl,
- });
- factory LiveConsultationMemberInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationMemberInfo(
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (id != null) {
- map['Id'] = id;
- }
- if (name != null) {
- map['Name'] = name;
- }
- if (headImageUrl != null) {
- map['HeadImageUrl'] = headImageUrl;
- }
- return map;
- }
- }
- class LiveConsultatioAccepterInfo extends LiveConsultationMemberInfo{
- bool isOnline;
- bool mute;
- bool videoOpend;
- LoginSource loginSource;
- LiveData? liveData;
- LiveConsultatioAccepterInfo({
- this.isOnline = false,
- this.mute = false,
- this.videoOpend = false,
- this.loginSource = LoginSource.PC,
- this.liveData,
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultatioAccepterInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultatioAccepterInfo(
- isOnline: map['IsOnline'],
- mute: map['Mute'],
- videoOpend: map['VideoOpend'],
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['IsOnline'] = isOnline;
- map['Mute'] = mute;
- map['VideoOpend'] = videoOpend;
- map['LoginSource'] = loginSource.index;
- if (liveData != null)
- map['LiveData'] = liveData;
- return map;
- }
- }
- class AcceptLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultatioAccepterInfo? accepter;
- AcceptLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.accepter,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory AcceptLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return AcceptLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- accepter: map['Accepter'] != null ? LiveConsultatioAccepterInfo.fromJson(map['Accepter']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (accepter != null)
- map['Accepter'] = accepter;
- return map;
- }
- }
- class CancelInvitingInLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- List<String>? userCodes;
- CancelInvitingInLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.userCodes,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CancelInvitingInLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return CancelInvitingInLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- userCodes: map['UserCodes']?.cast<String>().toList(),
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (userCodes != null)
- map['UserCodes'] = userCodes;
- return map;
- }
- }
- class CancelLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? initiatorCode;
- CancelLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.initiatorCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CancelLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return CancelLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- initiatorCode: map['InitiatorCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (initiatorCode != null)
- map['InitiatorCode'] = initiatorCode;
- return map;
- }
- }
- class CloseLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- String? initiatorCode;
- CloseLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.initiatorCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CloseLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return CloseLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- initiatorCode: map['InitiatorCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (initiatorCode != null)
- map['InitiatorCode'] = initiatorCode;
- return map;
- }
- }
- enum LiveConsultationMemberStatus {
- Default,
- Accepted,
- Rejected,
- Joined,
- Left,
- }
- class LiveConsultationMember {
- String? id;
- String? name;
- LiveMemberEnum memberType;
- String? headImageToken;
- bool isOnline;
- bool mute;
- bool videoOpend;
- bool isInitiator;
- bool isBusy;
- LiveConsultationMemberStatus status;
- String? loginServerUrl;
- LoginSource loginSource;
- bool mergedChannel;
- int mergedVideoOutputWidth;
- int mergedVideoOutputHeight;
- LiveData? liveData;
- List<VideoDeviceOutputInfo>? videoDeviceInfos;
- bool isControllingParameter;
- int sortNumber;
- int sortLevel;
- bool isOldPlatform;
- bool supportRtc;
- LiveConsultationMember({
- this.id,
- this.name,
- this.memberType = LiveMemberEnum.User,
- this.headImageToken,
- this.isOnline = false,
- this.mute = false,
- this.videoOpend = false,
- this.isInitiator = false,
- this.isBusy = false,
- this.status = LiveConsultationMemberStatus.Default,
- this.loginServerUrl,
- this.loginSource = LoginSource.PC,
- this.mergedChannel = false,
- this.mergedVideoOutputWidth = 0,
- this.mergedVideoOutputHeight = 0,
- this.liveData,
- this.videoDeviceInfos,
- this.isControllingParameter = false,
- this.sortNumber = 0,
- this.sortLevel = 0,
- this.isOldPlatform = false,
- this.supportRtc = false,
- });
- factory LiveConsultationMember.fromJson(Map<String, dynamic> map) {
- return LiveConsultationMember(
- id: map['Id'],
- name: map['Name'],
- memberType: LiveMemberEnum.values.firstWhere((e) => e.index == map['MemberType']),
- headImageToken: map['HeadImageToken'],
- isOnline: map['IsOnline'],
- mute: map['Mute'],
- videoOpend: map['VideoOpend'],
- isInitiator: map['IsInitiator'],
- isBusy: map['IsBusy'],
- status: LiveConsultationMemberStatus.values.firstWhere((e) => e.index == map['Status']),
- loginServerUrl: map['LoginServerUrl'],
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- mergedChannel: map['MergedChannel'],
- mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
- mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
- liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
- videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceOutputInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- isControllingParameter: map['IsControllingParameter'],
- sortNumber: map['SortNumber'],
- sortLevel: map['SortLevel'],
- isOldPlatform: map['IsOldPlatform'],
- supportRtc: map['SupportRtc'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (id != null) {
- map['Id'] = id;
- }
- if (name != null) {
- map['Name'] = name;
- }
- map['MemberType'] = memberType.index;
- if (headImageToken != null) {
- map['HeadImageToken'] = headImageToken;
- }
- map['IsOnline'] = isOnline;
- map['Mute'] = mute;
- map['VideoOpend'] = videoOpend;
- map['IsInitiator'] = isInitiator;
- map['IsBusy'] = isBusy;
- map['Status'] = status.index;
- if (loginServerUrl != null) {
- map['LoginServerUrl'] = loginServerUrl;
- }
- map['LoginSource'] = loginSource.index;
- map['MergedChannel'] = mergedChannel;
- map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
- map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
- if (liveData != null) {
- map['LiveData'] = liveData;
- }
- if (videoDeviceInfos != null) {
- map['VideoDeviceInfos'] = videoDeviceInfos;
- }
- map['IsControllingParameter'] = isControllingParameter;
- map['SortNumber'] = sortNumber;
- map['SortLevel'] = sortLevel;
- map['IsOldPlatform'] = isOldPlatform;
- map['SupportRtc'] = supportRtc;
- return map;
- }
- }
- class ChangeConsultationNotification extends NotificationDTO{
- String? consultationCode;
- int roomNo;
- List<LiveConsultationMember>? memberLiveDatas;
- ChangeConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.roomNo = 0,
- this.memberLiveDatas,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ChangeConsultationNotification.fromJson(Map<String, dynamic> map) {
- return ChangeConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- roomNo: map['RoomNo'],
- memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['RoomNo'] = roomNo;
- if (memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- return map;
- }
- }
- class ChangeConsultationToDeviceNotification extends NotificationDTO{
- String? consultationCode;
- int roomNo;
- List<LiveConsultationMember>? memberLiveDatas;
- ChangeConsultationToDeviceNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.roomNo = 0,
- this.memberLiveDatas,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory ChangeConsultationToDeviceNotification.fromJson(Map<String, dynamic> map) {
- return ChangeConsultationToDeviceNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- roomNo: map['RoomNo'],
- memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['RoomNo'] = roomNo;
- if (memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- return map;
- }
- }
- class CloseConsultationDueToChangeNotification extends NotificationDTO{
- String? consultationCode;
- CloseConsultationDueToChangeNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory CloseConsultationDueToChangeNotification.fromJson(Map<String, dynamic> map) {
- return CloseConsultationDueToChangeNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- return map;
- }
- }
- class EmergencyCallFailedNotification extends NotificationDTO{
- String? consultationCode;
- EmergencyCallFailedNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory EmergencyCallFailedNotification.fromJson(Map<String, dynamic> map) {
- return EmergencyCallFailedNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- return map;
- }
- }
- class EmergencyCallNotification extends NotificationDTO{
- String? consultationCode;
- int roomNo;
- int timeout;
- LiveConsultationMember? initiator;
- EmergencyCallNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.roomNo = 0,
- this.timeout = 0,
- this.initiator,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory EmergencyCallNotification.fromJson(Map<String, dynamic> map) {
- return EmergencyCallNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- roomNo: map['RoomNo'],
- timeout: map['Timeout'],
- initiator: map['Initiator'] != null ? LiveConsultationMember.fromJson(map['Initiator']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['RoomNo'] = roomNo;
- map['Timeout'] = timeout;
- if (initiator != null)
- map['Initiator'] = initiator;
- return map;
- }
- }
- class LiveConsultationJoinDeviceInfo {
- TransactionStatusEnum liveProtocol;
- int appId;
- bool mergedChannel;
- int mergedVideoOutputWidth;
- int mergedVideoOutputHeight;
- List<VideoDeviceOutputInfo>? videoDeviceOutputList;
- String? deviceCode;
- String? deviceSign;
- bool isOldPlatform;
- bool supportRtc;
- LiveConsultationJoinDeviceInfo({
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.appId = 0,
- this.mergedChannel = false,
- this.mergedVideoOutputWidth = 0,
- this.mergedVideoOutputHeight = 0,
- this.videoDeviceOutputList,
- this.deviceCode,
- this.deviceSign,
- this.isOldPlatform = false,
- this.supportRtc = false,
- });
- factory LiveConsultationJoinDeviceInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationJoinDeviceInfo(
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- appId: map['AppId'],
- mergedChannel: map['MergedChannel'],
- mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
- mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
- videoDeviceOutputList: map['VideoDeviceOutputList'] != null ? (map['VideoDeviceOutputList'] as List).map((e)=>VideoDeviceOutputInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- deviceCode: map['DeviceCode'],
- deviceSign: map['DeviceSign'],
- isOldPlatform: map['IsOldPlatform'],
- supportRtc: map['SupportRtc'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['LiveProtocol'] = liveProtocol.index;
- map['AppId'] = appId;
- map['MergedChannel'] = mergedChannel;
- map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
- map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
- if (videoDeviceOutputList != null) {
- map['VideoDeviceOutputList'] = videoDeviceOutputList;
- }
- if (deviceCode != null) {
- map['DeviceCode'] = deviceCode;
- }
- if (deviceSign != null) {
- map['DeviceSign'] = deviceSign;
- }
- map['IsOldPlatform'] = isOldPlatform;
- map['SupportRtc'] = supportRtc;
- return map;
- }
- }
- class LiveConsultationJoinerInfo extends LiveConsultationMemberInfo{
- bool isOnline;
- bool mute;
- bool videoOpend;
- bool isInitiator;
- LoginSource loginSource;
- LiveData? liveData;
- int sortNumber;
- int sortLevel;
- LiveConsultationJoinDeviceInfo? consultationDeviceInfo;
- bool isOldPlatform;
- bool supportRtc;
- LiveConsultationJoinerInfo({
- this.isOnline = false,
- this.mute = false,
- this.videoOpend = false,
- this.isInitiator = false,
- this.loginSource = LoginSource.PC,
- this.liveData,
- this.sortNumber = 0,
- this.sortLevel = 0,
- this.consultationDeviceInfo,
- this.isOldPlatform = false,
- this.supportRtc = false,
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultationJoinerInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationJoinerInfo(
- isOnline: map['IsOnline'],
- mute: map['Mute'],
- videoOpend: map['VideoOpend'],
- isInitiator: map['IsInitiator'],
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
- sortNumber: map['SortNumber'],
- sortLevel: map['SortLevel'],
- consultationDeviceInfo: map['ConsultationDeviceInfo'] != null ? LiveConsultationJoinDeviceInfo.fromJson(map['ConsultationDeviceInfo']) : null,
- isOldPlatform: map['IsOldPlatform'],
- supportRtc: map['SupportRtc'],
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['IsOnline'] = isOnline;
- map['Mute'] = mute;
- map['VideoOpend'] = videoOpend;
- map['IsInitiator'] = isInitiator;
- map['LoginSource'] = loginSource.index;
- if (liveData != null)
- map['LiveData'] = liveData;
- map['SortNumber'] = sortNumber;
- map['SortLevel'] = sortLevel;
- if (consultationDeviceInfo != null)
- map['ConsultationDeviceInfo'] = consultationDeviceInfo;
- map['IsOldPlatform'] = isOldPlatform;
- map['SupportRtc'] = supportRtc;
- return map;
- }
- }
- class HeartRateJoinConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationJoinerInfo? joiner;
- HeartRateJoinConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.joiner,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory HeartRateJoinConsultationNotification.fromJson(Map<String, dynamic> map) {
- return HeartRateJoinConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- joiner: map['Joiner'] != null ? LiveConsultationJoinerInfo.fromJson(map['Joiner']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (joiner != null)
- map['Joiner'] = joiner;
- return map;
- }
- }
- class LiveConsultationLeaverInfo extends LiveConsultationMemberInfo{
- LiveConsultationLeaverInfo({
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultationLeaverInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationLeaverInfo(
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class HeartRateLeaveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationLeaverInfo? leaverInfo;
- HeartRateLeaveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.leaverInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory HeartRateLeaveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return HeartRateLeaveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- leaverInfo: map['LeaverInfo'] != null ? LiveConsultationLeaverInfo.fromJson(map['LeaverInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (leaverInfo != null)
- map['LeaverInfo'] = leaverInfo;
- return map;
- }
- }
- class InviteLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- int roomNo;
- TransactionStatusEnum liveProtocol;
- LiveConsultationMember? initiator;
- InviteLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.roomNo = 0,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.initiator,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory InviteLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return InviteLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- roomNo: map['RoomNo'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- initiator: map['Initiator'] != null ? LiveConsultationMember.fromJson(map['Initiator']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['RoomNo'] = roomNo;
- map['LiveProtocol'] = liveProtocol.index;
- if (initiator != null)
- map['Initiator'] = initiator;
- return map;
- }
- }
- class InviteInLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- int roomNo;
- LiveConsultationMember? operator;
- List<LiveConsultationMember>? memberLiveDatas;
- InviteInLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.roomNo = 0,
- this.operator,
- this.memberLiveDatas,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory InviteInLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return InviteInLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- roomNo: map['RoomNo'],
- operator: map['Operator'] != null ? LiveConsultationMember.fromJson(map['Operator']) : null,
- memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['RoomNo'] = roomNo;
- if (operator != null)
- map['Operator'] = operator;
- if (memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- return map;
- }
- }
- class JoinInLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationJoinerInfo? joiner;
- JoinInLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.joiner,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory JoinInLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return JoinInLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- joiner: map['Joiner'] != null ? LiveConsultationJoinerInfo.fromJson(map['Joiner']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (joiner != null)
- map['Joiner'] = joiner;
- return map;
- }
- }
- class LiveConsultationRejecterInfo extends LiveConsultationMemberInfo{
- LiveConsultationRejecterInfo({
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultationRejecterInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationRejecterInfo(
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class RejectInviteLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationRejecterInfo? rejecter;
- RejectInviteLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.rejecter,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory RejectInviteLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return RejectInviteLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- rejecter: map['Rejecter'] != null ? LiveConsultationRejecterInfo.fromJson(map['Rejecter']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (rejecter != null)
- map['Rejecter'] = rejecter;
- return map;
- }
- }
- class JoinLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationJoinerInfo? joiner;
- JoinLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.joiner,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory JoinLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return JoinLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- joiner: map['Joiner'] != null ? LiveConsultationJoinerInfo.fromJson(map['Joiner']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (joiner != null)
- map['Joiner'] = joiner;
- return map;
- }
- }
- class LeaveLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationLeaverInfo? leaverInfo;
- LeaveLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.leaverInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory LeaveLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return LeaveLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- leaverInfo: map['LeaverInfo'] != null ? LiveConsultationLeaverInfo.fromJson(map['LeaverInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (leaverInfo != null)
- map['LeaverInfo'] = leaverInfo;
- return map;
- }
- }
- class LiveConsultationMuterInfo extends LiveConsultationMemberInfo{
- LiveConsultationMuterInfo({
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultationMuterInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationMuterInfo(
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class MuteLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- bool mute;
- LiveConsultationMuterInfo? muterInfo;
- MuteLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.mute = false,
- this.muterInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory MuteLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return MuteLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- mute: map['Mute'],
- muterInfo: map['MuterInfo'] != null ? LiveConsultationMuterInfo.fromJson(map['MuterInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['Mute'] = mute;
- if (muterInfo != null)
- map['MuterInfo'] = muterInfo;
- return map;
- }
- }
- class LiveConsultationNetworkErrMemberInfo extends LiveConsultationMemberInfo{
- LiveConsultationNetworkErrMemberInfo({
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultationNetworkErrMemberInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationNetworkErrMemberInfo(
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class NetworkErrConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationNetworkErrMemberInfo? networkErrMemberInfo;
- NetworkErrConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.networkErrMemberInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory NetworkErrConsultationNotification.fromJson(Map<String, dynamic> map) {
- return NetworkErrConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- networkErrMemberInfo: map['NetworkErrMemberInfo'] != null ? LiveConsultationNetworkErrMemberInfo.fromJson(map['NetworkErrMemberInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (networkErrMemberInfo != null)
- map['NetworkErrMemberInfo'] = networkErrMemberInfo;
- return map;
- }
- }
- class RealtimeConsultationMembersNotification extends NotificationDTO{
- String? consultationCode;
- List<LiveConsultationMember>? consultationMembers;
- RealtimeConsultationMembersNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.consultationMembers,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory RealtimeConsultationMembersNotification.fromJson(Map<String, dynamic> map) {
- return RealtimeConsultationMembersNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- consultationMembers: map['ConsultationMembers'] != null ? (map['ConsultationMembers'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (consultationMembers != null)
- map['ConsultationMembers'] = consultationMembers;
- return map;
- }
- }
- class RejectLiveConsultationNotification extends NotificationDTO{
- String? consultationCode;
- LiveConsultationRejecterInfo? rejecter;
- RejectLiveConsultationNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.rejecter,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory RejectLiveConsultationNotification.fromJson(Map<String, dynamic> map) {
- return RejectLiveConsultationNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- rejecter: map['Rejecter'] != null ? LiveConsultationRejecterInfo.fromJson(map['Rejecter']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (rejecter != null)
- map['Rejecter'] = rejecter;
- return map;
- }
- }
- class LiveConsultationSwitcherInfo extends LiveConsultationMemberInfo{
- LiveConsultationSwitcherInfo({
- String? id,
- String? name,
- String? headImageUrl,
- }) : super(
- id: id,
- name: name,
- headImageUrl: headImageUrl,
- );
- factory LiveConsultationSwitcherInfo.fromJson(Map<String, dynamic> map) {
- return LiveConsultationSwitcherInfo(
- id: map['Id'],
- name: map['Name'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class SwitchLiveConsultationVideoNotification extends NotificationDTO{
- String? consultationCode;
- bool opened;
- LiveConsultationSwitcherInfo? switcherInfo;
- SwitchLiveConsultationVideoNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.opened = false,
- this.switcherInfo,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SwitchLiveConsultationVideoNotification.fromJson(Map<String, dynamic> map) {
- return SwitchLiveConsultationVideoNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- opened: map['Opened'],
- switcherInfo: map['SwitcherInfo'] != null ? LiveConsultationSwitcherInfo.fromJson(map['SwitcherInfo']) : null,
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['Opened'] = opened;
- if (switcherInfo != null)
- map['SwitcherInfo'] = switcherInfo;
- return map;
- }
- }
- class UploadConsultationDataNotification extends NotificationDTO{
- String? consultationCode;
- String? userCode;
- UploadConsultationDataNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.userCode,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory UploadConsultationDataNotification.fromJson(Map<String, dynamic> map) {
- return UploadConsultationDataNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- userCode: map['UserCode'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- return map;
- }
- }
- class SendInteractiveBoardDataNotification extends NotificationDTO{
- String? consultationCode;
- bool isClear;
- String? userCode;
- String? boardData;
- SendInteractiveBoardDataNotification({
- NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
- this.consultationCode,
- this.isClear = false,
- this.userCode,
- this.boardData,
- String? code,
- bool isResponse = false,
- }) : super(
- notificationType: notificationType,
- code: code,
- isResponse: isResponse,
- );
- factory SendInteractiveBoardDataNotification.fromJson(Map<String, dynamic> map) {
- return SendInteractiveBoardDataNotification(
- notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
- consultationCode: map['ConsultationCode'],
- isClear: map['IsClear'],
- userCode: map['UserCode'],
- boardData: map['BoardData'],
- code: map['Code'],
- isResponse: map['IsResponse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (consultationCode != null)
- map['ConsultationCode'] = consultationCode;
- map['IsClear'] = isClear;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (boardData != null)
- map['BoardData'] = boardData;
- return map;
- }
- }
|