@fatehan/tsrp 1.6.35 → 1.6.36

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 +87 -0
  5. package/dist/fatehan/activities/workshift.d.ts.map +1 -0
  6. package/dist/fatehan/activities/workshift.js +670 -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 +258 -0
  14. package/dist/fatehan/devices/devices.d.ts.map +1 -0
  15. package/dist/fatehan/devices/devices.js +2742 -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 +238 -0
  50. package/dist/fatehan/notifies/notify.d.ts.map +1 -0
  51. package/dist/fatehan/notifies/notify.js +2027 -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 +1664 -0
  56. package/dist/fatehan/packets/dataModel.d.ts.map +1 -0
  57. package/dist/fatehan/packets/dataModel.js +15559 -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 +1304 -0
  65. package/dist/fatehan/services/api.d.ts.map +1 -0
  66. package/dist/fatehan/services/api.js +13554 -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 +250 -0
  71. package/dist/fatehan/stream/stream.d.ts.map +1 -0
  72. package/dist/fatehan/stream/stream.js +1824 -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 +80 -0
  80. package/dist/services.d.ts.map +1 -0
  81. package/dist/services.js +248 -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,2742 @@
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: devices/devices.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
+ import { DataModule } from "../packets/dataModule";
11
+ export const protobufPackage = "com.fatehan.devices";
12
+ export var SystemIo_SystemIoType;
13
+ (function (SystemIo_SystemIoType) {
14
+ SystemIo_SystemIoType[SystemIo_SystemIoType["STRING"] = 0] = "STRING";
15
+ SystemIo_SystemIoType[SystemIo_SystemIoType["BOOLEAN"] = 1] = "BOOLEAN";
16
+ SystemIo_SystemIoType[SystemIo_SystemIoType["NUMERIC"] = 2] = "NUMERIC";
17
+ SystemIo_SystemIoType[SystemIo_SystemIoType["FLOAT"] = 3] = "FLOAT";
18
+ SystemIo_SystemIoType[SystemIo_SystemIoType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
19
+ })(SystemIo_SystemIoType || (SystemIo_SystemIoType = {}));
20
+ function createBaseDevice() {
21
+ return {
22
+ id: Long.UZERO,
23
+ organizationId: undefined,
24
+ partnerId: undefined,
25
+ generation: undefined,
26
+ deviceId: "",
27
+ objectId: undefined,
28
+ objectType: undefined,
29
+ trackerId: undefined,
30
+ ownerId: Long.UZERO,
31
+ iconId: undefined,
32
+ warehouseId: undefined,
33
+ createdBy: Long.UZERO,
34
+ simCard: undefined,
35
+ simProvider: undefined,
36
+ idChanged: 0,
37
+ iccId: undefined,
38
+ smsUsername: undefined,
39
+ smsPassword: undefined,
40
+ configPassword: undefined,
41
+ test: false,
42
+ simCardId: undefined,
43
+ timezone: undefined,
44
+ isUnlimited: false,
45
+ tripType: "",
46
+ modules: undefined,
47
+ receiveAt: undefined,
48
+ expiresAt: undefined,
49
+ connectAt: undefined,
50
+ createdAt: undefined,
51
+ updatedAt: undefined,
52
+ };
53
+ }
54
+ export const Device = {
55
+ encode(message, writer = new BinaryWriter()) {
56
+ if (!message.id.equals(Long.UZERO)) {
57
+ writer.uint32(8).uint64(message.id.toString());
58
+ }
59
+ if (message.organizationId !== undefined) {
60
+ writer.uint32(16).uint64(message.organizationId.toString());
61
+ }
62
+ if (message.partnerId !== undefined) {
63
+ writer.uint32(24).uint64(message.partnerId.toString());
64
+ }
65
+ if (message.generation !== undefined) {
66
+ writer.uint32(34).string(message.generation);
67
+ }
68
+ if (message.deviceId !== "") {
69
+ writer.uint32(42).string(message.deviceId);
70
+ }
71
+ if (message.objectId !== undefined) {
72
+ writer.uint32(48).uint64(message.objectId.toString());
73
+ }
74
+ if (message.objectType !== undefined) {
75
+ writer.uint32(58).string(message.objectType);
76
+ }
77
+ if (message.trackerId !== undefined) {
78
+ writer.uint32(64).uint64(message.trackerId.toString());
79
+ }
80
+ if (!message.ownerId.equals(Long.UZERO)) {
81
+ writer.uint32(72).uint64(message.ownerId.toString());
82
+ }
83
+ if (message.iconId !== undefined) {
84
+ writer.uint32(232).uint64(message.iconId.toString());
85
+ }
86
+ if (message.warehouseId !== undefined) {
87
+ writer.uint32(80).uint64(message.warehouseId.toString());
88
+ }
89
+ if (!message.createdBy.equals(Long.UZERO)) {
90
+ writer.uint32(88).uint64(message.createdBy.toString());
91
+ }
92
+ if (message.simCard !== undefined) {
93
+ writer.uint32(98).string(message.simCard);
94
+ }
95
+ if (message.simProvider !== undefined) {
96
+ writer.uint32(104).sint32(message.simProvider);
97
+ }
98
+ if (message.idChanged !== 0) {
99
+ writer.uint32(112).uint32(message.idChanged);
100
+ }
101
+ if (message.iccId !== undefined) {
102
+ writer.uint32(122).string(message.iccId);
103
+ }
104
+ if (message.smsUsername !== undefined) {
105
+ writer.uint32(130).string(message.smsUsername);
106
+ }
107
+ if (message.smsPassword !== undefined) {
108
+ writer.uint32(138).string(message.smsPassword);
109
+ }
110
+ if (message.configPassword !== undefined) {
111
+ writer.uint32(146).string(message.configPassword);
112
+ }
113
+ if (message.test !== false) {
114
+ writer.uint32(152).bool(message.test);
115
+ }
116
+ if (message.simCardId !== undefined) {
117
+ writer.uint32(162).string(message.simCardId);
118
+ }
119
+ if (message.timezone !== undefined) {
120
+ writer.uint32(170).string(message.timezone);
121
+ }
122
+ if (message.isUnlimited !== false) {
123
+ writer.uint32(176).bool(message.isUnlimited);
124
+ }
125
+ if (message.tripType !== "") {
126
+ writer.uint32(186).string(message.tripType);
127
+ }
128
+ if (message.modules !== undefined) {
129
+ DataModule.encode(message.modules, writer.uint32(242).fork()).join();
130
+ }
131
+ if (message.receiveAt !== undefined) {
132
+ Timestamp.encode(toTimestamp(message.receiveAt), writer.uint32(194).fork()).join();
133
+ }
134
+ if (message.expiresAt !== undefined) {
135
+ Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(202).fork()).join();
136
+ }
137
+ if (message.connectAt !== undefined) {
138
+ Timestamp.encode(toTimestamp(message.connectAt), writer.uint32(210).fork()).join();
139
+ }
140
+ if (message.createdAt !== undefined) {
141
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(218).fork()).join();
142
+ }
143
+ if (message.updatedAt !== undefined) {
144
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(226).fork()).join();
145
+ }
146
+ return writer;
147
+ },
148
+ decode(input, length) {
149
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
150
+ const end = length === undefined ? reader.len : reader.pos + length;
151
+ const message = createBaseDevice();
152
+ while (reader.pos < end) {
153
+ const tag = reader.uint32();
154
+ switch (tag >>> 3) {
155
+ case 1: {
156
+ if (tag !== 8) {
157
+ break;
158
+ }
159
+ message.id = Long.fromString(reader.uint64().toString(), true);
160
+ continue;
161
+ }
162
+ case 2: {
163
+ if (tag !== 16) {
164
+ break;
165
+ }
166
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
167
+ continue;
168
+ }
169
+ case 3: {
170
+ if (tag !== 24) {
171
+ break;
172
+ }
173
+ message.partnerId = Long.fromString(reader.uint64().toString(), true);
174
+ continue;
175
+ }
176
+ case 4: {
177
+ if (tag !== 34) {
178
+ break;
179
+ }
180
+ message.generation = reader.string();
181
+ continue;
182
+ }
183
+ case 5: {
184
+ if (tag !== 42) {
185
+ break;
186
+ }
187
+ message.deviceId = reader.string();
188
+ continue;
189
+ }
190
+ case 6: {
191
+ if (tag !== 48) {
192
+ break;
193
+ }
194
+ message.objectId = Long.fromString(reader.uint64().toString(), true);
195
+ continue;
196
+ }
197
+ case 7: {
198
+ if (tag !== 58) {
199
+ break;
200
+ }
201
+ message.objectType = reader.string();
202
+ continue;
203
+ }
204
+ case 8: {
205
+ if (tag !== 64) {
206
+ break;
207
+ }
208
+ message.trackerId = Long.fromString(reader.uint64().toString(), true);
209
+ continue;
210
+ }
211
+ case 9: {
212
+ if (tag !== 72) {
213
+ break;
214
+ }
215
+ message.ownerId = Long.fromString(reader.uint64().toString(), true);
216
+ continue;
217
+ }
218
+ case 29: {
219
+ if (tag !== 232) {
220
+ break;
221
+ }
222
+ message.iconId = Long.fromString(reader.uint64().toString(), true);
223
+ continue;
224
+ }
225
+ case 10: {
226
+ if (tag !== 80) {
227
+ break;
228
+ }
229
+ message.warehouseId = Long.fromString(reader.uint64().toString(), true);
230
+ continue;
231
+ }
232
+ case 11: {
233
+ if (tag !== 88) {
234
+ break;
235
+ }
236
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
237
+ continue;
238
+ }
239
+ case 12: {
240
+ if (tag !== 98) {
241
+ break;
242
+ }
243
+ message.simCard = reader.string();
244
+ continue;
245
+ }
246
+ case 13: {
247
+ if (tag !== 104) {
248
+ break;
249
+ }
250
+ message.simProvider = reader.sint32();
251
+ continue;
252
+ }
253
+ case 14: {
254
+ if (tag !== 112) {
255
+ break;
256
+ }
257
+ message.idChanged = reader.uint32();
258
+ continue;
259
+ }
260
+ case 15: {
261
+ if (tag !== 122) {
262
+ break;
263
+ }
264
+ message.iccId = reader.string();
265
+ continue;
266
+ }
267
+ case 16: {
268
+ if (tag !== 130) {
269
+ break;
270
+ }
271
+ message.smsUsername = reader.string();
272
+ continue;
273
+ }
274
+ case 17: {
275
+ if (tag !== 138) {
276
+ break;
277
+ }
278
+ message.smsPassword = reader.string();
279
+ continue;
280
+ }
281
+ case 18: {
282
+ if (tag !== 146) {
283
+ break;
284
+ }
285
+ message.configPassword = reader.string();
286
+ continue;
287
+ }
288
+ case 19: {
289
+ if (tag !== 152) {
290
+ break;
291
+ }
292
+ message.test = reader.bool();
293
+ continue;
294
+ }
295
+ case 20: {
296
+ if (tag !== 162) {
297
+ break;
298
+ }
299
+ message.simCardId = reader.string();
300
+ continue;
301
+ }
302
+ case 21: {
303
+ if (tag !== 170) {
304
+ break;
305
+ }
306
+ message.timezone = reader.string();
307
+ continue;
308
+ }
309
+ case 22: {
310
+ if (tag !== 176) {
311
+ break;
312
+ }
313
+ message.isUnlimited = reader.bool();
314
+ continue;
315
+ }
316
+ case 23: {
317
+ if (tag !== 186) {
318
+ break;
319
+ }
320
+ message.tripType = reader.string();
321
+ continue;
322
+ }
323
+ case 30: {
324
+ if (tag !== 242) {
325
+ break;
326
+ }
327
+ message.modules = DataModule.decode(reader, reader.uint32());
328
+ continue;
329
+ }
330
+ case 24: {
331
+ if (tag !== 194) {
332
+ break;
333
+ }
334
+ message.receiveAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
335
+ continue;
336
+ }
337
+ case 25: {
338
+ if (tag !== 202) {
339
+ break;
340
+ }
341
+ message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
342
+ continue;
343
+ }
344
+ case 26: {
345
+ if (tag !== 210) {
346
+ break;
347
+ }
348
+ message.connectAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
349
+ continue;
350
+ }
351
+ case 27: {
352
+ if (tag !== 218) {
353
+ break;
354
+ }
355
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
356
+ continue;
357
+ }
358
+ case 28: {
359
+ if (tag !== 226) {
360
+ break;
361
+ }
362
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
363
+ continue;
364
+ }
365
+ }
366
+ if ((tag & 7) === 4 || tag === 0) {
367
+ break;
368
+ }
369
+ reader.skip(tag & 7);
370
+ }
371
+ return message;
372
+ },
373
+ create(base) {
374
+ return Device.fromPartial(base ?? {});
375
+ },
376
+ fromPartial(object) {
377
+ const message = createBaseDevice();
378
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
379
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
380
+ ? Long.fromValue(object.organizationId)
381
+ : undefined;
382
+ message.partnerId = (object.partnerId !== undefined && object.partnerId !== null)
383
+ ? Long.fromValue(object.partnerId)
384
+ : undefined;
385
+ message.generation = object.generation ?? undefined;
386
+ message.deviceId = object.deviceId ?? "";
387
+ message.objectId = (object.objectId !== undefined && object.objectId !== null)
388
+ ? Long.fromValue(object.objectId)
389
+ : undefined;
390
+ message.objectType = object.objectType ?? undefined;
391
+ message.trackerId = (object.trackerId !== undefined && object.trackerId !== null)
392
+ ? Long.fromValue(object.trackerId)
393
+ : undefined;
394
+ message.ownerId = (object.ownerId !== undefined && object.ownerId !== null)
395
+ ? Long.fromValue(object.ownerId)
396
+ : Long.UZERO;
397
+ message.iconId = (object.iconId !== undefined && object.iconId !== null)
398
+ ? Long.fromValue(object.iconId)
399
+ : undefined;
400
+ message.warehouseId = (object.warehouseId !== undefined && object.warehouseId !== null)
401
+ ? Long.fromValue(object.warehouseId)
402
+ : undefined;
403
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
404
+ ? Long.fromValue(object.createdBy)
405
+ : Long.UZERO;
406
+ message.simCard = object.simCard ?? undefined;
407
+ message.simProvider = object.simProvider ?? undefined;
408
+ message.idChanged = object.idChanged ?? 0;
409
+ message.iccId = object.iccId ?? undefined;
410
+ message.smsUsername = object.smsUsername ?? undefined;
411
+ message.smsPassword = object.smsPassword ?? undefined;
412
+ message.configPassword = object.configPassword ?? undefined;
413
+ message.test = object.test ?? false;
414
+ message.simCardId = object.simCardId ?? undefined;
415
+ message.timezone = object.timezone ?? undefined;
416
+ message.isUnlimited = object.isUnlimited ?? false;
417
+ message.tripType = object.tripType ?? "";
418
+ message.modules = (object.modules !== undefined && object.modules !== null)
419
+ ? DataModule.fromPartial(object.modules)
420
+ : undefined;
421
+ message.receiveAt = object.receiveAt ?? undefined;
422
+ message.expiresAt = object.expiresAt ?? undefined;
423
+ message.connectAt = object.connectAt ?? undefined;
424
+ message.createdAt = object.createdAt ?? undefined;
425
+ message.updatedAt = object.updatedAt ?? undefined;
426
+ return message;
427
+ },
428
+ };
429
+ function createBaseDeviceIcon() {
430
+ return {
431
+ id: Long.UZERO,
432
+ organizationId: Long.UZERO,
433
+ createdBy: undefined,
434
+ updatedBy: undefined,
435
+ iconType: Long.UZERO,
436
+ imageType: Long.UZERO,
437
+ name: "",
438
+ images: undefined,
439
+ isDefault: false,
440
+ createdAt: undefined,
441
+ updatedAt: undefined,
442
+ };
443
+ }
444
+ export const DeviceIcon = {
445
+ encode(message, writer = new BinaryWriter()) {
446
+ if (!message.id.equals(Long.UZERO)) {
447
+ writer.uint32(8).uint64(message.id.toString());
448
+ }
449
+ if (!message.organizationId.equals(Long.UZERO)) {
450
+ writer.uint32(16).uint64(message.organizationId.toString());
451
+ }
452
+ if (message.createdBy !== undefined) {
453
+ writer.uint32(24).uint64(message.createdBy.toString());
454
+ }
455
+ if (message.updatedBy !== undefined) {
456
+ writer.uint32(32).uint64(message.updatedBy.toString());
457
+ }
458
+ if (!message.iconType.equals(Long.UZERO)) {
459
+ writer.uint32(40).uint64(message.iconType.toString());
460
+ }
461
+ if (!message.imageType.equals(Long.UZERO)) {
462
+ writer.uint32(48).uint64(message.imageType.toString());
463
+ }
464
+ if (message.name !== "") {
465
+ writer.uint32(58).string(message.name);
466
+ }
467
+ if (message.images !== undefined) {
468
+ DeviceIcon_Image.encode(message.images, writer.uint32(66).fork()).join();
469
+ }
470
+ if (message.isDefault !== false) {
471
+ writer.uint32(72).bool(message.isDefault);
472
+ }
473
+ if (message.createdAt !== undefined) {
474
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
475
+ }
476
+ if (message.updatedAt !== undefined) {
477
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
478
+ }
479
+ return writer;
480
+ },
481
+ decode(input, length) {
482
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
483
+ const end = length === undefined ? reader.len : reader.pos + length;
484
+ const message = createBaseDeviceIcon();
485
+ while (reader.pos < end) {
486
+ const tag = reader.uint32();
487
+ switch (tag >>> 3) {
488
+ case 1: {
489
+ if (tag !== 8) {
490
+ break;
491
+ }
492
+ message.id = Long.fromString(reader.uint64().toString(), true);
493
+ continue;
494
+ }
495
+ case 2: {
496
+ if (tag !== 16) {
497
+ break;
498
+ }
499
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
500
+ continue;
501
+ }
502
+ case 3: {
503
+ if (tag !== 24) {
504
+ break;
505
+ }
506
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
507
+ continue;
508
+ }
509
+ case 4: {
510
+ if (tag !== 32) {
511
+ break;
512
+ }
513
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
514
+ continue;
515
+ }
516
+ case 5: {
517
+ if (tag !== 40) {
518
+ break;
519
+ }
520
+ message.iconType = Long.fromString(reader.uint64().toString(), true);
521
+ continue;
522
+ }
523
+ case 6: {
524
+ if (tag !== 48) {
525
+ break;
526
+ }
527
+ message.imageType = Long.fromString(reader.uint64().toString(), true);
528
+ continue;
529
+ }
530
+ case 7: {
531
+ if (tag !== 58) {
532
+ break;
533
+ }
534
+ message.name = reader.string();
535
+ continue;
536
+ }
537
+ case 8: {
538
+ if (tag !== 66) {
539
+ break;
540
+ }
541
+ message.images = DeviceIcon_Image.decode(reader, reader.uint32());
542
+ continue;
543
+ }
544
+ case 9: {
545
+ if (tag !== 72) {
546
+ break;
547
+ }
548
+ message.isDefault = reader.bool();
549
+ continue;
550
+ }
551
+ case 10: {
552
+ if (tag !== 82) {
553
+ break;
554
+ }
555
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
556
+ continue;
557
+ }
558
+ case 11: {
559
+ if (tag !== 90) {
560
+ break;
561
+ }
562
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
563
+ continue;
564
+ }
565
+ }
566
+ if ((tag & 7) === 4 || tag === 0) {
567
+ break;
568
+ }
569
+ reader.skip(tag & 7);
570
+ }
571
+ return message;
572
+ },
573
+ create(base) {
574
+ return DeviceIcon.fromPartial(base ?? {});
575
+ },
576
+ fromPartial(object) {
577
+ const message = createBaseDeviceIcon();
578
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
579
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
580
+ ? Long.fromValue(object.organizationId)
581
+ : Long.UZERO;
582
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
583
+ ? Long.fromValue(object.createdBy)
584
+ : undefined;
585
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
586
+ ? Long.fromValue(object.updatedBy)
587
+ : undefined;
588
+ message.iconType = (object.iconType !== undefined && object.iconType !== null)
589
+ ? Long.fromValue(object.iconType)
590
+ : Long.UZERO;
591
+ message.imageType = (object.imageType !== undefined && object.imageType !== null)
592
+ ? Long.fromValue(object.imageType)
593
+ : Long.UZERO;
594
+ message.name = object.name ?? "";
595
+ message.images = (object.images !== undefined && object.images !== null)
596
+ ? DeviceIcon_Image.fromPartial(object.images)
597
+ : undefined;
598
+ message.isDefault = object.isDefault ?? false;
599
+ message.createdAt = object.createdAt ?? undefined;
600
+ message.updatedAt = object.updatedAt ?? undefined;
601
+ return message;
602
+ },
603
+ };
604
+ function createBaseDeviceIcon_Image() {
605
+ return { imgCelo: undefined, imgMove: undefined, imgStop: undefined, imgTowing: undefined, imgTimeout: undefined };
606
+ }
607
+ export const DeviceIcon_Image = {
608
+ encode(message, writer = new BinaryWriter()) {
609
+ if (message.imgCelo !== undefined) {
610
+ writer.uint32(10).string(message.imgCelo);
611
+ }
612
+ if (message.imgMove !== undefined) {
613
+ writer.uint32(18).string(message.imgMove);
614
+ }
615
+ if (message.imgStop !== undefined) {
616
+ writer.uint32(26).string(message.imgStop);
617
+ }
618
+ if (message.imgTowing !== undefined) {
619
+ writer.uint32(34).string(message.imgTowing);
620
+ }
621
+ if (message.imgTimeout !== undefined) {
622
+ writer.uint32(42).string(message.imgTimeout);
623
+ }
624
+ return writer;
625
+ },
626
+ decode(input, length) {
627
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
628
+ const end = length === undefined ? reader.len : reader.pos + length;
629
+ const message = createBaseDeviceIcon_Image();
630
+ while (reader.pos < end) {
631
+ const tag = reader.uint32();
632
+ switch (tag >>> 3) {
633
+ case 1: {
634
+ if (tag !== 10) {
635
+ break;
636
+ }
637
+ message.imgCelo = reader.string();
638
+ continue;
639
+ }
640
+ case 2: {
641
+ if (tag !== 18) {
642
+ break;
643
+ }
644
+ message.imgMove = reader.string();
645
+ continue;
646
+ }
647
+ case 3: {
648
+ if (tag !== 26) {
649
+ break;
650
+ }
651
+ message.imgStop = reader.string();
652
+ continue;
653
+ }
654
+ case 4: {
655
+ if (tag !== 34) {
656
+ break;
657
+ }
658
+ message.imgTowing = reader.string();
659
+ continue;
660
+ }
661
+ case 5: {
662
+ if (tag !== 42) {
663
+ break;
664
+ }
665
+ message.imgTimeout = reader.string();
666
+ continue;
667
+ }
668
+ }
669
+ if ((tag & 7) === 4 || tag === 0) {
670
+ break;
671
+ }
672
+ reader.skip(tag & 7);
673
+ }
674
+ return message;
675
+ },
676
+ create(base) {
677
+ return DeviceIcon_Image.fromPartial(base ?? {});
678
+ },
679
+ fromPartial(object) {
680
+ const message = createBaseDeviceIcon_Image();
681
+ message.imgCelo = object.imgCelo ?? undefined;
682
+ message.imgMove = object.imgMove ?? undefined;
683
+ message.imgStop = object.imgStop ?? undefined;
684
+ message.imgTowing = object.imgTowing ?? undefined;
685
+ message.imgTimeout = object.imgTimeout ?? undefined;
686
+ return message;
687
+ },
688
+ };
689
+ function createBaseTracker() {
690
+ return {
691
+ id: Long.UZERO,
692
+ name: "",
693
+ picture: undefined,
694
+ metadata: undefined,
695
+ generation: undefined,
696
+ level: 0,
697
+ parentId: undefined,
698
+ createdBy: undefined,
699
+ createdAt: undefined,
700
+ updatedAt: undefined,
701
+ documents: [],
702
+ camera: undefined,
703
+ protocol: undefined,
704
+ };
705
+ }
706
+ export const Tracker = {
707
+ encode(message, writer = new BinaryWriter()) {
708
+ if (!message.id.equals(Long.UZERO)) {
709
+ writer.uint32(8).uint64(message.id.toString());
710
+ }
711
+ if (message.name !== "") {
712
+ writer.uint32(18).string(message.name);
713
+ }
714
+ if (message.picture !== undefined) {
715
+ writer.uint32(26).string(message.picture);
716
+ }
717
+ if (message.metadata !== undefined) {
718
+ Tracker_Metadata.encode(message.metadata, writer.uint32(34).fork()).join();
719
+ }
720
+ if (message.generation !== undefined) {
721
+ writer.uint32(42).string(message.generation);
722
+ }
723
+ if (message.level !== 0) {
724
+ writer.uint32(48).uint32(message.level);
725
+ }
726
+ if (message.parentId !== undefined) {
727
+ writer.uint32(56).uint64(message.parentId.toString());
728
+ }
729
+ if (message.createdBy !== undefined) {
730
+ writer.uint32(64).uint64(message.createdBy.toString());
731
+ }
732
+ if (message.createdAt !== undefined) {
733
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
734
+ }
735
+ if (message.updatedAt !== undefined) {
736
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(82).fork()).join();
737
+ }
738
+ for (const v of message.documents) {
739
+ Tracker_Document.encode(v, writer.uint32(90).fork()).join();
740
+ }
741
+ if (message.camera !== undefined) {
742
+ writer.uint32(98).string(message.camera);
743
+ }
744
+ if (message.protocol !== undefined) {
745
+ writer.uint32(104).int32(message.protocol);
746
+ }
747
+ return writer;
748
+ },
749
+ decode(input, length) {
750
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
751
+ const end = length === undefined ? reader.len : reader.pos + length;
752
+ const message = createBaseTracker();
753
+ while (reader.pos < end) {
754
+ const tag = reader.uint32();
755
+ switch (tag >>> 3) {
756
+ case 1: {
757
+ if (tag !== 8) {
758
+ break;
759
+ }
760
+ message.id = Long.fromString(reader.uint64().toString(), true);
761
+ continue;
762
+ }
763
+ case 2: {
764
+ if (tag !== 18) {
765
+ break;
766
+ }
767
+ message.name = reader.string();
768
+ continue;
769
+ }
770
+ case 3: {
771
+ if (tag !== 26) {
772
+ break;
773
+ }
774
+ message.picture = reader.string();
775
+ continue;
776
+ }
777
+ case 4: {
778
+ if (tag !== 34) {
779
+ break;
780
+ }
781
+ message.metadata = Tracker_Metadata.decode(reader, reader.uint32());
782
+ continue;
783
+ }
784
+ case 5: {
785
+ if (tag !== 42) {
786
+ break;
787
+ }
788
+ message.generation = reader.string();
789
+ continue;
790
+ }
791
+ case 6: {
792
+ if (tag !== 48) {
793
+ break;
794
+ }
795
+ message.level = reader.uint32();
796
+ continue;
797
+ }
798
+ case 7: {
799
+ if (tag !== 56) {
800
+ break;
801
+ }
802
+ message.parentId = Long.fromString(reader.uint64().toString(), true);
803
+ continue;
804
+ }
805
+ case 8: {
806
+ if (tag !== 64) {
807
+ break;
808
+ }
809
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
810
+ continue;
811
+ }
812
+ case 9: {
813
+ if (tag !== 74) {
814
+ break;
815
+ }
816
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
817
+ continue;
818
+ }
819
+ case 10: {
820
+ if (tag !== 82) {
821
+ break;
822
+ }
823
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
824
+ continue;
825
+ }
826
+ case 11: {
827
+ if (tag !== 90) {
828
+ break;
829
+ }
830
+ message.documents.push(Tracker_Document.decode(reader, reader.uint32()));
831
+ continue;
832
+ }
833
+ case 12: {
834
+ if (tag !== 98) {
835
+ break;
836
+ }
837
+ message.camera = reader.string();
838
+ continue;
839
+ }
840
+ case 13: {
841
+ if (tag !== 104) {
842
+ break;
843
+ }
844
+ message.protocol = reader.int32();
845
+ continue;
846
+ }
847
+ }
848
+ if ((tag & 7) === 4 || tag === 0) {
849
+ break;
850
+ }
851
+ reader.skip(tag & 7);
852
+ }
853
+ return message;
854
+ },
855
+ create(base) {
856
+ return Tracker.fromPartial(base ?? {});
857
+ },
858
+ fromPartial(object) {
859
+ const message = createBaseTracker();
860
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
861
+ message.name = object.name ?? "";
862
+ message.picture = object.picture ?? undefined;
863
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
864
+ ? Tracker_Metadata.fromPartial(object.metadata)
865
+ : undefined;
866
+ message.generation = object.generation ?? undefined;
867
+ message.level = object.level ?? 0;
868
+ message.parentId = (object.parentId !== undefined && object.parentId !== null)
869
+ ? Long.fromValue(object.parentId)
870
+ : undefined;
871
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
872
+ ? Long.fromValue(object.createdBy)
873
+ : undefined;
874
+ message.createdAt = object.createdAt ?? undefined;
875
+ message.updatedAt = object.updatedAt ?? undefined;
876
+ message.documents = object.documents?.map((e) => Tracker_Document.fromPartial(e)) || [];
877
+ message.camera = object.camera ?? undefined;
878
+ message.protocol = object.protocol ?? undefined;
879
+ return message;
880
+ },
881
+ };
882
+ function createBaseTracker_Metadata() {
883
+ return {
884
+ port: undefined,
885
+ tags: undefined,
886
+ type: undefined,
887
+ idType: undefined,
888
+ idStart: undefined,
889
+ odoType: undefined,
890
+ callType: undefined,
891
+ idLength: undefined,
892
+ analogInput: undefined,
893
+ smsPassword: undefined,
894
+ smsUsername: undefined,
895
+ digitalInput: undefined,
896
+ digitalOutput: undefined,
897
+ movementSensor: undefined,
898
+ smsCredentials: undefined,
899
+ deviceConfigCommands: undefined,
900
+ };
901
+ }
902
+ export const Tracker_Metadata = {
903
+ encode(message, writer = new BinaryWriter()) {
904
+ if (message.port !== undefined) {
905
+ writer.uint32(8).uint32(message.port);
906
+ }
907
+ if (message.tags !== undefined) {
908
+ writer.uint32(18).string(message.tags);
909
+ }
910
+ if (message.type !== undefined) {
911
+ writer.uint32(24).uint32(message.type);
912
+ }
913
+ if (message.idType !== undefined) {
914
+ writer.uint32(32).uint32(message.idType);
915
+ }
916
+ if (message.idStart !== undefined) {
917
+ writer.uint32(42).string(message.idStart);
918
+ }
919
+ if (message.odoType !== undefined) {
920
+ writer.uint32(48).uint32(message.odoType);
921
+ }
922
+ if (message.callType !== undefined) {
923
+ writer.uint32(56).uint32(message.callType);
924
+ }
925
+ if (message.idLength !== undefined) {
926
+ writer.uint32(64).uint32(message.idLength);
927
+ }
928
+ if (message.analogInput !== undefined) {
929
+ writer.uint32(80).uint32(message.analogInput);
930
+ }
931
+ if (message.smsPassword !== undefined) {
932
+ writer.uint32(90).string(message.smsPassword);
933
+ }
934
+ if (message.smsUsername !== undefined) {
935
+ writer.uint32(98).string(message.smsUsername);
936
+ }
937
+ if (message.digitalInput !== undefined) {
938
+ writer.uint32(104).uint32(message.digitalInput);
939
+ }
940
+ if (message.digitalOutput !== undefined) {
941
+ writer.uint32(112).uint32(message.digitalOutput);
942
+ }
943
+ if (message.movementSensor !== undefined) {
944
+ writer.uint32(120).bool(message.movementSensor);
945
+ }
946
+ if (message.smsCredentials !== undefined) {
947
+ Tracker_Metadata_SmsCredentials.encode(message.smsCredentials, writer.uint32(130).fork()).join();
948
+ }
949
+ if (message.deviceConfigCommands !== undefined) {
950
+ writer.uint32(138).string(message.deviceConfigCommands);
951
+ }
952
+ return writer;
953
+ },
954
+ decode(input, length) {
955
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
956
+ const end = length === undefined ? reader.len : reader.pos + length;
957
+ const message = createBaseTracker_Metadata();
958
+ while (reader.pos < end) {
959
+ const tag = reader.uint32();
960
+ switch (tag >>> 3) {
961
+ case 1: {
962
+ if (tag !== 8) {
963
+ break;
964
+ }
965
+ message.port = reader.uint32();
966
+ continue;
967
+ }
968
+ case 2: {
969
+ if (tag !== 18) {
970
+ break;
971
+ }
972
+ message.tags = reader.string();
973
+ continue;
974
+ }
975
+ case 3: {
976
+ if (tag !== 24) {
977
+ break;
978
+ }
979
+ message.type = reader.uint32();
980
+ continue;
981
+ }
982
+ case 4: {
983
+ if (tag !== 32) {
984
+ break;
985
+ }
986
+ message.idType = reader.uint32();
987
+ continue;
988
+ }
989
+ case 5: {
990
+ if (tag !== 42) {
991
+ break;
992
+ }
993
+ message.idStart = reader.string();
994
+ continue;
995
+ }
996
+ case 6: {
997
+ if (tag !== 48) {
998
+ break;
999
+ }
1000
+ message.odoType = reader.uint32();
1001
+ continue;
1002
+ }
1003
+ case 7: {
1004
+ if (tag !== 56) {
1005
+ break;
1006
+ }
1007
+ message.callType = reader.uint32();
1008
+ continue;
1009
+ }
1010
+ case 8: {
1011
+ if (tag !== 64) {
1012
+ break;
1013
+ }
1014
+ message.idLength = reader.uint32();
1015
+ continue;
1016
+ }
1017
+ case 10: {
1018
+ if (tag !== 80) {
1019
+ break;
1020
+ }
1021
+ message.analogInput = reader.uint32();
1022
+ continue;
1023
+ }
1024
+ case 11: {
1025
+ if (tag !== 90) {
1026
+ break;
1027
+ }
1028
+ message.smsPassword = reader.string();
1029
+ continue;
1030
+ }
1031
+ case 12: {
1032
+ if (tag !== 98) {
1033
+ break;
1034
+ }
1035
+ message.smsUsername = reader.string();
1036
+ continue;
1037
+ }
1038
+ case 13: {
1039
+ if (tag !== 104) {
1040
+ break;
1041
+ }
1042
+ message.digitalInput = reader.uint32();
1043
+ continue;
1044
+ }
1045
+ case 14: {
1046
+ if (tag !== 112) {
1047
+ break;
1048
+ }
1049
+ message.digitalOutput = reader.uint32();
1050
+ continue;
1051
+ }
1052
+ case 15: {
1053
+ if (tag !== 120) {
1054
+ break;
1055
+ }
1056
+ message.movementSensor = reader.bool();
1057
+ continue;
1058
+ }
1059
+ case 16: {
1060
+ if (tag !== 130) {
1061
+ break;
1062
+ }
1063
+ message.smsCredentials = Tracker_Metadata_SmsCredentials.decode(reader, reader.uint32());
1064
+ continue;
1065
+ }
1066
+ case 17: {
1067
+ if (tag !== 138) {
1068
+ break;
1069
+ }
1070
+ message.deviceConfigCommands = reader.string();
1071
+ continue;
1072
+ }
1073
+ }
1074
+ if ((tag & 7) === 4 || tag === 0) {
1075
+ break;
1076
+ }
1077
+ reader.skip(tag & 7);
1078
+ }
1079
+ return message;
1080
+ },
1081
+ create(base) {
1082
+ return Tracker_Metadata.fromPartial(base ?? {});
1083
+ },
1084
+ fromPartial(object) {
1085
+ const message = createBaseTracker_Metadata();
1086
+ message.port = object.port ?? undefined;
1087
+ message.tags = object.tags ?? undefined;
1088
+ message.type = object.type ?? undefined;
1089
+ message.idType = object.idType ?? undefined;
1090
+ message.idStart = object.idStart ?? undefined;
1091
+ message.odoType = object.odoType ?? undefined;
1092
+ message.callType = object.callType ?? undefined;
1093
+ message.idLength = object.idLength ?? undefined;
1094
+ message.analogInput = object.analogInput ?? undefined;
1095
+ message.smsPassword = object.smsPassword ?? undefined;
1096
+ message.smsUsername = object.smsUsername ?? undefined;
1097
+ message.digitalInput = object.digitalInput ?? undefined;
1098
+ message.digitalOutput = object.digitalOutput ?? undefined;
1099
+ message.movementSensor = object.movementSensor ?? undefined;
1100
+ message.smsCredentials = (object.smsCredentials !== undefined && object.smsCredentials !== null)
1101
+ ? Tracker_Metadata_SmsCredentials.fromPartial(object.smsCredentials)
1102
+ : undefined;
1103
+ message.deviceConfigCommands = object.deviceConfigCommands ?? undefined;
1104
+ return message;
1105
+ },
1106
+ };
1107
+ function createBaseTracker_Metadata_SmsCredentials() {
1108
+ return { password: undefined, username: undefined };
1109
+ }
1110
+ export const Tracker_Metadata_SmsCredentials = {
1111
+ encode(message, writer = new BinaryWriter()) {
1112
+ if (message.password !== undefined) {
1113
+ writer.uint32(10).string(message.password);
1114
+ }
1115
+ if (message.username !== undefined) {
1116
+ writer.uint32(18).string(message.username);
1117
+ }
1118
+ return writer;
1119
+ },
1120
+ decode(input, length) {
1121
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1122
+ const end = length === undefined ? reader.len : reader.pos + length;
1123
+ const message = createBaseTracker_Metadata_SmsCredentials();
1124
+ while (reader.pos < end) {
1125
+ const tag = reader.uint32();
1126
+ switch (tag >>> 3) {
1127
+ case 1: {
1128
+ if (tag !== 10) {
1129
+ break;
1130
+ }
1131
+ message.password = reader.string();
1132
+ continue;
1133
+ }
1134
+ case 2: {
1135
+ if (tag !== 18) {
1136
+ break;
1137
+ }
1138
+ message.username = reader.string();
1139
+ continue;
1140
+ }
1141
+ }
1142
+ if ((tag & 7) === 4 || tag === 0) {
1143
+ break;
1144
+ }
1145
+ reader.skip(tag & 7);
1146
+ }
1147
+ return message;
1148
+ },
1149
+ create(base) {
1150
+ return Tracker_Metadata_SmsCredentials.fromPartial(base ?? {});
1151
+ },
1152
+ fromPartial(object) {
1153
+ const message = createBaseTracker_Metadata_SmsCredentials();
1154
+ message.password = object.password ?? undefined;
1155
+ message.username = object.username ?? undefined;
1156
+ return message;
1157
+ },
1158
+ };
1159
+ function createBaseTracker_Document() {
1160
+ return {
1161
+ objectId: undefined,
1162
+ createdBy: undefined,
1163
+ organizationId: undefined,
1164
+ url: undefined,
1165
+ visibility: undefined,
1166
+ objectType: undefined,
1167
+ };
1168
+ }
1169
+ export const Tracker_Document = {
1170
+ encode(message, writer = new BinaryWriter()) {
1171
+ if (message.objectId !== undefined) {
1172
+ writer.uint32(8).uint64(message.objectId.toString());
1173
+ }
1174
+ if (message.createdBy !== undefined) {
1175
+ writer.uint32(16).uint64(message.createdBy.toString());
1176
+ }
1177
+ if (message.organizationId !== undefined) {
1178
+ writer.uint32(24).uint64(message.organizationId.toString());
1179
+ }
1180
+ if (message.url !== undefined) {
1181
+ writer.uint32(34).string(message.url);
1182
+ }
1183
+ if (message.visibility !== undefined) {
1184
+ writer.uint32(42).string(message.visibility);
1185
+ }
1186
+ if (message.objectType !== undefined) {
1187
+ writer.uint32(50).string(message.objectType);
1188
+ }
1189
+ return writer;
1190
+ },
1191
+ decode(input, length) {
1192
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1193
+ const end = length === undefined ? reader.len : reader.pos + length;
1194
+ const message = createBaseTracker_Document();
1195
+ while (reader.pos < end) {
1196
+ const tag = reader.uint32();
1197
+ switch (tag >>> 3) {
1198
+ case 1: {
1199
+ if (tag !== 8) {
1200
+ break;
1201
+ }
1202
+ message.objectId = Long.fromString(reader.uint64().toString(), true);
1203
+ continue;
1204
+ }
1205
+ case 2: {
1206
+ if (tag !== 16) {
1207
+ break;
1208
+ }
1209
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1210
+ continue;
1211
+ }
1212
+ case 3: {
1213
+ if (tag !== 24) {
1214
+ break;
1215
+ }
1216
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
1217
+ continue;
1218
+ }
1219
+ case 4: {
1220
+ if (tag !== 34) {
1221
+ break;
1222
+ }
1223
+ message.url = reader.string();
1224
+ continue;
1225
+ }
1226
+ case 5: {
1227
+ if (tag !== 42) {
1228
+ break;
1229
+ }
1230
+ message.visibility = reader.string();
1231
+ continue;
1232
+ }
1233
+ case 6: {
1234
+ if (tag !== 50) {
1235
+ break;
1236
+ }
1237
+ message.objectType = reader.string();
1238
+ continue;
1239
+ }
1240
+ }
1241
+ if ((tag & 7) === 4 || tag === 0) {
1242
+ break;
1243
+ }
1244
+ reader.skip(tag & 7);
1245
+ }
1246
+ return message;
1247
+ },
1248
+ create(base) {
1249
+ return Tracker_Document.fromPartial(base ?? {});
1250
+ },
1251
+ fromPartial(object) {
1252
+ const message = createBaseTracker_Document();
1253
+ message.objectId = (object.objectId !== undefined && object.objectId !== null)
1254
+ ? Long.fromValue(object.objectId)
1255
+ : undefined;
1256
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1257
+ ? Long.fromValue(object.createdBy)
1258
+ : undefined;
1259
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1260
+ ? Long.fromValue(object.organizationId)
1261
+ : undefined;
1262
+ message.url = object.url ?? undefined;
1263
+ message.visibility = object.visibility ?? undefined;
1264
+ message.objectType = object.objectType ?? undefined;
1265
+ return message;
1266
+ },
1267
+ };
1268
+ function createBaseCarModel() {
1269
+ return {
1270
+ id: Long.UZERO,
1271
+ carBrandId: Long.UZERO,
1272
+ name: "",
1273
+ picture: undefined,
1274
+ description: undefined,
1275
+ sord: undefined,
1276
+ isActive: false,
1277
+ createdBy: undefined,
1278
+ updatedBy: undefined,
1279
+ metadata: [],
1280
+ createdAt: undefined,
1281
+ updatedAt: undefined,
1282
+ };
1283
+ }
1284
+ export const CarModel = {
1285
+ encode(message, writer = new BinaryWriter()) {
1286
+ if (!message.id.equals(Long.UZERO)) {
1287
+ writer.uint32(8).uint64(message.id.toString());
1288
+ }
1289
+ if (!message.carBrandId.equals(Long.UZERO)) {
1290
+ writer.uint32(16).uint64(message.carBrandId.toString());
1291
+ }
1292
+ if (message.name !== "") {
1293
+ writer.uint32(26).string(message.name);
1294
+ }
1295
+ if (message.picture !== undefined) {
1296
+ writer.uint32(34).string(message.picture);
1297
+ }
1298
+ if (message.description !== undefined) {
1299
+ writer.uint32(42).string(message.description);
1300
+ }
1301
+ if (message.sord !== undefined) {
1302
+ writer.uint32(48).int32(message.sord);
1303
+ }
1304
+ if (message.isActive !== false) {
1305
+ writer.uint32(56).bool(message.isActive);
1306
+ }
1307
+ if (message.createdBy !== undefined) {
1308
+ writer.uint32(64).uint64(message.createdBy.toString());
1309
+ }
1310
+ if (message.updatedBy !== undefined) {
1311
+ writer.uint32(72).uint64(message.updatedBy.toString());
1312
+ }
1313
+ for (const v of message.metadata) {
1314
+ CarModel_Metadata.encode(v, writer.uint32(82).fork()).join();
1315
+ }
1316
+ if (message.createdAt !== undefined) {
1317
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
1318
+ }
1319
+ if (message.updatedAt !== undefined) {
1320
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
1321
+ }
1322
+ return writer;
1323
+ },
1324
+ decode(input, length) {
1325
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1326
+ const end = length === undefined ? reader.len : reader.pos + length;
1327
+ const message = createBaseCarModel();
1328
+ while (reader.pos < end) {
1329
+ const tag = reader.uint32();
1330
+ switch (tag >>> 3) {
1331
+ case 1: {
1332
+ if (tag !== 8) {
1333
+ break;
1334
+ }
1335
+ message.id = Long.fromString(reader.uint64().toString(), true);
1336
+ continue;
1337
+ }
1338
+ case 2: {
1339
+ if (tag !== 16) {
1340
+ break;
1341
+ }
1342
+ message.carBrandId = Long.fromString(reader.uint64().toString(), true);
1343
+ continue;
1344
+ }
1345
+ case 3: {
1346
+ if (tag !== 26) {
1347
+ break;
1348
+ }
1349
+ message.name = reader.string();
1350
+ continue;
1351
+ }
1352
+ case 4: {
1353
+ if (tag !== 34) {
1354
+ break;
1355
+ }
1356
+ message.picture = reader.string();
1357
+ continue;
1358
+ }
1359
+ case 5: {
1360
+ if (tag !== 42) {
1361
+ break;
1362
+ }
1363
+ message.description = reader.string();
1364
+ continue;
1365
+ }
1366
+ case 6: {
1367
+ if (tag !== 48) {
1368
+ break;
1369
+ }
1370
+ message.sord = reader.int32();
1371
+ continue;
1372
+ }
1373
+ case 7: {
1374
+ if (tag !== 56) {
1375
+ break;
1376
+ }
1377
+ message.isActive = reader.bool();
1378
+ continue;
1379
+ }
1380
+ case 8: {
1381
+ if (tag !== 64) {
1382
+ break;
1383
+ }
1384
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1385
+ continue;
1386
+ }
1387
+ case 9: {
1388
+ if (tag !== 72) {
1389
+ break;
1390
+ }
1391
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1392
+ continue;
1393
+ }
1394
+ case 10: {
1395
+ if (tag !== 82) {
1396
+ break;
1397
+ }
1398
+ message.metadata.push(CarModel_Metadata.decode(reader, reader.uint32()));
1399
+ continue;
1400
+ }
1401
+ case 11: {
1402
+ if (tag !== 90) {
1403
+ break;
1404
+ }
1405
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1406
+ continue;
1407
+ }
1408
+ case 12: {
1409
+ if (tag !== 98) {
1410
+ break;
1411
+ }
1412
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1413
+ continue;
1414
+ }
1415
+ }
1416
+ if ((tag & 7) === 4 || tag === 0) {
1417
+ break;
1418
+ }
1419
+ reader.skip(tag & 7);
1420
+ }
1421
+ return message;
1422
+ },
1423
+ create(base) {
1424
+ return CarModel.fromPartial(base ?? {});
1425
+ },
1426
+ fromPartial(object) {
1427
+ const message = createBaseCarModel();
1428
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1429
+ message.carBrandId = (object.carBrandId !== undefined && object.carBrandId !== null)
1430
+ ? Long.fromValue(object.carBrandId)
1431
+ : Long.UZERO;
1432
+ message.name = object.name ?? "";
1433
+ message.picture = object.picture ?? undefined;
1434
+ message.description = object.description ?? undefined;
1435
+ message.sord = object.sord ?? undefined;
1436
+ message.isActive = object.isActive ?? false;
1437
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1438
+ ? Long.fromValue(object.createdBy)
1439
+ : undefined;
1440
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1441
+ ? Long.fromValue(object.updatedBy)
1442
+ : undefined;
1443
+ message.metadata = object.metadata?.map((e) => CarModel_Metadata.fromPartial(e)) || [];
1444
+ message.createdAt = object.createdAt ?? undefined;
1445
+ message.updatedAt = object.updatedAt ?? undefined;
1446
+ return message;
1447
+ },
1448
+ };
1449
+ function createBaseCarModel_Metadata() {
1450
+ return { key: undefined, name: undefined, value: undefined };
1451
+ }
1452
+ export const CarModel_Metadata = {
1453
+ encode(message, writer = new BinaryWriter()) {
1454
+ if (message.key !== undefined) {
1455
+ writer.uint32(10).string(message.key);
1456
+ }
1457
+ if (message.name !== undefined) {
1458
+ writer.uint32(18).string(message.name);
1459
+ }
1460
+ if (message.value !== undefined) {
1461
+ writer.uint32(26).string(message.value);
1462
+ }
1463
+ return writer;
1464
+ },
1465
+ decode(input, length) {
1466
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1467
+ const end = length === undefined ? reader.len : reader.pos + length;
1468
+ const message = createBaseCarModel_Metadata();
1469
+ while (reader.pos < end) {
1470
+ const tag = reader.uint32();
1471
+ switch (tag >>> 3) {
1472
+ case 1: {
1473
+ if (tag !== 10) {
1474
+ break;
1475
+ }
1476
+ message.key = reader.string();
1477
+ continue;
1478
+ }
1479
+ case 2: {
1480
+ if (tag !== 18) {
1481
+ break;
1482
+ }
1483
+ message.name = reader.string();
1484
+ continue;
1485
+ }
1486
+ case 3: {
1487
+ if (tag !== 26) {
1488
+ break;
1489
+ }
1490
+ message.value = reader.string();
1491
+ continue;
1492
+ }
1493
+ }
1494
+ if ((tag & 7) === 4 || tag === 0) {
1495
+ break;
1496
+ }
1497
+ reader.skip(tag & 7);
1498
+ }
1499
+ return message;
1500
+ },
1501
+ create(base) {
1502
+ return CarModel_Metadata.fromPartial(base ?? {});
1503
+ },
1504
+ fromPartial(object) {
1505
+ const message = createBaseCarModel_Metadata();
1506
+ message.key = object.key ?? undefined;
1507
+ message.name = object.name ?? undefined;
1508
+ message.value = object.value ?? undefined;
1509
+ return message;
1510
+ },
1511
+ };
1512
+ function createBaseCarBrand() {
1513
+ return {
1514
+ id: Long.UZERO,
1515
+ carCategoryId: Long.UZERO,
1516
+ name: "",
1517
+ description: undefined,
1518
+ picture: undefined,
1519
+ sord: undefined,
1520
+ isActive: undefined,
1521
+ createdBy: undefined,
1522
+ updatedBy: undefined,
1523
+ createdAt: undefined,
1524
+ updatedAt: undefined,
1525
+ };
1526
+ }
1527
+ export const CarBrand = {
1528
+ encode(message, writer = new BinaryWriter()) {
1529
+ if (!message.id.equals(Long.UZERO)) {
1530
+ writer.uint32(8).uint64(message.id.toString());
1531
+ }
1532
+ if (!message.carCategoryId.equals(Long.UZERO)) {
1533
+ writer.uint32(16).uint64(message.carCategoryId.toString());
1534
+ }
1535
+ if (message.name !== "") {
1536
+ writer.uint32(26).string(message.name);
1537
+ }
1538
+ if (message.description !== undefined) {
1539
+ writer.uint32(34).string(message.description);
1540
+ }
1541
+ if (message.picture !== undefined) {
1542
+ writer.uint32(42).string(message.picture);
1543
+ }
1544
+ if (message.sord !== undefined) {
1545
+ writer.uint32(48).int32(message.sord);
1546
+ }
1547
+ if (message.isActive !== undefined) {
1548
+ writer.uint32(56).bool(message.isActive);
1549
+ }
1550
+ if (message.createdBy !== undefined) {
1551
+ writer.uint32(64).uint64(message.createdBy.toString());
1552
+ }
1553
+ if (message.updatedBy !== undefined) {
1554
+ writer.uint32(72).uint64(message.updatedBy.toString());
1555
+ }
1556
+ if (message.createdAt !== undefined) {
1557
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
1558
+ }
1559
+ if (message.updatedAt !== undefined) {
1560
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
1561
+ }
1562
+ return writer;
1563
+ },
1564
+ decode(input, length) {
1565
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1566
+ const end = length === undefined ? reader.len : reader.pos + length;
1567
+ const message = createBaseCarBrand();
1568
+ while (reader.pos < end) {
1569
+ const tag = reader.uint32();
1570
+ switch (tag >>> 3) {
1571
+ case 1: {
1572
+ if (tag !== 8) {
1573
+ break;
1574
+ }
1575
+ message.id = Long.fromString(reader.uint64().toString(), true);
1576
+ continue;
1577
+ }
1578
+ case 2: {
1579
+ if (tag !== 16) {
1580
+ break;
1581
+ }
1582
+ message.carCategoryId = Long.fromString(reader.uint64().toString(), true);
1583
+ continue;
1584
+ }
1585
+ case 3: {
1586
+ if (tag !== 26) {
1587
+ break;
1588
+ }
1589
+ message.name = reader.string();
1590
+ continue;
1591
+ }
1592
+ case 4: {
1593
+ if (tag !== 34) {
1594
+ break;
1595
+ }
1596
+ message.description = reader.string();
1597
+ continue;
1598
+ }
1599
+ case 5: {
1600
+ if (tag !== 42) {
1601
+ break;
1602
+ }
1603
+ message.picture = reader.string();
1604
+ continue;
1605
+ }
1606
+ case 6: {
1607
+ if (tag !== 48) {
1608
+ break;
1609
+ }
1610
+ message.sord = reader.int32();
1611
+ continue;
1612
+ }
1613
+ case 7: {
1614
+ if (tag !== 56) {
1615
+ break;
1616
+ }
1617
+ message.isActive = reader.bool();
1618
+ continue;
1619
+ }
1620
+ case 8: {
1621
+ if (tag !== 64) {
1622
+ break;
1623
+ }
1624
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1625
+ continue;
1626
+ }
1627
+ case 9: {
1628
+ if (tag !== 72) {
1629
+ break;
1630
+ }
1631
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1632
+ continue;
1633
+ }
1634
+ case 10: {
1635
+ if (tag !== 82) {
1636
+ break;
1637
+ }
1638
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1639
+ continue;
1640
+ }
1641
+ case 11: {
1642
+ if (tag !== 90) {
1643
+ break;
1644
+ }
1645
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1646
+ continue;
1647
+ }
1648
+ }
1649
+ if ((tag & 7) === 4 || tag === 0) {
1650
+ break;
1651
+ }
1652
+ reader.skip(tag & 7);
1653
+ }
1654
+ return message;
1655
+ },
1656
+ create(base) {
1657
+ return CarBrand.fromPartial(base ?? {});
1658
+ },
1659
+ fromPartial(object) {
1660
+ const message = createBaseCarBrand();
1661
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1662
+ message.carCategoryId = (object.carCategoryId !== undefined && object.carCategoryId !== null)
1663
+ ? Long.fromValue(object.carCategoryId)
1664
+ : Long.UZERO;
1665
+ message.name = object.name ?? "";
1666
+ message.description = object.description ?? undefined;
1667
+ message.picture = object.picture ?? undefined;
1668
+ message.sord = object.sord ?? undefined;
1669
+ message.isActive = object.isActive ?? undefined;
1670
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1671
+ ? Long.fromValue(object.createdBy)
1672
+ : undefined;
1673
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1674
+ ? Long.fromValue(object.updatedBy)
1675
+ : undefined;
1676
+ message.createdAt = object.createdAt ?? undefined;
1677
+ message.updatedAt = object.updatedAt ?? undefined;
1678
+ return message;
1679
+ },
1680
+ };
1681
+ function createBaseCar() {
1682
+ return {
1683
+ id: Long.UZERO,
1684
+ organizationId: Long.UZERO,
1685
+ createdBy: undefined,
1686
+ updatedBy: undefined,
1687
+ name: "",
1688
+ picture: undefined,
1689
+ plateNumber: undefined,
1690
+ carGroupId: undefined,
1691
+ carType: undefined,
1692
+ code: undefined,
1693
+ tonnage: undefined,
1694
+ maxSpeed: undefined,
1695
+ vin: undefined,
1696
+ engineNumber: undefined,
1697
+ chassisNumber: undefined,
1698
+ modelYear: undefined,
1699
+ fuelUsage: undefined,
1700
+ fuelUsagePerHour: undefined,
1701
+ fuelType: undefined,
1702
+ fuelCapacity: undefined,
1703
+ description: undefined,
1704
+ guarantyExpirationDate: undefined,
1705
+ guarantyExpirationKm: undefined,
1706
+ color: undefined,
1707
+ createdAt: undefined,
1708
+ updatedAt: undefined,
1709
+ };
1710
+ }
1711
+ export const Car = {
1712
+ encode(message, writer = new BinaryWriter()) {
1713
+ if (!message.id.equals(Long.UZERO)) {
1714
+ writer.uint32(8).uint64(message.id.toString());
1715
+ }
1716
+ if (!message.organizationId.equals(Long.UZERO)) {
1717
+ writer.uint32(16).uint64(message.organizationId.toString());
1718
+ }
1719
+ if (message.createdBy !== undefined) {
1720
+ writer.uint32(24).uint64(message.createdBy.toString());
1721
+ }
1722
+ if (message.updatedBy !== undefined) {
1723
+ writer.uint32(32).uint64(message.updatedBy.toString());
1724
+ }
1725
+ if (message.name !== "") {
1726
+ writer.uint32(42).string(message.name);
1727
+ }
1728
+ if (message.picture !== undefined) {
1729
+ writer.uint32(50).string(message.picture);
1730
+ }
1731
+ if (message.plateNumber !== undefined) {
1732
+ writer.uint32(218).string(message.plateNumber);
1733
+ }
1734
+ if (message.carGroupId !== undefined) {
1735
+ writer.uint32(56).uint64(message.carGroupId.toString());
1736
+ }
1737
+ if (message.carType !== undefined) {
1738
+ writer.uint32(64).uint64(message.carType.toString());
1739
+ }
1740
+ if (message.code !== undefined) {
1741
+ writer.uint32(74).string(message.code);
1742
+ }
1743
+ if (message.tonnage !== undefined) {
1744
+ writer.uint32(80).uint64(message.tonnage.toString());
1745
+ }
1746
+ if (message.maxSpeed !== undefined) {
1747
+ writer.uint32(88).uint64(message.maxSpeed.toString());
1748
+ }
1749
+ if (message.vin !== undefined) {
1750
+ writer.uint32(98).string(message.vin);
1751
+ }
1752
+ if (message.engineNumber !== undefined) {
1753
+ writer.uint32(106).string(message.engineNumber);
1754
+ }
1755
+ if (message.chassisNumber !== undefined) {
1756
+ writer.uint32(114).string(message.chassisNumber);
1757
+ }
1758
+ if (message.modelYear !== undefined) {
1759
+ writer.uint32(120).int32(message.modelYear);
1760
+ }
1761
+ if (message.fuelUsage !== undefined) {
1762
+ writer.uint32(128).uint32(message.fuelUsage);
1763
+ }
1764
+ if (message.fuelUsagePerHour !== undefined) {
1765
+ writer.uint32(136).uint32(message.fuelUsagePerHour);
1766
+ }
1767
+ if (message.fuelType !== undefined) {
1768
+ writer.uint32(146).string(message.fuelType);
1769
+ }
1770
+ if (message.fuelCapacity !== undefined) {
1771
+ writer.uint32(152).uint32(message.fuelCapacity);
1772
+ }
1773
+ if (message.description !== undefined) {
1774
+ writer.uint32(162).string(message.description);
1775
+ }
1776
+ if (message.guarantyExpirationDate !== undefined) {
1777
+ Timestamp.encode(toTimestamp(message.guarantyExpirationDate), writer.uint32(170).fork()).join();
1778
+ }
1779
+ if (message.guarantyExpirationKm !== undefined) {
1780
+ writer.uint32(176).uint64(message.guarantyExpirationKm.toString());
1781
+ }
1782
+ if (message.color !== undefined) {
1783
+ writer.uint32(186).string(message.color);
1784
+ }
1785
+ if (message.createdAt !== undefined) {
1786
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(194).fork()).join();
1787
+ }
1788
+ if (message.updatedAt !== undefined) {
1789
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(202).fork()).join();
1790
+ }
1791
+ return writer;
1792
+ },
1793
+ decode(input, length) {
1794
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1795
+ const end = length === undefined ? reader.len : reader.pos + length;
1796
+ const message = createBaseCar();
1797
+ while (reader.pos < end) {
1798
+ const tag = reader.uint32();
1799
+ switch (tag >>> 3) {
1800
+ case 1: {
1801
+ if (tag !== 8) {
1802
+ break;
1803
+ }
1804
+ message.id = Long.fromString(reader.uint64().toString(), true);
1805
+ continue;
1806
+ }
1807
+ case 2: {
1808
+ if (tag !== 16) {
1809
+ break;
1810
+ }
1811
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
1812
+ continue;
1813
+ }
1814
+ case 3: {
1815
+ if (tag !== 24) {
1816
+ break;
1817
+ }
1818
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1819
+ continue;
1820
+ }
1821
+ case 4: {
1822
+ if (tag !== 32) {
1823
+ break;
1824
+ }
1825
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1826
+ continue;
1827
+ }
1828
+ case 5: {
1829
+ if (tag !== 42) {
1830
+ break;
1831
+ }
1832
+ message.name = reader.string();
1833
+ continue;
1834
+ }
1835
+ case 6: {
1836
+ if (tag !== 50) {
1837
+ break;
1838
+ }
1839
+ message.picture = reader.string();
1840
+ continue;
1841
+ }
1842
+ case 27: {
1843
+ if (tag !== 218) {
1844
+ break;
1845
+ }
1846
+ message.plateNumber = reader.string();
1847
+ continue;
1848
+ }
1849
+ case 7: {
1850
+ if (tag !== 56) {
1851
+ break;
1852
+ }
1853
+ message.carGroupId = Long.fromString(reader.uint64().toString(), true);
1854
+ continue;
1855
+ }
1856
+ case 8: {
1857
+ if (tag !== 64) {
1858
+ break;
1859
+ }
1860
+ message.carType = Long.fromString(reader.uint64().toString(), true);
1861
+ continue;
1862
+ }
1863
+ case 9: {
1864
+ if (tag !== 74) {
1865
+ break;
1866
+ }
1867
+ message.code = reader.string();
1868
+ continue;
1869
+ }
1870
+ case 10: {
1871
+ if (tag !== 80) {
1872
+ break;
1873
+ }
1874
+ message.tonnage = Long.fromString(reader.uint64().toString(), true);
1875
+ continue;
1876
+ }
1877
+ case 11: {
1878
+ if (tag !== 88) {
1879
+ break;
1880
+ }
1881
+ message.maxSpeed = Long.fromString(reader.uint64().toString(), true);
1882
+ continue;
1883
+ }
1884
+ case 12: {
1885
+ if (tag !== 98) {
1886
+ break;
1887
+ }
1888
+ message.vin = reader.string();
1889
+ continue;
1890
+ }
1891
+ case 13: {
1892
+ if (tag !== 106) {
1893
+ break;
1894
+ }
1895
+ message.engineNumber = reader.string();
1896
+ continue;
1897
+ }
1898
+ case 14: {
1899
+ if (tag !== 114) {
1900
+ break;
1901
+ }
1902
+ message.chassisNumber = reader.string();
1903
+ continue;
1904
+ }
1905
+ case 15: {
1906
+ if (tag !== 120) {
1907
+ break;
1908
+ }
1909
+ message.modelYear = reader.int32();
1910
+ continue;
1911
+ }
1912
+ case 16: {
1913
+ if (tag !== 128) {
1914
+ break;
1915
+ }
1916
+ message.fuelUsage = reader.uint32();
1917
+ continue;
1918
+ }
1919
+ case 17: {
1920
+ if (tag !== 136) {
1921
+ break;
1922
+ }
1923
+ message.fuelUsagePerHour = reader.uint32();
1924
+ continue;
1925
+ }
1926
+ case 18: {
1927
+ if (tag !== 146) {
1928
+ break;
1929
+ }
1930
+ message.fuelType = reader.string();
1931
+ continue;
1932
+ }
1933
+ case 19: {
1934
+ if (tag !== 152) {
1935
+ break;
1936
+ }
1937
+ message.fuelCapacity = reader.uint32();
1938
+ continue;
1939
+ }
1940
+ case 20: {
1941
+ if (tag !== 162) {
1942
+ break;
1943
+ }
1944
+ message.description = reader.string();
1945
+ continue;
1946
+ }
1947
+ case 21: {
1948
+ if (tag !== 170) {
1949
+ break;
1950
+ }
1951
+ message.guarantyExpirationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1952
+ continue;
1953
+ }
1954
+ case 22: {
1955
+ if (tag !== 176) {
1956
+ break;
1957
+ }
1958
+ message.guarantyExpirationKm = Long.fromString(reader.uint64().toString(), true);
1959
+ continue;
1960
+ }
1961
+ case 23: {
1962
+ if (tag !== 186) {
1963
+ break;
1964
+ }
1965
+ message.color = reader.string();
1966
+ continue;
1967
+ }
1968
+ case 24: {
1969
+ if (tag !== 194) {
1970
+ break;
1971
+ }
1972
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1973
+ continue;
1974
+ }
1975
+ case 25: {
1976
+ if (tag !== 202) {
1977
+ break;
1978
+ }
1979
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1980
+ continue;
1981
+ }
1982
+ }
1983
+ if ((tag & 7) === 4 || tag === 0) {
1984
+ break;
1985
+ }
1986
+ reader.skip(tag & 7);
1987
+ }
1988
+ return message;
1989
+ },
1990
+ create(base) {
1991
+ return Car.fromPartial(base ?? {});
1992
+ },
1993
+ fromPartial(object) {
1994
+ const message = createBaseCar();
1995
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1996
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1997
+ ? Long.fromValue(object.organizationId)
1998
+ : Long.UZERO;
1999
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2000
+ ? Long.fromValue(object.createdBy)
2001
+ : undefined;
2002
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
2003
+ ? Long.fromValue(object.updatedBy)
2004
+ : undefined;
2005
+ message.name = object.name ?? "";
2006
+ message.picture = object.picture ?? undefined;
2007
+ message.plateNumber = object.plateNumber ?? undefined;
2008
+ message.carGroupId = (object.carGroupId !== undefined && object.carGroupId !== null)
2009
+ ? Long.fromValue(object.carGroupId)
2010
+ : undefined;
2011
+ message.carType = (object.carType !== undefined && object.carType !== null)
2012
+ ? Long.fromValue(object.carType)
2013
+ : undefined;
2014
+ message.code = object.code ?? undefined;
2015
+ message.tonnage = (object.tonnage !== undefined && object.tonnage !== null)
2016
+ ? Long.fromValue(object.tonnage)
2017
+ : undefined;
2018
+ message.maxSpeed = (object.maxSpeed !== undefined && object.maxSpeed !== null)
2019
+ ? Long.fromValue(object.maxSpeed)
2020
+ : undefined;
2021
+ message.vin = object.vin ?? undefined;
2022
+ message.engineNumber = object.engineNumber ?? undefined;
2023
+ message.chassisNumber = object.chassisNumber ?? undefined;
2024
+ message.modelYear = object.modelYear ?? undefined;
2025
+ message.fuelUsage = object.fuelUsage ?? undefined;
2026
+ message.fuelUsagePerHour = object.fuelUsagePerHour ?? undefined;
2027
+ message.fuelType = object.fuelType ?? undefined;
2028
+ message.fuelCapacity = object.fuelCapacity ?? undefined;
2029
+ message.description = object.description ?? undefined;
2030
+ message.guarantyExpirationDate = object.guarantyExpirationDate ?? undefined;
2031
+ message.guarantyExpirationKm = (object.guarantyExpirationKm !== undefined && object.guarantyExpirationKm !== null)
2032
+ ? Long.fromValue(object.guarantyExpirationKm)
2033
+ : undefined;
2034
+ message.color = object.color ?? undefined;
2035
+ message.createdAt = object.createdAt ?? undefined;
2036
+ message.updatedAt = object.updatedAt ?? undefined;
2037
+ return message;
2038
+ },
2039
+ };
2040
+ function createBaseSystemIoStyle() {
2041
+ return { icon: undefined, name: undefined, color: undefined };
2042
+ }
2043
+ export const SystemIoStyle = {
2044
+ encode(message, writer = new BinaryWriter()) {
2045
+ if (message.icon !== undefined) {
2046
+ writer.uint32(10).string(message.icon);
2047
+ }
2048
+ if (message.name !== undefined) {
2049
+ writer.uint32(18).string(message.name);
2050
+ }
2051
+ if (message.color !== undefined) {
2052
+ writer.uint32(26).string(message.color);
2053
+ }
2054
+ return writer;
2055
+ },
2056
+ decode(input, length) {
2057
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2058
+ const end = length === undefined ? reader.len : reader.pos + length;
2059
+ const message = createBaseSystemIoStyle();
2060
+ while (reader.pos < end) {
2061
+ const tag = reader.uint32();
2062
+ switch (tag >>> 3) {
2063
+ case 1: {
2064
+ if (tag !== 10) {
2065
+ break;
2066
+ }
2067
+ message.icon = reader.string();
2068
+ continue;
2069
+ }
2070
+ case 2: {
2071
+ if (tag !== 18) {
2072
+ break;
2073
+ }
2074
+ message.name = reader.string();
2075
+ continue;
2076
+ }
2077
+ case 3: {
2078
+ if (tag !== 26) {
2079
+ break;
2080
+ }
2081
+ message.color = reader.string();
2082
+ continue;
2083
+ }
2084
+ }
2085
+ if ((tag & 7) === 4 || tag === 0) {
2086
+ break;
2087
+ }
2088
+ reader.skip(tag & 7);
2089
+ }
2090
+ return message;
2091
+ },
2092
+ create(base) {
2093
+ return SystemIoStyle.fromPartial(base ?? {});
2094
+ },
2095
+ fromPartial(object) {
2096
+ const message = createBaseSystemIoStyle();
2097
+ message.icon = object.icon ?? undefined;
2098
+ message.name = object.name ?? undefined;
2099
+ message.color = object.color ?? undefined;
2100
+ return message;
2101
+ },
2102
+ };
2103
+ function createBaseSystemIo() {
2104
+ return {
2105
+ id: Long.UZERO,
2106
+ deviceId: undefined,
2107
+ organizationId: undefined,
2108
+ formula: "",
2109
+ name: "",
2110
+ description: undefined,
2111
+ type: 0,
2112
+ unit: undefined,
2113
+ activeStyle: undefined,
2114
+ inactiveStyle: undefined,
2115
+ active: false,
2116
+ graphable: false,
2117
+ sord: 0,
2118
+ hidden: [],
2119
+ unknown: {},
2120
+ createdBy: undefined,
2121
+ createdAt: undefined,
2122
+ updatedAt: undefined,
2123
+ separatorsCount: undefined,
2124
+ decimalCount: undefined,
2125
+ };
2126
+ }
2127
+ export const SystemIo = {
2128
+ encode(message, writer = new BinaryWriter()) {
2129
+ if (!message.id.equals(Long.UZERO)) {
2130
+ writer.uint32(8).uint64(message.id.toString());
2131
+ }
2132
+ if (message.deviceId !== undefined) {
2133
+ writer.uint32(24).uint64(message.deviceId.toString());
2134
+ }
2135
+ if (message.organizationId !== undefined) {
2136
+ writer.uint32(32).uint64(message.organizationId.toString());
2137
+ }
2138
+ if (message.formula !== "") {
2139
+ writer.uint32(42).string(message.formula);
2140
+ }
2141
+ if (message.name !== "") {
2142
+ writer.uint32(18).string(message.name);
2143
+ }
2144
+ if (message.description !== undefined) {
2145
+ writer.uint32(66).string(message.description);
2146
+ }
2147
+ if (message.type !== 0) {
2148
+ writer.uint32(48).int32(message.type);
2149
+ }
2150
+ if (message.unit !== undefined) {
2151
+ writer.uint32(58).string(message.unit);
2152
+ }
2153
+ if (message.activeStyle !== undefined) {
2154
+ SystemIoStyle.encode(message.activeStyle, writer.uint32(74).fork()).join();
2155
+ }
2156
+ if (message.inactiveStyle !== undefined) {
2157
+ SystemIoStyle.encode(message.inactiveStyle, writer.uint32(82).fork()).join();
2158
+ }
2159
+ if (message.active !== false) {
2160
+ writer.uint32(88).bool(message.active);
2161
+ }
2162
+ if (message.graphable !== false) {
2163
+ writer.uint32(96).bool(message.graphable);
2164
+ }
2165
+ if (message.sord !== 0) {
2166
+ writer.uint32(104).uint32(message.sord);
2167
+ }
2168
+ for (const v of message.hidden) {
2169
+ writer.uint32(114).string(v);
2170
+ }
2171
+ globalThis.Object.entries(message.unknown).forEach(([key, value]) => {
2172
+ SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
2173
+ });
2174
+ if (message.createdBy !== undefined) {
2175
+ writer.uint32(128).uint64(message.createdBy.toString());
2176
+ }
2177
+ if (message.createdAt !== undefined) {
2178
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(138).fork()).join();
2179
+ }
2180
+ if (message.updatedAt !== undefined) {
2181
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(146).fork()).join();
2182
+ }
2183
+ if (message.separatorsCount !== undefined) {
2184
+ writer.uint32(152).uint32(message.separatorsCount);
2185
+ }
2186
+ if (message.decimalCount !== undefined) {
2187
+ writer.uint32(160).uint32(message.decimalCount);
2188
+ }
2189
+ return writer;
2190
+ },
2191
+ decode(input, length) {
2192
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2193
+ const end = length === undefined ? reader.len : reader.pos + length;
2194
+ const message = createBaseSystemIo();
2195
+ while (reader.pos < end) {
2196
+ const tag = reader.uint32();
2197
+ switch (tag >>> 3) {
2198
+ case 1: {
2199
+ if (tag !== 8) {
2200
+ break;
2201
+ }
2202
+ message.id = Long.fromString(reader.uint64().toString(), true);
2203
+ continue;
2204
+ }
2205
+ case 3: {
2206
+ if (tag !== 24) {
2207
+ break;
2208
+ }
2209
+ message.deviceId = Long.fromString(reader.uint64().toString(), true);
2210
+ continue;
2211
+ }
2212
+ case 4: {
2213
+ if (tag !== 32) {
2214
+ break;
2215
+ }
2216
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
2217
+ continue;
2218
+ }
2219
+ case 5: {
2220
+ if (tag !== 42) {
2221
+ break;
2222
+ }
2223
+ message.formula = reader.string();
2224
+ continue;
2225
+ }
2226
+ case 2: {
2227
+ if (tag !== 18) {
2228
+ break;
2229
+ }
2230
+ message.name = reader.string();
2231
+ continue;
2232
+ }
2233
+ case 8: {
2234
+ if (tag !== 66) {
2235
+ break;
2236
+ }
2237
+ message.description = reader.string();
2238
+ continue;
2239
+ }
2240
+ case 6: {
2241
+ if (tag !== 48) {
2242
+ break;
2243
+ }
2244
+ message.type = reader.int32();
2245
+ continue;
2246
+ }
2247
+ case 7: {
2248
+ if (tag !== 58) {
2249
+ break;
2250
+ }
2251
+ message.unit = reader.string();
2252
+ continue;
2253
+ }
2254
+ case 9: {
2255
+ if (tag !== 74) {
2256
+ break;
2257
+ }
2258
+ message.activeStyle = SystemIoStyle.decode(reader, reader.uint32());
2259
+ continue;
2260
+ }
2261
+ case 10: {
2262
+ if (tag !== 82) {
2263
+ break;
2264
+ }
2265
+ message.inactiveStyle = SystemIoStyle.decode(reader, reader.uint32());
2266
+ continue;
2267
+ }
2268
+ case 11: {
2269
+ if (tag !== 88) {
2270
+ break;
2271
+ }
2272
+ message.active = reader.bool();
2273
+ continue;
2274
+ }
2275
+ case 12: {
2276
+ if (tag !== 96) {
2277
+ break;
2278
+ }
2279
+ message.graphable = reader.bool();
2280
+ continue;
2281
+ }
2282
+ case 13: {
2283
+ if (tag !== 104) {
2284
+ break;
2285
+ }
2286
+ message.sord = reader.uint32();
2287
+ continue;
2288
+ }
2289
+ case 14: {
2290
+ if (tag !== 114) {
2291
+ break;
2292
+ }
2293
+ message.hidden.push(reader.string());
2294
+ continue;
2295
+ }
2296
+ case 15: {
2297
+ if (tag !== 122) {
2298
+ break;
2299
+ }
2300
+ const entry15 = SystemIo_UnknownEntry.decode(reader, reader.uint32());
2301
+ if (entry15.value !== undefined) {
2302
+ message.unknown[entry15.key] = entry15.value;
2303
+ }
2304
+ continue;
2305
+ }
2306
+ case 16: {
2307
+ if (tag !== 128) {
2308
+ break;
2309
+ }
2310
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
2311
+ continue;
2312
+ }
2313
+ case 17: {
2314
+ if (tag !== 138) {
2315
+ break;
2316
+ }
2317
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2318
+ continue;
2319
+ }
2320
+ case 18: {
2321
+ if (tag !== 146) {
2322
+ break;
2323
+ }
2324
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2325
+ continue;
2326
+ }
2327
+ case 19: {
2328
+ if (tag !== 152) {
2329
+ break;
2330
+ }
2331
+ message.separatorsCount = reader.uint32();
2332
+ continue;
2333
+ }
2334
+ case 20: {
2335
+ if (tag !== 160) {
2336
+ break;
2337
+ }
2338
+ message.decimalCount = reader.uint32();
2339
+ continue;
2340
+ }
2341
+ }
2342
+ if ((tag & 7) === 4 || tag === 0) {
2343
+ break;
2344
+ }
2345
+ reader.skip(tag & 7);
2346
+ }
2347
+ return message;
2348
+ },
2349
+ create(base) {
2350
+ return SystemIo.fromPartial(base ?? {});
2351
+ },
2352
+ fromPartial(object) {
2353
+ const message = createBaseSystemIo();
2354
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
2355
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
2356
+ ? Long.fromValue(object.deviceId)
2357
+ : undefined;
2358
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
2359
+ ? Long.fromValue(object.organizationId)
2360
+ : undefined;
2361
+ message.formula = object.formula ?? "";
2362
+ message.name = object.name ?? "";
2363
+ message.description = object.description ?? undefined;
2364
+ message.type = object.type ?? 0;
2365
+ message.unit = object.unit ?? undefined;
2366
+ message.activeStyle = (object.activeStyle !== undefined && object.activeStyle !== null)
2367
+ ? SystemIoStyle.fromPartial(object.activeStyle)
2368
+ : undefined;
2369
+ message.inactiveStyle = (object.inactiveStyle !== undefined && object.inactiveStyle !== null)
2370
+ ? SystemIoStyle.fromPartial(object.inactiveStyle)
2371
+ : undefined;
2372
+ message.active = object.active ?? false;
2373
+ message.graphable = object.graphable ?? false;
2374
+ message.sord = object.sord ?? 0;
2375
+ message.hidden = object.hidden?.map((e) => e) || [];
2376
+ message.unknown = globalThis.Object.entries(object.unknown ?? {}).reduce((acc, [key, value]) => {
2377
+ if (value !== undefined) {
2378
+ acc[key] = globalThis.String(value);
2379
+ }
2380
+ return acc;
2381
+ }, {});
2382
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2383
+ ? Long.fromValue(object.createdBy)
2384
+ : undefined;
2385
+ message.createdAt = object.createdAt ?? undefined;
2386
+ message.updatedAt = object.updatedAt ?? undefined;
2387
+ message.separatorsCount = object.separatorsCount ?? undefined;
2388
+ message.decimalCount = object.decimalCount ?? undefined;
2389
+ return message;
2390
+ },
2391
+ };
2392
+ function createBaseSystemIo_UnknownEntry() {
2393
+ return { key: "", value: "" };
2394
+ }
2395
+ export const SystemIo_UnknownEntry = {
2396
+ encode(message, writer = new BinaryWriter()) {
2397
+ if (message.key !== "") {
2398
+ writer.uint32(10).string(message.key);
2399
+ }
2400
+ if (message.value !== "") {
2401
+ writer.uint32(18).string(message.value);
2402
+ }
2403
+ return writer;
2404
+ },
2405
+ decode(input, length) {
2406
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2407
+ const end = length === undefined ? reader.len : reader.pos + length;
2408
+ const message = createBaseSystemIo_UnknownEntry();
2409
+ while (reader.pos < end) {
2410
+ const tag = reader.uint32();
2411
+ switch (tag >>> 3) {
2412
+ case 1: {
2413
+ if (tag !== 10) {
2414
+ break;
2415
+ }
2416
+ message.key = reader.string();
2417
+ continue;
2418
+ }
2419
+ case 2: {
2420
+ if (tag !== 18) {
2421
+ break;
2422
+ }
2423
+ message.value = reader.string();
2424
+ continue;
2425
+ }
2426
+ }
2427
+ if ((tag & 7) === 4 || tag === 0) {
2428
+ break;
2429
+ }
2430
+ reader.skip(tag & 7);
2431
+ }
2432
+ return message;
2433
+ },
2434
+ create(base) {
2435
+ return SystemIo_UnknownEntry.fromPartial(base ?? {});
2436
+ },
2437
+ fromPartial(object) {
2438
+ const message = createBaseSystemIo_UnknownEntry();
2439
+ message.key = object.key ?? "";
2440
+ message.value = object.value ?? "";
2441
+ return message;
2442
+ },
2443
+ };
2444
+ function createBaseShownIo() {
2445
+ return {
2446
+ name: "",
2447
+ style: undefined,
2448
+ unit: undefined,
2449
+ description: undefined,
2450
+ value: "",
2451
+ active: false,
2452
+ graphable: false,
2453
+ sord: 0,
2454
+ };
2455
+ }
2456
+ export const ShownIo = {
2457
+ encode(message, writer = new BinaryWriter()) {
2458
+ if (message.name !== "") {
2459
+ writer.uint32(10).string(message.name);
2460
+ }
2461
+ if (message.style !== undefined) {
2462
+ SystemIoStyle.encode(message.style, writer.uint32(18).fork()).join();
2463
+ }
2464
+ if (message.unit !== undefined) {
2465
+ writer.uint32(26).string(message.unit);
2466
+ }
2467
+ if (message.description !== undefined) {
2468
+ writer.uint32(34).string(message.description);
2469
+ }
2470
+ if (message.value !== "") {
2471
+ writer.uint32(42).string(message.value);
2472
+ }
2473
+ if (message.active !== false) {
2474
+ writer.uint32(48).bool(message.active);
2475
+ }
2476
+ if (message.graphable !== false) {
2477
+ writer.uint32(56).bool(message.graphable);
2478
+ }
2479
+ if (message.sord !== 0) {
2480
+ writer.uint32(64).uint32(message.sord);
2481
+ }
2482
+ return writer;
2483
+ },
2484
+ decode(input, length) {
2485
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2486
+ const end = length === undefined ? reader.len : reader.pos + length;
2487
+ const message = createBaseShownIo();
2488
+ while (reader.pos < end) {
2489
+ const tag = reader.uint32();
2490
+ switch (tag >>> 3) {
2491
+ case 1: {
2492
+ if (tag !== 10) {
2493
+ break;
2494
+ }
2495
+ message.name = reader.string();
2496
+ continue;
2497
+ }
2498
+ case 2: {
2499
+ if (tag !== 18) {
2500
+ break;
2501
+ }
2502
+ message.style = SystemIoStyle.decode(reader, reader.uint32());
2503
+ continue;
2504
+ }
2505
+ case 3: {
2506
+ if (tag !== 26) {
2507
+ break;
2508
+ }
2509
+ message.unit = reader.string();
2510
+ continue;
2511
+ }
2512
+ case 4: {
2513
+ if (tag !== 34) {
2514
+ break;
2515
+ }
2516
+ message.description = reader.string();
2517
+ continue;
2518
+ }
2519
+ case 5: {
2520
+ if (tag !== 42) {
2521
+ break;
2522
+ }
2523
+ message.value = reader.string();
2524
+ continue;
2525
+ }
2526
+ case 6: {
2527
+ if (tag !== 48) {
2528
+ break;
2529
+ }
2530
+ message.active = reader.bool();
2531
+ continue;
2532
+ }
2533
+ case 7: {
2534
+ if (tag !== 56) {
2535
+ break;
2536
+ }
2537
+ message.graphable = reader.bool();
2538
+ continue;
2539
+ }
2540
+ case 8: {
2541
+ if (tag !== 64) {
2542
+ break;
2543
+ }
2544
+ message.sord = reader.uint32();
2545
+ continue;
2546
+ }
2547
+ }
2548
+ if ((tag & 7) === 4 || tag === 0) {
2549
+ break;
2550
+ }
2551
+ reader.skip(tag & 7);
2552
+ }
2553
+ return message;
2554
+ },
2555
+ create(base) {
2556
+ return ShownIo.fromPartial(base ?? {});
2557
+ },
2558
+ fromPartial(object) {
2559
+ const message = createBaseShownIo();
2560
+ message.name = object.name ?? "";
2561
+ message.style = (object.style !== undefined && object.style !== null)
2562
+ ? SystemIoStyle.fromPartial(object.style)
2563
+ : undefined;
2564
+ message.unit = object.unit ?? undefined;
2565
+ message.description = object.description ?? undefined;
2566
+ message.value = object.value ?? "";
2567
+ message.active = object.active ?? false;
2568
+ message.graphable = object.graphable ?? false;
2569
+ message.sord = object.sord ?? 0;
2570
+ return message;
2571
+ },
2572
+ };
2573
+ function createBaseCommandAction() {
2574
+ return {
2575
+ id: Long.UZERO,
2576
+ name: "",
2577
+ description: undefined,
2578
+ picture: undefined,
2579
+ sord: 0,
2580
+ organizationId: undefined,
2581
+ createdBy: undefined,
2582
+ updatedBy: undefined,
2583
+ createdAt: undefined,
2584
+ updatedAt: undefined,
2585
+ };
2586
+ }
2587
+ export const CommandAction = {
2588
+ encode(message, writer = new BinaryWriter()) {
2589
+ if (!message.id.equals(Long.UZERO)) {
2590
+ writer.uint32(8).uint64(message.id.toString());
2591
+ }
2592
+ if (message.name !== "") {
2593
+ writer.uint32(18).string(message.name);
2594
+ }
2595
+ if (message.description !== undefined) {
2596
+ writer.uint32(26).string(message.description);
2597
+ }
2598
+ if (message.picture !== undefined) {
2599
+ writer.uint32(34).string(message.picture);
2600
+ }
2601
+ if (message.sord !== 0) {
2602
+ writer.uint32(40).uint32(message.sord);
2603
+ }
2604
+ if (message.organizationId !== undefined) {
2605
+ writer.uint32(48).uint64(message.organizationId.toString());
2606
+ }
2607
+ if (message.createdBy !== undefined) {
2608
+ writer.uint32(56).uint64(message.createdBy.toString());
2609
+ }
2610
+ if (message.updatedBy !== undefined) {
2611
+ writer.uint32(64).uint64(message.updatedBy.toString());
2612
+ }
2613
+ if (message.createdAt !== undefined) {
2614
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
2615
+ }
2616
+ if (message.updatedAt !== undefined) {
2617
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(82).fork()).join();
2618
+ }
2619
+ return writer;
2620
+ },
2621
+ decode(input, length) {
2622
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2623
+ const end = length === undefined ? reader.len : reader.pos + length;
2624
+ const message = createBaseCommandAction();
2625
+ while (reader.pos < end) {
2626
+ const tag = reader.uint32();
2627
+ switch (tag >>> 3) {
2628
+ case 1: {
2629
+ if (tag !== 8) {
2630
+ break;
2631
+ }
2632
+ message.id = Long.fromString(reader.uint64().toString(), true);
2633
+ continue;
2634
+ }
2635
+ case 2: {
2636
+ if (tag !== 18) {
2637
+ break;
2638
+ }
2639
+ message.name = reader.string();
2640
+ continue;
2641
+ }
2642
+ case 3: {
2643
+ if (tag !== 26) {
2644
+ break;
2645
+ }
2646
+ message.description = reader.string();
2647
+ continue;
2648
+ }
2649
+ case 4: {
2650
+ if (tag !== 34) {
2651
+ break;
2652
+ }
2653
+ message.picture = reader.string();
2654
+ continue;
2655
+ }
2656
+ case 5: {
2657
+ if (tag !== 40) {
2658
+ break;
2659
+ }
2660
+ message.sord = reader.uint32();
2661
+ continue;
2662
+ }
2663
+ case 6: {
2664
+ if (tag !== 48) {
2665
+ break;
2666
+ }
2667
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
2668
+ continue;
2669
+ }
2670
+ case 7: {
2671
+ if (tag !== 56) {
2672
+ break;
2673
+ }
2674
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
2675
+ continue;
2676
+ }
2677
+ case 8: {
2678
+ if (tag !== 64) {
2679
+ break;
2680
+ }
2681
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
2682
+ continue;
2683
+ }
2684
+ case 9: {
2685
+ if (tag !== 74) {
2686
+ break;
2687
+ }
2688
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2689
+ continue;
2690
+ }
2691
+ case 10: {
2692
+ if (tag !== 82) {
2693
+ break;
2694
+ }
2695
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2696
+ continue;
2697
+ }
2698
+ }
2699
+ if ((tag & 7) === 4 || tag === 0) {
2700
+ break;
2701
+ }
2702
+ reader.skip(tag & 7);
2703
+ }
2704
+ return message;
2705
+ },
2706
+ create(base) {
2707
+ return CommandAction.fromPartial(base ?? {});
2708
+ },
2709
+ fromPartial(object) {
2710
+ const message = createBaseCommandAction();
2711
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
2712
+ message.name = object.name ?? "";
2713
+ message.description = object.description ?? undefined;
2714
+ message.picture = object.picture ?? undefined;
2715
+ message.sord = object.sord ?? 0;
2716
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
2717
+ ? Long.fromValue(object.organizationId)
2718
+ : undefined;
2719
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2720
+ ? Long.fromValue(object.createdBy)
2721
+ : undefined;
2722
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
2723
+ ? Long.fromValue(object.updatedBy)
2724
+ : undefined;
2725
+ message.createdAt = object.createdAt ?? undefined;
2726
+ message.updatedAt = object.updatedAt ?? undefined;
2727
+ return message;
2728
+ },
2729
+ };
2730
+ function toTimestamp(date) {
2731
+ const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
2732
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
2733
+ return { seconds, nanos };
2734
+ }
2735
+ function fromTimestamp(t) {
2736
+ let millis = (t.seconds.toNumber() || 0) * 1_000;
2737
+ millis += (t.nanos || 0) / 1_000_000;
2738
+ return new globalThis.Date(millis);
2739
+ }
2740
+ function numberToLong(number) {
2741
+ return Long.fromNumber(number);
2742
+ }