@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,2730 @@
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
+ };
704
+ }
705
+ export const Tracker = {
706
+ encode(message, writer = new BinaryWriter()) {
707
+ if (!message.id.equals(Long.UZERO)) {
708
+ writer.uint32(8).uint64(message.id.toString());
709
+ }
710
+ if (message.name !== "") {
711
+ writer.uint32(18).string(message.name);
712
+ }
713
+ if (message.picture !== undefined) {
714
+ writer.uint32(26).string(message.picture);
715
+ }
716
+ if (message.metadata !== undefined) {
717
+ Tracker_Metadata.encode(message.metadata, writer.uint32(34).fork()).join();
718
+ }
719
+ if (message.generation !== undefined) {
720
+ writer.uint32(42).string(message.generation);
721
+ }
722
+ if (message.level !== 0) {
723
+ writer.uint32(48).uint32(message.level);
724
+ }
725
+ if (message.parentId !== undefined) {
726
+ writer.uint32(56).uint64(message.parentId.toString());
727
+ }
728
+ if (message.createdBy !== undefined) {
729
+ writer.uint32(64).uint64(message.createdBy.toString());
730
+ }
731
+ if (message.createdAt !== undefined) {
732
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
733
+ }
734
+ if (message.updatedAt !== undefined) {
735
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(82).fork()).join();
736
+ }
737
+ for (const v of message.documents) {
738
+ Tracker_Document.encode(v, writer.uint32(90).fork()).join();
739
+ }
740
+ if (message.camera !== undefined) {
741
+ writer.uint32(98).string(message.camera);
742
+ }
743
+ return writer;
744
+ },
745
+ decode(input, length) {
746
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
747
+ const end = length === undefined ? reader.len : reader.pos + length;
748
+ const message = createBaseTracker();
749
+ while (reader.pos < end) {
750
+ const tag = reader.uint32();
751
+ switch (tag >>> 3) {
752
+ case 1: {
753
+ if (tag !== 8) {
754
+ break;
755
+ }
756
+ message.id = Long.fromString(reader.uint64().toString(), true);
757
+ continue;
758
+ }
759
+ case 2: {
760
+ if (tag !== 18) {
761
+ break;
762
+ }
763
+ message.name = reader.string();
764
+ continue;
765
+ }
766
+ case 3: {
767
+ if (tag !== 26) {
768
+ break;
769
+ }
770
+ message.picture = reader.string();
771
+ continue;
772
+ }
773
+ case 4: {
774
+ if (tag !== 34) {
775
+ break;
776
+ }
777
+ message.metadata = Tracker_Metadata.decode(reader, reader.uint32());
778
+ continue;
779
+ }
780
+ case 5: {
781
+ if (tag !== 42) {
782
+ break;
783
+ }
784
+ message.generation = reader.string();
785
+ continue;
786
+ }
787
+ case 6: {
788
+ if (tag !== 48) {
789
+ break;
790
+ }
791
+ message.level = reader.uint32();
792
+ continue;
793
+ }
794
+ case 7: {
795
+ if (tag !== 56) {
796
+ break;
797
+ }
798
+ message.parentId = Long.fromString(reader.uint64().toString(), true);
799
+ continue;
800
+ }
801
+ case 8: {
802
+ if (tag !== 64) {
803
+ break;
804
+ }
805
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
806
+ continue;
807
+ }
808
+ case 9: {
809
+ if (tag !== 74) {
810
+ break;
811
+ }
812
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
813
+ continue;
814
+ }
815
+ case 10: {
816
+ if (tag !== 82) {
817
+ break;
818
+ }
819
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
820
+ continue;
821
+ }
822
+ case 11: {
823
+ if (tag !== 90) {
824
+ break;
825
+ }
826
+ message.documents.push(Tracker_Document.decode(reader, reader.uint32()));
827
+ continue;
828
+ }
829
+ case 12: {
830
+ if (tag !== 98) {
831
+ break;
832
+ }
833
+ message.camera = 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 Tracker.fromPartial(base ?? {});
846
+ },
847
+ fromPartial(object) {
848
+ const message = createBaseTracker();
849
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
850
+ message.name = object.name ?? "";
851
+ message.picture = object.picture ?? undefined;
852
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
853
+ ? Tracker_Metadata.fromPartial(object.metadata)
854
+ : undefined;
855
+ message.generation = object.generation ?? undefined;
856
+ message.level = object.level ?? 0;
857
+ message.parentId = (object.parentId !== undefined && object.parentId !== null)
858
+ ? Long.fromValue(object.parentId)
859
+ : undefined;
860
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
861
+ ? Long.fromValue(object.createdBy)
862
+ : undefined;
863
+ message.createdAt = object.createdAt ?? undefined;
864
+ message.updatedAt = object.updatedAt ?? undefined;
865
+ message.documents = object.documents?.map((e) => Tracker_Document.fromPartial(e)) || [];
866
+ message.camera = object.camera ?? undefined;
867
+ return message;
868
+ },
869
+ };
870
+ function createBaseTracker_Metadata() {
871
+ return {
872
+ port: undefined,
873
+ tags: undefined,
874
+ type: undefined,
875
+ idType: undefined,
876
+ idStart: undefined,
877
+ odoType: undefined,
878
+ callType: undefined,
879
+ idLength: undefined,
880
+ analogInput: undefined,
881
+ smsPassword: undefined,
882
+ smsUsername: undefined,
883
+ digitalInput: undefined,
884
+ digitalOutput: undefined,
885
+ movementSensor: undefined,
886
+ smsCredentials: undefined,
887
+ deviceConfigCommands: undefined,
888
+ };
889
+ }
890
+ export const Tracker_Metadata = {
891
+ encode(message, writer = new BinaryWriter()) {
892
+ if (message.port !== undefined) {
893
+ writer.uint32(8).uint32(message.port);
894
+ }
895
+ if (message.tags !== undefined) {
896
+ writer.uint32(18).string(message.tags);
897
+ }
898
+ if (message.type !== undefined) {
899
+ writer.uint32(24).uint32(message.type);
900
+ }
901
+ if (message.idType !== undefined) {
902
+ writer.uint32(32).uint32(message.idType);
903
+ }
904
+ if (message.idStart !== undefined) {
905
+ writer.uint32(42).string(message.idStart);
906
+ }
907
+ if (message.odoType !== undefined) {
908
+ writer.uint32(48).uint32(message.odoType);
909
+ }
910
+ if (message.callType !== undefined) {
911
+ writer.uint32(56).uint32(message.callType);
912
+ }
913
+ if (message.idLength !== undefined) {
914
+ writer.uint32(64).uint32(message.idLength);
915
+ }
916
+ if (message.analogInput !== undefined) {
917
+ writer.uint32(80).uint32(message.analogInput);
918
+ }
919
+ if (message.smsPassword !== undefined) {
920
+ writer.uint32(90).string(message.smsPassword);
921
+ }
922
+ if (message.smsUsername !== undefined) {
923
+ writer.uint32(98).string(message.smsUsername);
924
+ }
925
+ if (message.digitalInput !== undefined) {
926
+ writer.uint32(104).uint32(message.digitalInput);
927
+ }
928
+ if (message.digitalOutput !== undefined) {
929
+ writer.uint32(112).uint32(message.digitalOutput);
930
+ }
931
+ if (message.movementSensor !== undefined) {
932
+ writer.uint32(120).bool(message.movementSensor);
933
+ }
934
+ if (message.smsCredentials !== undefined) {
935
+ Tracker_Metadata_SmsCredentials.encode(message.smsCredentials, writer.uint32(130).fork()).join();
936
+ }
937
+ if (message.deviceConfigCommands !== undefined) {
938
+ writer.uint32(138).string(message.deviceConfigCommands);
939
+ }
940
+ return writer;
941
+ },
942
+ decode(input, length) {
943
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
944
+ const end = length === undefined ? reader.len : reader.pos + length;
945
+ const message = createBaseTracker_Metadata();
946
+ while (reader.pos < end) {
947
+ const tag = reader.uint32();
948
+ switch (tag >>> 3) {
949
+ case 1: {
950
+ if (tag !== 8) {
951
+ break;
952
+ }
953
+ message.port = reader.uint32();
954
+ continue;
955
+ }
956
+ case 2: {
957
+ if (tag !== 18) {
958
+ break;
959
+ }
960
+ message.tags = reader.string();
961
+ continue;
962
+ }
963
+ case 3: {
964
+ if (tag !== 24) {
965
+ break;
966
+ }
967
+ message.type = reader.uint32();
968
+ continue;
969
+ }
970
+ case 4: {
971
+ if (tag !== 32) {
972
+ break;
973
+ }
974
+ message.idType = reader.uint32();
975
+ continue;
976
+ }
977
+ case 5: {
978
+ if (tag !== 42) {
979
+ break;
980
+ }
981
+ message.idStart = reader.string();
982
+ continue;
983
+ }
984
+ case 6: {
985
+ if (tag !== 48) {
986
+ break;
987
+ }
988
+ message.odoType = reader.uint32();
989
+ continue;
990
+ }
991
+ case 7: {
992
+ if (tag !== 56) {
993
+ break;
994
+ }
995
+ message.callType = reader.uint32();
996
+ continue;
997
+ }
998
+ case 8: {
999
+ if (tag !== 64) {
1000
+ break;
1001
+ }
1002
+ message.idLength = reader.uint32();
1003
+ continue;
1004
+ }
1005
+ case 10: {
1006
+ if (tag !== 80) {
1007
+ break;
1008
+ }
1009
+ message.analogInput = reader.uint32();
1010
+ continue;
1011
+ }
1012
+ case 11: {
1013
+ if (tag !== 90) {
1014
+ break;
1015
+ }
1016
+ message.smsPassword = reader.string();
1017
+ continue;
1018
+ }
1019
+ case 12: {
1020
+ if (tag !== 98) {
1021
+ break;
1022
+ }
1023
+ message.smsUsername = reader.string();
1024
+ continue;
1025
+ }
1026
+ case 13: {
1027
+ if (tag !== 104) {
1028
+ break;
1029
+ }
1030
+ message.digitalInput = reader.uint32();
1031
+ continue;
1032
+ }
1033
+ case 14: {
1034
+ if (tag !== 112) {
1035
+ break;
1036
+ }
1037
+ message.digitalOutput = reader.uint32();
1038
+ continue;
1039
+ }
1040
+ case 15: {
1041
+ if (tag !== 120) {
1042
+ break;
1043
+ }
1044
+ message.movementSensor = reader.bool();
1045
+ continue;
1046
+ }
1047
+ case 16: {
1048
+ if (tag !== 130) {
1049
+ break;
1050
+ }
1051
+ message.smsCredentials = Tracker_Metadata_SmsCredentials.decode(reader, reader.uint32());
1052
+ continue;
1053
+ }
1054
+ case 17: {
1055
+ if (tag !== 138) {
1056
+ break;
1057
+ }
1058
+ message.deviceConfigCommands = reader.string();
1059
+ continue;
1060
+ }
1061
+ }
1062
+ if ((tag & 7) === 4 || tag === 0) {
1063
+ break;
1064
+ }
1065
+ reader.skip(tag & 7);
1066
+ }
1067
+ return message;
1068
+ },
1069
+ create(base) {
1070
+ return Tracker_Metadata.fromPartial(base ?? {});
1071
+ },
1072
+ fromPartial(object) {
1073
+ const message = createBaseTracker_Metadata();
1074
+ message.port = object.port ?? undefined;
1075
+ message.tags = object.tags ?? undefined;
1076
+ message.type = object.type ?? undefined;
1077
+ message.idType = object.idType ?? undefined;
1078
+ message.idStart = object.idStart ?? undefined;
1079
+ message.odoType = object.odoType ?? undefined;
1080
+ message.callType = object.callType ?? undefined;
1081
+ message.idLength = object.idLength ?? undefined;
1082
+ message.analogInput = object.analogInput ?? undefined;
1083
+ message.smsPassword = object.smsPassword ?? undefined;
1084
+ message.smsUsername = object.smsUsername ?? undefined;
1085
+ message.digitalInput = object.digitalInput ?? undefined;
1086
+ message.digitalOutput = object.digitalOutput ?? undefined;
1087
+ message.movementSensor = object.movementSensor ?? undefined;
1088
+ message.smsCredentials = (object.smsCredentials !== undefined && object.smsCredentials !== null)
1089
+ ? Tracker_Metadata_SmsCredentials.fromPartial(object.smsCredentials)
1090
+ : undefined;
1091
+ message.deviceConfigCommands = object.deviceConfigCommands ?? undefined;
1092
+ return message;
1093
+ },
1094
+ };
1095
+ function createBaseTracker_Metadata_SmsCredentials() {
1096
+ return { password: undefined, username: undefined };
1097
+ }
1098
+ export const Tracker_Metadata_SmsCredentials = {
1099
+ encode(message, writer = new BinaryWriter()) {
1100
+ if (message.password !== undefined) {
1101
+ writer.uint32(10).string(message.password);
1102
+ }
1103
+ if (message.username !== undefined) {
1104
+ writer.uint32(18).string(message.username);
1105
+ }
1106
+ return writer;
1107
+ },
1108
+ decode(input, length) {
1109
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1110
+ const end = length === undefined ? reader.len : reader.pos + length;
1111
+ const message = createBaseTracker_Metadata_SmsCredentials();
1112
+ while (reader.pos < end) {
1113
+ const tag = reader.uint32();
1114
+ switch (tag >>> 3) {
1115
+ case 1: {
1116
+ if (tag !== 10) {
1117
+ break;
1118
+ }
1119
+ message.password = reader.string();
1120
+ continue;
1121
+ }
1122
+ case 2: {
1123
+ if (tag !== 18) {
1124
+ break;
1125
+ }
1126
+ message.username = reader.string();
1127
+ continue;
1128
+ }
1129
+ }
1130
+ if ((tag & 7) === 4 || tag === 0) {
1131
+ break;
1132
+ }
1133
+ reader.skip(tag & 7);
1134
+ }
1135
+ return message;
1136
+ },
1137
+ create(base) {
1138
+ return Tracker_Metadata_SmsCredentials.fromPartial(base ?? {});
1139
+ },
1140
+ fromPartial(object) {
1141
+ const message = createBaseTracker_Metadata_SmsCredentials();
1142
+ message.password = object.password ?? undefined;
1143
+ message.username = object.username ?? undefined;
1144
+ return message;
1145
+ },
1146
+ };
1147
+ function createBaseTracker_Document() {
1148
+ return {
1149
+ objectId: undefined,
1150
+ createdBy: undefined,
1151
+ organizationId: undefined,
1152
+ url: undefined,
1153
+ visibility: undefined,
1154
+ objectType: undefined,
1155
+ };
1156
+ }
1157
+ export const Tracker_Document = {
1158
+ encode(message, writer = new BinaryWriter()) {
1159
+ if (message.objectId !== undefined) {
1160
+ writer.uint32(8).uint64(message.objectId.toString());
1161
+ }
1162
+ if (message.createdBy !== undefined) {
1163
+ writer.uint32(16).uint64(message.createdBy.toString());
1164
+ }
1165
+ if (message.organizationId !== undefined) {
1166
+ writer.uint32(24).uint64(message.organizationId.toString());
1167
+ }
1168
+ if (message.url !== undefined) {
1169
+ writer.uint32(34).string(message.url);
1170
+ }
1171
+ if (message.visibility !== undefined) {
1172
+ writer.uint32(42).string(message.visibility);
1173
+ }
1174
+ if (message.objectType !== undefined) {
1175
+ writer.uint32(50).string(message.objectType);
1176
+ }
1177
+ return writer;
1178
+ },
1179
+ decode(input, length) {
1180
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1181
+ const end = length === undefined ? reader.len : reader.pos + length;
1182
+ const message = createBaseTracker_Document();
1183
+ while (reader.pos < end) {
1184
+ const tag = reader.uint32();
1185
+ switch (tag >>> 3) {
1186
+ case 1: {
1187
+ if (tag !== 8) {
1188
+ break;
1189
+ }
1190
+ message.objectId = Long.fromString(reader.uint64().toString(), true);
1191
+ continue;
1192
+ }
1193
+ case 2: {
1194
+ if (tag !== 16) {
1195
+ break;
1196
+ }
1197
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1198
+ continue;
1199
+ }
1200
+ case 3: {
1201
+ if (tag !== 24) {
1202
+ break;
1203
+ }
1204
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
1205
+ continue;
1206
+ }
1207
+ case 4: {
1208
+ if (tag !== 34) {
1209
+ break;
1210
+ }
1211
+ message.url = reader.string();
1212
+ continue;
1213
+ }
1214
+ case 5: {
1215
+ if (tag !== 42) {
1216
+ break;
1217
+ }
1218
+ message.visibility = reader.string();
1219
+ continue;
1220
+ }
1221
+ case 6: {
1222
+ if (tag !== 50) {
1223
+ break;
1224
+ }
1225
+ message.objectType = reader.string();
1226
+ continue;
1227
+ }
1228
+ }
1229
+ if ((tag & 7) === 4 || tag === 0) {
1230
+ break;
1231
+ }
1232
+ reader.skip(tag & 7);
1233
+ }
1234
+ return message;
1235
+ },
1236
+ create(base) {
1237
+ return Tracker_Document.fromPartial(base ?? {});
1238
+ },
1239
+ fromPartial(object) {
1240
+ const message = createBaseTracker_Document();
1241
+ message.objectId = (object.objectId !== undefined && object.objectId !== null)
1242
+ ? Long.fromValue(object.objectId)
1243
+ : undefined;
1244
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1245
+ ? Long.fromValue(object.createdBy)
1246
+ : undefined;
1247
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1248
+ ? Long.fromValue(object.organizationId)
1249
+ : undefined;
1250
+ message.url = object.url ?? undefined;
1251
+ message.visibility = object.visibility ?? undefined;
1252
+ message.objectType = object.objectType ?? undefined;
1253
+ return message;
1254
+ },
1255
+ };
1256
+ function createBaseCarModel() {
1257
+ return {
1258
+ id: Long.UZERO,
1259
+ carBrandId: Long.UZERO,
1260
+ name: "",
1261
+ picture: undefined,
1262
+ description: undefined,
1263
+ sord: undefined,
1264
+ isActive: false,
1265
+ createdBy: undefined,
1266
+ updatedBy: undefined,
1267
+ metadata: [],
1268
+ createdAt: undefined,
1269
+ updatedAt: undefined,
1270
+ };
1271
+ }
1272
+ export const CarModel = {
1273
+ encode(message, writer = new BinaryWriter()) {
1274
+ if (!message.id.equals(Long.UZERO)) {
1275
+ writer.uint32(8).uint64(message.id.toString());
1276
+ }
1277
+ if (!message.carBrandId.equals(Long.UZERO)) {
1278
+ writer.uint32(16).uint64(message.carBrandId.toString());
1279
+ }
1280
+ if (message.name !== "") {
1281
+ writer.uint32(26).string(message.name);
1282
+ }
1283
+ if (message.picture !== undefined) {
1284
+ writer.uint32(34).string(message.picture);
1285
+ }
1286
+ if (message.description !== undefined) {
1287
+ writer.uint32(42).string(message.description);
1288
+ }
1289
+ if (message.sord !== undefined) {
1290
+ writer.uint32(48).int32(message.sord);
1291
+ }
1292
+ if (message.isActive !== false) {
1293
+ writer.uint32(56).bool(message.isActive);
1294
+ }
1295
+ if (message.createdBy !== undefined) {
1296
+ writer.uint32(64).uint64(message.createdBy.toString());
1297
+ }
1298
+ if (message.updatedBy !== undefined) {
1299
+ writer.uint32(72).uint64(message.updatedBy.toString());
1300
+ }
1301
+ for (const v of message.metadata) {
1302
+ CarModel_Metadata.encode(v, writer.uint32(82).fork()).join();
1303
+ }
1304
+ if (message.createdAt !== undefined) {
1305
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
1306
+ }
1307
+ if (message.updatedAt !== undefined) {
1308
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
1309
+ }
1310
+ return writer;
1311
+ },
1312
+ decode(input, length) {
1313
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1314
+ const end = length === undefined ? reader.len : reader.pos + length;
1315
+ const message = createBaseCarModel();
1316
+ while (reader.pos < end) {
1317
+ const tag = reader.uint32();
1318
+ switch (tag >>> 3) {
1319
+ case 1: {
1320
+ if (tag !== 8) {
1321
+ break;
1322
+ }
1323
+ message.id = Long.fromString(reader.uint64().toString(), true);
1324
+ continue;
1325
+ }
1326
+ case 2: {
1327
+ if (tag !== 16) {
1328
+ break;
1329
+ }
1330
+ message.carBrandId = Long.fromString(reader.uint64().toString(), true);
1331
+ continue;
1332
+ }
1333
+ case 3: {
1334
+ if (tag !== 26) {
1335
+ break;
1336
+ }
1337
+ message.name = reader.string();
1338
+ continue;
1339
+ }
1340
+ case 4: {
1341
+ if (tag !== 34) {
1342
+ break;
1343
+ }
1344
+ message.picture = reader.string();
1345
+ continue;
1346
+ }
1347
+ case 5: {
1348
+ if (tag !== 42) {
1349
+ break;
1350
+ }
1351
+ message.description = reader.string();
1352
+ continue;
1353
+ }
1354
+ case 6: {
1355
+ if (tag !== 48) {
1356
+ break;
1357
+ }
1358
+ message.sord = reader.int32();
1359
+ continue;
1360
+ }
1361
+ case 7: {
1362
+ if (tag !== 56) {
1363
+ break;
1364
+ }
1365
+ message.isActive = reader.bool();
1366
+ continue;
1367
+ }
1368
+ case 8: {
1369
+ if (tag !== 64) {
1370
+ break;
1371
+ }
1372
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1373
+ continue;
1374
+ }
1375
+ case 9: {
1376
+ if (tag !== 72) {
1377
+ break;
1378
+ }
1379
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1380
+ continue;
1381
+ }
1382
+ case 10: {
1383
+ if (tag !== 82) {
1384
+ break;
1385
+ }
1386
+ message.metadata.push(CarModel_Metadata.decode(reader, reader.uint32()));
1387
+ continue;
1388
+ }
1389
+ case 11: {
1390
+ if (tag !== 90) {
1391
+ break;
1392
+ }
1393
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1394
+ continue;
1395
+ }
1396
+ case 12: {
1397
+ if (tag !== 98) {
1398
+ break;
1399
+ }
1400
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1401
+ continue;
1402
+ }
1403
+ }
1404
+ if ((tag & 7) === 4 || tag === 0) {
1405
+ break;
1406
+ }
1407
+ reader.skip(tag & 7);
1408
+ }
1409
+ return message;
1410
+ },
1411
+ create(base) {
1412
+ return CarModel.fromPartial(base ?? {});
1413
+ },
1414
+ fromPartial(object) {
1415
+ const message = createBaseCarModel();
1416
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1417
+ message.carBrandId = (object.carBrandId !== undefined && object.carBrandId !== null)
1418
+ ? Long.fromValue(object.carBrandId)
1419
+ : Long.UZERO;
1420
+ message.name = object.name ?? "";
1421
+ message.picture = object.picture ?? undefined;
1422
+ message.description = object.description ?? undefined;
1423
+ message.sord = object.sord ?? undefined;
1424
+ message.isActive = object.isActive ?? false;
1425
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1426
+ ? Long.fromValue(object.createdBy)
1427
+ : undefined;
1428
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1429
+ ? Long.fromValue(object.updatedBy)
1430
+ : undefined;
1431
+ message.metadata = object.metadata?.map((e) => CarModel_Metadata.fromPartial(e)) || [];
1432
+ message.createdAt = object.createdAt ?? undefined;
1433
+ message.updatedAt = object.updatedAt ?? undefined;
1434
+ return message;
1435
+ },
1436
+ };
1437
+ function createBaseCarModel_Metadata() {
1438
+ return { key: undefined, name: undefined, value: undefined };
1439
+ }
1440
+ export const CarModel_Metadata = {
1441
+ encode(message, writer = new BinaryWriter()) {
1442
+ if (message.key !== undefined) {
1443
+ writer.uint32(10).string(message.key);
1444
+ }
1445
+ if (message.name !== undefined) {
1446
+ writer.uint32(18).string(message.name);
1447
+ }
1448
+ if (message.value !== undefined) {
1449
+ writer.uint32(26).string(message.value);
1450
+ }
1451
+ return writer;
1452
+ },
1453
+ decode(input, length) {
1454
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1455
+ const end = length === undefined ? reader.len : reader.pos + length;
1456
+ const message = createBaseCarModel_Metadata();
1457
+ while (reader.pos < end) {
1458
+ const tag = reader.uint32();
1459
+ switch (tag >>> 3) {
1460
+ case 1: {
1461
+ if (tag !== 10) {
1462
+ break;
1463
+ }
1464
+ message.key = reader.string();
1465
+ continue;
1466
+ }
1467
+ case 2: {
1468
+ if (tag !== 18) {
1469
+ break;
1470
+ }
1471
+ message.name = reader.string();
1472
+ continue;
1473
+ }
1474
+ case 3: {
1475
+ if (tag !== 26) {
1476
+ break;
1477
+ }
1478
+ message.value = reader.string();
1479
+ continue;
1480
+ }
1481
+ }
1482
+ if ((tag & 7) === 4 || tag === 0) {
1483
+ break;
1484
+ }
1485
+ reader.skip(tag & 7);
1486
+ }
1487
+ return message;
1488
+ },
1489
+ create(base) {
1490
+ return CarModel_Metadata.fromPartial(base ?? {});
1491
+ },
1492
+ fromPartial(object) {
1493
+ const message = createBaseCarModel_Metadata();
1494
+ message.key = object.key ?? undefined;
1495
+ message.name = object.name ?? undefined;
1496
+ message.value = object.value ?? undefined;
1497
+ return message;
1498
+ },
1499
+ };
1500
+ function createBaseCarBrand() {
1501
+ return {
1502
+ id: Long.UZERO,
1503
+ carCategoryId: Long.UZERO,
1504
+ name: "",
1505
+ description: undefined,
1506
+ picture: undefined,
1507
+ sord: undefined,
1508
+ isActive: undefined,
1509
+ createdBy: undefined,
1510
+ updatedBy: undefined,
1511
+ createdAt: undefined,
1512
+ updatedAt: undefined,
1513
+ };
1514
+ }
1515
+ export const CarBrand = {
1516
+ encode(message, writer = new BinaryWriter()) {
1517
+ if (!message.id.equals(Long.UZERO)) {
1518
+ writer.uint32(8).uint64(message.id.toString());
1519
+ }
1520
+ if (!message.carCategoryId.equals(Long.UZERO)) {
1521
+ writer.uint32(16).uint64(message.carCategoryId.toString());
1522
+ }
1523
+ if (message.name !== "") {
1524
+ writer.uint32(26).string(message.name);
1525
+ }
1526
+ if (message.description !== undefined) {
1527
+ writer.uint32(34).string(message.description);
1528
+ }
1529
+ if (message.picture !== undefined) {
1530
+ writer.uint32(42).string(message.picture);
1531
+ }
1532
+ if (message.sord !== undefined) {
1533
+ writer.uint32(48).int32(message.sord);
1534
+ }
1535
+ if (message.isActive !== undefined) {
1536
+ writer.uint32(56).bool(message.isActive);
1537
+ }
1538
+ if (message.createdBy !== undefined) {
1539
+ writer.uint32(64).uint64(message.createdBy.toString());
1540
+ }
1541
+ if (message.updatedBy !== undefined) {
1542
+ writer.uint32(72).uint64(message.updatedBy.toString());
1543
+ }
1544
+ if (message.createdAt !== undefined) {
1545
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
1546
+ }
1547
+ if (message.updatedAt !== undefined) {
1548
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
1549
+ }
1550
+ return writer;
1551
+ },
1552
+ decode(input, length) {
1553
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1554
+ const end = length === undefined ? reader.len : reader.pos + length;
1555
+ const message = createBaseCarBrand();
1556
+ while (reader.pos < end) {
1557
+ const tag = reader.uint32();
1558
+ switch (tag >>> 3) {
1559
+ case 1: {
1560
+ if (tag !== 8) {
1561
+ break;
1562
+ }
1563
+ message.id = Long.fromString(reader.uint64().toString(), true);
1564
+ continue;
1565
+ }
1566
+ case 2: {
1567
+ if (tag !== 16) {
1568
+ break;
1569
+ }
1570
+ message.carCategoryId = Long.fromString(reader.uint64().toString(), true);
1571
+ continue;
1572
+ }
1573
+ case 3: {
1574
+ if (tag !== 26) {
1575
+ break;
1576
+ }
1577
+ message.name = reader.string();
1578
+ continue;
1579
+ }
1580
+ case 4: {
1581
+ if (tag !== 34) {
1582
+ break;
1583
+ }
1584
+ message.description = reader.string();
1585
+ continue;
1586
+ }
1587
+ case 5: {
1588
+ if (tag !== 42) {
1589
+ break;
1590
+ }
1591
+ message.picture = reader.string();
1592
+ continue;
1593
+ }
1594
+ case 6: {
1595
+ if (tag !== 48) {
1596
+ break;
1597
+ }
1598
+ message.sord = reader.int32();
1599
+ continue;
1600
+ }
1601
+ case 7: {
1602
+ if (tag !== 56) {
1603
+ break;
1604
+ }
1605
+ message.isActive = reader.bool();
1606
+ continue;
1607
+ }
1608
+ case 8: {
1609
+ if (tag !== 64) {
1610
+ break;
1611
+ }
1612
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1613
+ continue;
1614
+ }
1615
+ case 9: {
1616
+ if (tag !== 72) {
1617
+ break;
1618
+ }
1619
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1620
+ continue;
1621
+ }
1622
+ case 10: {
1623
+ if (tag !== 82) {
1624
+ break;
1625
+ }
1626
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1627
+ continue;
1628
+ }
1629
+ case 11: {
1630
+ if (tag !== 90) {
1631
+ break;
1632
+ }
1633
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1634
+ continue;
1635
+ }
1636
+ }
1637
+ if ((tag & 7) === 4 || tag === 0) {
1638
+ break;
1639
+ }
1640
+ reader.skip(tag & 7);
1641
+ }
1642
+ return message;
1643
+ },
1644
+ create(base) {
1645
+ return CarBrand.fromPartial(base ?? {});
1646
+ },
1647
+ fromPartial(object) {
1648
+ const message = createBaseCarBrand();
1649
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1650
+ message.carCategoryId = (object.carCategoryId !== undefined && object.carCategoryId !== null)
1651
+ ? Long.fromValue(object.carCategoryId)
1652
+ : Long.UZERO;
1653
+ message.name = object.name ?? "";
1654
+ message.description = object.description ?? undefined;
1655
+ message.picture = object.picture ?? undefined;
1656
+ message.sord = object.sord ?? undefined;
1657
+ message.isActive = object.isActive ?? undefined;
1658
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1659
+ ? Long.fromValue(object.createdBy)
1660
+ : undefined;
1661
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1662
+ ? Long.fromValue(object.updatedBy)
1663
+ : undefined;
1664
+ message.createdAt = object.createdAt ?? undefined;
1665
+ message.updatedAt = object.updatedAt ?? undefined;
1666
+ return message;
1667
+ },
1668
+ };
1669
+ function createBaseCar() {
1670
+ return {
1671
+ id: Long.UZERO,
1672
+ organizationId: Long.UZERO,
1673
+ createdBy: undefined,
1674
+ updatedBy: undefined,
1675
+ name: "",
1676
+ picture: undefined,
1677
+ plateNumber: undefined,
1678
+ carGroupId: undefined,
1679
+ carType: undefined,
1680
+ code: undefined,
1681
+ tonnage: undefined,
1682
+ maxSpeed: undefined,
1683
+ vin: undefined,
1684
+ engineNumber: undefined,
1685
+ chassisNumber: undefined,
1686
+ modelYear: undefined,
1687
+ fuelUsage: undefined,
1688
+ fuelUsagePerHour: undefined,
1689
+ fuelType: undefined,
1690
+ fuelCapacity: undefined,
1691
+ description: undefined,
1692
+ guarantyExpirationDate: undefined,
1693
+ guarantyExpirationKm: undefined,
1694
+ color: undefined,
1695
+ createdAt: undefined,
1696
+ updatedAt: undefined,
1697
+ };
1698
+ }
1699
+ export const Car = {
1700
+ encode(message, writer = new BinaryWriter()) {
1701
+ if (!message.id.equals(Long.UZERO)) {
1702
+ writer.uint32(8).uint64(message.id.toString());
1703
+ }
1704
+ if (!message.organizationId.equals(Long.UZERO)) {
1705
+ writer.uint32(16).uint64(message.organizationId.toString());
1706
+ }
1707
+ if (message.createdBy !== undefined) {
1708
+ writer.uint32(24).uint64(message.createdBy.toString());
1709
+ }
1710
+ if (message.updatedBy !== undefined) {
1711
+ writer.uint32(32).uint64(message.updatedBy.toString());
1712
+ }
1713
+ if (message.name !== "") {
1714
+ writer.uint32(42).string(message.name);
1715
+ }
1716
+ if (message.picture !== undefined) {
1717
+ writer.uint32(50).string(message.picture);
1718
+ }
1719
+ if (message.plateNumber !== undefined) {
1720
+ writer.uint32(218).string(message.plateNumber);
1721
+ }
1722
+ if (message.carGroupId !== undefined) {
1723
+ writer.uint32(56).uint64(message.carGroupId.toString());
1724
+ }
1725
+ if (message.carType !== undefined) {
1726
+ writer.uint32(64).uint64(message.carType.toString());
1727
+ }
1728
+ if (message.code !== undefined) {
1729
+ writer.uint32(74).string(message.code);
1730
+ }
1731
+ if (message.tonnage !== undefined) {
1732
+ writer.uint32(80).uint64(message.tonnage.toString());
1733
+ }
1734
+ if (message.maxSpeed !== undefined) {
1735
+ writer.uint32(88).uint64(message.maxSpeed.toString());
1736
+ }
1737
+ if (message.vin !== undefined) {
1738
+ writer.uint32(98).string(message.vin);
1739
+ }
1740
+ if (message.engineNumber !== undefined) {
1741
+ writer.uint32(106).string(message.engineNumber);
1742
+ }
1743
+ if (message.chassisNumber !== undefined) {
1744
+ writer.uint32(114).string(message.chassisNumber);
1745
+ }
1746
+ if (message.modelYear !== undefined) {
1747
+ writer.uint32(120).int32(message.modelYear);
1748
+ }
1749
+ if (message.fuelUsage !== undefined) {
1750
+ writer.uint32(128).uint32(message.fuelUsage);
1751
+ }
1752
+ if (message.fuelUsagePerHour !== undefined) {
1753
+ writer.uint32(136).uint32(message.fuelUsagePerHour);
1754
+ }
1755
+ if (message.fuelType !== undefined) {
1756
+ writer.uint32(146).string(message.fuelType);
1757
+ }
1758
+ if (message.fuelCapacity !== undefined) {
1759
+ writer.uint32(152).uint32(message.fuelCapacity);
1760
+ }
1761
+ if (message.description !== undefined) {
1762
+ writer.uint32(162).string(message.description);
1763
+ }
1764
+ if (message.guarantyExpirationDate !== undefined) {
1765
+ Timestamp.encode(toTimestamp(message.guarantyExpirationDate), writer.uint32(170).fork()).join();
1766
+ }
1767
+ if (message.guarantyExpirationKm !== undefined) {
1768
+ writer.uint32(176).uint64(message.guarantyExpirationKm.toString());
1769
+ }
1770
+ if (message.color !== undefined) {
1771
+ writer.uint32(186).string(message.color);
1772
+ }
1773
+ if (message.createdAt !== undefined) {
1774
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(194).fork()).join();
1775
+ }
1776
+ if (message.updatedAt !== undefined) {
1777
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(202).fork()).join();
1778
+ }
1779
+ return writer;
1780
+ },
1781
+ decode(input, length) {
1782
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1783
+ const end = length === undefined ? reader.len : reader.pos + length;
1784
+ const message = createBaseCar();
1785
+ while (reader.pos < end) {
1786
+ const tag = reader.uint32();
1787
+ switch (tag >>> 3) {
1788
+ case 1: {
1789
+ if (tag !== 8) {
1790
+ break;
1791
+ }
1792
+ message.id = Long.fromString(reader.uint64().toString(), true);
1793
+ continue;
1794
+ }
1795
+ case 2: {
1796
+ if (tag !== 16) {
1797
+ break;
1798
+ }
1799
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
1800
+ continue;
1801
+ }
1802
+ case 3: {
1803
+ if (tag !== 24) {
1804
+ break;
1805
+ }
1806
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
1807
+ continue;
1808
+ }
1809
+ case 4: {
1810
+ if (tag !== 32) {
1811
+ break;
1812
+ }
1813
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1814
+ continue;
1815
+ }
1816
+ case 5: {
1817
+ if (tag !== 42) {
1818
+ break;
1819
+ }
1820
+ message.name = reader.string();
1821
+ continue;
1822
+ }
1823
+ case 6: {
1824
+ if (tag !== 50) {
1825
+ break;
1826
+ }
1827
+ message.picture = reader.string();
1828
+ continue;
1829
+ }
1830
+ case 27: {
1831
+ if (tag !== 218) {
1832
+ break;
1833
+ }
1834
+ message.plateNumber = reader.string();
1835
+ continue;
1836
+ }
1837
+ case 7: {
1838
+ if (tag !== 56) {
1839
+ break;
1840
+ }
1841
+ message.carGroupId = Long.fromString(reader.uint64().toString(), true);
1842
+ continue;
1843
+ }
1844
+ case 8: {
1845
+ if (tag !== 64) {
1846
+ break;
1847
+ }
1848
+ message.carType = Long.fromString(reader.uint64().toString(), true);
1849
+ continue;
1850
+ }
1851
+ case 9: {
1852
+ if (tag !== 74) {
1853
+ break;
1854
+ }
1855
+ message.code = reader.string();
1856
+ continue;
1857
+ }
1858
+ case 10: {
1859
+ if (tag !== 80) {
1860
+ break;
1861
+ }
1862
+ message.tonnage = Long.fromString(reader.uint64().toString(), true);
1863
+ continue;
1864
+ }
1865
+ case 11: {
1866
+ if (tag !== 88) {
1867
+ break;
1868
+ }
1869
+ message.maxSpeed = Long.fromString(reader.uint64().toString(), true);
1870
+ continue;
1871
+ }
1872
+ case 12: {
1873
+ if (tag !== 98) {
1874
+ break;
1875
+ }
1876
+ message.vin = reader.string();
1877
+ continue;
1878
+ }
1879
+ case 13: {
1880
+ if (tag !== 106) {
1881
+ break;
1882
+ }
1883
+ message.engineNumber = reader.string();
1884
+ continue;
1885
+ }
1886
+ case 14: {
1887
+ if (tag !== 114) {
1888
+ break;
1889
+ }
1890
+ message.chassisNumber = reader.string();
1891
+ continue;
1892
+ }
1893
+ case 15: {
1894
+ if (tag !== 120) {
1895
+ break;
1896
+ }
1897
+ message.modelYear = reader.int32();
1898
+ continue;
1899
+ }
1900
+ case 16: {
1901
+ if (tag !== 128) {
1902
+ break;
1903
+ }
1904
+ message.fuelUsage = reader.uint32();
1905
+ continue;
1906
+ }
1907
+ case 17: {
1908
+ if (tag !== 136) {
1909
+ break;
1910
+ }
1911
+ message.fuelUsagePerHour = reader.uint32();
1912
+ continue;
1913
+ }
1914
+ case 18: {
1915
+ if (tag !== 146) {
1916
+ break;
1917
+ }
1918
+ message.fuelType = reader.string();
1919
+ continue;
1920
+ }
1921
+ case 19: {
1922
+ if (tag !== 152) {
1923
+ break;
1924
+ }
1925
+ message.fuelCapacity = reader.uint32();
1926
+ continue;
1927
+ }
1928
+ case 20: {
1929
+ if (tag !== 162) {
1930
+ break;
1931
+ }
1932
+ message.description = reader.string();
1933
+ continue;
1934
+ }
1935
+ case 21: {
1936
+ if (tag !== 170) {
1937
+ break;
1938
+ }
1939
+ message.guarantyExpirationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1940
+ continue;
1941
+ }
1942
+ case 22: {
1943
+ if (tag !== 176) {
1944
+ break;
1945
+ }
1946
+ message.guarantyExpirationKm = Long.fromString(reader.uint64().toString(), true);
1947
+ continue;
1948
+ }
1949
+ case 23: {
1950
+ if (tag !== 186) {
1951
+ break;
1952
+ }
1953
+ message.color = reader.string();
1954
+ continue;
1955
+ }
1956
+ case 24: {
1957
+ if (tag !== 194) {
1958
+ break;
1959
+ }
1960
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1961
+ continue;
1962
+ }
1963
+ case 25: {
1964
+ if (tag !== 202) {
1965
+ break;
1966
+ }
1967
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1968
+ continue;
1969
+ }
1970
+ }
1971
+ if ((tag & 7) === 4 || tag === 0) {
1972
+ break;
1973
+ }
1974
+ reader.skip(tag & 7);
1975
+ }
1976
+ return message;
1977
+ },
1978
+ create(base) {
1979
+ return Car.fromPartial(base ?? {});
1980
+ },
1981
+ fromPartial(object) {
1982
+ const message = createBaseCar();
1983
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1984
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1985
+ ? Long.fromValue(object.organizationId)
1986
+ : Long.UZERO;
1987
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1988
+ ? Long.fromValue(object.createdBy)
1989
+ : undefined;
1990
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1991
+ ? Long.fromValue(object.updatedBy)
1992
+ : undefined;
1993
+ message.name = object.name ?? "";
1994
+ message.picture = object.picture ?? undefined;
1995
+ message.plateNumber = object.plateNumber ?? undefined;
1996
+ message.carGroupId = (object.carGroupId !== undefined && object.carGroupId !== null)
1997
+ ? Long.fromValue(object.carGroupId)
1998
+ : undefined;
1999
+ message.carType = (object.carType !== undefined && object.carType !== null)
2000
+ ? Long.fromValue(object.carType)
2001
+ : undefined;
2002
+ message.code = object.code ?? undefined;
2003
+ message.tonnage = (object.tonnage !== undefined && object.tonnage !== null)
2004
+ ? Long.fromValue(object.tonnage)
2005
+ : undefined;
2006
+ message.maxSpeed = (object.maxSpeed !== undefined && object.maxSpeed !== null)
2007
+ ? Long.fromValue(object.maxSpeed)
2008
+ : undefined;
2009
+ message.vin = object.vin ?? undefined;
2010
+ message.engineNumber = object.engineNumber ?? undefined;
2011
+ message.chassisNumber = object.chassisNumber ?? undefined;
2012
+ message.modelYear = object.modelYear ?? undefined;
2013
+ message.fuelUsage = object.fuelUsage ?? undefined;
2014
+ message.fuelUsagePerHour = object.fuelUsagePerHour ?? undefined;
2015
+ message.fuelType = object.fuelType ?? undefined;
2016
+ message.fuelCapacity = object.fuelCapacity ?? undefined;
2017
+ message.description = object.description ?? undefined;
2018
+ message.guarantyExpirationDate = object.guarantyExpirationDate ?? undefined;
2019
+ message.guarantyExpirationKm = (object.guarantyExpirationKm !== undefined && object.guarantyExpirationKm !== null)
2020
+ ? Long.fromValue(object.guarantyExpirationKm)
2021
+ : undefined;
2022
+ message.color = object.color ?? undefined;
2023
+ message.createdAt = object.createdAt ?? undefined;
2024
+ message.updatedAt = object.updatedAt ?? undefined;
2025
+ return message;
2026
+ },
2027
+ };
2028
+ function createBaseSystemIoStyle() {
2029
+ return { icon: undefined, name: undefined, color: undefined };
2030
+ }
2031
+ export const SystemIoStyle = {
2032
+ encode(message, writer = new BinaryWriter()) {
2033
+ if (message.icon !== undefined) {
2034
+ writer.uint32(10).string(message.icon);
2035
+ }
2036
+ if (message.name !== undefined) {
2037
+ writer.uint32(18).string(message.name);
2038
+ }
2039
+ if (message.color !== undefined) {
2040
+ writer.uint32(26).string(message.color);
2041
+ }
2042
+ return writer;
2043
+ },
2044
+ decode(input, length) {
2045
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2046
+ const end = length === undefined ? reader.len : reader.pos + length;
2047
+ const message = createBaseSystemIoStyle();
2048
+ while (reader.pos < end) {
2049
+ const tag = reader.uint32();
2050
+ switch (tag >>> 3) {
2051
+ case 1: {
2052
+ if (tag !== 10) {
2053
+ break;
2054
+ }
2055
+ message.icon = reader.string();
2056
+ continue;
2057
+ }
2058
+ case 2: {
2059
+ if (tag !== 18) {
2060
+ break;
2061
+ }
2062
+ message.name = reader.string();
2063
+ continue;
2064
+ }
2065
+ case 3: {
2066
+ if (tag !== 26) {
2067
+ break;
2068
+ }
2069
+ message.color = reader.string();
2070
+ continue;
2071
+ }
2072
+ }
2073
+ if ((tag & 7) === 4 || tag === 0) {
2074
+ break;
2075
+ }
2076
+ reader.skip(tag & 7);
2077
+ }
2078
+ return message;
2079
+ },
2080
+ create(base) {
2081
+ return SystemIoStyle.fromPartial(base ?? {});
2082
+ },
2083
+ fromPartial(object) {
2084
+ const message = createBaseSystemIoStyle();
2085
+ message.icon = object.icon ?? undefined;
2086
+ message.name = object.name ?? undefined;
2087
+ message.color = object.color ?? undefined;
2088
+ return message;
2089
+ },
2090
+ };
2091
+ function createBaseSystemIo() {
2092
+ return {
2093
+ id: Long.UZERO,
2094
+ deviceId: undefined,
2095
+ organizationId: undefined,
2096
+ formula: "",
2097
+ name: "",
2098
+ description: undefined,
2099
+ type: 0,
2100
+ unit: undefined,
2101
+ activeStyle: undefined,
2102
+ inactiveStyle: undefined,
2103
+ active: false,
2104
+ graphable: false,
2105
+ sord: 0,
2106
+ hidden: [],
2107
+ unknown: {},
2108
+ createdBy: undefined,
2109
+ createdAt: undefined,
2110
+ updatedAt: undefined,
2111
+ separatorsCount: undefined,
2112
+ decimalCount: undefined,
2113
+ };
2114
+ }
2115
+ export const SystemIo = {
2116
+ encode(message, writer = new BinaryWriter()) {
2117
+ if (!message.id.equals(Long.UZERO)) {
2118
+ writer.uint32(8).uint64(message.id.toString());
2119
+ }
2120
+ if (message.deviceId !== undefined) {
2121
+ writer.uint32(24).uint64(message.deviceId.toString());
2122
+ }
2123
+ if (message.organizationId !== undefined) {
2124
+ writer.uint32(32).uint64(message.organizationId.toString());
2125
+ }
2126
+ if (message.formula !== "") {
2127
+ writer.uint32(42).string(message.formula);
2128
+ }
2129
+ if (message.name !== "") {
2130
+ writer.uint32(18).string(message.name);
2131
+ }
2132
+ if (message.description !== undefined) {
2133
+ writer.uint32(66).string(message.description);
2134
+ }
2135
+ if (message.type !== 0) {
2136
+ writer.uint32(48).int32(message.type);
2137
+ }
2138
+ if (message.unit !== undefined) {
2139
+ writer.uint32(58).string(message.unit);
2140
+ }
2141
+ if (message.activeStyle !== undefined) {
2142
+ SystemIoStyle.encode(message.activeStyle, writer.uint32(74).fork()).join();
2143
+ }
2144
+ if (message.inactiveStyle !== undefined) {
2145
+ SystemIoStyle.encode(message.inactiveStyle, writer.uint32(82).fork()).join();
2146
+ }
2147
+ if (message.active !== false) {
2148
+ writer.uint32(88).bool(message.active);
2149
+ }
2150
+ if (message.graphable !== false) {
2151
+ writer.uint32(96).bool(message.graphable);
2152
+ }
2153
+ if (message.sord !== 0) {
2154
+ writer.uint32(104).uint32(message.sord);
2155
+ }
2156
+ for (const v of message.hidden) {
2157
+ writer.uint32(114).string(v);
2158
+ }
2159
+ globalThis.Object.entries(message.unknown).forEach(([key, value]) => {
2160
+ SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
2161
+ });
2162
+ if (message.createdBy !== undefined) {
2163
+ writer.uint32(128).uint64(message.createdBy.toString());
2164
+ }
2165
+ if (message.createdAt !== undefined) {
2166
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(138).fork()).join();
2167
+ }
2168
+ if (message.updatedAt !== undefined) {
2169
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(146).fork()).join();
2170
+ }
2171
+ if (message.separatorsCount !== undefined) {
2172
+ writer.uint32(152).uint32(message.separatorsCount);
2173
+ }
2174
+ if (message.decimalCount !== undefined) {
2175
+ writer.uint32(160).uint32(message.decimalCount);
2176
+ }
2177
+ return writer;
2178
+ },
2179
+ decode(input, length) {
2180
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2181
+ const end = length === undefined ? reader.len : reader.pos + length;
2182
+ const message = createBaseSystemIo();
2183
+ while (reader.pos < end) {
2184
+ const tag = reader.uint32();
2185
+ switch (tag >>> 3) {
2186
+ case 1: {
2187
+ if (tag !== 8) {
2188
+ break;
2189
+ }
2190
+ message.id = Long.fromString(reader.uint64().toString(), true);
2191
+ continue;
2192
+ }
2193
+ case 3: {
2194
+ if (tag !== 24) {
2195
+ break;
2196
+ }
2197
+ message.deviceId = Long.fromString(reader.uint64().toString(), true);
2198
+ continue;
2199
+ }
2200
+ case 4: {
2201
+ if (tag !== 32) {
2202
+ break;
2203
+ }
2204
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
2205
+ continue;
2206
+ }
2207
+ case 5: {
2208
+ if (tag !== 42) {
2209
+ break;
2210
+ }
2211
+ message.formula = reader.string();
2212
+ continue;
2213
+ }
2214
+ case 2: {
2215
+ if (tag !== 18) {
2216
+ break;
2217
+ }
2218
+ message.name = reader.string();
2219
+ continue;
2220
+ }
2221
+ case 8: {
2222
+ if (tag !== 66) {
2223
+ break;
2224
+ }
2225
+ message.description = reader.string();
2226
+ continue;
2227
+ }
2228
+ case 6: {
2229
+ if (tag !== 48) {
2230
+ break;
2231
+ }
2232
+ message.type = reader.int32();
2233
+ continue;
2234
+ }
2235
+ case 7: {
2236
+ if (tag !== 58) {
2237
+ break;
2238
+ }
2239
+ message.unit = reader.string();
2240
+ continue;
2241
+ }
2242
+ case 9: {
2243
+ if (tag !== 74) {
2244
+ break;
2245
+ }
2246
+ message.activeStyle = SystemIoStyle.decode(reader, reader.uint32());
2247
+ continue;
2248
+ }
2249
+ case 10: {
2250
+ if (tag !== 82) {
2251
+ break;
2252
+ }
2253
+ message.inactiveStyle = SystemIoStyle.decode(reader, reader.uint32());
2254
+ continue;
2255
+ }
2256
+ case 11: {
2257
+ if (tag !== 88) {
2258
+ break;
2259
+ }
2260
+ message.active = reader.bool();
2261
+ continue;
2262
+ }
2263
+ case 12: {
2264
+ if (tag !== 96) {
2265
+ break;
2266
+ }
2267
+ message.graphable = reader.bool();
2268
+ continue;
2269
+ }
2270
+ case 13: {
2271
+ if (tag !== 104) {
2272
+ break;
2273
+ }
2274
+ message.sord = reader.uint32();
2275
+ continue;
2276
+ }
2277
+ case 14: {
2278
+ if (tag !== 114) {
2279
+ break;
2280
+ }
2281
+ message.hidden.push(reader.string());
2282
+ continue;
2283
+ }
2284
+ case 15: {
2285
+ if (tag !== 122) {
2286
+ break;
2287
+ }
2288
+ const entry15 = SystemIo_UnknownEntry.decode(reader, reader.uint32());
2289
+ if (entry15.value !== undefined) {
2290
+ message.unknown[entry15.key] = entry15.value;
2291
+ }
2292
+ continue;
2293
+ }
2294
+ case 16: {
2295
+ if (tag !== 128) {
2296
+ break;
2297
+ }
2298
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
2299
+ continue;
2300
+ }
2301
+ case 17: {
2302
+ if (tag !== 138) {
2303
+ break;
2304
+ }
2305
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2306
+ continue;
2307
+ }
2308
+ case 18: {
2309
+ if (tag !== 146) {
2310
+ break;
2311
+ }
2312
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2313
+ continue;
2314
+ }
2315
+ case 19: {
2316
+ if (tag !== 152) {
2317
+ break;
2318
+ }
2319
+ message.separatorsCount = reader.uint32();
2320
+ continue;
2321
+ }
2322
+ case 20: {
2323
+ if (tag !== 160) {
2324
+ break;
2325
+ }
2326
+ message.decimalCount = reader.uint32();
2327
+ continue;
2328
+ }
2329
+ }
2330
+ if ((tag & 7) === 4 || tag === 0) {
2331
+ break;
2332
+ }
2333
+ reader.skip(tag & 7);
2334
+ }
2335
+ return message;
2336
+ },
2337
+ create(base) {
2338
+ return SystemIo.fromPartial(base ?? {});
2339
+ },
2340
+ fromPartial(object) {
2341
+ const message = createBaseSystemIo();
2342
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
2343
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
2344
+ ? Long.fromValue(object.deviceId)
2345
+ : undefined;
2346
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
2347
+ ? Long.fromValue(object.organizationId)
2348
+ : undefined;
2349
+ message.formula = object.formula ?? "";
2350
+ message.name = object.name ?? "";
2351
+ message.description = object.description ?? undefined;
2352
+ message.type = object.type ?? 0;
2353
+ message.unit = object.unit ?? undefined;
2354
+ message.activeStyle = (object.activeStyle !== undefined && object.activeStyle !== null)
2355
+ ? SystemIoStyle.fromPartial(object.activeStyle)
2356
+ : undefined;
2357
+ message.inactiveStyle = (object.inactiveStyle !== undefined && object.inactiveStyle !== null)
2358
+ ? SystemIoStyle.fromPartial(object.inactiveStyle)
2359
+ : undefined;
2360
+ message.active = object.active ?? false;
2361
+ message.graphable = object.graphable ?? false;
2362
+ message.sord = object.sord ?? 0;
2363
+ message.hidden = object.hidden?.map((e) => e) || [];
2364
+ message.unknown = globalThis.Object.entries(object.unknown ?? {}).reduce((acc, [key, value]) => {
2365
+ if (value !== undefined) {
2366
+ acc[key] = globalThis.String(value);
2367
+ }
2368
+ return acc;
2369
+ }, {});
2370
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2371
+ ? Long.fromValue(object.createdBy)
2372
+ : undefined;
2373
+ message.createdAt = object.createdAt ?? undefined;
2374
+ message.updatedAt = object.updatedAt ?? undefined;
2375
+ message.separatorsCount = object.separatorsCount ?? undefined;
2376
+ message.decimalCount = object.decimalCount ?? undefined;
2377
+ return message;
2378
+ },
2379
+ };
2380
+ function createBaseSystemIo_UnknownEntry() {
2381
+ return { key: "", value: "" };
2382
+ }
2383
+ export const SystemIo_UnknownEntry = {
2384
+ encode(message, writer = new BinaryWriter()) {
2385
+ if (message.key !== "") {
2386
+ writer.uint32(10).string(message.key);
2387
+ }
2388
+ if (message.value !== "") {
2389
+ writer.uint32(18).string(message.value);
2390
+ }
2391
+ return writer;
2392
+ },
2393
+ decode(input, length) {
2394
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2395
+ const end = length === undefined ? reader.len : reader.pos + length;
2396
+ const message = createBaseSystemIo_UnknownEntry();
2397
+ while (reader.pos < end) {
2398
+ const tag = reader.uint32();
2399
+ switch (tag >>> 3) {
2400
+ case 1: {
2401
+ if (tag !== 10) {
2402
+ break;
2403
+ }
2404
+ message.key = reader.string();
2405
+ continue;
2406
+ }
2407
+ case 2: {
2408
+ if (tag !== 18) {
2409
+ break;
2410
+ }
2411
+ message.value = reader.string();
2412
+ continue;
2413
+ }
2414
+ }
2415
+ if ((tag & 7) === 4 || tag === 0) {
2416
+ break;
2417
+ }
2418
+ reader.skip(tag & 7);
2419
+ }
2420
+ return message;
2421
+ },
2422
+ create(base) {
2423
+ return SystemIo_UnknownEntry.fromPartial(base ?? {});
2424
+ },
2425
+ fromPartial(object) {
2426
+ const message = createBaseSystemIo_UnknownEntry();
2427
+ message.key = object.key ?? "";
2428
+ message.value = object.value ?? "";
2429
+ return message;
2430
+ },
2431
+ };
2432
+ function createBaseShownIo() {
2433
+ return {
2434
+ name: "",
2435
+ style: undefined,
2436
+ unit: undefined,
2437
+ description: undefined,
2438
+ value: "",
2439
+ active: false,
2440
+ graphable: false,
2441
+ sord: 0,
2442
+ };
2443
+ }
2444
+ export const ShownIo = {
2445
+ encode(message, writer = new BinaryWriter()) {
2446
+ if (message.name !== "") {
2447
+ writer.uint32(10).string(message.name);
2448
+ }
2449
+ if (message.style !== undefined) {
2450
+ SystemIoStyle.encode(message.style, writer.uint32(18).fork()).join();
2451
+ }
2452
+ if (message.unit !== undefined) {
2453
+ writer.uint32(26).string(message.unit);
2454
+ }
2455
+ if (message.description !== undefined) {
2456
+ writer.uint32(34).string(message.description);
2457
+ }
2458
+ if (message.value !== "") {
2459
+ writer.uint32(42).string(message.value);
2460
+ }
2461
+ if (message.active !== false) {
2462
+ writer.uint32(48).bool(message.active);
2463
+ }
2464
+ if (message.graphable !== false) {
2465
+ writer.uint32(56).bool(message.graphable);
2466
+ }
2467
+ if (message.sord !== 0) {
2468
+ writer.uint32(64).uint32(message.sord);
2469
+ }
2470
+ return writer;
2471
+ },
2472
+ decode(input, length) {
2473
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2474
+ const end = length === undefined ? reader.len : reader.pos + length;
2475
+ const message = createBaseShownIo();
2476
+ while (reader.pos < end) {
2477
+ const tag = reader.uint32();
2478
+ switch (tag >>> 3) {
2479
+ case 1: {
2480
+ if (tag !== 10) {
2481
+ break;
2482
+ }
2483
+ message.name = reader.string();
2484
+ continue;
2485
+ }
2486
+ case 2: {
2487
+ if (tag !== 18) {
2488
+ break;
2489
+ }
2490
+ message.style = SystemIoStyle.decode(reader, reader.uint32());
2491
+ continue;
2492
+ }
2493
+ case 3: {
2494
+ if (tag !== 26) {
2495
+ break;
2496
+ }
2497
+ message.unit = reader.string();
2498
+ continue;
2499
+ }
2500
+ case 4: {
2501
+ if (tag !== 34) {
2502
+ break;
2503
+ }
2504
+ message.description = reader.string();
2505
+ continue;
2506
+ }
2507
+ case 5: {
2508
+ if (tag !== 42) {
2509
+ break;
2510
+ }
2511
+ message.value = reader.string();
2512
+ continue;
2513
+ }
2514
+ case 6: {
2515
+ if (tag !== 48) {
2516
+ break;
2517
+ }
2518
+ message.active = reader.bool();
2519
+ continue;
2520
+ }
2521
+ case 7: {
2522
+ if (tag !== 56) {
2523
+ break;
2524
+ }
2525
+ message.graphable = reader.bool();
2526
+ continue;
2527
+ }
2528
+ case 8: {
2529
+ if (tag !== 64) {
2530
+ break;
2531
+ }
2532
+ message.sord = reader.uint32();
2533
+ continue;
2534
+ }
2535
+ }
2536
+ if ((tag & 7) === 4 || tag === 0) {
2537
+ break;
2538
+ }
2539
+ reader.skip(tag & 7);
2540
+ }
2541
+ return message;
2542
+ },
2543
+ create(base) {
2544
+ return ShownIo.fromPartial(base ?? {});
2545
+ },
2546
+ fromPartial(object) {
2547
+ const message = createBaseShownIo();
2548
+ message.name = object.name ?? "";
2549
+ message.style = (object.style !== undefined && object.style !== null)
2550
+ ? SystemIoStyle.fromPartial(object.style)
2551
+ : undefined;
2552
+ message.unit = object.unit ?? undefined;
2553
+ message.description = object.description ?? undefined;
2554
+ message.value = object.value ?? "";
2555
+ message.active = object.active ?? false;
2556
+ message.graphable = object.graphable ?? false;
2557
+ message.sord = object.sord ?? 0;
2558
+ return message;
2559
+ },
2560
+ };
2561
+ function createBaseCommandAction() {
2562
+ return {
2563
+ id: Long.UZERO,
2564
+ name: "",
2565
+ description: undefined,
2566
+ picture: undefined,
2567
+ sord: 0,
2568
+ organizationId: undefined,
2569
+ createdBy: undefined,
2570
+ updatedBy: undefined,
2571
+ createdAt: undefined,
2572
+ updatedAt: undefined,
2573
+ };
2574
+ }
2575
+ export const CommandAction = {
2576
+ encode(message, writer = new BinaryWriter()) {
2577
+ if (!message.id.equals(Long.UZERO)) {
2578
+ writer.uint32(8).uint64(message.id.toString());
2579
+ }
2580
+ if (message.name !== "") {
2581
+ writer.uint32(18).string(message.name);
2582
+ }
2583
+ if (message.description !== undefined) {
2584
+ writer.uint32(26).string(message.description);
2585
+ }
2586
+ if (message.picture !== undefined) {
2587
+ writer.uint32(34).string(message.picture);
2588
+ }
2589
+ if (message.sord !== 0) {
2590
+ writer.uint32(40).uint32(message.sord);
2591
+ }
2592
+ if (message.organizationId !== undefined) {
2593
+ writer.uint32(48).uint64(message.organizationId.toString());
2594
+ }
2595
+ if (message.createdBy !== undefined) {
2596
+ writer.uint32(56).uint64(message.createdBy.toString());
2597
+ }
2598
+ if (message.updatedBy !== undefined) {
2599
+ writer.uint32(64).uint64(message.updatedBy.toString());
2600
+ }
2601
+ if (message.createdAt !== undefined) {
2602
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
2603
+ }
2604
+ if (message.updatedAt !== undefined) {
2605
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(82).fork()).join();
2606
+ }
2607
+ return writer;
2608
+ },
2609
+ decode(input, length) {
2610
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2611
+ const end = length === undefined ? reader.len : reader.pos + length;
2612
+ const message = createBaseCommandAction();
2613
+ while (reader.pos < end) {
2614
+ const tag = reader.uint32();
2615
+ switch (tag >>> 3) {
2616
+ case 1: {
2617
+ if (tag !== 8) {
2618
+ break;
2619
+ }
2620
+ message.id = Long.fromString(reader.uint64().toString(), true);
2621
+ continue;
2622
+ }
2623
+ case 2: {
2624
+ if (tag !== 18) {
2625
+ break;
2626
+ }
2627
+ message.name = reader.string();
2628
+ continue;
2629
+ }
2630
+ case 3: {
2631
+ if (tag !== 26) {
2632
+ break;
2633
+ }
2634
+ message.description = reader.string();
2635
+ continue;
2636
+ }
2637
+ case 4: {
2638
+ if (tag !== 34) {
2639
+ break;
2640
+ }
2641
+ message.picture = reader.string();
2642
+ continue;
2643
+ }
2644
+ case 5: {
2645
+ if (tag !== 40) {
2646
+ break;
2647
+ }
2648
+ message.sord = reader.uint32();
2649
+ continue;
2650
+ }
2651
+ case 6: {
2652
+ if (tag !== 48) {
2653
+ break;
2654
+ }
2655
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
2656
+ continue;
2657
+ }
2658
+ case 7: {
2659
+ if (tag !== 56) {
2660
+ break;
2661
+ }
2662
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
2663
+ continue;
2664
+ }
2665
+ case 8: {
2666
+ if (tag !== 64) {
2667
+ break;
2668
+ }
2669
+ message.updatedBy = Long.fromString(reader.uint64().toString(), true);
2670
+ continue;
2671
+ }
2672
+ case 9: {
2673
+ if (tag !== 74) {
2674
+ break;
2675
+ }
2676
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2677
+ continue;
2678
+ }
2679
+ case 10: {
2680
+ if (tag !== 82) {
2681
+ break;
2682
+ }
2683
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2684
+ continue;
2685
+ }
2686
+ }
2687
+ if ((tag & 7) === 4 || tag === 0) {
2688
+ break;
2689
+ }
2690
+ reader.skip(tag & 7);
2691
+ }
2692
+ return message;
2693
+ },
2694
+ create(base) {
2695
+ return CommandAction.fromPartial(base ?? {});
2696
+ },
2697
+ fromPartial(object) {
2698
+ const message = createBaseCommandAction();
2699
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
2700
+ message.name = object.name ?? "";
2701
+ message.description = object.description ?? undefined;
2702
+ message.picture = object.picture ?? undefined;
2703
+ message.sord = object.sord ?? 0;
2704
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
2705
+ ? Long.fromValue(object.organizationId)
2706
+ : undefined;
2707
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2708
+ ? Long.fromValue(object.createdBy)
2709
+ : undefined;
2710
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
2711
+ ? Long.fromValue(object.updatedBy)
2712
+ : undefined;
2713
+ message.createdAt = object.createdAt ?? undefined;
2714
+ message.updatedAt = object.updatedAt ?? undefined;
2715
+ return message;
2716
+ },
2717
+ };
2718
+ function toTimestamp(date) {
2719
+ const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
2720
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
2721
+ return { seconds, nanos };
2722
+ }
2723
+ function fromTimestamp(t) {
2724
+ let millis = (t.seconds.toNumber() || 0) * 1_000;
2725
+ millis += (t.nanos || 0) / 1_000_000;
2726
+ return new globalThis.Date(millis);
2727
+ }
2728
+ function numberToLong(number) {
2729
+ return Long.fromNumber(number);
2730
+ }