@fatehan/tsrp 1.6.18 → 1.6.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/fatehan/activities/workflow.d.ts +219 -0
  2. package/dist/fatehan/activities/workflow.d.ts.map +1 -0
  3. package/dist/fatehan/activities/workflow.js +1941 -0
  4. package/dist/fatehan/activities/workshift.d.ts +140 -0
  5. package/dist/fatehan/activities/workshift.d.ts.map +1 -0
  6. package/dist/fatehan/activities/workshift.js +1244 -0
  7. package/dist/fatehan/apis/client.d.ts +246 -0
  8. package/dist/fatehan/apis/client.d.ts.map +1 -0
  9. package/dist/fatehan/apis/client.js +2572 -0
  10. package/dist/fatehan/areas/area.d.ts +96 -0
  11. package/dist/fatehan/areas/area.d.ts.map +1 -0
  12. package/dist/fatehan/areas/area.js +761 -0
  13. package/dist/fatehan/devices/devices.d.ts +256 -0
  14. package/dist/fatehan/devices/devices.d.ts.map +1 -0
  15. package/dist/fatehan/devices/devices.js +2730 -0
  16. package/dist/fatehan/devices/maintenance.d.ts +64 -0
  17. package/dist/fatehan/devices/maintenance.d.ts.map +1 -0
  18. package/dist/fatehan/devices/maintenance.js +484 -0
  19. package/dist/fatehan/financial/financial.d.ts +162 -0
  20. package/dist/fatehan/financial/financial.d.ts.map +1 -0
  21. package/dist/fatehan/financial/financial.js +1701 -0
  22. package/dist/fatehan/google/protobuf/descriptor.d.ts +1303 -0
  23. package/dist/fatehan/google/protobuf/descriptor.d.ts.map +1 -0
  24. package/dist/fatehan/google/protobuf/descriptor.js +3467 -0
  25. package/dist/fatehan/google/protobuf/duration.d.ts +99 -0
  26. package/dist/fatehan/google/protobuf/duration.d.ts.map +1 -0
  27. package/dist/fatehan/google/protobuf/duration.js +63 -0
  28. package/dist/fatehan/google/protobuf/field_mask.d.ts +228 -0
  29. package/dist/fatehan/google/protobuf/field_mask.d.ts.map +1 -0
  30. package/dist/fatehan/google/protobuf/field_mask.js +57 -0
  31. package/dist/fatehan/google/protobuf/timestamp.d.ts +129 -0
  32. package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -0
  33. package/dist/fatehan/google/protobuf/timestamp.js +63 -0
  34. package/dist/fatehan/identities/authentication.d.ts +164 -0
  35. package/dist/fatehan/identities/authentication.d.ts.map +1 -0
  36. package/dist/fatehan/identities/authentication.js +1291 -0
  37. package/dist/fatehan/identities/identities.d.ts +969 -0
  38. package/dist/fatehan/identities/identities.d.ts.map +1 -0
  39. package/dist/fatehan/identities/identities.js +2993 -0
  40. package/dist/fatehan/models/fusion.d.ts +149 -0
  41. package/dist/fatehan/models/fusion.d.ts.map +1 -0
  42. package/dist/fatehan/models/fusion.js +1531 -0
  43. package/dist/fatehan/models/models.d.ts +162 -0
  44. package/dist/fatehan/models/models.d.ts.map +1 -0
  45. package/dist/fatehan/models/models.js +1486 -0
  46. package/dist/fatehan/notifies/direct.d.ts +85 -0
  47. package/dist/fatehan/notifies/direct.d.ts.map +1 -0
  48. package/dist/fatehan/notifies/direct.js +669 -0
  49. package/dist/fatehan/notifies/notify.d.ts +232 -0
  50. package/dist/fatehan/notifies/notify.d.ts.map +1 -0
  51. package/dist/fatehan/notifies/notify.js +1958 -0
  52. package/dist/fatehan/packets/commands.d.ts +150 -0
  53. package/dist/fatehan/packets/commands.d.ts.map +1 -0
  54. package/dist/fatehan/packets/commands.js +1364 -0
  55. package/dist/fatehan/packets/dataModel.d.ts +1610 -0
  56. package/dist/fatehan/packets/dataModel.d.ts.map +1 -0
  57. package/dist/fatehan/packets/dataModel.js +14947 -0
  58. package/dist/fatehan/packets/dataModule.d.ts +61 -0
  59. package/dist/fatehan/packets/dataModule.d.ts.map +1 -0
  60. package/dist/fatehan/packets/dataModule.js +386 -0
  61. package/dist/fatehan/packets/forge.d.ts +142 -0
  62. package/dist/fatehan/packets/forge.d.ts.map +1 -0
  63. package/dist/fatehan/packets/forge.js +1339 -0
  64. package/dist/fatehan/services/api.d.ts +1220 -0
  65. package/dist/fatehan/services/api.d.ts.map +1 -0
  66. package/dist/fatehan/services/api.js +12660 -0
  67. package/dist/fatehan/services/repositories.d.ts +78 -0
  68. package/dist/fatehan/services/repositories.d.ts.map +1 -0
  69. package/dist/fatehan/services/repositories.js +620 -0
  70. package/dist/fatehan/stream/stream.d.ts +224 -0
  71. package/dist/fatehan/stream/stream.d.ts.map +1 -0
  72. package/dist/fatehan/stream/stream.js +1416 -0
  73. package/dist/fatehan/trips/trip.d.ts +325 -0
  74. package/dist/fatehan/trips/trip.d.ts.map +1 -0
  75. package/dist/fatehan/trips/trip.js +1635 -0
  76. package/dist/fatehan/utils/buf/validate/validate.d.ts +3520 -0
  77. package/dist/fatehan/utils/buf/validate/validate.d.ts.map +1 -0
  78. package/dist/fatehan/utils/buf/validate/validate.js +4248 -0
  79. package/dist/services.d.ts +79 -0
  80. package/dist/services.d.ts.map +1 -0
  81. package/dist/services.js +245 -0
  82. package/dist/store/system.io.d.ts +6 -0
  83. package/dist/store/system.io.d.ts.map +1 -0
  84. package/dist/store/system.io.js +14 -0
  85. package/dist/system.io.d.ts +6 -0
  86. package/dist/system.io.d.ts.map +1 -0
  87. package/dist/system.io.js +208 -0
  88. package/package.json +1 -1
@@ -0,0 +1,1531 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v7.34.1
5
+ // source: models/fusion.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import Long from "long";
9
+ import { Timestamp } from "../google/protobuf/timestamp";
10
+ export const protobufPackage = "com.fatehan.models";
11
+ function createBaseWorkCycleDevice() {
12
+ return {
13
+ deviceId: undefined,
14
+ movable: false,
15
+ radius: 0,
16
+ groupId: 0,
17
+ organizationId: Long.UZERO,
18
+ name: undefined,
19
+ areaId: undefined,
20
+ };
21
+ }
22
+ export const WorkCycleDevice = {
23
+ encode(message, writer = new BinaryWriter()) {
24
+ if (message.deviceId !== undefined) {
25
+ writer.uint32(8).uint64(message.deviceId.toString());
26
+ }
27
+ if (message.movable !== false) {
28
+ writer.uint32(16).bool(message.movable);
29
+ }
30
+ if (message.radius !== 0) {
31
+ writer.uint32(24).uint32(message.radius);
32
+ }
33
+ if (message.groupId !== 0) {
34
+ writer.uint32(32).uint32(message.groupId);
35
+ }
36
+ if (!message.organizationId.equals(Long.UZERO)) {
37
+ writer.uint32(40).uint64(message.organizationId.toString());
38
+ }
39
+ if (message.name !== undefined) {
40
+ writer.uint32(50).string(message.name);
41
+ }
42
+ if (message.areaId !== undefined) {
43
+ writer.uint32(56).uint64(message.areaId.toString());
44
+ }
45
+ return writer;
46
+ },
47
+ decode(input, length) {
48
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
49
+ const end = length === undefined ? reader.len : reader.pos + length;
50
+ const message = createBaseWorkCycleDevice();
51
+ while (reader.pos < end) {
52
+ const tag = reader.uint32();
53
+ switch (tag >>> 3) {
54
+ case 1: {
55
+ if (tag !== 8) {
56
+ break;
57
+ }
58
+ message.deviceId = Long.fromString(reader.uint64().toString(), true);
59
+ continue;
60
+ }
61
+ case 2: {
62
+ if (tag !== 16) {
63
+ break;
64
+ }
65
+ message.movable = reader.bool();
66
+ continue;
67
+ }
68
+ case 3: {
69
+ if (tag !== 24) {
70
+ break;
71
+ }
72
+ message.radius = reader.uint32();
73
+ continue;
74
+ }
75
+ case 4: {
76
+ if (tag !== 32) {
77
+ break;
78
+ }
79
+ message.groupId = reader.uint32();
80
+ continue;
81
+ }
82
+ case 5: {
83
+ if (tag !== 40) {
84
+ break;
85
+ }
86
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
87
+ continue;
88
+ }
89
+ case 6: {
90
+ if (tag !== 50) {
91
+ break;
92
+ }
93
+ message.name = reader.string();
94
+ continue;
95
+ }
96
+ case 7: {
97
+ if (tag !== 56) {
98
+ break;
99
+ }
100
+ message.areaId = Long.fromString(reader.uint64().toString(), true);
101
+ continue;
102
+ }
103
+ }
104
+ if ((tag & 7) === 4 || tag === 0) {
105
+ break;
106
+ }
107
+ reader.skip(tag & 7);
108
+ }
109
+ return message;
110
+ },
111
+ create(base) {
112
+ return WorkCycleDevice.fromPartial(base ?? {});
113
+ },
114
+ fromPartial(object) {
115
+ const message = createBaseWorkCycleDevice();
116
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
117
+ ? Long.fromValue(object.deviceId)
118
+ : undefined;
119
+ message.movable = object.movable ?? false;
120
+ message.radius = object.radius ?? 0;
121
+ message.groupId = object.groupId ?? 0;
122
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
123
+ ? Long.fromValue(object.organizationId)
124
+ : Long.UZERO;
125
+ message.name = object.name ?? undefined;
126
+ message.areaId = (object.areaId !== undefined && object.areaId !== null)
127
+ ? Long.fromValue(object.areaId)
128
+ : undefined;
129
+ return message;
130
+ },
131
+ };
132
+ function createBaseWorkCycleDeviceList() {
133
+ return { list: [] };
134
+ }
135
+ export const WorkCycleDeviceList = {
136
+ encode(message, writer = new BinaryWriter()) {
137
+ for (const v of message.list) {
138
+ WorkCycleDevice.encode(v, writer.uint32(10).fork()).join();
139
+ }
140
+ return writer;
141
+ },
142
+ decode(input, length) {
143
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
144
+ const end = length === undefined ? reader.len : reader.pos + length;
145
+ const message = createBaseWorkCycleDeviceList();
146
+ while (reader.pos < end) {
147
+ const tag = reader.uint32();
148
+ switch (tag >>> 3) {
149
+ case 1: {
150
+ if (tag !== 10) {
151
+ break;
152
+ }
153
+ message.list.push(WorkCycleDevice.decode(reader, reader.uint32()));
154
+ continue;
155
+ }
156
+ }
157
+ if ((tag & 7) === 4 || tag === 0) {
158
+ break;
159
+ }
160
+ reader.skip(tag & 7);
161
+ }
162
+ return message;
163
+ },
164
+ create(base) {
165
+ return WorkCycleDeviceList.fromPartial(base ?? {});
166
+ },
167
+ fromPartial(object) {
168
+ const message = createBaseWorkCycleDeviceList();
169
+ message.list = object.list?.map((e) => WorkCycleDevice.fromPartial(e)) || [];
170
+ return message;
171
+ },
172
+ };
173
+ function createBaseAlertsListDevice() {
174
+ return {
175
+ alertListId: 0,
176
+ dateCreate: 0,
177
+ userId: 0,
178
+ imei: Long.UZERO,
179
+ content: "",
180
+ alertRead: 0,
181
+ alertId: 0,
182
+ title: "",
183
+ disabled: 0,
184
+ latitude: 0,
185
+ longitude: 0,
186
+ latitudeEnd: 0,
187
+ longitudeEnd: 0,
188
+ dateEnd: 0,
189
+ dateRead: 0,
190
+ alertSend: 0,
191
+ dateSend: 0,
192
+ vals: "",
193
+ relId: 0,
194
+ createdAt: undefined,
195
+ updatedAt: undefined,
196
+ identificationNo: undefined,
197
+ };
198
+ }
199
+ export const AlertsListDevice = {
200
+ encode(message, writer = new BinaryWriter()) {
201
+ if (message.alertListId !== 0) {
202
+ writer.uint32(8).uint32(message.alertListId);
203
+ }
204
+ if (message.dateCreate !== 0) {
205
+ writer.uint32(16).uint32(message.dateCreate);
206
+ }
207
+ if (message.userId !== 0) {
208
+ writer.uint32(24).uint32(message.userId);
209
+ }
210
+ if (!message.imei.equals(Long.UZERO)) {
211
+ writer.uint32(32).uint64(message.imei.toString());
212
+ }
213
+ if (message.content !== "") {
214
+ writer.uint32(42).string(message.content);
215
+ }
216
+ if (message.alertRead !== 0) {
217
+ writer.uint32(48).uint32(message.alertRead);
218
+ }
219
+ if (message.alertId !== 0) {
220
+ writer.uint32(56).uint32(message.alertId);
221
+ }
222
+ if (message.title !== "") {
223
+ writer.uint32(66).string(message.title);
224
+ }
225
+ if (message.disabled !== 0) {
226
+ writer.uint32(72).uint32(message.disabled);
227
+ }
228
+ if (message.latitude !== 0) {
229
+ writer.uint32(85).float(message.latitude);
230
+ }
231
+ if (message.longitude !== 0) {
232
+ writer.uint32(93).float(message.longitude);
233
+ }
234
+ if (message.latitudeEnd !== 0) {
235
+ writer.uint32(101).float(message.latitudeEnd);
236
+ }
237
+ if (message.longitudeEnd !== 0) {
238
+ writer.uint32(109).float(message.longitudeEnd);
239
+ }
240
+ if (message.dateEnd !== 0) {
241
+ writer.uint32(112).uint32(message.dateEnd);
242
+ }
243
+ if (message.dateRead !== 0) {
244
+ writer.uint32(120).uint32(message.dateRead);
245
+ }
246
+ if (message.alertSend !== 0) {
247
+ writer.uint32(128).uint32(message.alertSend);
248
+ }
249
+ if (message.dateSend !== 0) {
250
+ writer.uint32(136).uint32(message.dateSend);
251
+ }
252
+ if (message.vals !== "") {
253
+ writer.uint32(146).string(message.vals);
254
+ }
255
+ if (message.relId !== 0) {
256
+ writer.uint32(152).uint32(message.relId);
257
+ }
258
+ if (message.createdAt !== undefined) {
259
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(162).fork()).join();
260
+ }
261
+ if (message.updatedAt !== undefined) {
262
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(170).fork()).join();
263
+ }
264
+ if (message.identificationNo !== undefined) {
265
+ writer.uint32(178).string(message.identificationNo);
266
+ }
267
+ return writer;
268
+ },
269
+ decode(input, length) {
270
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
271
+ const end = length === undefined ? reader.len : reader.pos + length;
272
+ const message = createBaseAlertsListDevice();
273
+ while (reader.pos < end) {
274
+ const tag = reader.uint32();
275
+ switch (tag >>> 3) {
276
+ case 1: {
277
+ if (tag !== 8) {
278
+ break;
279
+ }
280
+ message.alertListId = reader.uint32();
281
+ continue;
282
+ }
283
+ case 2: {
284
+ if (tag !== 16) {
285
+ break;
286
+ }
287
+ message.dateCreate = reader.uint32();
288
+ continue;
289
+ }
290
+ case 3: {
291
+ if (tag !== 24) {
292
+ break;
293
+ }
294
+ message.userId = reader.uint32();
295
+ continue;
296
+ }
297
+ case 4: {
298
+ if (tag !== 32) {
299
+ break;
300
+ }
301
+ message.imei = Long.fromString(reader.uint64().toString(), true);
302
+ continue;
303
+ }
304
+ case 5: {
305
+ if (tag !== 42) {
306
+ break;
307
+ }
308
+ message.content = reader.string();
309
+ continue;
310
+ }
311
+ case 6: {
312
+ if (tag !== 48) {
313
+ break;
314
+ }
315
+ message.alertRead = reader.uint32();
316
+ continue;
317
+ }
318
+ case 7: {
319
+ if (tag !== 56) {
320
+ break;
321
+ }
322
+ message.alertId = reader.uint32();
323
+ continue;
324
+ }
325
+ case 8: {
326
+ if (tag !== 66) {
327
+ break;
328
+ }
329
+ message.title = reader.string();
330
+ continue;
331
+ }
332
+ case 9: {
333
+ if (tag !== 72) {
334
+ break;
335
+ }
336
+ message.disabled = reader.uint32();
337
+ continue;
338
+ }
339
+ case 10: {
340
+ if (tag !== 85) {
341
+ break;
342
+ }
343
+ message.latitude = reader.float();
344
+ continue;
345
+ }
346
+ case 11: {
347
+ if (tag !== 93) {
348
+ break;
349
+ }
350
+ message.longitude = reader.float();
351
+ continue;
352
+ }
353
+ case 12: {
354
+ if (tag !== 101) {
355
+ break;
356
+ }
357
+ message.latitudeEnd = reader.float();
358
+ continue;
359
+ }
360
+ case 13: {
361
+ if (tag !== 109) {
362
+ break;
363
+ }
364
+ message.longitudeEnd = reader.float();
365
+ continue;
366
+ }
367
+ case 14: {
368
+ if (tag !== 112) {
369
+ break;
370
+ }
371
+ message.dateEnd = reader.uint32();
372
+ continue;
373
+ }
374
+ case 15: {
375
+ if (tag !== 120) {
376
+ break;
377
+ }
378
+ message.dateRead = reader.uint32();
379
+ continue;
380
+ }
381
+ case 16: {
382
+ if (tag !== 128) {
383
+ break;
384
+ }
385
+ message.alertSend = reader.uint32();
386
+ continue;
387
+ }
388
+ case 17: {
389
+ if (tag !== 136) {
390
+ break;
391
+ }
392
+ message.dateSend = reader.uint32();
393
+ continue;
394
+ }
395
+ case 18: {
396
+ if (tag !== 146) {
397
+ break;
398
+ }
399
+ message.vals = reader.string();
400
+ continue;
401
+ }
402
+ case 19: {
403
+ if (tag !== 152) {
404
+ break;
405
+ }
406
+ message.relId = reader.uint32();
407
+ continue;
408
+ }
409
+ case 20: {
410
+ if (tag !== 162) {
411
+ break;
412
+ }
413
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
414
+ continue;
415
+ }
416
+ case 21: {
417
+ if (tag !== 170) {
418
+ break;
419
+ }
420
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
421
+ continue;
422
+ }
423
+ case 22: {
424
+ if (tag !== 178) {
425
+ break;
426
+ }
427
+ message.identificationNo = reader.string();
428
+ continue;
429
+ }
430
+ }
431
+ if ((tag & 7) === 4 || tag === 0) {
432
+ break;
433
+ }
434
+ reader.skip(tag & 7);
435
+ }
436
+ return message;
437
+ },
438
+ create(base) {
439
+ return AlertsListDevice.fromPartial(base ?? {});
440
+ },
441
+ fromPartial(object) {
442
+ const message = createBaseAlertsListDevice();
443
+ message.alertListId = object.alertListId ?? 0;
444
+ message.dateCreate = object.dateCreate ?? 0;
445
+ message.userId = object.userId ?? 0;
446
+ message.imei = (object.imei !== undefined && object.imei !== null) ? Long.fromValue(object.imei) : Long.UZERO;
447
+ message.content = object.content ?? "";
448
+ message.alertRead = object.alertRead ?? 0;
449
+ message.alertId = object.alertId ?? 0;
450
+ message.title = object.title ?? "";
451
+ message.disabled = object.disabled ?? 0;
452
+ message.latitude = object.latitude ?? 0;
453
+ message.longitude = object.longitude ?? 0;
454
+ message.latitudeEnd = object.latitudeEnd ?? 0;
455
+ message.longitudeEnd = object.longitudeEnd ?? 0;
456
+ message.dateEnd = object.dateEnd ?? 0;
457
+ message.dateRead = object.dateRead ?? 0;
458
+ message.alertSend = object.alertSend ?? 0;
459
+ message.dateSend = object.dateSend ?? 0;
460
+ message.vals = object.vals ?? "";
461
+ message.relId = object.relId ?? 0;
462
+ message.createdAt = object.createdAt ?? undefined;
463
+ message.updatedAt = object.updatedAt ?? undefined;
464
+ message.identificationNo = object.identificationNo ?? undefined;
465
+ return message;
466
+ },
467
+ };
468
+ function createBaseCommandDevice() {
469
+ return {
470
+ cdId: 0,
471
+ commandId: 0,
472
+ imei: Long.UZERO,
473
+ userId: 0,
474
+ dateCreate: 0,
475
+ status: 0,
476
+ command: "",
477
+ commandParse: undefined,
478
+ dateSend: 0,
479
+ response: undefined,
480
+ responseParse: undefined,
481
+ dateResponse: 0,
482
+ timeOut: 0,
483
+ type: 0,
484
+ deviceId: Long.UZERO,
485
+ };
486
+ }
487
+ export const CommandDevice = {
488
+ encode(message, writer = new BinaryWriter()) {
489
+ if (message.cdId !== 0) {
490
+ writer.uint32(8).uint32(message.cdId);
491
+ }
492
+ if (message.commandId !== 0) {
493
+ writer.uint32(16).uint32(message.commandId);
494
+ }
495
+ if (!message.imei.equals(Long.UZERO)) {
496
+ writer.uint32(24).uint64(message.imei.toString());
497
+ }
498
+ if (message.userId !== 0) {
499
+ writer.uint32(32).sint32(message.userId);
500
+ }
501
+ if (message.dateCreate !== 0) {
502
+ writer.uint32(40).sint32(message.dateCreate);
503
+ }
504
+ if (message.status !== 0) {
505
+ writer.uint32(48).uint32(message.status);
506
+ }
507
+ if (message.command !== "") {
508
+ writer.uint32(58).string(message.command);
509
+ }
510
+ if (message.commandParse !== undefined) {
511
+ writer.uint32(66).string(message.commandParse);
512
+ }
513
+ if (message.dateSend !== 0) {
514
+ writer.uint32(72).sint32(message.dateSend);
515
+ }
516
+ if (message.response !== undefined) {
517
+ writer.uint32(82).string(message.response);
518
+ }
519
+ if (message.responseParse !== undefined) {
520
+ writer.uint32(90).string(message.responseParse);
521
+ }
522
+ if (message.dateResponse !== 0) {
523
+ writer.uint32(96).sint32(message.dateResponse);
524
+ }
525
+ if (message.timeOut !== 0) {
526
+ writer.uint32(104).sint32(message.timeOut);
527
+ }
528
+ if (message.type !== 0) {
529
+ writer.uint32(112).uint32(message.type);
530
+ }
531
+ if (!message.deviceId.equals(Long.UZERO)) {
532
+ writer.uint32(120).uint64(message.deviceId.toString());
533
+ }
534
+ return writer;
535
+ },
536
+ decode(input, length) {
537
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
538
+ const end = length === undefined ? reader.len : reader.pos + length;
539
+ const message = createBaseCommandDevice();
540
+ while (reader.pos < end) {
541
+ const tag = reader.uint32();
542
+ switch (tag >>> 3) {
543
+ case 1: {
544
+ if (tag !== 8) {
545
+ break;
546
+ }
547
+ message.cdId = reader.uint32();
548
+ continue;
549
+ }
550
+ case 2: {
551
+ if (tag !== 16) {
552
+ break;
553
+ }
554
+ message.commandId = reader.uint32();
555
+ continue;
556
+ }
557
+ case 3: {
558
+ if (tag !== 24) {
559
+ break;
560
+ }
561
+ message.imei = Long.fromString(reader.uint64().toString(), true);
562
+ continue;
563
+ }
564
+ case 4: {
565
+ if (tag !== 32) {
566
+ break;
567
+ }
568
+ message.userId = reader.sint32();
569
+ continue;
570
+ }
571
+ case 5: {
572
+ if (tag !== 40) {
573
+ break;
574
+ }
575
+ message.dateCreate = reader.sint32();
576
+ continue;
577
+ }
578
+ case 6: {
579
+ if (tag !== 48) {
580
+ break;
581
+ }
582
+ message.status = reader.uint32();
583
+ continue;
584
+ }
585
+ case 7: {
586
+ if (tag !== 58) {
587
+ break;
588
+ }
589
+ message.command = reader.string();
590
+ continue;
591
+ }
592
+ case 8: {
593
+ if (tag !== 66) {
594
+ break;
595
+ }
596
+ message.commandParse = reader.string();
597
+ continue;
598
+ }
599
+ case 9: {
600
+ if (tag !== 72) {
601
+ break;
602
+ }
603
+ message.dateSend = reader.sint32();
604
+ continue;
605
+ }
606
+ case 10: {
607
+ if (tag !== 82) {
608
+ break;
609
+ }
610
+ message.response = reader.string();
611
+ continue;
612
+ }
613
+ case 11: {
614
+ if (tag !== 90) {
615
+ break;
616
+ }
617
+ message.responseParse = reader.string();
618
+ continue;
619
+ }
620
+ case 12: {
621
+ if (tag !== 96) {
622
+ break;
623
+ }
624
+ message.dateResponse = reader.sint32();
625
+ continue;
626
+ }
627
+ case 13: {
628
+ if (tag !== 104) {
629
+ break;
630
+ }
631
+ message.timeOut = reader.sint32();
632
+ continue;
633
+ }
634
+ case 14: {
635
+ if (tag !== 112) {
636
+ break;
637
+ }
638
+ message.type = reader.uint32();
639
+ continue;
640
+ }
641
+ case 15: {
642
+ if (tag !== 120) {
643
+ break;
644
+ }
645
+ message.deviceId = Long.fromString(reader.uint64().toString(), true);
646
+ continue;
647
+ }
648
+ }
649
+ if ((tag & 7) === 4 || tag === 0) {
650
+ break;
651
+ }
652
+ reader.skip(tag & 7);
653
+ }
654
+ return message;
655
+ },
656
+ create(base) {
657
+ return CommandDevice.fromPartial(base ?? {});
658
+ },
659
+ fromPartial(object) {
660
+ const message = createBaseCommandDevice();
661
+ message.cdId = object.cdId ?? 0;
662
+ message.commandId = object.commandId ?? 0;
663
+ message.imei = (object.imei !== undefined && object.imei !== null) ? Long.fromValue(object.imei) : Long.UZERO;
664
+ message.userId = object.userId ?? 0;
665
+ message.dateCreate = object.dateCreate ?? 0;
666
+ message.status = object.status ?? 0;
667
+ message.command = object.command ?? "";
668
+ message.commandParse = object.commandParse ?? undefined;
669
+ message.dateSend = object.dateSend ?? 0;
670
+ message.response = object.response ?? undefined;
671
+ message.responseParse = object.responseParse ?? undefined;
672
+ message.dateResponse = object.dateResponse ?? 0;
673
+ message.timeOut = object.timeOut ?? 0;
674
+ message.type = object.type ?? 0;
675
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
676
+ ? Long.fromValue(object.deviceId)
677
+ : Long.UZERO;
678
+ return message;
679
+ },
680
+ };
681
+ function createBaseFusionCar() {
682
+ return { carId: Long.UZERO, deviceName: "", powerVoltage: 0 };
683
+ }
684
+ export const FusionCar = {
685
+ encode(message, writer = new BinaryWriter()) {
686
+ if (!message.carId.equals(Long.UZERO)) {
687
+ writer.uint32(8).uint64(message.carId.toString());
688
+ }
689
+ if (message.deviceName !== "") {
690
+ writer.uint32(18).string(message.deviceName);
691
+ }
692
+ if (message.powerVoltage !== 0) {
693
+ writer.uint32(24).uint32(message.powerVoltage);
694
+ }
695
+ return writer;
696
+ },
697
+ decode(input, length) {
698
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
699
+ const end = length === undefined ? reader.len : reader.pos + length;
700
+ const message = createBaseFusionCar();
701
+ while (reader.pos < end) {
702
+ const tag = reader.uint32();
703
+ switch (tag >>> 3) {
704
+ case 1: {
705
+ if (tag !== 8) {
706
+ break;
707
+ }
708
+ message.carId = Long.fromString(reader.uint64().toString(), true);
709
+ continue;
710
+ }
711
+ case 2: {
712
+ if (tag !== 18) {
713
+ break;
714
+ }
715
+ message.deviceName = reader.string();
716
+ continue;
717
+ }
718
+ case 3: {
719
+ if (tag !== 24) {
720
+ break;
721
+ }
722
+ message.powerVoltage = reader.uint32();
723
+ continue;
724
+ }
725
+ }
726
+ if ((tag & 7) === 4 || tag === 0) {
727
+ break;
728
+ }
729
+ reader.skip(tag & 7);
730
+ }
731
+ return message;
732
+ },
733
+ create(base) {
734
+ return FusionCar.fromPartial(base ?? {});
735
+ },
736
+ fromPartial(object) {
737
+ const message = createBaseFusionCar();
738
+ message.carId = (object.carId !== undefined && object.carId !== null) ? Long.fromValue(object.carId) : Long.UZERO;
739
+ message.deviceName = object.deviceName ?? "";
740
+ message.powerVoltage = object.powerVoltage ?? 0;
741
+ return message;
742
+ },
743
+ };
744
+ function createBaseFusionNotify() {
745
+ return {
746
+ userId: Long.UZERO,
747
+ title: "",
748
+ body: "",
749
+ data: undefined,
750
+ image: undefined,
751
+ sound: undefined,
752
+ token: undefined,
753
+ };
754
+ }
755
+ export const FusionNotify = {
756
+ encode(message, writer = new BinaryWriter()) {
757
+ if (!message.userId.equals(Long.UZERO)) {
758
+ writer.uint32(8).uint64(message.userId.toString());
759
+ }
760
+ if (message.title !== "") {
761
+ writer.uint32(18).string(message.title);
762
+ }
763
+ if (message.body !== "") {
764
+ writer.uint32(26).string(message.body);
765
+ }
766
+ if (message.data !== undefined) {
767
+ FusionNotify_Body.encode(message.data, writer.uint32(34).fork()).join();
768
+ }
769
+ if (message.image !== undefined) {
770
+ writer.uint32(42).string(message.image);
771
+ }
772
+ if (message.sound !== undefined) {
773
+ writer.uint32(48).uint32(message.sound);
774
+ }
775
+ if (message.token !== undefined) {
776
+ writer.uint32(58).string(message.token);
777
+ }
778
+ return writer;
779
+ },
780
+ decode(input, length) {
781
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
782
+ const end = length === undefined ? reader.len : reader.pos + length;
783
+ const message = createBaseFusionNotify();
784
+ while (reader.pos < end) {
785
+ const tag = reader.uint32();
786
+ switch (tag >>> 3) {
787
+ case 1: {
788
+ if (tag !== 8) {
789
+ break;
790
+ }
791
+ message.userId = Long.fromString(reader.uint64().toString(), true);
792
+ continue;
793
+ }
794
+ case 2: {
795
+ if (tag !== 18) {
796
+ break;
797
+ }
798
+ message.title = reader.string();
799
+ continue;
800
+ }
801
+ case 3: {
802
+ if (tag !== 26) {
803
+ break;
804
+ }
805
+ message.body = reader.string();
806
+ continue;
807
+ }
808
+ case 4: {
809
+ if (tag !== 34) {
810
+ break;
811
+ }
812
+ message.data = FusionNotify_Body.decode(reader, reader.uint32());
813
+ continue;
814
+ }
815
+ case 5: {
816
+ if (tag !== 42) {
817
+ break;
818
+ }
819
+ message.image = reader.string();
820
+ continue;
821
+ }
822
+ case 6: {
823
+ if (tag !== 48) {
824
+ break;
825
+ }
826
+ message.sound = reader.uint32();
827
+ continue;
828
+ }
829
+ case 7: {
830
+ if (tag !== 58) {
831
+ break;
832
+ }
833
+ message.token = reader.string();
834
+ continue;
835
+ }
836
+ }
837
+ if ((tag & 7) === 4 || tag === 0) {
838
+ break;
839
+ }
840
+ reader.skip(tag & 7);
841
+ }
842
+ return message;
843
+ },
844
+ create(base) {
845
+ return FusionNotify.fromPartial(base ?? {});
846
+ },
847
+ fromPartial(object) {
848
+ const message = createBaseFusionNotify();
849
+ message.userId = (object.userId !== undefined && object.userId !== null)
850
+ ? Long.fromValue(object.userId)
851
+ : Long.UZERO;
852
+ message.title = object.title ?? "";
853
+ message.body = object.body ?? "";
854
+ message.data = (object.data !== undefined && object.data !== null)
855
+ ? FusionNotify_Body.fromPartial(object.data)
856
+ : undefined;
857
+ message.image = object.image ?? undefined;
858
+ message.sound = object.sound ?? undefined;
859
+ message.token = object.token ?? undefined;
860
+ return message;
861
+ },
862
+ };
863
+ function createBaseFusionNotify_Body() {
864
+ return {
865
+ type: "",
866
+ alertParam: undefined,
867
+ alertType: 0,
868
+ alertRead: "",
869
+ icon: undefined,
870
+ unit: undefined,
871
+ vals: undefined,
872
+ alertListId: undefined,
873
+ lat: 0,
874
+ lng: 0,
875
+ gpsTime: Long.ZERO,
876
+ imei: Long.UZERO,
877
+ deviceName: "",
878
+ relId: undefined,
879
+ title: "",
880
+ };
881
+ }
882
+ export const FusionNotify_Body = {
883
+ encode(message, writer = new BinaryWriter()) {
884
+ if (message.type !== "") {
885
+ writer.uint32(10).string(message.type);
886
+ }
887
+ if (message.alertParam !== undefined) {
888
+ writer.uint32(18).string(message.alertParam);
889
+ }
890
+ if (message.alertType !== 0) {
891
+ writer.uint32(24).uint32(message.alertType);
892
+ }
893
+ if (message.alertRead !== "") {
894
+ writer.uint32(34).string(message.alertRead);
895
+ }
896
+ if (message.icon !== undefined) {
897
+ writer.uint32(42).string(message.icon);
898
+ }
899
+ if (message.unit !== undefined) {
900
+ writer.uint32(50).string(message.unit);
901
+ }
902
+ if (message.vals !== undefined) {
903
+ writer.uint32(58).string(message.vals);
904
+ }
905
+ if (message.alertListId !== undefined) {
906
+ writer.uint32(64).uint32(message.alertListId);
907
+ }
908
+ if (message.lat !== 0) {
909
+ writer.uint32(77).float(message.lat);
910
+ }
911
+ if (message.lng !== 0) {
912
+ writer.uint32(85).float(message.lng);
913
+ }
914
+ if (!message.gpsTime.equals(Long.ZERO)) {
915
+ writer.uint32(88).sint64(message.gpsTime.toString());
916
+ }
917
+ if (!message.imei.equals(Long.UZERO)) {
918
+ writer.uint32(96).uint64(message.imei.toString());
919
+ }
920
+ if (message.deviceName !== "") {
921
+ writer.uint32(106).string(message.deviceName);
922
+ }
923
+ if (message.relId !== undefined) {
924
+ writer.uint32(112).uint64(message.relId.toString());
925
+ }
926
+ if (message.title !== "") {
927
+ writer.uint32(122).string(message.title);
928
+ }
929
+ return writer;
930
+ },
931
+ decode(input, length) {
932
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
933
+ const end = length === undefined ? reader.len : reader.pos + length;
934
+ const message = createBaseFusionNotify_Body();
935
+ while (reader.pos < end) {
936
+ const tag = reader.uint32();
937
+ switch (tag >>> 3) {
938
+ case 1: {
939
+ if (tag !== 10) {
940
+ break;
941
+ }
942
+ message.type = reader.string();
943
+ continue;
944
+ }
945
+ case 2: {
946
+ if (tag !== 18) {
947
+ break;
948
+ }
949
+ message.alertParam = reader.string();
950
+ continue;
951
+ }
952
+ case 3: {
953
+ if (tag !== 24) {
954
+ break;
955
+ }
956
+ message.alertType = reader.uint32();
957
+ continue;
958
+ }
959
+ case 4: {
960
+ if (tag !== 34) {
961
+ break;
962
+ }
963
+ message.alertRead = reader.string();
964
+ continue;
965
+ }
966
+ case 5: {
967
+ if (tag !== 42) {
968
+ break;
969
+ }
970
+ message.icon = reader.string();
971
+ continue;
972
+ }
973
+ case 6: {
974
+ if (tag !== 50) {
975
+ break;
976
+ }
977
+ message.unit = reader.string();
978
+ continue;
979
+ }
980
+ case 7: {
981
+ if (tag !== 58) {
982
+ break;
983
+ }
984
+ message.vals = reader.string();
985
+ continue;
986
+ }
987
+ case 8: {
988
+ if (tag !== 64) {
989
+ break;
990
+ }
991
+ message.alertListId = reader.uint32();
992
+ continue;
993
+ }
994
+ case 9: {
995
+ if (tag !== 77) {
996
+ break;
997
+ }
998
+ message.lat = reader.float();
999
+ continue;
1000
+ }
1001
+ case 10: {
1002
+ if (tag !== 85) {
1003
+ break;
1004
+ }
1005
+ message.lng = reader.float();
1006
+ continue;
1007
+ }
1008
+ case 11: {
1009
+ if (tag !== 88) {
1010
+ break;
1011
+ }
1012
+ message.gpsTime = Long.fromString(reader.sint64().toString());
1013
+ continue;
1014
+ }
1015
+ case 12: {
1016
+ if (tag !== 96) {
1017
+ break;
1018
+ }
1019
+ message.imei = Long.fromString(reader.uint64().toString(), true);
1020
+ continue;
1021
+ }
1022
+ case 13: {
1023
+ if (tag !== 106) {
1024
+ break;
1025
+ }
1026
+ message.deviceName = reader.string();
1027
+ continue;
1028
+ }
1029
+ case 14: {
1030
+ if (tag !== 112) {
1031
+ break;
1032
+ }
1033
+ message.relId = Long.fromString(reader.uint64().toString(), true);
1034
+ continue;
1035
+ }
1036
+ case 15: {
1037
+ if (tag !== 122) {
1038
+ break;
1039
+ }
1040
+ message.title = reader.string();
1041
+ continue;
1042
+ }
1043
+ }
1044
+ if ((tag & 7) === 4 || tag === 0) {
1045
+ break;
1046
+ }
1047
+ reader.skip(tag & 7);
1048
+ }
1049
+ return message;
1050
+ },
1051
+ create(base) {
1052
+ return FusionNotify_Body.fromPartial(base ?? {});
1053
+ },
1054
+ fromPartial(object) {
1055
+ const message = createBaseFusionNotify_Body();
1056
+ message.type = object.type ?? "";
1057
+ message.alertParam = object.alertParam ?? undefined;
1058
+ message.alertType = object.alertType ?? 0;
1059
+ message.alertRead = object.alertRead ?? "";
1060
+ message.icon = object.icon ?? undefined;
1061
+ message.unit = object.unit ?? undefined;
1062
+ message.vals = object.vals ?? undefined;
1063
+ message.alertListId = object.alertListId ?? undefined;
1064
+ message.lat = object.lat ?? 0;
1065
+ message.lng = object.lng ?? 0;
1066
+ message.gpsTime = (object.gpsTime !== undefined && object.gpsTime !== null)
1067
+ ? Long.fromValue(object.gpsTime)
1068
+ : Long.ZERO;
1069
+ message.imei = (object.imei !== undefined && object.imei !== null) ? Long.fromValue(object.imei) : Long.UZERO;
1070
+ message.deviceName = object.deviceName ?? "";
1071
+ message.relId = (object.relId !== undefined && object.relId !== null) ? Long.fromValue(object.relId) : undefined;
1072
+ message.title = object.title ?? "";
1073
+ return message;
1074
+ },
1075
+ };
1076
+ function createBaseFusionMaintenance() {
1077
+ return {
1078
+ mcId: 0,
1079
+ carId: 0,
1080
+ maintenanceId: 0,
1081
+ projectId: 0,
1082
+ userId: 0,
1083
+ dateSet: 0,
1084
+ price: 0,
1085
+ expireable: false,
1086
+ expireDate: 0,
1087
+ expireEnginTime: 0,
1088
+ expireOdo: 0,
1089
+ expired: 0,
1090
+ carEnginTime: 0,
1091
+ carOdo: 0,
1092
+ dateCreate: 0,
1093
+ renewable: 0,
1094
+ dateRenew: 0,
1095
+ renewId: 0,
1096
+ sent: 0,
1097
+ dateExpired: 0,
1098
+ parts: undefined,
1099
+ serviceProviderId: 0,
1100
+ lat: undefined,
1101
+ lng: undefined,
1102
+ photo: undefined,
1103
+ userCreatorId: 0,
1104
+ expireDateWarranty: 0,
1105
+ description: undefined,
1106
+ dateEnd: 0,
1107
+ currentMileage: Long.UZERO,
1108
+ currentEngineTime: Long.UZERO,
1109
+ expiredReason: undefined,
1110
+ createdAt: undefined,
1111
+ updatedAt: undefined,
1112
+ };
1113
+ }
1114
+ export const FusionMaintenance = {
1115
+ encode(message, writer = new BinaryWriter()) {
1116
+ if (message.mcId !== 0) {
1117
+ writer.uint32(8).uint32(message.mcId);
1118
+ }
1119
+ if (message.carId !== 0) {
1120
+ writer.uint32(16).uint32(message.carId);
1121
+ }
1122
+ if (message.maintenanceId !== 0) {
1123
+ writer.uint32(24).uint32(message.maintenanceId);
1124
+ }
1125
+ if (message.projectId !== 0) {
1126
+ writer.uint32(32).uint32(message.projectId);
1127
+ }
1128
+ if (message.userId !== 0) {
1129
+ writer.uint32(40).uint32(message.userId);
1130
+ }
1131
+ if (message.dateSet !== 0) {
1132
+ writer.uint32(48).uint32(message.dateSet);
1133
+ }
1134
+ if (message.price !== 0) {
1135
+ writer.uint32(56).uint32(message.price);
1136
+ }
1137
+ if (message.expireable !== false) {
1138
+ writer.uint32(64).bool(message.expireable);
1139
+ }
1140
+ if (message.expireDate !== 0) {
1141
+ writer.uint32(72).uint32(message.expireDate);
1142
+ }
1143
+ if (message.expireEnginTime !== 0) {
1144
+ writer.uint32(80).uint32(message.expireEnginTime);
1145
+ }
1146
+ if (message.expireOdo !== 0) {
1147
+ writer.uint32(88).uint32(message.expireOdo);
1148
+ }
1149
+ if (message.expired !== 0) {
1150
+ writer.uint32(96).uint32(message.expired);
1151
+ }
1152
+ if (message.carEnginTime !== 0) {
1153
+ writer.uint32(104).uint32(message.carEnginTime);
1154
+ }
1155
+ if (message.carOdo !== 0) {
1156
+ writer.uint32(112).uint32(message.carOdo);
1157
+ }
1158
+ if (message.dateCreate !== 0) {
1159
+ writer.uint32(120).uint32(message.dateCreate);
1160
+ }
1161
+ if (message.renewable !== 0) {
1162
+ writer.uint32(128).uint32(message.renewable);
1163
+ }
1164
+ if (message.dateRenew !== 0) {
1165
+ writer.uint32(136).sint32(message.dateRenew);
1166
+ }
1167
+ if (message.renewId !== 0) {
1168
+ writer.uint32(144).sint32(message.renewId);
1169
+ }
1170
+ if (message.sent !== 0) {
1171
+ writer.uint32(152).uint32(message.sent);
1172
+ }
1173
+ if (message.dateExpired !== 0) {
1174
+ writer.uint32(160).sint32(message.dateExpired);
1175
+ }
1176
+ if (message.parts !== undefined) {
1177
+ writer.uint32(170).string(message.parts);
1178
+ }
1179
+ if (message.serviceProviderId !== 0) {
1180
+ writer.uint32(176).uint32(message.serviceProviderId);
1181
+ }
1182
+ if (message.lat !== undefined) {
1183
+ writer.uint32(185).double(message.lat);
1184
+ }
1185
+ if (message.lng !== undefined) {
1186
+ writer.uint32(193).double(message.lng);
1187
+ }
1188
+ if (message.photo !== undefined) {
1189
+ writer.uint32(202).string(message.photo);
1190
+ }
1191
+ if (message.userCreatorId !== 0) {
1192
+ writer.uint32(208).uint32(message.userCreatorId);
1193
+ }
1194
+ if (message.expireDateWarranty !== 0) {
1195
+ writer.uint32(216).uint32(message.expireDateWarranty);
1196
+ }
1197
+ if (message.description !== undefined) {
1198
+ writer.uint32(226).string(message.description);
1199
+ }
1200
+ if (message.dateEnd !== 0) {
1201
+ writer.uint32(232).uint32(message.dateEnd);
1202
+ }
1203
+ if (!message.currentMileage.equals(Long.UZERO)) {
1204
+ writer.uint32(240).uint64(message.currentMileage.toString());
1205
+ }
1206
+ if (!message.currentEngineTime.equals(Long.UZERO)) {
1207
+ writer.uint32(248).uint64(message.currentEngineTime.toString());
1208
+ }
1209
+ if (message.expiredReason !== undefined) {
1210
+ writer.uint32(258).string(message.expiredReason);
1211
+ }
1212
+ if (message.createdAt !== undefined) {
1213
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(266).fork()).join();
1214
+ }
1215
+ if (message.updatedAt !== undefined) {
1216
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(274).fork()).join();
1217
+ }
1218
+ return writer;
1219
+ },
1220
+ decode(input, length) {
1221
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1222
+ const end = length === undefined ? reader.len : reader.pos + length;
1223
+ const message = createBaseFusionMaintenance();
1224
+ while (reader.pos < end) {
1225
+ const tag = reader.uint32();
1226
+ switch (tag >>> 3) {
1227
+ case 1: {
1228
+ if (tag !== 8) {
1229
+ break;
1230
+ }
1231
+ message.mcId = reader.uint32();
1232
+ continue;
1233
+ }
1234
+ case 2: {
1235
+ if (tag !== 16) {
1236
+ break;
1237
+ }
1238
+ message.carId = reader.uint32();
1239
+ continue;
1240
+ }
1241
+ case 3: {
1242
+ if (tag !== 24) {
1243
+ break;
1244
+ }
1245
+ message.maintenanceId = reader.uint32();
1246
+ continue;
1247
+ }
1248
+ case 4: {
1249
+ if (tag !== 32) {
1250
+ break;
1251
+ }
1252
+ message.projectId = reader.uint32();
1253
+ continue;
1254
+ }
1255
+ case 5: {
1256
+ if (tag !== 40) {
1257
+ break;
1258
+ }
1259
+ message.userId = reader.uint32();
1260
+ continue;
1261
+ }
1262
+ case 6: {
1263
+ if (tag !== 48) {
1264
+ break;
1265
+ }
1266
+ message.dateSet = reader.uint32();
1267
+ continue;
1268
+ }
1269
+ case 7: {
1270
+ if (tag !== 56) {
1271
+ break;
1272
+ }
1273
+ message.price = reader.uint32();
1274
+ continue;
1275
+ }
1276
+ case 8: {
1277
+ if (tag !== 64) {
1278
+ break;
1279
+ }
1280
+ message.expireable = reader.bool();
1281
+ continue;
1282
+ }
1283
+ case 9: {
1284
+ if (tag !== 72) {
1285
+ break;
1286
+ }
1287
+ message.expireDate = reader.uint32();
1288
+ continue;
1289
+ }
1290
+ case 10: {
1291
+ if (tag !== 80) {
1292
+ break;
1293
+ }
1294
+ message.expireEnginTime = reader.uint32();
1295
+ continue;
1296
+ }
1297
+ case 11: {
1298
+ if (tag !== 88) {
1299
+ break;
1300
+ }
1301
+ message.expireOdo = reader.uint32();
1302
+ continue;
1303
+ }
1304
+ case 12: {
1305
+ if (tag !== 96) {
1306
+ break;
1307
+ }
1308
+ message.expired = reader.uint32();
1309
+ continue;
1310
+ }
1311
+ case 13: {
1312
+ if (tag !== 104) {
1313
+ break;
1314
+ }
1315
+ message.carEnginTime = reader.uint32();
1316
+ continue;
1317
+ }
1318
+ case 14: {
1319
+ if (tag !== 112) {
1320
+ break;
1321
+ }
1322
+ message.carOdo = reader.uint32();
1323
+ continue;
1324
+ }
1325
+ case 15: {
1326
+ if (tag !== 120) {
1327
+ break;
1328
+ }
1329
+ message.dateCreate = reader.uint32();
1330
+ continue;
1331
+ }
1332
+ case 16: {
1333
+ if (tag !== 128) {
1334
+ break;
1335
+ }
1336
+ message.renewable = reader.uint32();
1337
+ continue;
1338
+ }
1339
+ case 17: {
1340
+ if (tag !== 136) {
1341
+ break;
1342
+ }
1343
+ message.dateRenew = reader.sint32();
1344
+ continue;
1345
+ }
1346
+ case 18: {
1347
+ if (tag !== 144) {
1348
+ break;
1349
+ }
1350
+ message.renewId = reader.sint32();
1351
+ continue;
1352
+ }
1353
+ case 19: {
1354
+ if (tag !== 152) {
1355
+ break;
1356
+ }
1357
+ message.sent = reader.uint32();
1358
+ continue;
1359
+ }
1360
+ case 20: {
1361
+ if (tag !== 160) {
1362
+ break;
1363
+ }
1364
+ message.dateExpired = reader.sint32();
1365
+ continue;
1366
+ }
1367
+ case 21: {
1368
+ if (tag !== 170) {
1369
+ break;
1370
+ }
1371
+ message.parts = reader.string();
1372
+ continue;
1373
+ }
1374
+ case 22: {
1375
+ if (tag !== 176) {
1376
+ break;
1377
+ }
1378
+ message.serviceProviderId = reader.uint32();
1379
+ continue;
1380
+ }
1381
+ case 23: {
1382
+ if (tag !== 185) {
1383
+ break;
1384
+ }
1385
+ message.lat = reader.double();
1386
+ continue;
1387
+ }
1388
+ case 24: {
1389
+ if (tag !== 193) {
1390
+ break;
1391
+ }
1392
+ message.lng = reader.double();
1393
+ continue;
1394
+ }
1395
+ case 25: {
1396
+ if (tag !== 202) {
1397
+ break;
1398
+ }
1399
+ message.photo = reader.string();
1400
+ continue;
1401
+ }
1402
+ case 26: {
1403
+ if (tag !== 208) {
1404
+ break;
1405
+ }
1406
+ message.userCreatorId = reader.uint32();
1407
+ continue;
1408
+ }
1409
+ case 27: {
1410
+ if (tag !== 216) {
1411
+ break;
1412
+ }
1413
+ message.expireDateWarranty = reader.uint32();
1414
+ continue;
1415
+ }
1416
+ case 28: {
1417
+ if (tag !== 226) {
1418
+ break;
1419
+ }
1420
+ message.description = reader.string();
1421
+ continue;
1422
+ }
1423
+ case 29: {
1424
+ if (tag !== 232) {
1425
+ break;
1426
+ }
1427
+ message.dateEnd = reader.uint32();
1428
+ continue;
1429
+ }
1430
+ case 30: {
1431
+ if (tag !== 240) {
1432
+ break;
1433
+ }
1434
+ message.currentMileage = Long.fromString(reader.uint64().toString(), true);
1435
+ continue;
1436
+ }
1437
+ case 31: {
1438
+ if (tag !== 248) {
1439
+ break;
1440
+ }
1441
+ message.currentEngineTime = Long.fromString(reader.uint64().toString(), true);
1442
+ continue;
1443
+ }
1444
+ case 32: {
1445
+ if (tag !== 258) {
1446
+ break;
1447
+ }
1448
+ message.expiredReason = reader.string();
1449
+ continue;
1450
+ }
1451
+ case 33: {
1452
+ if (tag !== 266) {
1453
+ break;
1454
+ }
1455
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1456
+ continue;
1457
+ }
1458
+ case 34: {
1459
+ if (tag !== 274) {
1460
+ break;
1461
+ }
1462
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1463
+ continue;
1464
+ }
1465
+ }
1466
+ if ((tag & 7) === 4 || tag === 0) {
1467
+ break;
1468
+ }
1469
+ reader.skip(tag & 7);
1470
+ }
1471
+ return message;
1472
+ },
1473
+ create(base) {
1474
+ return FusionMaintenance.fromPartial(base ?? {});
1475
+ },
1476
+ fromPartial(object) {
1477
+ const message = createBaseFusionMaintenance();
1478
+ message.mcId = object.mcId ?? 0;
1479
+ message.carId = object.carId ?? 0;
1480
+ message.maintenanceId = object.maintenanceId ?? 0;
1481
+ message.projectId = object.projectId ?? 0;
1482
+ message.userId = object.userId ?? 0;
1483
+ message.dateSet = object.dateSet ?? 0;
1484
+ message.price = object.price ?? 0;
1485
+ message.expireable = object.expireable ?? false;
1486
+ message.expireDate = object.expireDate ?? 0;
1487
+ message.expireEnginTime = object.expireEnginTime ?? 0;
1488
+ message.expireOdo = object.expireOdo ?? 0;
1489
+ message.expired = object.expired ?? 0;
1490
+ message.carEnginTime = object.carEnginTime ?? 0;
1491
+ message.carOdo = object.carOdo ?? 0;
1492
+ message.dateCreate = object.dateCreate ?? 0;
1493
+ message.renewable = object.renewable ?? 0;
1494
+ message.dateRenew = object.dateRenew ?? 0;
1495
+ message.renewId = object.renewId ?? 0;
1496
+ message.sent = object.sent ?? 0;
1497
+ message.dateExpired = object.dateExpired ?? 0;
1498
+ message.parts = object.parts ?? undefined;
1499
+ message.serviceProviderId = object.serviceProviderId ?? 0;
1500
+ message.lat = object.lat ?? undefined;
1501
+ message.lng = object.lng ?? undefined;
1502
+ message.photo = object.photo ?? undefined;
1503
+ message.userCreatorId = object.userCreatorId ?? 0;
1504
+ message.expireDateWarranty = object.expireDateWarranty ?? 0;
1505
+ message.description = object.description ?? undefined;
1506
+ message.dateEnd = object.dateEnd ?? 0;
1507
+ message.currentMileage = (object.currentMileage !== undefined && object.currentMileage !== null)
1508
+ ? Long.fromValue(object.currentMileage)
1509
+ : Long.UZERO;
1510
+ message.currentEngineTime = (object.currentEngineTime !== undefined && object.currentEngineTime !== null)
1511
+ ? Long.fromValue(object.currentEngineTime)
1512
+ : Long.UZERO;
1513
+ message.expiredReason = object.expiredReason ?? undefined;
1514
+ message.createdAt = object.createdAt ?? undefined;
1515
+ message.updatedAt = object.updatedAt ?? undefined;
1516
+ return message;
1517
+ },
1518
+ };
1519
+ function toTimestamp(date) {
1520
+ const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
1521
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
1522
+ return { seconds, nanos };
1523
+ }
1524
+ function fromTimestamp(t) {
1525
+ let millis = (t.seconds.toNumber() || 0) * 1_000;
1526
+ millis += (t.nanos || 0) / 1_000_000;
1527
+ return new globalThis.Date(millis);
1528
+ }
1529
+ function numberToLong(number) {
1530
+ return Long.fromNumber(number);
1531
+ }