@fatehan/tsrp 1.4.44 → 1.4.46

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 (73) hide show
  1. package/dist/fatehan/activities/camera.d.ts +0 -2
  2. package/dist/fatehan/activities/camera.d.ts.map +1 -1
  3. package/dist/fatehan/activities/camera.js +0 -257
  4. package/dist/fatehan/activities/workflow.d.ts +20 -30
  5. package/dist/fatehan/activities/workflow.d.ts.map +1 -1
  6. package/dist/fatehan/activities/workflow.js +0 -718
  7. package/dist/fatehan/apis/client.d.ts +10 -12
  8. package/dist/fatehan/apis/client.d.ts.map +1 -1
  9. package/dist/fatehan/apis/client.js +23 -1015
  10. package/dist/fatehan/areas/area.d.ts +11 -15
  11. package/dist/fatehan/areas/area.d.ts.map +1 -1
  12. package/dist/fatehan/areas/area.js +0 -271
  13. package/dist/fatehan/devices/devices.d.ts +3 -7
  14. package/dist/fatehan/devices/devices.d.ts.map +1 -1
  15. package/dist/fatehan/devices/devices.js +0 -911
  16. package/dist/fatehan/devices/maintenance.d.ts +3 -7
  17. package/dist/fatehan/devices/maintenance.d.ts.map +1 -1
  18. package/dist/fatehan/devices/maintenance.js +0 -189
  19. package/dist/fatehan/financial/financial.d.ts +14 -16
  20. package/dist/fatehan/financial/financial.d.ts.map +1 -1
  21. package/dist/fatehan/financial/financial.js +0 -538
  22. package/dist/fatehan/google/protobuf/descriptor.d.ts +0 -42
  23. package/dist/fatehan/google/protobuf/descriptor.d.ts.map +1 -1
  24. package/dist/fatehan/google/protobuf/descriptor.js +0 -1864
  25. package/dist/fatehan/google/protobuf/duration.d.ts +0 -2
  26. package/dist/fatehan/google/protobuf/duration.d.ts.map +1 -1
  27. package/dist/fatehan/google/protobuf/duration.js +0 -19
  28. package/dist/fatehan/google/protobuf/field_mask.d.ts +0 -2
  29. package/dist/fatehan/google/protobuf/field_mask.d.ts.map +1 -1
  30. package/dist/fatehan/google/protobuf/field_mask.js +0 -12
  31. package/dist/fatehan/google/protobuf/timestamp.d.ts +0 -2
  32. package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -1
  33. package/dist/fatehan/google/protobuf/timestamp.js +0 -19
  34. package/dist/fatehan/identities/authentication.d.ts +13 -15
  35. package/dist/fatehan/identities/authentication.d.ts.map +1 -1
  36. package/dist/fatehan/identities/authentication.js +0 -339
  37. package/dist/fatehan/identities/identities.d.ts +6 -12
  38. package/dist/fatehan/identities/identities.d.ts.map +1 -1
  39. package/dist/fatehan/identities/identities.js +0 -4069
  40. package/dist/fatehan/models/fusion.d.ts +5 -7
  41. package/dist/fatehan/models/fusion.d.ts.map +1 -1
  42. package/dist/fatehan/models/fusion.js +0 -494
  43. package/dist/fatehan/models/models.d.ts +6 -10
  44. package/dist/fatehan/models/models.d.ts.map +1 -1
  45. package/dist/fatehan/models/models.js +1 -554
  46. package/dist/fatehan/notifies/notify.d.ts +10 -24
  47. package/dist/fatehan/notifies/notify.d.ts.map +1 -1
  48. package/dist/fatehan/notifies/notify.js +0 -1096
  49. package/dist/fatehan/packets/dataModel.d.ts +18 -48
  50. package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
  51. package/dist/fatehan/packets/dataModel.js +34 -7015
  52. package/dist/fatehan/packets/dataModule.d.ts +2 -6
  53. package/dist/fatehan/packets/dataModule.d.ts.map +1 -1
  54. package/dist/fatehan/packets/dataModule.js +0 -167
  55. package/dist/fatehan/packets/messages.d.ts +5 -9
  56. package/dist/fatehan/packets/messages.d.ts.map +1 -1
  57. package/dist/fatehan/packets/messages.js +0 -280
  58. package/dist/fatehan/reports/report.d.ts +87 -115
  59. package/dist/fatehan/reports/report.d.ts.map +1 -1
  60. package/dist/fatehan/reports/report.js +3 -3112
  61. package/dist/fatehan/services/api.d.ts +14 -14
  62. package/dist/fatehan/services/api.d.ts.map +1 -1
  63. package/dist/fatehan/services/api.js +29 -1254
  64. package/dist/fatehan/services/repositories.d.ts +6 -8
  65. package/dist/fatehan/services/repositories.d.ts.map +1 -1
  66. package/dist/fatehan/services/repositories.js +0 -191
  67. package/dist/fatehan/trips/trip.d.ts +18 -30
  68. package/dist/fatehan/trips/trip.d.ts.map +1 -1
  69. package/dist/fatehan/trips/trip.js +0 -1662
  70. package/dist/fatehan/utils/buf/validate/validate.d.ts +0 -6
  71. package/dist/fatehan/utils/buf/validate/validate.d.ts.map +1 -1
  72. package/dist/fatehan/utils/buf/validate/validate.js +0 -1318
  73. package/package.json +1 -1
@@ -6,7 +6,7 @@
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import Long from "long";
9
- import { workflowStatFromJSON, workflowStatToJSON, WorkflowTask } from "../activities/workflow";
9
+ import { WorkflowTask } from "../activities/workflow";
10
10
  import { Area, Point, WorkCycle } from "../areas/area";
11
11
  import { Timestamp } from "../google/protobuf/timestamp";
12
12
  import { Data, Log } from "../packets/dataModel";
@@ -19,31 +19,6 @@ export var Source;
19
19
  Source[Source["CASSANDRA"] = 1] = "CASSANDRA";
20
20
  Source[Source["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
21
  })(Source || (Source = {}));
22
- export function sourceFromJSON(object) {
23
- switch (object) {
24
- case 0:
25
- case "MYSQL":
26
- return Source.MYSQL;
27
- case 1:
28
- case "CASSANDRA":
29
- return Source.CASSANDRA;
30
- case -1:
31
- case "UNRECOGNIZED":
32
- default:
33
- return Source.UNRECOGNIZED;
34
- }
35
- }
36
- export function sourceToJSON(object) {
37
- switch (object) {
38
- case Source.MYSQL:
39
- return "MYSQL";
40
- case Source.CASSANDRA:
41
- return "CASSANDRA";
42
- case Source.UNRECOGNIZED:
43
- default:
44
- return "UNRECOGNIZED";
45
- }
46
- }
47
22
  export var RouteStopType;
48
23
  (function (RouteStopType) {
49
24
  RouteStopType[RouteStopType["NONE"] = 0] = "NONE";
@@ -51,36 +26,6 @@ export var RouteStopType;
51
26
  RouteStopType[RouteStopType["STOPS"] = 2] = "STOPS";
52
27
  RouteStopType[RouteStopType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
53
28
  })(RouteStopType || (RouteStopType = {}));
54
- export function routeStopTypeFromJSON(object) {
55
- switch (object) {
56
- case 0:
57
- case "NONE":
58
- return RouteStopType.NONE;
59
- case 1:
60
- case "IDLING":
61
- return RouteStopType.IDLING;
62
- case 2:
63
- case "STOPS":
64
- return RouteStopType.STOPS;
65
- case -1:
66
- case "UNRECOGNIZED":
67
- default:
68
- return RouteStopType.UNRECOGNIZED;
69
- }
70
- }
71
- export function routeStopTypeToJSON(object) {
72
- switch (object) {
73
- case RouteStopType.NONE:
74
- return "NONE";
75
- case RouteStopType.IDLING:
76
- return "IDLING";
77
- case RouteStopType.STOPS:
78
- return "STOPS";
79
- case RouteStopType.UNRECOGNIZED:
80
- default:
81
- return "UNRECOGNIZED";
82
- }
83
- }
84
29
  export var StopCalculateIo;
85
30
  (function (StopCalculateIo) {
86
31
  StopCalculateIo[StopCalculateIo["BOTH"] = 0] = "BOTH";
@@ -88,36 +33,6 @@ export var StopCalculateIo;
88
33
  StopCalculateIo[StopCalculateIo["IGNITION"] = 2] = "IGNITION";
89
34
  StopCalculateIo[StopCalculateIo["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
90
35
  })(StopCalculateIo || (StopCalculateIo = {}));
91
- export function stopCalculateIoFromJSON(object) {
92
- switch (object) {
93
- case 0:
94
- case "BOTH":
95
- return StopCalculateIo.BOTH;
96
- case 1:
97
- case "SPEED":
98
- return StopCalculateIo.SPEED;
99
- case 2:
100
- case "IGNITION":
101
- return StopCalculateIo.IGNITION;
102
- case -1:
103
- case "UNRECOGNIZED":
104
- default:
105
- return StopCalculateIo.UNRECOGNIZED;
106
- }
107
- }
108
- export function stopCalculateIoToJSON(object) {
109
- switch (object) {
110
- case StopCalculateIo.BOTH:
111
- return "BOTH";
112
- case StopCalculateIo.SPEED:
113
- return "SPEED";
114
- case StopCalculateIo.IGNITION:
115
- return "IGNITION";
116
- case StopCalculateIo.UNRECOGNIZED:
117
- default:
118
- return "UNRECOGNIZED";
119
- }
120
- }
121
36
  export var DriverBehaviorReportRequest_GroupBy;
122
37
  (function (DriverBehaviorReportRequest_GroupBy) {
123
38
  DriverBehaviorReportRequest_GroupBy[DriverBehaviorReportRequest_GroupBy["GROUP_BY_UNSPECIFIED"] = 0] = "GROUP_BY_UNSPECIFIED";
@@ -126,72 +41,12 @@ export var DriverBehaviorReportRequest_GroupBy;
126
41
  DriverBehaviorReportRequest_GroupBy[DriverBehaviorReportRequest_GroupBy["GROUP_BY_DEVICE_DATETIME"] = 3] = "GROUP_BY_DEVICE_DATETIME";
127
42
  DriverBehaviorReportRequest_GroupBy[DriverBehaviorReportRequest_GroupBy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
128
43
  })(DriverBehaviorReportRequest_GroupBy || (DriverBehaviorReportRequest_GroupBy = {}));
129
- export function driverBehaviorReportRequest_GroupByFromJSON(object) {
130
- switch (object) {
131
- case 0:
132
- case "GROUP_BY_UNSPECIFIED":
133
- return DriverBehaviorReportRequest_GroupBy.GROUP_BY_UNSPECIFIED;
134
- case 1:
135
- case "GROUP_BY_DEVICE":
136
- return DriverBehaviorReportRequest_GroupBy.GROUP_BY_DEVICE;
137
- case 2:
138
- case "GROUP_BY_DATETIME":
139
- return DriverBehaviorReportRequest_GroupBy.GROUP_BY_DATETIME;
140
- case 3:
141
- case "GROUP_BY_DEVICE_DATETIME":
142
- return DriverBehaviorReportRequest_GroupBy.GROUP_BY_DEVICE_DATETIME;
143
- case -1:
144
- case "UNRECOGNIZED":
145
- default:
146
- return DriverBehaviorReportRequest_GroupBy.UNRECOGNIZED;
147
- }
148
- }
149
- export function driverBehaviorReportRequest_GroupByToJSON(object) {
150
- switch (object) {
151
- case DriverBehaviorReportRequest_GroupBy.GROUP_BY_UNSPECIFIED:
152
- return "GROUP_BY_UNSPECIFIED";
153
- case DriverBehaviorReportRequest_GroupBy.GROUP_BY_DEVICE:
154
- return "GROUP_BY_DEVICE";
155
- case DriverBehaviorReportRequest_GroupBy.GROUP_BY_DATETIME:
156
- return "GROUP_BY_DATETIME";
157
- case DriverBehaviorReportRequest_GroupBy.GROUP_BY_DEVICE_DATETIME:
158
- return "GROUP_BY_DEVICE_DATETIME";
159
- case DriverBehaviorReportRequest_GroupBy.UNRECOGNIZED:
160
- default:
161
- return "UNRECOGNIZED";
162
- }
163
- }
164
44
  export var WorkCycleRequest_Source;
165
45
  (function (WorkCycleRequest_Source) {
166
46
  WorkCycleRequest_Source[WorkCycleRequest_Source["fusion"] = 0] = "fusion";
167
47
  WorkCycleRequest_Source[WorkCycleRequest_Source["odyssey"] = 1] = "odyssey";
168
48
  WorkCycleRequest_Source[WorkCycleRequest_Source["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
169
49
  })(WorkCycleRequest_Source || (WorkCycleRequest_Source = {}));
170
- export function workCycleRequest_SourceFromJSON(object) {
171
- switch (object) {
172
- case 0:
173
- case "fusion":
174
- return WorkCycleRequest_Source.fusion;
175
- case 1:
176
- case "odyssey":
177
- return WorkCycleRequest_Source.odyssey;
178
- case -1:
179
- case "UNRECOGNIZED":
180
- default:
181
- return WorkCycleRequest_Source.UNRECOGNIZED;
182
- }
183
- }
184
- export function workCycleRequest_SourceToJSON(object) {
185
- switch (object) {
186
- case WorkCycleRequest_Source.fusion:
187
- return "fusion";
188
- case WorkCycleRequest_Source.odyssey:
189
- return "odyssey";
190
- case WorkCycleRequest_Source.UNRECOGNIZED:
191
- default:
192
- return "UNRECOGNIZED";
193
- }
194
- }
195
50
  export var TripPerformanceRequest_GroupBy;
196
51
  (function (TripPerformanceRequest_GroupBy) {
197
52
  TripPerformanceRequest_GroupBy[TripPerformanceRequest_GroupBy["All"] = 0] = "All";
@@ -201,46 +56,6 @@ export var TripPerformanceRequest_GroupBy;
201
56
  TripPerformanceRequest_GroupBy[TripPerformanceRequest_GroupBy["Hour"] = 4] = "Hour";
202
57
  TripPerformanceRequest_GroupBy[TripPerformanceRequest_GroupBy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
203
58
  })(TripPerformanceRequest_GroupBy || (TripPerformanceRequest_GroupBy = {}));
204
- export function tripPerformanceRequest_GroupByFromJSON(object) {
205
- switch (object) {
206
- case 0:
207
- case "All":
208
- return TripPerformanceRequest_GroupBy.All;
209
- case 1:
210
- case "Day":
211
- return TripPerformanceRequest_GroupBy.Day;
212
- case 2:
213
- case "Month":
214
- return TripPerformanceRequest_GroupBy.Month;
215
- case 3:
216
- case "Year":
217
- return TripPerformanceRequest_GroupBy.Year;
218
- case 4:
219
- case "Hour":
220
- return TripPerformanceRequest_GroupBy.Hour;
221
- case -1:
222
- case "UNRECOGNIZED":
223
- default:
224
- return TripPerformanceRequest_GroupBy.UNRECOGNIZED;
225
- }
226
- }
227
- export function tripPerformanceRequest_GroupByToJSON(object) {
228
- switch (object) {
229
- case TripPerformanceRequest_GroupBy.All:
230
- return "All";
231
- case TripPerformanceRequest_GroupBy.Day:
232
- return "Day";
233
- case TripPerformanceRequest_GroupBy.Month:
234
- return "Month";
235
- case TripPerformanceRequest_GroupBy.Year:
236
- return "Year";
237
- case TripPerformanceRequest_GroupBy.Hour:
238
- return "Hour";
239
- case TripPerformanceRequest_GroupBy.UNRECOGNIZED:
240
- default:
241
- return "UNRECOGNIZED";
242
- }
243
- }
244
59
  export var Traffix_Event_Type;
245
60
  (function (Traffix_Event_Type) {
246
61
  Traffix_Event_Type[Traffix_Event_Type["NONE"] = 0] = "NONE";
@@ -248,36 +63,6 @@ export var Traffix_Event_Type;
248
63
  Traffix_Event_Type[Traffix_Event_Type["OUTSIDE"] = 2] = "OUTSIDE";
249
64
  Traffix_Event_Type[Traffix_Event_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
250
65
  })(Traffix_Event_Type || (Traffix_Event_Type = {}));
251
- export function traffix_Event_TypeFromJSON(object) {
252
- switch (object) {
253
- case 0:
254
- case "NONE":
255
- return Traffix_Event_Type.NONE;
256
- case 1:
257
- case "INSIDE":
258
- return Traffix_Event_Type.INSIDE;
259
- case 2:
260
- case "OUTSIDE":
261
- return Traffix_Event_Type.OUTSIDE;
262
- case -1:
263
- case "UNRECOGNIZED":
264
- default:
265
- return Traffix_Event_Type.UNRECOGNIZED;
266
- }
267
- }
268
- export function traffix_Event_TypeToJSON(object) {
269
- switch (object) {
270
- case Traffix_Event_Type.NONE:
271
- return "NONE";
272
- case Traffix_Event_Type.INSIDE:
273
- return "INSIDE";
274
- case Traffix_Event_Type.OUTSIDE:
275
- return "OUTSIDE";
276
- case Traffix_Event_Type.UNRECOGNIZED:
277
- default:
278
- return "UNRECOGNIZED";
279
- }
280
- }
281
66
  export var AreaSummaryReviewRequest_ScopeEnum;
282
67
  (function (AreaSummaryReviewRequest_ScopeEnum) {
283
68
  AreaSummaryReviewRequest_ScopeEnum[AreaSummaryReviewRequest_ScopeEnum["inside_only"] = 0] = "inside_only";
@@ -285,98 +70,18 @@ export var AreaSummaryReviewRequest_ScopeEnum;
285
70
  AreaSummaryReviewRequest_ScopeEnum[AreaSummaryReviewRequest_ScopeEnum["both_side"] = 2] = "both_side";
286
71
  AreaSummaryReviewRequest_ScopeEnum[AreaSummaryReviewRequest_ScopeEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
287
72
  })(AreaSummaryReviewRequest_ScopeEnum || (AreaSummaryReviewRequest_ScopeEnum = {}));
288
- export function areaSummaryReviewRequest_ScopeEnumFromJSON(object) {
289
- switch (object) {
290
- case 0:
291
- case "inside_only":
292
- return AreaSummaryReviewRequest_ScopeEnum.inside_only;
293
- case 1:
294
- case "outside_only":
295
- return AreaSummaryReviewRequest_ScopeEnum.outside_only;
296
- case 2:
297
- case "both_side":
298
- return AreaSummaryReviewRequest_ScopeEnum.both_side;
299
- case -1:
300
- case "UNRECOGNIZED":
301
- default:
302
- return AreaSummaryReviewRequest_ScopeEnum.UNRECOGNIZED;
303
- }
304
- }
305
- export function areaSummaryReviewRequest_ScopeEnumToJSON(object) {
306
- switch (object) {
307
- case AreaSummaryReviewRequest_ScopeEnum.inside_only:
308
- return "inside_only";
309
- case AreaSummaryReviewRequest_ScopeEnum.outside_only:
310
- return "outside_only";
311
- case AreaSummaryReviewRequest_ScopeEnum.both_side:
312
- return "both_side";
313
- case AreaSummaryReviewRequest_ScopeEnum.UNRECOGNIZED:
314
- default:
315
- return "UNRECOGNIZED";
316
- }
317
- }
318
73
  export var AreaSummaryReviewRequest_AreaSourceEnum;
319
74
  (function (AreaSummaryReviewRequest_AreaSourceEnum) {
320
75
  AreaSummaryReviewRequest_AreaSourceEnum[AreaSummaryReviewRequest_AreaSourceEnum["fusion"] = 0] = "fusion";
321
76
  AreaSummaryReviewRequest_AreaSourceEnum[AreaSummaryReviewRequest_AreaSourceEnum["odyssey"] = 1] = "odyssey";
322
77
  AreaSummaryReviewRequest_AreaSourceEnum[AreaSummaryReviewRequest_AreaSourceEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
323
78
  })(AreaSummaryReviewRequest_AreaSourceEnum || (AreaSummaryReviewRequest_AreaSourceEnum = {}));
324
- export function areaSummaryReviewRequest_AreaSourceEnumFromJSON(object) {
325
- switch (object) {
326
- case 0:
327
- case "fusion":
328
- return AreaSummaryReviewRequest_AreaSourceEnum.fusion;
329
- case 1:
330
- case "odyssey":
331
- return AreaSummaryReviewRequest_AreaSourceEnum.odyssey;
332
- case -1:
333
- case "UNRECOGNIZED":
334
- default:
335
- return AreaSummaryReviewRequest_AreaSourceEnum.UNRECOGNIZED;
336
- }
337
- }
338
- export function areaSummaryReviewRequest_AreaSourceEnumToJSON(object) {
339
- switch (object) {
340
- case AreaSummaryReviewRequest_AreaSourceEnum.fusion:
341
- return "fusion";
342
- case AreaSummaryReviewRequest_AreaSourceEnum.odyssey:
343
- return "odyssey";
344
- case AreaSummaryReviewRequest_AreaSourceEnum.UNRECOGNIZED:
345
- default:
346
- return "UNRECOGNIZED";
347
- }
348
- }
349
79
  export var AreaSummaryReviewResponse_trafficType;
350
80
  (function (AreaSummaryReviewResponse_trafficType) {
351
81
  AreaSummaryReviewResponse_trafficType[AreaSummaryReviewResponse_trafficType["inside"] = 0] = "inside";
352
82
  AreaSummaryReviewResponse_trafficType[AreaSummaryReviewResponse_trafficType["outSide"] = 1] = "outSide";
353
83
  AreaSummaryReviewResponse_trafficType[AreaSummaryReviewResponse_trafficType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
354
84
  })(AreaSummaryReviewResponse_trafficType || (AreaSummaryReviewResponse_trafficType = {}));
355
- export function areaSummaryReviewResponse_trafficTypeFromJSON(object) {
356
- switch (object) {
357
- case 0:
358
- case "inside":
359
- return AreaSummaryReviewResponse_trafficType.inside;
360
- case 1:
361
- case "outSide":
362
- return AreaSummaryReviewResponse_trafficType.outSide;
363
- case -1:
364
- case "UNRECOGNIZED":
365
- default:
366
- return AreaSummaryReviewResponse_trafficType.UNRECOGNIZED;
367
- }
368
- }
369
- export function areaSummaryReviewResponse_trafficTypeToJSON(object) {
370
- switch (object) {
371
- case AreaSummaryReviewResponse_trafficType.inside:
372
- return "inside";
373
- case AreaSummaryReviewResponse_trafficType.outSide:
374
- return "outSide";
375
- case AreaSummaryReviewResponse_trafficType.UNRECOGNIZED:
376
- default:
377
- return "UNRECOGNIZED";
378
- }
379
- }
380
85
  export var TrafficResponse_Traffic_EventType;
381
86
  (function (TrafficResponse_Traffic_EventType) {
382
87
  TrafficResponse_Traffic_EventType[TrafficResponse_Traffic_EventType["NONE_EVENT"] = 0] = "NONE_EVENT";
@@ -384,36 +89,6 @@ export var TrafficResponse_Traffic_EventType;
384
89
  TrafficResponse_Traffic_EventType[TrafficResponse_Traffic_EventType["EXIT"] = 2] = "EXIT";
385
90
  TrafficResponse_Traffic_EventType[TrafficResponse_Traffic_EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
386
91
  })(TrafficResponse_Traffic_EventType || (TrafficResponse_Traffic_EventType = {}));
387
- export function trafficResponse_Traffic_EventTypeFromJSON(object) {
388
- switch (object) {
389
- case 0:
390
- case "NONE_EVENT":
391
- return TrafficResponse_Traffic_EventType.NONE_EVENT;
392
- case 1:
393
- case "ENTER":
394
- return TrafficResponse_Traffic_EventType.ENTER;
395
- case 2:
396
- case "EXIT":
397
- return TrafficResponse_Traffic_EventType.EXIT;
398
- case -1:
399
- case "UNRECOGNIZED":
400
- default:
401
- return TrafficResponse_Traffic_EventType.UNRECOGNIZED;
402
- }
403
- }
404
- export function trafficResponse_Traffic_EventTypeToJSON(object) {
405
- switch (object) {
406
- case TrafficResponse_Traffic_EventType.NONE_EVENT:
407
- return "NONE_EVENT";
408
- case TrafficResponse_Traffic_EventType.ENTER:
409
- return "ENTER";
410
- case TrafficResponse_Traffic_EventType.EXIT:
411
- return "EXIT";
412
- case TrafficResponse_Traffic_EventType.UNRECOGNIZED:
413
- default:
414
- return "UNRECOGNIZED";
415
- }
416
- }
417
92
  export var AttendanceResponse_EventType;
418
93
  (function (AttendanceResponse_EventType) {
419
94
  AttendanceResponse_EventType[AttendanceResponse_EventType["NONE_EVENT"] = 0] = "NONE_EVENT";
@@ -421,36 +96,6 @@ export var AttendanceResponse_EventType;
421
96
  AttendanceResponse_EventType[AttendanceResponse_EventType["EXIT"] = 2] = "EXIT";
422
97
  AttendanceResponse_EventType[AttendanceResponse_EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
423
98
  })(AttendanceResponse_EventType || (AttendanceResponse_EventType = {}));
424
- export function attendanceResponse_EventTypeFromJSON(object) {
425
- switch (object) {
426
- case 0:
427
- case "NONE_EVENT":
428
- return AttendanceResponse_EventType.NONE_EVENT;
429
- case 1:
430
- case "ENTER":
431
- return AttendanceResponse_EventType.ENTER;
432
- case 2:
433
- case "EXIT":
434
- return AttendanceResponse_EventType.EXIT;
435
- case -1:
436
- case "UNRECOGNIZED":
437
- default:
438
- return AttendanceResponse_EventType.UNRECOGNIZED;
439
- }
440
- }
441
- export function attendanceResponse_EventTypeToJSON(object) {
442
- switch (object) {
443
- case AttendanceResponse_EventType.NONE_EVENT:
444
- return "NONE_EVENT";
445
- case AttendanceResponse_EventType.ENTER:
446
- return "ENTER";
447
- case AttendanceResponse_EventType.EXIT:
448
- return "EXIT";
449
- case AttendanceResponse_EventType.UNRECOGNIZED:
450
- default:
451
- return "UNRECOGNIZED";
452
- }
453
- }
454
99
  export var TripsSummaryRequest_GroupBy;
455
100
  (function (TripsSummaryRequest_GroupBy) {
456
101
  TripsSummaryRequest_GroupBy[TripsSummaryRequest_GroupBy["All"] = 0] = "All";
@@ -458,36 +103,6 @@ export var TripsSummaryRequest_GroupBy;
458
103
  TripsSummaryRequest_GroupBy[TripsSummaryRequest_GroupBy["Month"] = 2] = "Month";
459
104
  TripsSummaryRequest_GroupBy[TripsSummaryRequest_GroupBy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
460
105
  })(TripsSummaryRequest_GroupBy || (TripsSummaryRequest_GroupBy = {}));
461
- export function tripsSummaryRequest_GroupByFromJSON(object) {
462
- switch (object) {
463
- case 0:
464
- case "All":
465
- return TripsSummaryRequest_GroupBy.All;
466
- case 1:
467
- case "Day":
468
- return TripsSummaryRequest_GroupBy.Day;
469
- case 2:
470
- case "Month":
471
- return TripsSummaryRequest_GroupBy.Month;
472
- case -1:
473
- case "UNRECOGNIZED":
474
- default:
475
- return TripsSummaryRequest_GroupBy.UNRECOGNIZED;
476
- }
477
- }
478
- export function tripsSummaryRequest_GroupByToJSON(object) {
479
- switch (object) {
480
- case TripsSummaryRequest_GroupBy.All:
481
- return "All";
482
- case TripsSummaryRequest_GroupBy.Day:
483
- return "Day";
484
- case TripsSummaryRequest_GroupBy.Month:
485
- return "Month";
486
- case TripsSummaryRequest_GroupBy.UNRECOGNIZED:
487
- default:
488
- return "UNRECOGNIZED";
489
- }
490
- }
491
106
  function createBaseDriverBehaviorReportResponse() {
492
107
  return { cost: 0, records: 0, points: [], chunks: [] };
493
108
  }
@@ -550,32 +165,6 @@ export const DriverBehaviorReportResponse = {
550
165
  }
551
166
  return message;
552
167
  },
553
- fromJSON(object) {
554
- return {
555
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
556
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
557
- points: globalThis.Array.isArray(object?.points) ? object.points.map((e) => TripPoint.fromJSON(e)) : [],
558
- chunks: globalThis.Array.isArray(object?.chunks)
559
- ? object.chunks.map((e) => DriverBehaviorReportResponse_Chunk.fromJSON(e))
560
- : [],
561
- };
562
- },
563
- toJSON(message) {
564
- const obj = {};
565
- if (message.cost !== 0) {
566
- obj.cost = Math.round(message.cost);
567
- }
568
- if (message.records !== 0) {
569
- obj.records = Math.round(message.records);
570
- }
571
- if (message.points?.length) {
572
- obj.points = message.points.map((e) => TripPoint.toJSON(e));
573
- }
574
- if (message.chunks?.length) {
575
- obj.chunks = message.chunks.map((e) => DriverBehaviorReportResponse_Chunk.toJSON(e));
576
- }
577
- return obj;
578
- },
579
168
  create(base) {
580
169
  return DriverBehaviorReportResponse.fromPartial(base ?? {});
581
170
  },
@@ -895,165 +484,6 @@ export const DriverBehaviorReportResponse_Chunk = {
895
484
  }
896
485
  return message;
897
486
  },
898
- fromJSON(object) {
899
- return {
900
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
901
- organizationName: isSet(object.organization_name) ? globalThis.String(object.organization_name) : "",
902
- carName: isSet(object.car_name) ? globalThis.String(object.car_name) : undefined,
903
- driverName: isSet(object.driver_name) ? globalThis.String(object.driver_name) : undefined,
904
- mileage: isSet(object.mileage) ? Long.fromValue(object.mileage) : Long.UZERO,
905
- idling: isSet(object.idling) ? Long.fromValue(object.idling) : Long.UZERO,
906
- parking: isSet(object.parking) ? Long.fromValue(object.parking) : Long.UZERO,
907
- moving: isSet(object.moving) ? Long.fromValue(object.moving) : Long.UZERO,
908
- towing: isSet(object.towing) ? Long.fromValue(object.towing) : Long.UZERO,
909
- avgSpeed: isSet(object.avg_speed) ? Long.fromValue(object.avg_speed) : Long.UZERO,
910
- totalSpeed: isSet(object.total_speed) ? globalThis.Number(object.total_speed) : 0,
911
- sumSpeed: isSet(object.sum_speed) ? globalThis.Number(object.sum_speed) : 0,
912
- maxSpeed: isSet(object.max_speed) ? Long.fromValue(object.max_speed) : Long.UZERO,
913
- iButton: isSet(object.i_button) ? Long.fromValue(object.i_button) : undefined,
914
- ignition: isSet(object.ignition) ? globalThis.Number(object.ignition) : undefined,
915
- doorOpened: isSet(object.door_opened) ? globalThis.Number(object.door_opened) : undefined,
916
- fuelUsed: isSet(object.fuel_used) ? globalThis.Number(object.fuel_used) : undefined,
917
- crashes: isObject(object.crashes)
918
- ? Object.entries(object.crashes).reduce((acc, [key, value]) => {
919
- acc[globalThis.Number(key)] = Number(value);
920
- return acc;
921
- }, {})
922
- : {},
923
- speeds: isObject(object.speeds)
924
- ? Object.entries(object.speeds).reduce((acc, [key, value]) => {
925
- acc[globalThis.Number(key)] = TripDurationStat.fromJSON(value);
926
- return acc;
927
- }, {})
928
- : {},
929
- greenDriving: isObject(object.green_driving)
930
- ? Object.entries(object.green_driving).reduce((acc, [key, value]) => {
931
- acc[globalThis.Number(key)] = Number(value);
932
- return acc;
933
- }, {})
934
- : {},
935
- temperature: isObject(object.temperature)
936
- ? Object.entries(object.temperature).reduce((acc, [key, value]) => {
937
- acc[globalThis.Number(key)] = Number(value);
938
- return acc;
939
- }, {})
940
- : {},
941
- humidity: isObject(object.humidity)
942
- ? Object.entries(object.humidity).reduce((acc, [key, value]) => {
943
- acc[globalThis.Number(key)] = Number(value);
944
- return acc;
945
- }, {})
946
- : {},
947
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
948
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
949
- };
950
- },
951
- toJSON(message) {
952
- const obj = {};
953
- if (!message.deviceId.equals(Long.UZERO)) {
954
- obj.device_id = (message.deviceId || Long.UZERO).toString();
955
- }
956
- if (message.organizationName !== "") {
957
- obj.organization_name = message.organizationName;
958
- }
959
- if (message.carName !== undefined) {
960
- obj.car_name = message.carName;
961
- }
962
- if (message.driverName !== undefined) {
963
- obj.driver_name = message.driverName;
964
- }
965
- if (!message.mileage.equals(Long.UZERO)) {
966
- obj.mileage = (message.mileage || Long.UZERO).toString();
967
- }
968
- if (!message.idling.equals(Long.UZERO)) {
969
- obj.idling = (message.idling || Long.UZERO).toString();
970
- }
971
- if (!message.parking.equals(Long.UZERO)) {
972
- obj.parking = (message.parking || Long.UZERO).toString();
973
- }
974
- if (!message.moving.equals(Long.UZERO)) {
975
- obj.moving = (message.moving || Long.UZERO).toString();
976
- }
977
- if (!message.towing.equals(Long.UZERO)) {
978
- obj.towing = (message.towing || Long.UZERO).toString();
979
- }
980
- if (!message.avgSpeed.equals(Long.UZERO)) {
981
- obj.avg_speed = (message.avgSpeed || Long.UZERO).toString();
982
- }
983
- if (message.totalSpeed !== 0) {
984
- obj.total_speed = Math.round(message.totalSpeed);
985
- }
986
- if (message.sumSpeed !== 0) {
987
- obj.sum_speed = Math.round(message.sumSpeed);
988
- }
989
- if (!message.maxSpeed.equals(Long.UZERO)) {
990
- obj.max_speed = (message.maxSpeed || Long.UZERO).toString();
991
- }
992
- if (message.iButton !== undefined) {
993
- obj.i_button = (message.iButton || Long.UZERO).toString();
994
- }
995
- if (message.ignition !== undefined) {
996
- obj.ignition = Math.round(message.ignition);
997
- }
998
- if (message.doorOpened !== undefined) {
999
- obj.door_opened = Math.round(message.doorOpened);
1000
- }
1001
- if (message.fuelUsed !== undefined) {
1002
- obj.fuel_used = Math.round(message.fuelUsed);
1003
- }
1004
- if (message.crashes) {
1005
- const entries = Object.entries(message.crashes);
1006
- if (entries.length > 0) {
1007
- obj.crashes = {};
1008
- entries.forEach(([k, v]) => {
1009
- obj.crashes[k] = Math.round(v);
1010
- });
1011
- }
1012
- }
1013
- if (message.speeds) {
1014
- const entries = Object.entries(message.speeds);
1015
- if (entries.length > 0) {
1016
- obj.speeds = {};
1017
- entries.forEach(([k, v]) => {
1018
- obj.speeds[k] = TripDurationStat.toJSON(v);
1019
- });
1020
- }
1021
- }
1022
- if (message.greenDriving) {
1023
- const entries = Object.entries(message.greenDriving);
1024
- if (entries.length > 0) {
1025
- obj.green_driving = {};
1026
- entries.forEach(([k, v]) => {
1027
- obj.green_driving[k] = Math.round(v);
1028
- });
1029
- }
1030
- }
1031
- if (message.temperature) {
1032
- const entries = Object.entries(message.temperature);
1033
- if (entries.length > 0) {
1034
- obj.temperature = {};
1035
- entries.forEach(([k, v]) => {
1036
- obj.temperature[k] = Math.round(v);
1037
- });
1038
- }
1039
- }
1040
- if (message.humidity) {
1041
- const entries = Object.entries(message.humidity);
1042
- if (entries.length > 0) {
1043
- obj.humidity = {};
1044
- entries.forEach(([k, v]) => {
1045
- obj.humidity[k] = Math.round(v);
1046
- });
1047
- }
1048
- }
1049
- if (message.startedAt !== undefined) {
1050
- obj.started_at = message.startedAt.toISOString();
1051
- }
1052
- if (message.finishedAt !== undefined) {
1053
- obj.finished_at = message.finishedAt.toISOString();
1054
- }
1055
- return obj;
1056
- },
1057
487
  create(base) {
1058
488
  return DriverBehaviorReportResponse_Chunk.fromPartial(base ?? {});
1059
489
  },
@@ -1171,22 +601,6 @@ export const DriverBehaviorReportResponse_Chunk_CrashesEntry = {
1171
601
  }
1172
602
  return message;
1173
603
  },
1174
- fromJSON(object) {
1175
- return {
1176
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
1177
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
1178
- };
1179
- },
1180
- toJSON(message) {
1181
- const obj = {};
1182
- if (message.key !== 0) {
1183
- obj.key = Math.round(message.key);
1184
- }
1185
- if (message.value !== 0) {
1186
- obj.value = Math.round(message.value);
1187
- }
1188
- return obj;
1189
- },
1190
604
  create(base) {
1191
605
  return DriverBehaviorReportResponse_Chunk_CrashesEntry.fromPartial(base ?? {});
1192
606
  },
@@ -1239,22 +653,6 @@ export const DriverBehaviorReportResponse_Chunk_SpeedsEntry = {
1239
653
  }
1240
654
  return message;
1241
655
  },
1242
- fromJSON(object) {
1243
- return {
1244
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
1245
- value: isSet(object.value) ? TripDurationStat.fromJSON(object.value) : undefined,
1246
- };
1247
- },
1248
- toJSON(message) {
1249
- const obj = {};
1250
- if (message.key !== 0) {
1251
- obj.key = Math.round(message.key);
1252
- }
1253
- if (message.value !== undefined) {
1254
- obj.value = TripDurationStat.toJSON(message.value);
1255
- }
1256
- return obj;
1257
- },
1258
656
  create(base) {
1259
657
  return DriverBehaviorReportResponse_Chunk_SpeedsEntry.fromPartial(base ?? {});
1260
658
  },
@@ -1309,22 +707,6 @@ export const DriverBehaviorReportResponse_Chunk_GreenDrivingEntry = {
1309
707
  }
1310
708
  return message;
1311
709
  },
1312
- fromJSON(object) {
1313
- return {
1314
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
1315
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
1316
- };
1317
- },
1318
- toJSON(message) {
1319
- const obj = {};
1320
- if (message.key !== 0) {
1321
- obj.key = Math.round(message.key);
1322
- }
1323
- if (message.value !== 0) {
1324
- obj.value = Math.round(message.value);
1325
- }
1326
- return obj;
1327
- },
1328
710
  create(base) {
1329
711
  return DriverBehaviorReportResponse_Chunk_GreenDrivingEntry.fromPartial(base ?? {});
1330
712
  },
@@ -1377,22 +759,6 @@ export const DriverBehaviorReportResponse_Chunk_TemperatureEntry = {
1377
759
  }
1378
760
  return message;
1379
761
  },
1380
- fromJSON(object) {
1381
- return {
1382
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
1383
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
1384
- };
1385
- },
1386
- toJSON(message) {
1387
- const obj = {};
1388
- if (message.key !== 0) {
1389
- obj.key = Math.round(message.key);
1390
- }
1391
- if (message.value !== 0) {
1392
- obj.value = Math.round(message.value);
1393
- }
1394
- return obj;
1395
- },
1396
762
  create(base) {
1397
763
  return DriverBehaviorReportResponse_Chunk_TemperatureEntry.fromPartial(base ?? {});
1398
764
  },
@@ -1445,22 +811,6 @@ export const DriverBehaviorReportResponse_Chunk_HumidityEntry = {
1445
811
  }
1446
812
  return message;
1447
813
  },
1448
- fromJSON(object) {
1449
- return {
1450
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
1451
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
1452
- };
1453
- },
1454
- toJSON(message) {
1455
- const obj = {};
1456
- if (message.key !== 0) {
1457
- obj.key = Math.round(message.key);
1458
- }
1459
- if (message.value !== 0) {
1460
- obj.value = Math.round(message.value);
1461
- }
1462
- return obj;
1463
- },
1464
814
  create(base) {
1465
815
  return DriverBehaviorReportResponse_Chunk_HumidityEntry.fromPartial(base ?? {});
1466
816
  },
@@ -1552,36 +902,6 @@ export const DriverBehaviorReportRequest = {
1552
902
  }
1553
903
  return message;
1554
904
  },
1555
- fromJSON(object) {
1556
- return {
1557
- organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : Long.UZERO,
1558
- groupBy: isSet(object.group_by) ? driverBehaviorReportRequest_GroupByFromJSON(object.group_by) : 0,
1559
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
1560
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
1561
- deviceIds: globalThis.Array.isArray(object?.device_ids)
1562
- ? object.device_ids.map((e) => Long.fromValue(e))
1563
- : [],
1564
- };
1565
- },
1566
- toJSON(message) {
1567
- const obj = {};
1568
- if (!message.organizationId.equals(Long.UZERO)) {
1569
- obj.organization_id = (message.organizationId || Long.UZERO).toString();
1570
- }
1571
- if (message.groupBy !== 0) {
1572
- obj.group_by = driverBehaviorReportRequest_GroupByToJSON(message.groupBy);
1573
- }
1574
- if (message.startedAt !== undefined) {
1575
- obj.started_at = message.startedAt.toISOString();
1576
- }
1577
- if (message.finishedAt !== undefined) {
1578
- obj.finished_at = message.finishedAt.toISOString();
1579
- }
1580
- if (message.deviceIds?.length) {
1581
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
1582
- }
1583
- return obj;
1584
- },
1585
905
  create(base) {
1586
906
  return DriverBehaviorReportRequest.fromPartial(base ?? {});
1587
907
  },
@@ -1719,50 +1039,6 @@ export const WorkflowRequest = {
1719
1039
  }
1720
1040
  return message;
1721
1041
  },
1722
- fromJSON(object) {
1723
- return {
1724
- organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : undefined,
1725
- workflowId: isSet(object.workflow_id) ? Long.fromValue(object.workflow_id) : undefined,
1726
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : undefined,
1727
- status: isSet(object.status) ? workflowStatFromJSON(object.status) : undefined,
1728
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
1729
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
1730
- disablePagination: isSet(object.disable_pagination) ? globalThis.Boolean(object.disable_pagination) : false,
1731
- page: isSet(object.page) ? globalThis.Number(object.page) : undefined,
1732
- perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : undefined,
1733
- };
1734
- },
1735
- toJSON(message) {
1736
- const obj = {};
1737
- if (message.organizationId !== undefined) {
1738
- obj.organization_id = (message.organizationId || Long.UZERO).toString();
1739
- }
1740
- if (message.workflowId !== undefined) {
1741
- obj.workflow_id = (message.workflowId || Long.UZERO).toString();
1742
- }
1743
- if (message.deviceId !== undefined) {
1744
- obj.device_id = (message.deviceId || Long.UZERO).toString();
1745
- }
1746
- if (message.status !== undefined) {
1747
- obj.status = workflowStatToJSON(message.status);
1748
- }
1749
- if (message.startedAt !== undefined) {
1750
- obj.started_at = message.startedAt.toISOString();
1751
- }
1752
- if (message.finishedAt !== undefined) {
1753
- obj.finished_at = message.finishedAt.toISOString();
1754
- }
1755
- if (message.disablePagination !== false) {
1756
- obj.disable_pagination = message.disablePagination;
1757
- }
1758
- if (message.page !== undefined) {
1759
- obj.page = Math.round(message.page);
1760
- }
1761
- if (message.perPage !== undefined) {
1762
- obj.per_page = Math.round(message.perPage);
1763
- }
1764
- return obj;
1765
- },
1766
1042
  create(base) {
1767
1043
  return WorkflowRequest.fromPartial(base ?? {});
1768
1044
  },
@@ -1888,46 +1164,6 @@ export const WorkflowResponse = {
1888
1164
  }
1889
1165
  return message;
1890
1166
  },
1891
- fromJSON(object) {
1892
- return {
1893
- currentPage: isSet(object.current_page) ? globalThis.Number(object.current_page) : 0,
1894
- from: isSet(object.from) ? globalThis.Number(object.from) : 0,
1895
- to: isSet(object.to) ? globalThis.Number(object.to) : 0,
1896
- lastPage: isSet(object.last_page) ? globalThis.Number(object.last_page) : 0,
1897
- perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : 0,
1898
- cost: isSet(object.cost) ? Long.fromValue(object.cost) : Long.ZERO,
1899
- total: isSet(object.total) ? globalThis.Number(object.total) : 0,
1900
- data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => WorkflowTask.fromJSON(e)) : [],
1901
- };
1902
- },
1903
- toJSON(message) {
1904
- const obj = {};
1905
- if (message.currentPage !== 0) {
1906
- obj.current_page = Math.round(message.currentPage);
1907
- }
1908
- if (message.from !== 0) {
1909
- obj.from = Math.round(message.from);
1910
- }
1911
- if (message.to !== 0) {
1912
- obj.to = Math.round(message.to);
1913
- }
1914
- if (message.lastPage !== 0) {
1915
- obj.last_page = Math.round(message.lastPage);
1916
- }
1917
- if (message.perPage !== 0) {
1918
- obj.per_page = Math.round(message.perPage);
1919
- }
1920
- if (!message.cost.equals(Long.ZERO)) {
1921
- obj.cost = (message.cost || Long.ZERO).toString();
1922
- }
1923
- if (message.total !== 0) {
1924
- obj.total = Math.round(message.total);
1925
- }
1926
- if (message.data?.length) {
1927
- obj.data = message.data.map((e) => WorkflowTask.toJSON(e));
1928
- }
1929
- return obj;
1930
- },
1931
1167
  create(base) {
1932
1168
  return WorkflowResponse.fromPartial(base ?? {});
1933
1169
  },
@@ -2015,32 +1251,6 @@ export const ChartRequest = {
2015
1251
  }
2016
1252
  return message;
2017
1253
  },
2018
- fromJSON(object) {
2019
- return {
2020
- deviceIds: globalThis.Array.isArray(object?.device_ids)
2021
- ? object.device_ids.map((e) => Long.fromValue(e))
2022
- : [],
2023
- ios: globalThis.Array.isArray(object?.ios) ? object.ios.map((e) => globalThis.String(e)) : [],
2024
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
2025
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
2026
- };
2027
- },
2028
- toJSON(message) {
2029
- const obj = {};
2030
- if (message.deviceIds?.length) {
2031
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
2032
- }
2033
- if (message.ios?.length) {
2034
- obj.ios = message.ios;
2035
- }
2036
- if (message.startedAt !== undefined) {
2037
- obj.started_at = message.startedAt.toISOString();
2038
- }
2039
- if (message.finishedAt !== undefined) {
2040
- obj.finished_at = message.finishedAt.toISOString();
2041
- }
2042
- return obj;
2043
- },
2044
1254
  create(base) {
2045
1255
  return ChartRequest.fromPartial(base ?? {});
2046
1256
  },
@@ -2118,38 +1328,6 @@ export const ChartResponse = {
2118
1328
  }
2119
1329
  return message;
2120
1330
  },
2121
- fromJSON(object) {
2122
- return {
2123
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
2124
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
2125
- chart: isObject(object.chart)
2126
- ? Object.entries(object.chart).reduce((acc, [key, value]) => {
2127
- acc.set(Long.fromValue(key), ChartResponse_Chart.fromJSON(value));
2128
- return acc;
2129
- }, new Map())
2130
- : new Map(),
2131
- section: isSet(object.section) ? globalThis.Number(object.section) : 0,
2132
- };
2133
- },
2134
- toJSON(message) {
2135
- const obj = {};
2136
- if (message.cost !== 0) {
2137
- obj.cost = Math.round(message.cost);
2138
- }
2139
- if (message.records !== 0) {
2140
- obj.records = Math.round(message.records);
2141
- }
2142
- if (message.chart?.size) {
2143
- obj.chart = {};
2144
- message.chart.forEach((v, k) => {
2145
- obj.chart[longToNumber(k)] = ChartResponse_Chart.toJSON(v);
2146
- });
2147
- }
2148
- if (message.section !== 0) {
2149
- obj.section = Math.round(message.section);
2150
- }
2151
- return obj;
2152
- },
2153
1331
  create(base) {
2154
1332
  return ChartResponse.fromPartial(base ?? {});
2155
1333
  },
@@ -2202,18 +1380,6 @@ export const ChartResponse_Series = {
2202
1380
  }
2203
1381
  return message;
2204
1382
  },
2205
- fromJSON(object) {
2206
- return {
2207
- series: globalThis.Array.isArray(object?.series) ? object.series.map((e) => globalThis.String(e)) : [],
2208
- };
2209
- },
2210
- toJSON(message) {
2211
- const obj = {};
2212
- if (message.series?.length) {
2213
- obj.series = message.series;
2214
- }
2215
- return obj;
2216
- },
2217
1383
  create(base) {
2218
1384
  return ChartResponse_Series.fromPartial(base ?? {});
2219
1385
  },
@@ -2268,33 +1434,6 @@ export const ChartResponse_Chart = {
2268
1434
  }
2269
1435
  return message;
2270
1436
  },
2271
- fromJSON(object) {
2272
- return {
2273
- ios: isObject(object.ios)
2274
- ? Object.entries(object.ios).reduce((acc, [key, value]) => {
2275
- acc[key] = ChartResponse_Series.fromJSON(value);
2276
- return acc;
2277
- }, {})
2278
- : {},
2279
- datetime: globalThis.Array.isArray(object?.datetime) ? object.datetime.map((e) => fromJsonTimestamp(e)) : [],
2280
- };
2281
- },
2282
- toJSON(message) {
2283
- const obj = {};
2284
- if (message.ios) {
2285
- const entries = Object.entries(message.ios);
2286
- if (entries.length > 0) {
2287
- obj.ios = {};
2288
- entries.forEach(([k, v]) => {
2289
- obj.ios[k] = ChartResponse_Series.toJSON(v);
2290
- });
2291
- }
2292
- }
2293
- if (message.datetime?.length) {
2294
- obj.datetime = message.datetime.map((e) => e.toISOString());
2295
- }
2296
- return obj;
2297
- },
2298
1437
  create(base) {
2299
1438
  return ChartResponse_Chart.fromPartial(base ?? {});
2300
1439
  },
@@ -2352,22 +1491,6 @@ export const ChartResponse_Chart_IosEntry = {
2352
1491
  }
2353
1492
  return message;
2354
1493
  },
2355
- fromJSON(object) {
2356
- return {
2357
- key: isSet(object.key) ? globalThis.String(object.key) : "",
2358
- value: isSet(object.value) ? ChartResponse_Series.fromJSON(object.value) : undefined,
2359
- };
2360
- },
2361
- toJSON(message) {
2362
- const obj = {};
2363
- if (message.key !== "") {
2364
- obj.key = message.key;
2365
- }
2366
- if (message.value !== undefined) {
2367
- obj.value = ChartResponse_Series.toJSON(message.value);
2368
- }
2369
- return obj;
2370
- },
2371
1494
  create(base) {
2372
1495
  return ChartResponse_Chart_IosEntry.fromPartial(base ?? {});
2373
1496
  },
@@ -2422,22 +1545,6 @@ export const ChartResponse_ChartEntry = {
2422
1545
  }
2423
1546
  return message;
2424
1547
  },
2425
- fromJSON(object) {
2426
- return {
2427
- key: isSet(object.key) ? Long.fromValue(object.key) : Long.UZERO,
2428
- value: isSet(object.value) ? ChartResponse_Chart.fromJSON(object.value) : undefined,
2429
- };
2430
- },
2431
- toJSON(message) {
2432
- const obj = {};
2433
- if (!message.key.equals(Long.UZERO)) {
2434
- obj.key = (message.key || Long.UZERO).toString();
2435
- }
2436
- if (message.value !== undefined) {
2437
- obj.value = ChartResponse_Chart.toJSON(message.value);
2438
- }
2439
- return obj;
2440
- },
2441
1548
  create(base) {
2442
1549
  return ChartResponse_ChartEntry.fromPartial(base ?? {});
2443
1550
  },
@@ -2502,26 +1609,6 @@ export const CommandHistoryRequest = {
2502
1609
  }
2503
1610
  return message;
2504
1611
  },
2505
- fromJSON(object) {
2506
- return {
2507
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
2508
- limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
2509
- page: isSet(object.page) ? globalThis.Number(object.page) : 0,
2510
- };
2511
- },
2512
- toJSON(message) {
2513
- const obj = {};
2514
- if (!message.deviceId.equals(Long.UZERO)) {
2515
- obj.device_id = (message.deviceId || Long.UZERO).toString();
2516
- }
2517
- if (message.limit !== 0) {
2518
- obj.limit = Math.round(message.limit);
2519
- }
2520
- if (message.page !== 0) {
2521
- obj.page = Math.round(message.page);
2522
- }
2523
- return obj;
2524
- },
2525
1612
  create(base) {
2526
1613
  return CommandHistoryRequest.fromPartial(base ?? {});
2527
1614
  },
@@ -2597,30 +1684,6 @@ export const CommandHistoryResponse = {
2597
1684
  }
2598
1685
  return message;
2599
1686
  },
2600
- fromJSON(object) {
2601
- return {
2602
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
2603
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
2604
- page: isSet(object.page) ? globalThis.Number(object.page) : 0,
2605
- list: globalThis.Array.isArray(object?.list) ? object.list.map((e) => Command.fromJSON(e)) : [],
2606
- };
2607
- },
2608
- toJSON(message) {
2609
- const obj = {};
2610
- if (message.records !== 0) {
2611
- obj.records = Math.round(message.records);
2612
- }
2613
- if (message.cost !== 0) {
2614
- obj.cost = Math.round(message.cost);
2615
- }
2616
- if (message.page !== 0) {
2617
- obj.page = Math.round(message.page);
2618
- }
2619
- if (message.list?.length) {
2620
- obj.list = message.list.map((e) => Command.toJSON(e));
2621
- }
2622
- return obj;
2623
- },
2624
1687
  create(base) {
2625
1688
  return CommandHistoryResponse.fromPartial(base ?? {});
2626
1689
  },
@@ -2742,44 +1805,6 @@ export const WorkCycleRequest = {
2742
1805
  }
2743
1806
  return message;
2744
1807
  },
2745
- fromJSON(object) {
2746
- return {
2747
- deviceIds: globalThis.Array.isArray(object?.device_ids)
2748
- ? object.device_ids.map((e) => Long.fromValue(e))
2749
- : [],
2750
- orgId: isSet(object.org_id) ? Long.fromValue(object.org_id) : undefined,
2751
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
2752
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
2753
- shovelStopSeconds: isSet(object.shovel_stop_seconds) ? globalThis.Number(object.shovel_stop_seconds) : 0,
2754
- areaStopSeconds: isSet(object.area_stop_seconds) ? globalThis.Number(object.area_stop_seconds) : 0,
2755
- source: isSet(object.source) ? workCycleRequest_SourceFromJSON(object.source) : 0,
2756
- };
2757
- },
2758
- toJSON(message) {
2759
- const obj = {};
2760
- if (message.deviceIds?.length) {
2761
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
2762
- }
2763
- if (message.orgId !== undefined) {
2764
- obj.org_id = (message.orgId || Long.UZERO).toString();
2765
- }
2766
- if (message.startedAt !== undefined) {
2767
- obj.started_at = message.startedAt.toISOString();
2768
- }
2769
- if (message.finishedAt !== undefined) {
2770
- obj.finished_at = message.finishedAt.toISOString();
2771
- }
2772
- if (message.shovelStopSeconds !== 0) {
2773
- obj.shovel_stop_seconds = message.shovelStopSeconds;
2774
- }
2775
- if (message.areaStopSeconds !== 0) {
2776
- obj.area_stop_seconds = message.areaStopSeconds;
2777
- }
2778
- if (message.source !== 0) {
2779
- obj.source = workCycleRequest_SourceToJSON(message.source);
2780
- }
2781
- return obj;
2782
- },
2783
1808
  create(base) {
2784
1809
  return WorkCycleRequest.fromPartial(base ?? {});
2785
1810
  },
@@ -2857,32 +1882,6 @@ export const WorkCycleResponse = {
2857
1882
  }
2858
1883
  return message;
2859
1884
  },
2860
- fromJSON(object) {
2861
- return {
2862
- workCycles: globalThis.Array.isArray(object?.work_cycles)
2863
- ? object.work_cycles.map((e) => WorkCycle.fromJSON(e))
2864
- : [],
2865
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
2866
- threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
2867
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
2868
- };
2869
- },
2870
- toJSON(message) {
2871
- const obj = {};
2872
- if (message.workCycles?.length) {
2873
- obj.work_cycles = message.workCycles.map((e) => WorkCycle.toJSON(e));
2874
- }
2875
- if (message.cost !== 0) {
2876
- obj.cost = Math.round(message.cost);
2877
- }
2878
- if (message.threads !== 0) {
2879
- obj.threads = Math.round(message.threads);
2880
- }
2881
- if (message.records !== 0) {
2882
- obj.records = Math.round(message.records);
2883
- }
2884
- return obj;
2885
- },
2886
1885
  create(base) {
2887
1886
  return WorkCycleResponse.fromPartial(base ?? {});
2888
1887
  },
@@ -2956,26 +1955,6 @@ export const TripReportRequest = {
2956
1955
  }
2957
1956
  return message;
2958
1957
  },
2959
- fromJSON(object) {
2960
- return {
2961
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
2962
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
2963
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
2964
- };
2965
- },
2966
- toJSON(message) {
2967
- const obj = {};
2968
- if (message.deviceIds?.length) {
2969
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
2970
- }
2971
- if (message.startedAt !== undefined) {
2972
- obj.startedAt = message.startedAt.toISOString();
2973
- }
2974
- if (message.finishedAt !== undefined) {
2975
- obj.finishedAt = message.finishedAt.toISOString();
2976
- }
2977
- return obj;
2978
- },
2979
1958
  create(base) {
2980
1959
  return TripReportRequest.fromPartial(base ?? {});
2981
1960
  },
@@ -3067,32 +2046,6 @@ export const AreaSplitterRequest = {
3067
2046
  }
3068
2047
  return message;
3069
2048
  },
3070
- fromJSON(object) {
3071
- return {
3072
- deviceIds: globalThis.Array.isArray(object?.device_ids)
3073
- ? object.device_ids.map((e) => Long.fromValue(e))
3074
- : [],
3075
- areaIds: globalThis.Array.isArray(object?.area_ids) ? object.area_ids.map((e) => Long.fromValue(e)) : [],
3076
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
3077
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
3078
- };
3079
- },
3080
- toJSON(message) {
3081
- const obj = {};
3082
- if (message.deviceIds?.length) {
3083
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
3084
- }
3085
- if (message.areaIds?.length) {
3086
- obj.area_ids = message.areaIds.map((e) => (e || Long.UZERO).toString());
3087
- }
3088
- if (message.startedAt !== undefined) {
3089
- obj.started_at = message.startedAt.toISOString();
3090
- }
3091
- if (message.finishedAt !== undefined) {
3092
- obj.finished_at = message.finishedAt.toISOString();
3093
- }
3094
- return obj;
3095
- },
3096
2049
  create(base) {
3097
2050
  return AreaSplitterRequest.fromPartial(base ?? {});
3098
2051
  },
@@ -3157,28 +2110,6 @@ export const AreaSplitterResponse = {
3157
2110
  }
3158
2111
  return message;
3159
2112
  },
3160
- fromJSON(object) {
3161
- return {
3162
- reports: globalThis.Array.isArray(object?.reports)
3163
- ? object.reports.map((e) => AreaSplitterResponse_Record.fromJSON(e))
3164
- : [],
3165
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
3166
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
3167
- };
3168
- },
3169
- toJSON(message) {
3170
- const obj = {};
3171
- if (message.reports?.length) {
3172
- obj.reports = message.reports.map((e) => AreaSplitterResponse_Record.toJSON(e));
3173
- }
3174
- if (message.startedAt !== undefined) {
3175
- obj.started_at = message.startedAt.toISOString();
3176
- }
3177
- if (message.finishedAt !== undefined) {
3178
- obj.finished_at = message.finishedAt.toISOString();
3179
- }
3180
- return obj;
3181
- },
3182
2113
  create(base) {
3183
2114
  return AreaSplitterResponse.fromPartial(base ?? {});
3184
2115
  },
@@ -3232,22 +2163,6 @@ export const AreaSplitterResponse_Area = {
3232
2163
  }
3233
2164
  return message;
3234
2165
  },
3235
- fromJSON(object) {
3236
- return {
3237
- id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
3238
- name: isSet(object.name) ? globalThis.String(object.name) : undefined,
3239
- };
3240
- },
3241
- toJSON(message) {
3242
- const obj = {};
3243
- if (!message.id.equals(Long.UZERO)) {
3244
- obj.id = (message.id || Long.UZERO).toString();
3245
- }
3246
- if (message.name !== undefined) {
3247
- obj.name = message.name;
3248
- }
3249
- return obj;
3250
- },
3251
2166
  create(base) {
3252
2167
  return AreaSplitterResponse_Area.fromPartial(base ?? {});
3253
2168
  },
@@ -3402,58 +2317,6 @@ export const AreaSplitterResponse_Record = {
3402
2317
  }
3403
2318
  return message;
3404
2319
  },
3405
- fromJSON(object) {
3406
- return {
3407
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
3408
- start: isSet(object.start) ? AreaSplitterResponse_Area.fromJSON(object.start) : undefined,
3409
- finish: isSet(object.finish) ? AreaSplitterResponse_Area.fromJSON(object.finish) : undefined,
3410
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
3411
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
3412
- durationOrigin: isSet(object.duration_origin) ? globalThis.Number(object.duration_origin) : 0,
3413
- durationTrip: isSet(object.duration_trip) ? globalThis.Number(object.duration_trip) : 0,
3414
- durationDestination: isSet(object.duration_destination) ? globalThis.Number(object.duration_destination) : 0,
3415
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : undefined,
3416
- speedMax: isSet(object.speed_max) ? globalThis.Number(object.speed_max) : 0,
3417
- speedAvg: isSet(object.speed_avg) ? globalThis.Number(object.speed_avg) : 0,
3418
- };
3419
- },
3420
- toJSON(message) {
3421
- const obj = {};
3422
- if (!message.deviceId.equals(Long.UZERO)) {
3423
- obj.device_id = (message.deviceId || Long.UZERO).toString();
3424
- }
3425
- if (message.start !== undefined) {
3426
- obj.start = AreaSplitterResponse_Area.toJSON(message.start);
3427
- }
3428
- if (message.finish !== undefined) {
3429
- obj.finish = AreaSplitterResponse_Area.toJSON(message.finish);
3430
- }
3431
- if (message.startedAt !== undefined) {
3432
- obj.started_at = message.startedAt.toISOString();
3433
- }
3434
- if (message.finishedAt !== undefined) {
3435
- obj.finished_at = message.finishedAt.toISOString();
3436
- }
3437
- if (message.durationOrigin !== 0) {
3438
- obj.duration_origin = Math.round(message.durationOrigin);
3439
- }
3440
- if (message.durationTrip !== 0) {
3441
- obj.duration_trip = Math.round(message.durationTrip);
3442
- }
3443
- if (message.durationDestination !== 0) {
3444
- obj.duration_destination = Math.round(message.durationDestination);
3445
- }
3446
- if (message.mileage !== undefined) {
3447
- obj.mileage = Math.round(message.mileage);
3448
- }
3449
- if (message.speedMax !== 0) {
3450
- obj.speed_max = Math.round(message.speedMax);
3451
- }
3452
- if (message.speedAvg !== 0) {
3453
- obj.speed_avg = Math.round(message.speedAvg);
3454
- }
3455
- return obj;
3456
- },
3457
2320
  create(base) {
3458
2321
  return AreaSplitterResponse_Record.fromPartial(base ?? {});
3459
2322
  },
@@ -3588,44 +2451,6 @@ export const TripPerformanceRequest = {
3588
2451
  }
3589
2452
  return message;
3590
2453
  },
3591
- fromJSON(object) {
3592
- return {
3593
- deviceId: globalThis.Array.isArray(object?.device_id) ? object.device_id.map((e) => Long.fromValue(e)) : [],
3594
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
3595
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
3596
- groupByDevice: isSet(object.group_by_device) ? globalThis.Boolean(object.group_by_device) : false,
3597
- groupByDatetime: isSet(object.group_by_datetime)
3598
- ? tripPerformanceRequest_GroupByFromJSON(object.group_by_datetime)
3599
- : 0,
3600
- hourly: isSet(object.hourly) ? globalThis.Boolean(object.hourly) : false,
3601
- orgId: isSet(object.org_id) ? Long.fromValue(object.org_id) : undefined,
3602
- };
3603
- },
3604
- toJSON(message) {
3605
- const obj = {};
3606
- if (message.deviceId?.length) {
3607
- obj.device_id = message.deviceId.map((e) => (e || Long.UZERO).toString());
3608
- }
3609
- if (message.startedAt !== undefined) {
3610
- obj.started_at = message.startedAt.toISOString();
3611
- }
3612
- if (message.finishedAt !== undefined) {
3613
- obj.finished_at = message.finishedAt.toISOString();
3614
- }
3615
- if (message.groupByDevice !== false) {
3616
- obj.group_by_device = message.groupByDevice;
3617
- }
3618
- if (message.groupByDatetime !== 0) {
3619
- obj.group_by_datetime = tripPerformanceRequest_GroupByToJSON(message.groupByDatetime);
3620
- }
3621
- if (message.hourly !== false) {
3622
- obj.hourly = message.hourly;
3623
- }
3624
- if (message.orgId !== undefined) {
3625
- obj.org_id = (message.orgId || Long.UZERO).toString();
3626
- }
3627
- return obj;
3628
- },
3629
2454
  create(base) {
3630
2455
  return TripPerformanceRequest.fromPartial(base ?? {});
3631
2456
  },
@@ -3703,30 +2528,6 @@ export const TripPerformanceResponse = {
3703
2528
  }
3704
2529
  return message;
3705
2530
  },
3706
- fromJSON(object) {
3707
- return {
3708
- data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => TripPerformance.fromJSON(e)) : [],
3709
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
3710
- threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
3711
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
3712
- };
3713
- },
3714
- toJSON(message) {
3715
- const obj = {};
3716
- if (message.data?.length) {
3717
- obj.data = message.data.map((e) => TripPerformance.toJSON(e));
3718
- }
3719
- if (message.cost !== 0) {
3720
- obj.cost = Math.round(message.cost);
3721
- }
3722
- if (message.threads !== 0) {
3723
- obj.threads = Math.round(message.threads);
3724
- }
3725
- if (message.records !== 0) {
3726
- obj.records = Math.round(message.records);
3727
- }
3728
- return obj;
3729
- },
3730
2531
  create(base) {
3731
2532
  return TripPerformanceResponse.fromPartial(base ?? {});
3732
2533
  },
@@ -4105,187 +2906,6 @@ export const TripPerformance = {
4105
2906
  }
4106
2907
  return message;
4107
2908
  },
4108
- fromJSON(object) {
4109
- return {
4110
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
4111
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
4112
- idling: isSet(object.idling) ? globalThis.Number(object.idling) : 0,
4113
- parking: isSet(object.parking) ? globalThis.Number(object.parking) : 0,
4114
- moving: isSet(object.moving) ? globalThis.Number(object.moving) : 0,
4115
- towing: isSet(object.towing) ? globalThis.Number(object.towing) : 0,
4116
- totalSpeed: isSet(object.total_speed) ? globalThis.Number(object.total_speed) : 0,
4117
- sumSpeed: isSet(object.sum_speed) ? globalThis.Number(object.sum_speed) : 0,
4118
- maxSpeed: isSet(object.max_speed) ? globalThis.Number(object.max_speed) : 0,
4119
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
4120
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
4121
- driving: isObject(object.driving)
4122
- ? Object.entries(object.driving).reduce((acc, [key, value]) => {
4123
- acc[key] = Number(value);
4124
- return acc;
4125
- }, {})
4126
- : {},
4127
- temperature: isObject(object.temperature)
4128
- ? Object.entries(object.temperature).reduce((acc, [key, value]) => {
4129
- acc[key] = Number(value);
4130
- return acc;
4131
- }, {})
4132
- : {},
4133
- humidity: isObject(object.humidity)
4134
- ? Object.entries(object.humidity).reduce((acc, [key, value]) => {
4135
- acc[key] = Number(value);
4136
- return acc;
4137
- }, {})
4138
- : {},
4139
- iButton: globalThis.Array.isArray(object?.i_button) ? object.i_button.map((e) => Long.fromValue(e)) : [],
4140
- ignition: isSet(object.ignition) ? globalThis.Number(object.ignition) : 0,
4141
- doorOpened: isSet(object.door_opened) ? globalThis.Number(object.door_opened) : undefined,
4142
- fuelUsed: isSet(object.fuel_used) ? globalThis.Number(object.fuel_used) : undefined,
4143
- fuelRate: isSet(object.fuel_rate) ? globalThis.Number(object.fuel_rate) : undefined,
4144
- engineRpm: isSet(object.engine_rpm) ? globalThis.Number(object.engine_rpm) : undefined,
4145
- engineLoad: isSet(object.engine_load) ? globalThis.Number(object.engine_load) : undefined,
4146
- crashes: isObject(object.crashes)
4147
- ? Object.entries(object.crashes).reduce((acc, [key, value]) => {
4148
- acc[key] = Number(value);
4149
- return acc;
4150
- }, {})
4151
- : {},
4152
- speeds: isObject(object.speeds)
4153
- ? Object.entries(object.speeds).reduce((acc, [key, value]) => {
4154
- acc[globalThis.Number(key)] = TripDurationStat.fromJSON(value);
4155
- return acc;
4156
- }, {})
4157
- : {},
4158
- points: isSet(object.points) ? globalThis.Number(object.points) : 0,
4159
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
4160
- average: globalThis.Array.isArray(object?.average)
4161
- ? object.average.map((e) => TripPerformance_Average.fromJSON(e))
4162
- : [],
4163
- deviceName: isSet(object.device_name) ? globalThis.String(object.device_name) : undefined,
4164
- driverName: isSet(object.driver_name) ? globalThis.String(object.driver_name) : undefined,
4165
- organizationName: isSet(object.organization_name) ? globalThis.String(object.organization_name) : undefined,
4166
- };
4167
- },
4168
- toJSON(message) {
4169
- const obj = {};
4170
- if (!message.deviceId.equals(Long.UZERO)) {
4171
- obj.device_id = (message.deviceId || Long.UZERO).toString();
4172
- }
4173
- if (message.mileage !== 0) {
4174
- obj.mileage = Math.round(message.mileage);
4175
- }
4176
- if (message.idling !== 0) {
4177
- obj.idling = Math.round(message.idling);
4178
- }
4179
- if (message.parking !== 0) {
4180
- obj.parking = Math.round(message.parking);
4181
- }
4182
- if (message.moving !== 0) {
4183
- obj.moving = Math.round(message.moving);
4184
- }
4185
- if (message.towing !== 0) {
4186
- obj.towing = Math.round(message.towing);
4187
- }
4188
- if (message.totalSpeed !== 0) {
4189
- obj.total_speed = Math.round(message.totalSpeed);
4190
- }
4191
- if (message.sumSpeed !== 0) {
4192
- obj.sum_speed = Math.round(message.sumSpeed);
4193
- }
4194
- if (message.maxSpeed !== 0) {
4195
- obj.max_speed = Math.round(message.maxSpeed);
4196
- }
4197
- if (message.startedAt !== undefined) {
4198
- obj.started_at = message.startedAt.toISOString();
4199
- }
4200
- if (message.finishedAt !== undefined) {
4201
- obj.finished_at = message.finishedAt.toISOString();
4202
- }
4203
- if (message.driving) {
4204
- const entries = Object.entries(message.driving);
4205
- if (entries.length > 0) {
4206
- obj.driving = {};
4207
- entries.forEach(([k, v]) => {
4208
- obj.driving[k] = Math.round(v);
4209
- });
4210
- }
4211
- }
4212
- if (message.temperature) {
4213
- const entries = Object.entries(message.temperature);
4214
- if (entries.length > 0) {
4215
- obj.temperature = {};
4216
- entries.forEach(([k, v]) => {
4217
- obj.temperature[k] = Math.round(v);
4218
- });
4219
- }
4220
- }
4221
- if (message.humidity) {
4222
- const entries = Object.entries(message.humidity);
4223
- if (entries.length > 0) {
4224
- obj.humidity = {};
4225
- entries.forEach(([k, v]) => {
4226
- obj.humidity[k] = Math.round(v);
4227
- });
4228
- }
4229
- }
4230
- if (message.iButton?.length) {
4231
- obj.i_button = message.iButton.map((e) => (e || Long.UZERO).toString());
4232
- }
4233
- if (message.ignition !== 0) {
4234
- obj.ignition = Math.round(message.ignition);
4235
- }
4236
- if (message.doorOpened !== undefined) {
4237
- obj.door_opened = Math.round(message.doorOpened);
4238
- }
4239
- if (message.fuelUsed !== undefined) {
4240
- obj.fuel_used = Math.round(message.fuelUsed);
4241
- }
4242
- if (message.fuelRate !== undefined) {
4243
- obj.fuel_rate = Math.round(message.fuelRate);
4244
- }
4245
- if (message.engineRpm !== undefined) {
4246
- obj.engine_rpm = Math.round(message.engineRpm);
4247
- }
4248
- if (message.engineLoad !== undefined) {
4249
- obj.engine_load = Math.round(message.engineLoad);
4250
- }
4251
- if (message.crashes) {
4252
- const entries = Object.entries(message.crashes);
4253
- if (entries.length > 0) {
4254
- obj.crashes = {};
4255
- entries.forEach(([k, v]) => {
4256
- obj.crashes[k] = Math.round(v);
4257
- });
4258
- }
4259
- }
4260
- if (message.speeds) {
4261
- const entries = Object.entries(message.speeds);
4262
- if (entries.length > 0) {
4263
- obj.speeds = {};
4264
- entries.forEach(([k, v]) => {
4265
- obj.speeds[k] = TripDurationStat.toJSON(v);
4266
- });
4267
- }
4268
- }
4269
- if (message.points !== 0) {
4270
- obj.points = Math.round(message.points);
4271
- }
4272
- if (message.records !== 0) {
4273
- obj.records = Math.round(message.records);
4274
- }
4275
- if (message.average?.length) {
4276
- obj.average = message.average.map((e) => TripPerformance_Average.toJSON(e));
4277
- }
4278
- if (message.deviceName !== undefined) {
4279
- obj.device_name = message.deviceName;
4280
- }
4281
- if (message.driverName !== undefined) {
4282
- obj.driver_name = message.driverName;
4283
- }
4284
- if (message.organizationName !== undefined) {
4285
- obj.organization_name = message.organizationName;
4286
- }
4287
- return obj;
4288
- },
4289
2909
  create(base) {
4290
2910
  return TripPerformance.fromPartial(base ?? {});
4291
2911
  },
@@ -4422,34 +3042,6 @@ export const TripPerformance_Average = {
4422
3042
  }
4423
3043
  return message;
4424
3044
  },
4425
- fromJSON(object) {
4426
- return {
4427
- name: isSet(object.name) ? globalThis.String(object.name) : "",
4428
- uintValue: isSet(object.uint_value) ? globalThis.Number(object.uint_value) : 0,
4429
- intValue: isSet(object.int_value) ? globalThis.Number(object.int_value) : 0,
4430
- seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO,
4431
- kind: isSet(object.kind) ? globalThis.Number(object.kind) : 0,
4432
- };
4433
- },
4434
- toJSON(message) {
4435
- const obj = {};
4436
- if (message.name !== "") {
4437
- obj.name = message.name;
4438
- }
4439
- if (message.uintValue !== 0) {
4440
- obj.uint_value = Math.round(message.uintValue);
4441
- }
4442
- if (message.intValue !== 0) {
4443
- obj.int_value = Math.round(message.intValue);
4444
- }
4445
- if (!message.seconds.equals(Long.ZERO)) {
4446
- obj.seconds = (message.seconds || Long.ZERO).toString();
4447
- }
4448
- if (message.kind !== 0) {
4449
- obj.kind = Math.round(message.kind);
4450
- }
4451
- return obj;
4452
- },
4453
3045
  create(base) {
4454
3046
  return TripPerformance_Average.fromPartial(base ?? {});
4455
3047
  },
@@ -4507,22 +3099,6 @@ export const TripPerformance_DrivingEntry = {
4507
3099
  }
4508
3100
  return message;
4509
3101
  },
4510
- fromJSON(object) {
4511
- return {
4512
- key: isSet(object.key) ? globalThis.String(object.key) : "",
4513
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
4514
- };
4515
- },
4516
- toJSON(message) {
4517
- const obj = {};
4518
- if (message.key !== "") {
4519
- obj.key = message.key;
4520
- }
4521
- if (message.value !== 0) {
4522
- obj.value = Math.round(message.value);
4523
- }
4524
- return obj;
4525
- },
4526
3102
  create(base) {
4527
3103
  return TripPerformance_DrivingEntry.fromPartial(base ?? {});
4528
3104
  },
@@ -4575,22 +3151,6 @@ export const TripPerformance_TemperatureEntry = {
4575
3151
  }
4576
3152
  return message;
4577
3153
  },
4578
- fromJSON(object) {
4579
- return {
4580
- key: isSet(object.key) ? globalThis.String(object.key) : "",
4581
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
4582
- };
4583
- },
4584
- toJSON(message) {
4585
- const obj = {};
4586
- if (message.key !== "") {
4587
- obj.key = message.key;
4588
- }
4589
- if (message.value !== 0) {
4590
- obj.value = Math.round(message.value);
4591
- }
4592
- return obj;
4593
- },
4594
3154
  create(base) {
4595
3155
  return TripPerformance_TemperatureEntry.fromPartial(base ?? {});
4596
3156
  },
@@ -4643,22 +3203,6 @@ export const TripPerformance_HumidityEntry = {
4643
3203
  }
4644
3204
  return message;
4645
3205
  },
4646
- fromJSON(object) {
4647
- return {
4648
- key: isSet(object.key) ? globalThis.String(object.key) : "",
4649
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
4650
- };
4651
- },
4652
- toJSON(message) {
4653
- const obj = {};
4654
- if (message.key !== "") {
4655
- obj.key = message.key;
4656
- }
4657
- if (message.value !== 0) {
4658
- obj.value = Math.round(message.value);
4659
- }
4660
- return obj;
4661
- },
4662
3206
  create(base) {
4663
3207
  return TripPerformance_HumidityEntry.fromPartial(base ?? {});
4664
3208
  },
@@ -4711,22 +3255,6 @@ export const TripPerformance_CrashesEntry = {
4711
3255
  }
4712
3256
  return message;
4713
3257
  },
4714
- fromJSON(object) {
4715
- return {
4716
- key: isSet(object.key) ? globalThis.String(object.key) : "",
4717
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
4718
- };
4719
- },
4720
- toJSON(message) {
4721
- const obj = {};
4722
- if (message.key !== "") {
4723
- obj.key = message.key;
4724
- }
4725
- if (message.value !== 0) {
4726
- obj.value = Math.round(message.value);
4727
- }
4728
- return obj;
4729
- },
4730
3258
  create(base) {
4731
3259
  return TripPerformance_CrashesEntry.fromPartial(base ?? {});
4732
3260
  },
@@ -4779,22 +3307,6 @@ export const TripPerformance_SpeedsEntry = {
4779
3307
  }
4780
3308
  return message;
4781
3309
  },
4782
- fromJSON(object) {
4783
- return {
4784
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
4785
- value: isSet(object.value) ? TripDurationStat.fromJSON(object.value) : undefined,
4786
- };
4787
- },
4788
- toJSON(message) {
4789
- const obj = {};
4790
- if (message.key !== 0) {
4791
- obj.key = Math.round(message.key);
4792
- }
4793
- if (message.value !== undefined) {
4794
- obj.value = TripDurationStat.toJSON(message.value);
4795
- }
4796
- return obj;
4797
- },
4798
3310
  create(base) {
4799
3311
  return TripPerformance_SpeedsEntry.fromPartial(base ?? {});
4800
3312
  },
@@ -5187,128 +3699,6 @@ export const DashboardIndividualResponse = {
5187
3699
  }
5188
3700
  return message;
5189
3701
  },
5190
- fromJSON(object) {
5191
- return {
5192
- dataList: globalThis.Array.isArray(object?.dataList) ? object.dataList.map((e) => Data.fromJSON(e)) : [],
5193
- title: globalThis.Array.isArray(object?.title) ? object.title.map((e) => globalThis.String(e)) : [],
5194
- mileage: globalThis.Array.isArray(object?.mileage) ? object.mileage.map((e) => globalThis.Number(e)) : [],
5195
- weight: globalThis.Array.isArray(object?.weight) ? object.weight.map((e) => globalThis.Number(e)) : [],
5196
- fuelUsed: globalThis.Array.isArray(object?.fuelUsed) ? object.fuelUsed.map((e) => globalThis.Number(e)) : [],
5197
- fuelRate: globalThis.Array.isArray(object?.fuelRate) ? object.fuelRate.map((e) => globalThis.Number(e)) : [],
5198
- trips: globalThis.Array.isArray(object?.trips) ? object.trips.map((e) => globalThis.Number(e)) : [],
5199
- idling: globalThis.Array.isArray(object?.idling) ? object.idling.map((e) => globalThis.Number(e)) : [],
5200
- parking: globalThis.Array.isArray(object?.parking) ? object.parking.map((e) => globalThis.Number(e)) : [],
5201
- moving: globalThis.Array.isArray(object?.moving) ? object.moving.map((e) => globalThis.Number(e)) : [],
5202
- towing: globalThis.Array.isArray(object?.towing) ? object.towing.map((e) => globalThis.Number(e)) : [],
5203
- totalSpeed: globalThis.Array.isArray(object?.totalSpeed)
5204
- ? object.totalSpeed.map((e) => globalThis.Number(e))
5205
- : [],
5206
- sumSpeed: globalThis.Array.isArray(object?.sumSpeed) ? object.sumSpeed.map((e) => globalThis.Number(e)) : [],
5207
- maxSpeed: globalThis.Array.isArray(object?.maxSpeed) ? object.maxSpeed.map((e) => globalThis.Number(e)) : [],
5208
- points: globalThis.Array.isArray(object?.points) ? object.points.map((e) => TripPoint.fromJSON(e)) : [],
5209
- environmental: globalThis.Array.isArray(object?.environmental)
5210
- ? object.environmental.map((e) => DashboardIndividualResponse_Environmental.fromJSON(e))
5211
- : [],
5212
- greenDriving: isObject(object.greenDriving)
5213
- ? Object.entries(object.greenDriving).reduce((acc, [key, value]) => {
5214
- acc[globalThis.Number(key)] = Number(value);
5215
- return acc;
5216
- }, {})
5217
- : {},
5218
- speeds: isObject(object.speeds)
5219
- ? Object.entries(object.speeds).reduce((acc, [key, value]) => {
5220
- acc[globalThis.Number(key)] = TripDurationStat.fromJSON(value);
5221
- return acc;
5222
- }, {})
5223
- : {},
5224
- crashes: isSet(object.crashes) ? globalThis.Number(object.crashes) : 0,
5225
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
5226
- threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
5227
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
5228
- };
5229
- },
5230
- toJSON(message) {
5231
- const obj = {};
5232
- if (message.dataList?.length) {
5233
- obj.dataList = message.dataList.map((e) => Data.toJSON(e));
5234
- }
5235
- if (message.title?.length) {
5236
- obj.title = message.title;
5237
- }
5238
- if (message.mileage?.length) {
5239
- obj.mileage = message.mileage.map((e) => Math.round(e));
5240
- }
5241
- if (message.weight?.length) {
5242
- obj.weight = message.weight.map((e) => Math.round(e));
5243
- }
5244
- if (message.fuelUsed?.length) {
5245
- obj.fuelUsed = message.fuelUsed.map((e) => Math.round(e));
5246
- }
5247
- if (message.fuelRate?.length) {
5248
- obj.fuelRate = message.fuelRate.map((e) => Math.round(e));
5249
- }
5250
- if (message.trips?.length) {
5251
- obj.trips = message.trips.map((e) => Math.round(e));
5252
- }
5253
- if (message.idling?.length) {
5254
- obj.idling = message.idling.map((e) => Math.round(e));
5255
- }
5256
- if (message.parking?.length) {
5257
- obj.parking = message.parking.map((e) => Math.round(e));
5258
- }
5259
- if (message.moving?.length) {
5260
- obj.moving = message.moving.map((e) => Math.round(e));
5261
- }
5262
- if (message.towing?.length) {
5263
- obj.towing = message.towing.map((e) => Math.round(e));
5264
- }
5265
- if (message.totalSpeed?.length) {
5266
- obj.totalSpeed = message.totalSpeed.map((e) => Math.round(e));
5267
- }
5268
- if (message.sumSpeed?.length) {
5269
- obj.sumSpeed = message.sumSpeed.map((e) => Math.round(e));
5270
- }
5271
- if (message.maxSpeed?.length) {
5272
- obj.maxSpeed = message.maxSpeed.map((e) => Math.round(e));
5273
- }
5274
- if (message.points?.length) {
5275
- obj.points = message.points.map((e) => TripPoint.toJSON(e));
5276
- }
5277
- if (message.environmental?.length) {
5278
- obj.environmental = message.environmental.map((e) => DashboardIndividualResponse_Environmental.toJSON(e));
5279
- }
5280
- if (message.greenDriving) {
5281
- const entries = Object.entries(message.greenDriving);
5282
- if (entries.length > 0) {
5283
- obj.greenDriving = {};
5284
- entries.forEach(([k, v]) => {
5285
- obj.greenDriving[k] = Math.round(v);
5286
- });
5287
- }
5288
- }
5289
- if (message.speeds) {
5290
- const entries = Object.entries(message.speeds);
5291
- if (entries.length > 0) {
5292
- obj.speeds = {};
5293
- entries.forEach(([k, v]) => {
5294
- obj.speeds[k] = TripDurationStat.toJSON(v);
5295
- });
5296
- }
5297
- }
5298
- if (message.crashes !== 0) {
5299
- obj.crashes = Math.round(message.crashes);
5300
- }
5301
- if (message.cost !== 0) {
5302
- obj.cost = Math.round(message.cost);
5303
- }
5304
- if (message.threads !== 0) {
5305
- obj.threads = Math.round(message.threads);
5306
- }
5307
- if (message.records !== 0) {
5308
- obj.records = Math.round(message.records);
5309
- }
5310
- return obj;
5311
- },
5312
3702
  create(base) {
5313
3703
  return DashboardIndividualResponse.fromPartial(base ?? {});
5314
3704
  },
@@ -5398,44 +3788,6 @@ export const DashboardIndividualResponse_Environmental = {
5398
3788
  }
5399
3789
  return message;
5400
3790
  },
5401
- fromJSON(object) {
5402
- return {
5403
- temperature: isObject(object.temperature)
5404
- ? Object.entries(object.temperature).reduce((acc, [key, value]) => {
5405
- acc[globalThis.Number(key)] = Number(value);
5406
- return acc;
5407
- }, {})
5408
- : {},
5409
- humidity: isObject(object.humidity)
5410
- ? Object.entries(object.humidity).reduce((acc, [key, value]) => {
5411
- acc[globalThis.Number(key)] = Number(value);
5412
- return acc;
5413
- }, {})
5414
- : {},
5415
- };
5416
- },
5417
- toJSON(message) {
5418
- const obj = {};
5419
- if (message.temperature) {
5420
- const entries = Object.entries(message.temperature);
5421
- if (entries.length > 0) {
5422
- obj.temperature = {};
5423
- entries.forEach(([k, v]) => {
5424
- obj.temperature[k] = Math.round(v);
5425
- });
5426
- }
5427
- }
5428
- if (message.humidity) {
5429
- const entries = Object.entries(message.humidity);
5430
- if (entries.length > 0) {
5431
- obj.humidity = {};
5432
- entries.forEach(([k, v]) => {
5433
- obj.humidity[k] = Math.round(v);
5434
- });
5435
- }
5436
- }
5437
- return obj;
5438
- },
5439
3791
  create(base) {
5440
3792
  return DashboardIndividualResponse_Environmental.fromPartial(base ?? {});
5441
3793
  },
@@ -5498,22 +3850,6 @@ export const DashboardIndividualResponse_Environmental_TemperatureEntry = {
5498
3850
  }
5499
3851
  return message;
5500
3852
  },
5501
- fromJSON(object) {
5502
- return {
5503
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
5504
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
5505
- };
5506
- },
5507
- toJSON(message) {
5508
- const obj = {};
5509
- if (message.key !== 0) {
5510
- obj.key = Math.round(message.key);
5511
- }
5512
- if (message.value !== 0) {
5513
- obj.value = Math.round(message.value);
5514
- }
5515
- return obj;
5516
- },
5517
3853
  create(base) {
5518
3854
  return DashboardIndividualResponse_Environmental_TemperatureEntry.fromPartial(base ?? {});
5519
3855
  },
@@ -5566,22 +3902,6 @@ export const DashboardIndividualResponse_Environmental_HumidityEntry = {
5566
3902
  }
5567
3903
  return message;
5568
3904
  },
5569
- fromJSON(object) {
5570
- return {
5571
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
5572
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
5573
- };
5574
- },
5575
- toJSON(message) {
5576
- const obj = {};
5577
- if (message.key !== 0) {
5578
- obj.key = Math.round(message.key);
5579
- }
5580
- if (message.value !== 0) {
5581
- obj.value = Math.round(message.value);
5582
- }
5583
- return obj;
5584
- },
5585
3905
  create(base) {
5586
3906
  return DashboardIndividualResponse_Environmental_HumidityEntry.fromPartial(base ?? {});
5587
3907
  },
@@ -5634,22 +3954,6 @@ export const DashboardIndividualResponse_GreenDrivingEntry = {
5634
3954
  }
5635
3955
  return message;
5636
3956
  },
5637
- fromJSON(object) {
5638
- return {
5639
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
5640
- value: isSet(object.value) ? globalThis.Number(object.value) : 0,
5641
- };
5642
- },
5643
- toJSON(message) {
5644
- const obj = {};
5645
- if (message.key !== 0) {
5646
- obj.key = Math.round(message.key);
5647
- }
5648
- if (message.value !== 0) {
5649
- obj.value = Math.round(message.value);
5650
- }
5651
- return obj;
5652
- },
5653
3957
  create(base) {
5654
3958
  return DashboardIndividualResponse_GreenDrivingEntry.fromPartial(base ?? {});
5655
3959
  },
@@ -5702,22 +4006,6 @@ export const DashboardIndividualResponse_SpeedsEntry = {
5702
4006
  }
5703
4007
  return message;
5704
4008
  },
5705
- fromJSON(object) {
5706
- return {
5707
- key: isSet(object.key) ? globalThis.Number(object.key) : 0,
5708
- value: isSet(object.value) ? TripDurationStat.fromJSON(object.value) : undefined,
5709
- };
5710
- },
5711
- toJSON(message) {
5712
- const obj = {};
5713
- if (message.key !== 0) {
5714
- obj.key = Math.round(message.key);
5715
- }
5716
- if (message.value !== undefined) {
5717
- obj.value = TripDurationStat.toJSON(message.value);
5718
- }
5719
- return obj;
5720
- },
5721
4009
  create(base) {
5722
4010
  return DashboardIndividualResponse_SpeedsEntry.fromPartial(base ?? {});
5723
4011
  },
@@ -5782,26 +4070,6 @@ export const DashboardIndividualRequest = {
5782
4070
  }
5783
4071
  return message;
5784
4072
  },
5785
- fromJSON(object) {
5786
- return {
5787
- deviceId: isSet(object.deviceId) ? Long.fromValue(object.deviceId) : Long.UZERO,
5788
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
5789
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
5790
- };
5791
- },
5792
- toJSON(message) {
5793
- const obj = {};
5794
- if (!message.deviceId.equals(Long.UZERO)) {
5795
- obj.deviceId = (message.deviceId || Long.UZERO).toString();
5796
- }
5797
- if (message.startedAt !== undefined) {
5798
- obj.startedAt = message.startedAt.toISOString();
5799
- }
5800
- if (message.finishedAt !== undefined) {
5801
- obj.finishedAt = message.finishedAt.toISOString();
5802
- }
5803
- return obj;
5804
- },
5805
4073
  create(base) {
5806
4074
  return DashboardIndividualRequest.fromPartial(base ?? {});
5807
4075
  },
@@ -5847,16 +4115,6 @@ export const TraffixResponse = {
5847
4115
  }
5848
4116
  return message;
5849
4117
  },
5850
- fromJSON(object) {
5851
- return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e) => Traffix.fromJSON(e)) : [] };
5852
- },
5853
- toJSON(message) {
5854
- const obj = {};
5855
- if (message.list?.length) {
5856
- obj.list = message.list.map((e) => Traffix.toJSON(e));
5857
- }
5858
- return obj;
5859
- },
5860
4118
  create(base) {
5861
4119
  return TraffixResponse.fromPartial(base ?? {});
5862
4120
  },
@@ -6043,76 +4301,6 @@ export const Traffix = {
6043
4301
  }
6044
4302
  return message;
6045
4303
  },
6046
- fromJSON(object) {
6047
- return {
6048
- deviceId: isSet(object.deviceId) ? Long.fromValue(object.deviceId) : Long.UZERO,
6049
- dateTime: isSet(object.dateTime) ? fromJsonTimestamp(object.dateTime) : undefined,
6050
- workStartedAt: isSet(object.workStartedAt) ? fromJsonTimestamp(object.workStartedAt) : undefined,
6051
- workFinishedAt: isSet(object.workFinishedAt) ? fromJsonTimestamp(object.workFinishedAt) : undefined,
6052
- homeStartedAt: isSet(object.homeStartedAt) ? fromJsonTimestamp(object.homeStartedAt) : undefined,
6053
- homeFinishedAt: isSet(object.homeFinishedAt) ? fromJsonTimestamp(object.homeFinishedAt) : undefined,
6054
- workTraffic: globalThis.Array.isArray(object?.workTraffic)
6055
- ? object.workTraffic.map((e) => Traffix_Event.fromJSON(e))
6056
- : [],
6057
- homeTraffic: globalThis.Array.isArray(object?.homeTraffic)
6058
- ? object.homeTraffic.map((e) => Traffix_Event.fromJSON(e))
6059
- : [],
6060
- stopList: globalThis.Array.isArray(object?.stopList)
6061
- ? object.stopList.map((e) => Traffix_STOP.fromJSON(e))
6062
- : [],
6063
- workTimeMileage: isSet(object.workTimeMileage) ? Long.fromValue(object.workTimeMileage) : Long.UZERO,
6064
- totalMileage: isSet(object.totalMileage) ? Long.fromValue(object.totalMileage) : Long.UZERO,
6065
- homeToWorkMileage: isSet(object.homeToWorkMileage) ? Long.fromValue(object.homeToWorkMileage) : Long.UZERO,
6066
- workToWorkMileage: isSet(object.workToWorkMileage) ? Long.fromValue(object.workToWorkMileage) : Long.UZERO,
6067
- workToHomeMileage: isSet(object.workToHomeMileage) ? Long.fromValue(object.workToHomeMileage) : Long.UZERO,
6068
- };
6069
- },
6070
- toJSON(message) {
6071
- const obj = {};
6072
- if (!message.deviceId.equals(Long.UZERO)) {
6073
- obj.deviceId = (message.deviceId || Long.UZERO).toString();
6074
- }
6075
- if (message.dateTime !== undefined) {
6076
- obj.dateTime = message.dateTime.toISOString();
6077
- }
6078
- if (message.workStartedAt !== undefined) {
6079
- obj.workStartedAt = message.workStartedAt.toISOString();
6080
- }
6081
- if (message.workFinishedAt !== undefined) {
6082
- obj.workFinishedAt = message.workFinishedAt.toISOString();
6083
- }
6084
- if (message.homeStartedAt !== undefined) {
6085
- obj.homeStartedAt = message.homeStartedAt.toISOString();
6086
- }
6087
- if (message.homeFinishedAt !== undefined) {
6088
- obj.homeFinishedAt = message.homeFinishedAt.toISOString();
6089
- }
6090
- if (message.workTraffic?.length) {
6091
- obj.workTraffic = message.workTraffic.map((e) => Traffix_Event.toJSON(e));
6092
- }
6093
- if (message.homeTraffic?.length) {
6094
- obj.homeTraffic = message.homeTraffic.map((e) => Traffix_Event.toJSON(e));
6095
- }
6096
- if (message.stopList?.length) {
6097
- obj.stopList = message.stopList.map((e) => Traffix_STOP.toJSON(e));
6098
- }
6099
- if (!message.workTimeMileage.equals(Long.UZERO)) {
6100
- obj.workTimeMileage = (message.workTimeMileage || Long.UZERO).toString();
6101
- }
6102
- if (!message.totalMileage.equals(Long.UZERO)) {
6103
- obj.totalMileage = (message.totalMileage || Long.UZERO).toString();
6104
- }
6105
- if (!message.homeToWorkMileage.equals(Long.UZERO)) {
6106
- obj.homeToWorkMileage = (message.homeToWorkMileage || Long.UZERO).toString();
6107
- }
6108
- if (!message.workToWorkMileage.equals(Long.UZERO)) {
6109
- obj.workToWorkMileage = (message.workToWorkMileage || Long.UZERO).toString();
6110
- }
6111
- if (!message.workToHomeMileage.equals(Long.UZERO)) {
6112
- obj.workToHomeMileage = (message.workToHomeMileage || Long.UZERO).toString();
6113
- }
6114
- return obj;
6115
- },
6116
4304
  create(base) {
6117
4305
  return Traffix.fromPartial(base ?? {});
6118
4306
  },
@@ -6258,46 +4446,6 @@ export const Traffix_Event = {
6258
4446
  }
6259
4447
  return message;
6260
4448
  },
6261
- fromJSON(object) {
6262
- return {
6263
- areaId: isSet(object.areaId) ? Long.fromValue(object.areaId) : Long.UZERO,
6264
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
6265
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
6266
- mileage: isSet(object.mileage) ? Long.fromValue(object.mileage) : Long.UZERO,
6267
- duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
6268
- type: isSet(object.type) ? traffix_Event_TypeFromJSON(object.type) : 0,
6269
- groupId: isSet(object.groupId) ? Long.fromValue(object.groupId) : Long.UZERO,
6270
- mileageSum: isSet(object.mileageSum) ? globalThis.Number(object.mileageSum) : undefined,
6271
- };
6272
- },
6273
- toJSON(message) {
6274
- const obj = {};
6275
- if (!message.areaId.equals(Long.UZERO)) {
6276
- obj.areaId = (message.areaId || Long.UZERO).toString();
6277
- }
6278
- if (message.startedAt !== undefined) {
6279
- obj.startedAt = message.startedAt.toISOString();
6280
- }
6281
- if (message.finishedAt !== undefined) {
6282
- obj.finishedAt = message.finishedAt.toISOString();
6283
- }
6284
- if (!message.mileage.equals(Long.UZERO)) {
6285
- obj.mileage = (message.mileage || Long.UZERO).toString();
6286
- }
6287
- if (message.duration !== 0) {
6288
- obj.duration = Math.round(message.duration);
6289
- }
6290
- if (message.type !== 0) {
6291
- obj.type = traffix_Event_TypeToJSON(message.type);
6292
- }
6293
- if (!message.groupId.equals(Long.UZERO)) {
6294
- obj.groupId = (message.groupId || Long.UZERO).toString();
6295
- }
6296
- if (message.mileageSum !== undefined) {
6297
- obj.mileageSum = Math.round(message.mileageSum);
6298
- }
6299
- return obj;
6300
- },
6301
4449
  create(base) {
6302
4450
  return Traffix_Event.fromPartial(base ?? {});
6303
4451
  },
@@ -6372,28 +4520,8 @@ export const Traffix_STOP = {
6372
4520
  }
6373
4521
  return message;
6374
4522
  },
6375
- fromJSON(object) {
6376
- return {
6377
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
6378
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
6379
- duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
6380
- };
6381
- },
6382
- toJSON(message) {
6383
- const obj = {};
6384
- if (message.startedAt !== undefined) {
6385
- obj.startedAt = message.startedAt.toISOString();
6386
- }
6387
- if (message.finishedAt !== undefined) {
6388
- obj.finishedAt = message.finishedAt.toISOString();
6389
- }
6390
- if (message.duration !== 0) {
6391
- obj.duration = Math.round(message.duration);
6392
- }
6393
- return obj;
6394
- },
6395
- create(base) {
6396
- return Traffix_STOP.fromPartial(base ?? {});
4523
+ create(base) {
4524
+ return Traffix_STOP.fromPartial(base ?? {});
6397
4525
  },
6398
4526
  fromPartial(object) {
6399
4527
  const message = createBaseTraffix_STOP();
@@ -6484,34 +4612,6 @@ export const TraffixRequest = {
6484
4612
  }
6485
4613
  return message;
6486
4614
  },
6487
- fromJSON(object) {
6488
- return {
6489
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
6490
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
6491
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
6492
- workStarts: isSet(object.workStarts) ? globalThis.String(object.workStarts) : undefined,
6493
- workFinishes: isSet(object.workFinishes) ? globalThis.String(object.workFinishes) : undefined,
6494
- };
6495
- },
6496
- toJSON(message) {
6497
- const obj = {};
6498
- if (message.deviceIds?.length) {
6499
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
6500
- }
6501
- if (message.startedAt !== undefined) {
6502
- obj.startedAt = message.startedAt.toISOString();
6503
- }
6504
- if (message.finishedAt !== undefined) {
6505
- obj.finishedAt = message.finishedAt.toISOString();
6506
- }
6507
- if (message.workStarts !== undefined) {
6508
- obj.workStarts = message.workStarts;
6509
- }
6510
- if (message.workFinishes !== undefined) {
6511
- obj.workFinishes = message.workFinishes;
6512
- }
6513
- return obj;
6514
- },
6515
4615
  create(base) {
6516
4616
  return TraffixRequest.fromPartial(base ?? {});
6517
4617
  },
@@ -6587,30 +4687,6 @@ export const TripReportResponse = {
6587
4687
  }
6588
4688
  return message;
6589
4689
  },
6590
- fromJSON(object) {
6591
- return {
6592
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
6593
- threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
6594
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
6595
- trips: globalThis.Array.isArray(object?.trips) ? object.trips.map((e) => Trip.fromJSON(e)) : [],
6596
- };
6597
- },
6598
- toJSON(message) {
6599
- const obj = {};
6600
- if (message.cost !== 0) {
6601
- obj.cost = Math.round(message.cost);
6602
- }
6603
- if (message.threads !== 0) {
6604
- obj.threads = Math.round(message.threads);
6605
- }
6606
- if (message.records !== 0) {
6607
- obj.records = Math.round(message.records);
6608
- }
6609
- if (message.trips?.length) {
6610
- obj.trips = message.trips.map((e) => Trip.toJSON(e));
6611
- }
6612
- return obj;
6613
- },
6614
4690
  create(base) {
6615
4691
  return TripReportResponse.fromPartial(base ?? {});
6616
4692
  },
@@ -6741,44 +4817,6 @@ export const AreaSummaryReviewRequest = {
6741
4817
  }
6742
4818
  return message;
6743
4819
  },
6744
- fromJSON(object) {
6745
- return {
6746
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
6747
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
6748
- scope: isSet(object.scope) ? areaSummaryReviewRequest_ScopeEnumFromJSON(object.scope) : 0,
6749
- source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
6750
- areaSource: isSet(object.area_source) ? areaSummaryReviewRequest_AreaSourceEnumFromJSON(object.area_source) : 0,
6751
- areaIds: globalThis.Array.isArray(object?.area_ids) ? object.area_ids.map((e) => Long.fromValue(e)) : [],
6752
- deviceIds: globalThis.Array.isArray(object?.device_ids)
6753
- ? object.device_ids.map((e) => Long.fromValue(e))
6754
- : [],
6755
- };
6756
- },
6757
- toJSON(message) {
6758
- const obj = {};
6759
- if (message.startedAt !== undefined) {
6760
- obj.started_at = message.startedAt.toISOString();
6761
- }
6762
- if (message.finishedAt !== undefined) {
6763
- obj.finished_at = message.finishedAt.toISOString();
6764
- }
6765
- if (message.scope !== 0) {
6766
- obj.scope = areaSummaryReviewRequest_ScopeEnumToJSON(message.scope);
6767
- }
6768
- if (message.source !== 0) {
6769
- obj.source = sourceToJSON(message.source);
6770
- }
6771
- if (message.areaSource !== 0) {
6772
- obj.area_source = areaSummaryReviewRequest_AreaSourceEnumToJSON(message.areaSource);
6773
- }
6774
- if (message.areaIds?.length) {
6775
- obj.area_ids = message.areaIds.map((e) => (e || Long.UZERO).toString());
6776
- }
6777
- if (message.deviceIds?.length) {
6778
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
6779
- }
6780
- return obj;
6781
- },
6782
4820
  create(base) {
6783
4821
  return AreaSummaryReviewRequest.fromPartial(base ?? {});
6784
4822
  },
@@ -6916,58 +4954,6 @@ export const AreaSummaryReviewResponse = {
6916
4954
  }
6917
4955
  return message;
6918
4956
  },
6919
- fromJSON(object) {
6920
- return {
6921
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
6922
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
6923
- totalDurationInside: isSet(object.total_duration_inside)
6924
- ? Long.fromValue(object.total_duration_inside)
6925
- : Long.UZERO,
6926
- totalDurationOutside: isSet(object.total_duration_outside)
6927
- ? Long.fromValue(object.total_duration_outside)
6928
- : Long.UZERO,
6929
- totalMileageInside: isSet(object.total_mileage_inside) ? Long.fromValue(object.total_mileage_inside) : Long.UZERO,
6930
- totalMileageOutside: isSet(object.total_mileage_outside)
6931
- ? Long.fromValue(object.total_mileage_outside)
6932
- : Long.UZERO,
6933
- totalInsideRecords: isSet(object.total_inside_records) ? globalThis.Number(object.total_inside_records) : 0,
6934
- totalOutsideRecords: isSet(object.total_outside_records) ? globalThis.Number(object.total_outside_records) : 0,
6935
- reports: globalThis.Array.isArray(object?.reports)
6936
- ? object.reports.map((e) => AreaSummaryReviewResponse_Review.fromJSON(e))
6937
- : [],
6938
- };
6939
- },
6940
- toJSON(message) {
6941
- const obj = {};
6942
- if (message.records !== 0) {
6943
- obj.records = Math.round(message.records);
6944
- }
6945
- if (message.cost !== 0) {
6946
- obj.cost = Math.round(message.cost);
6947
- }
6948
- if (!message.totalDurationInside.equals(Long.UZERO)) {
6949
- obj.total_duration_inside = (message.totalDurationInside || Long.UZERO).toString();
6950
- }
6951
- if (!message.totalDurationOutside.equals(Long.UZERO)) {
6952
- obj.total_duration_outside = (message.totalDurationOutside || Long.UZERO).toString();
6953
- }
6954
- if (!message.totalMileageInside.equals(Long.UZERO)) {
6955
- obj.total_mileage_inside = (message.totalMileageInside || Long.UZERO).toString();
6956
- }
6957
- if (!message.totalMileageOutside.equals(Long.UZERO)) {
6958
- obj.total_mileage_outside = (message.totalMileageOutside || Long.UZERO).toString();
6959
- }
6960
- if (message.totalInsideRecords !== 0) {
6961
- obj.total_inside_records = Math.round(message.totalInsideRecords);
6962
- }
6963
- if (message.totalOutsideRecords !== 0) {
6964
- obj.total_outside_records = Math.round(message.totalOutsideRecords);
6965
- }
6966
- if (message.reports?.length) {
6967
- obj.reports = message.reports.map((e) => AreaSummaryReviewResponse_Review.toJSON(e));
6968
- }
6969
- return obj;
6970
- },
6971
4957
  create(base) {
6972
4958
  return AreaSummaryReviewResponse.fromPartial(base ?? {});
6973
4959
  },
@@ -7137,58 +5123,6 @@ export const AreaSummaryReviewResponse_Review = {
7137
5123
  }
7138
5124
  return message;
7139
5125
  },
7140
- fromJSON(object) {
7141
- return {
7142
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
7143
- areaId: isSet(object.area_id) ? Long.fromValue(object.area_id) : Long.UZERO,
7144
- started: isSet(object.started) ? Data.fromJSON(object.started) : undefined,
7145
- finished: isSet(object.finished) ? Data.fromJSON(object.finished) : undefined,
7146
- mileage: isSet(object.mileage) ? Long.fromValue(object.mileage) : Long.UZERO,
7147
- duration: isSet(object.duration) ? Long.fromValue(object.duration) : Long.UZERO,
7148
- maxSpeed: isSet(object.max_speed) ? globalThis.Number(object.max_speed) : 0,
7149
- totalSpeed: isSet(object.total_speed) ? Long.fromValue(object.total_speed) : Long.UZERO,
7150
- countSpeed: isSet(object.count_speed) ? globalThis.Number(object.count_speed) : 0,
7151
- type: isSet(object.traffic_type) ? areaSummaryReviewResponse_trafficTypeFromJSON(object.traffic_type) : 0,
7152
- area: isSet(object.area) ? Area.fromJSON(object.area) : undefined,
7153
- };
7154
- },
7155
- toJSON(message) {
7156
- const obj = {};
7157
- if (!message.deviceId.equals(Long.UZERO)) {
7158
- obj.device_id = (message.deviceId || Long.UZERO).toString();
7159
- }
7160
- if (!message.areaId.equals(Long.UZERO)) {
7161
- obj.area_id = (message.areaId || Long.UZERO).toString();
7162
- }
7163
- if (message.started !== undefined) {
7164
- obj.started = Data.toJSON(message.started);
7165
- }
7166
- if (message.finished !== undefined) {
7167
- obj.finished = Data.toJSON(message.finished);
7168
- }
7169
- if (!message.mileage.equals(Long.UZERO)) {
7170
- obj.mileage = (message.mileage || Long.UZERO).toString();
7171
- }
7172
- if (!message.duration.equals(Long.UZERO)) {
7173
- obj.duration = (message.duration || Long.UZERO).toString();
7174
- }
7175
- if (message.maxSpeed !== 0) {
7176
- obj.max_speed = Math.round(message.maxSpeed);
7177
- }
7178
- if (!message.totalSpeed.equals(Long.UZERO)) {
7179
- obj.total_speed = (message.totalSpeed || Long.UZERO).toString();
7180
- }
7181
- if (message.countSpeed !== 0) {
7182
- obj.count_speed = Math.round(message.countSpeed);
7183
- }
7184
- if (message.type !== 0) {
7185
- obj.traffic_type = areaSummaryReviewResponse_trafficTypeToJSON(message.type);
7186
- }
7187
- if (message.area !== undefined) {
7188
- obj.area = Area.toJSON(message.area);
7189
- }
7190
- return obj;
7191
- },
7192
5126
  create(base) {
7193
5127
  return AreaSummaryReviewResponse_Review.fromPartial(base ?? {});
7194
5128
  },
@@ -7294,36 +5228,6 @@ export const ShiftSummaryResponse = {
7294
5228
  }
7295
5229
  return message;
7296
5230
  },
7297
- fromJSON(object) {
7298
- return {
7299
- Reports: globalThis.Array.isArray(object?.Reports)
7300
- ? object.Reports.map((e) => ShiftSummaryResponse_Summary.fromJSON(e))
7301
- : [],
7302
- tripRecords: isSet(object.tripRecords) ? Long.fromValue(object.tripRecords) : Long.UZERO,
7303
- tripMilliseconds: isSet(object.tripMilliseconds) ? Long.fromValue(object.tripMilliseconds) : Long.ZERO,
7304
- startedAt: isSet(object.startedAt) ? globalThis.String(object.startedAt) : "",
7305
- finishedAt: isSet(object.finishedAt) ? globalThis.String(object.finishedAt) : "",
7306
- };
7307
- },
7308
- toJSON(message) {
7309
- const obj = {};
7310
- if (message.Reports?.length) {
7311
- obj.Reports = message.Reports.map((e) => ShiftSummaryResponse_Summary.toJSON(e));
7312
- }
7313
- if (!message.tripRecords.equals(Long.UZERO)) {
7314
- obj.tripRecords = (message.tripRecords || Long.UZERO).toString();
7315
- }
7316
- if (!message.tripMilliseconds.equals(Long.ZERO)) {
7317
- obj.tripMilliseconds = (message.tripMilliseconds || Long.ZERO).toString();
7318
- }
7319
- if (message.startedAt !== "") {
7320
- obj.startedAt = message.startedAt;
7321
- }
7322
- if (message.finishedAt !== "") {
7323
- obj.finishedAt = message.finishedAt;
7324
- }
7325
- return obj;
7326
- },
7327
5231
  create(base) {
7328
5232
  return ShiftSummaryResponse.fromPartial(base ?? {});
7329
5233
  },
@@ -7672,126 +5576,6 @@ export const ShiftSummaryResponse_Summary = {
7672
5576
  }
7673
5577
  return message;
7674
5578
  },
7675
- fromJSON(object) {
7676
- return {
7677
- deviceId: isSet(object.deviceId) ? Long.fromValue(object.deviceId) : Long.UZERO,
7678
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
7679
- idling: isSet(object.idling) ? globalThis.Number(object.idling) : 0,
7680
- parking: isSet(object.parking) ? globalThis.Number(object.parking) : 0,
7681
- moving: isSet(object.moving) ? globalThis.Number(object.moving) : 0,
7682
- towing: isSet(object.towing) ? globalThis.Number(object.towing) : 0,
7683
- speedTotal: isSet(object.speedTotal) ? globalThis.Number(object.speedTotal) : 0,
7684
- speedSum: isSet(object.speedSum) ? globalThis.Number(object.speedSum) : 0,
7685
- speedMax: isSet(object.speedMax) ? globalThis.Number(object.speedMax) : 0,
7686
- records: isSet(object.records) ? Long.fromValue(object.records) : Long.UZERO,
7687
- harshAcceleration: isSet(object.harshAcceleration) ? globalThis.Number(object.harshAcceleration) : 0,
7688
- harshBreak: isSet(object.harshBreak) ? globalThis.Number(object.harshBreak) : 0,
7689
- harshCorner: isSet(object.harshCorner) ? globalThis.Number(object.harshCorner) : 0,
7690
- minTemp01: isSet(object.minTemp01) ? globalThis.Number(object.minTemp01) : undefined,
7691
- maxTemp01: isSet(object.maxTemp01) ? globalThis.Number(object.maxTemp01) : undefined,
7692
- minTemp02: isSet(object.minTemp02) ? globalThis.Number(object.minTemp02) : undefined,
7693
- maxTemp02: isSet(object.maxTemp02) ? globalThis.Number(object.maxTemp02) : undefined,
7694
- minTemp03: isSet(object.minTemp03) ? globalThis.Number(object.minTemp03) : undefined,
7695
- maxTemp03: isSet(object.maxTemp03) ? globalThis.Number(object.maxTemp03) : undefined,
7696
- minTemp04: isSet(object.minTemp04) ? globalThis.Number(object.minTemp04) : undefined,
7697
- maxTemp04: isSet(object.maxTemp04) ? globalThis.Number(object.maxTemp04) : undefined,
7698
- minHumidity: isSet(object.minHumidity) ? globalThis.Number(object.minHumidity) : undefined,
7699
- maxHumidity: isSet(object.maxHumidity) ? globalThis.Number(object.maxHumidity) : undefined,
7700
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
7701
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
7702
- totalSeconds: isSet(object.totalSeconds) ? Long.fromValue(object.totalSeconds) : Long.ZERO,
7703
- includingSeconds: isSet(object.includingSeconds) ? Long.fromValue(object.includingSeconds) : Long.UZERO,
7704
- different: isSet(object.different) ? Long.fromValue(object.different) : Long.ZERO,
7705
- };
7706
- },
7707
- toJSON(message) {
7708
- const obj = {};
7709
- if (!message.deviceId.equals(Long.UZERO)) {
7710
- obj.deviceId = (message.deviceId || Long.UZERO).toString();
7711
- }
7712
- if (message.mileage !== 0) {
7713
- obj.mileage = Math.round(message.mileage);
7714
- }
7715
- if (message.idling !== 0) {
7716
- obj.idling = Math.round(message.idling);
7717
- }
7718
- if (message.parking !== 0) {
7719
- obj.parking = Math.round(message.parking);
7720
- }
7721
- if (message.moving !== 0) {
7722
- obj.moving = Math.round(message.moving);
7723
- }
7724
- if (message.towing !== 0) {
7725
- obj.towing = Math.round(message.towing);
7726
- }
7727
- if (message.speedTotal !== 0) {
7728
- obj.speedTotal = Math.round(message.speedTotal);
7729
- }
7730
- if (message.speedSum !== 0) {
7731
- obj.speedSum = Math.round(message.speedSum);
7732
- }
7733
- if (message.speedMax !== 0) {
7734
- obj.speedMax = Math.round(message.speedMax);
7735
- }
7736
- if (!message.records.equals(Long.UZERO)) {
7737
- obj.records = (message.records || Long.UZERO).toString();
7738
- }
7739
- if (message.harshAcceleration !== 0) {
7740
- obj.harshAcceleration = Math.round(message.harshAcceleration);
7741
- }
7742
- if (message.harshBreak !== 0) {
7743
- obj.harshBreak = Math.round(message.harshBreak);
7744
- }
7745
- if (message.harshCorner !== 0) {
7746
- obj.harshCorner = Math.round(message.harshCorner);
7747
- }
7748
- if (message.minTemp01 !== undefined) {
7749
- obj.minTemp01 = Math.round(message.minTemp01);
7750
- }
7751
- if (message.maxTemp01 !== undefined) {
7752
- obj.maxTemp01 = Math.round(message.maxTemp01);
7753
- }
7754
- if (message.minTemp02 !== undefined) {
7755
- obj.minTemp02 = Math.round(message.minTemp02);
7756
- }
7757
- if (message.maxTemp02 !== undefined) {
7758
- obj.maxTemp02 = Math.round(message.maxTemp02);
7759
- }
7760
- if (message.minTemp03 !== undefined) {
7761
- obj.minTemp03 = Math.round(message.minTemp03);
7762
- }
7763
- if (message.maxTemp03 !== undefined) {
7764
- obj.maxTemp03 = Math.round(message.maxTemp03);
7765
- }
7766
- if (message.minTemp04 !== undefined) {
7767
- obj.minTemp04 = Math.round(message.minTemp04);
7768
- }
7769
- if (message.maxTemp04 !== undefined) {
7770
- obj.maxTemp04 = Math.round(message.maxTemp04);
7771
- }
7772
- if (message.minHumidity !== undefined) {
7773
- obj.minHumidity = Math.round(message.minHumidity);
7774
- }
7775
- if (message.maxHumidity !== undefined) {
7776
- obj.maxHumidity = Math.round(message.maxHumidity);
7777
- }
7778
- if (message.startedAt !== undefined) {
7779
- obj.startedAt = message.startedAt.toISOString();
7780
- }
7781
- if (message.finishedAt !== undefined) {
7782
- obj.finishedAt = message.finishedAt.toISOString();
7783
- }
7784
- if (!message.totalSeconds.equals(Long.ZERO)) {
7785
- obj.totalSeconds = (message.totalSeconds || Long.ZERO).toString();
7786
- }
7787
- if (!message.includingSeconds.equals(Long.UZERO)) {
7788
- obj.includingSeconds = (message.includingSeconds || Long.UZERO).toString();
7789
- }
7790
- if (!message.different.equals(Long.ZERO)) {
7791
- obj.different = (message.different || Long.ZERO).toString();
7792
- }
7793
- return obj;
7794
- },
7795
5579
  create(base) {
7796
5580
  return ShiftSummaryResponse_Summary.fromPartial(base ?? {});
7797
5581
  },
@@ -7899,26 +5683,6 @@ export const ShiftRequest = {
7899
5683
  }
7900
5684
  return message;
7901
5685
  },
7902
- fromJSON(object) {
7903
- return {
7904
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
7905
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
7906
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
7907
- };
7908
- },
7909
- toJSON(message) {
7910
- const obj = {};
7911
- if (message.startedAt !== undefined) {
7912
- obj.startedAt = message.startedAt.toISOString();
7913
- }
7914
- if (message.finishedAt !== undefined) {
7915
- obj.finishedAt = message.finishedAt.toISOString();
7916
- }
7917
- if (message.deviceIds?.length) {
7918
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
7919
- }
7920
- return obj;
7921
- },
7922
5686
  create(base) {
7923
5687
  return ShiftRequest.fromPartial(base ?? {});
7924
5688
  },
@@ -7962,20 +5726,6 @@ export const ShiftResponse = {
7962
5726
  }
7963
5727
  return message;
7964
5728
  },
7965
- fromJSON(object) {
7966
- return {
7967
- Reports: globalThis.Array.isArray(object?.Reports)
7968
- ? object.Reports.map((e) => ShiftResponse_Shift.fromJSON(e))
7969
- : [],
7970
- };
7971
- },
7972
- toJSON(message) {
7973
- const obj = {};
7974
- if (message.Reports?.length) {
7975
- obj.Reports = message.Reports.map((e) => ShiftResponse_Shift.toJSON(e));
7976
- }
7977
- return obj;
7978
- },
7979
5729
  create(base) {
7980
5730
  return ShiftResponse.fromPartial(base ?? {});
7981
5731
  },
@@ -8371,146 +6121,6 @@ export const ShiftResponse_Shift = {
8371
6121
  }
8372
6122
  return message;
8373
6123
  },
8374
- fromJSON(object) {
8375
- return {
8376
- id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
8377
- deviceId: isSet(object.deviceId) ? Long.fromValue(object.deviceId) : Long.UZERO,
8378
- shiftId: isSet(object.shiftId) ? Long.fromValue(object.shiftId) : Long.UZERO,
8379
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
8380
- idling: isSet(object.idling) ? globalThis.Number(object.idling) : 0,
8381
- parking: isSet(object.parking) ? globalThis.Number(object.parking) : 0,
8382
- moving: isSet(object.moving) ? globalThis.Number(object.moving) : 0,
8383
- towing: isSet(object.towing) ? globalThis.Number(object.towing) : 0,
8384
- speedTotal: isSet(object.speedTotal) ? globalThis.Number(object.speedTotal) : 0,
8385
- speedSum: isSet(object.speedSum) ? globalThis.Number(object.speedSum) : 0,
8386
- speedMax: isSet(object.speedMax) ? globalThis.Number(object.speedMax) : 0,
8387
- records: isSet(object.records) ? Long.fromValue(object.records) : Long.UZERO,
8388
- harshAcceleration: isSet(object.harshAcceleration) ? globalThis.Number(object.harshAcceleration) : 0,
8389
- harshBreak: isSet(object.harshBreak) ? globalThis.Number(object.harshBreak) : 0,
8390
- harshCorner: isSet(object.harshCorner) ? globalThis.Number(object.harshCorner) : 0,
8391
- minTemp01: isSet(object.minTemp01) ? globalThis.Number(object.minTemp01) : undefined,
8392
- maxTemp01: isSet(object.maxTemp01) ? globalThis.Number(object.maxTemp01) : undefined,
8393
- minTemp02: isSet(object.minTemp02) ? globalThis.Number(object.minTemp02) : undefined,
8394
- maxTemp02: isSet(object.maxTemp02) ? globalThis.Number(object.maxTemp02) : undefined,
8395
- minTemp03: isSet(object.minTemp03) ? globalThis.Number(object.minTemp03) : undefined,
8396
- maxTemp03: isSet(object.maxTemp03) ? globalThis.Number(object.maxTemp03) : undefined,
8397
- minTemp04: isSet(object.minTemp04) ? globalThis.Number(object.minTemp04) : undefined,
8398
- maxTemp04: isSet(object.maxTemp04) ? globalThis.Number(object.maxTemp04) : undefined,
8399
- minHumidity: isSet(object.minHumidity) ? globalThis.Number(object.minHumidity) : undefined,
8400
- maxHumidity: isSet(object.maxHumidity) ? globalThis.Number(object.maxHumidity) : undefined,
8401
- startLat: isSet(object.startLat) ? globalThis.Number(object.startLat) : undefined,
8402
- startLng: isSet(object.startLng) ? globalThis.Number(object.startLng) : undefined,
8403
- finishLat: isSet(object.finishLat) ? globalThis.Number(object.finishLat) : undefined,
8404
- finishLng: isSet(object.finishLng) ? globalThis.Number(object.finishLng) : undefined,
8405
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
8406
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
8407
- createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
8408
- updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
8409
- };
8410
- },
8411
- toJSON(message) {
8412
- const obj = {};
8413
- if (!message.id.equals(Long.UZERO)) {
8414
- obj.id = (message.id || Long.UZERO).toString();
8415
- }
8416
- if (!message.deviceId.equals(Long.UZERO)) {
8417
- obj.deviceId = (message.deviceId || Long.UZERO).toString();
8418
- }
8419
- if (!message.shiftId.equals(Long.UZERO)) {
8420
- obj.shiftId = (message.shiftId || Long.UZERO).toString();
8421
- }
8422
- if (message.mileage !== 0) {
8423
- obj.mileage = Math.round(message.mileage);
8424
- }
8425
- if (message.idling !== 0) {
8426
- obj.idling = Math.round(message.idling);
8427
- }
8428
- if (message.parking !== 0) {
8429
- obj.parking = Math.round(message.parking);
8430
- }
8431
- if (message.moving !== 0) {
8432
- obj.moving = Math.round(message.moving);
8433
- }
8434
- if (message.towing !== 0) {
8435
- obj.towing = Math.round(message.towing);
8436
- }
8437
- if (message.speedTotal !== 0) {
8438
- obj.speedTotal = Math.round(message.speedTotal);
8439
- }
8440
- if (message.speedSum !== 0) {
8441
- obj.speedSum = Math.round(message.speedSum);
8442
- }
8443
- if (message.speedMax !== 0) {
8444
- obj.speedMax = Math.round(message.speedMax);
8445
- }
8446
- if (!message.records.equals(Long.UZERO)) {
8447
- obj.records = (message.records || Long.UZERO).toString();
8448
- }
8449
- if (message.harshAcceleration !== 0) {
8450
- obj.harshAcceleration = Math.round(message.harshAcceleration);
8451
- }
8452
- if (message.harshBreak !== 0) {
8453
- obj.harshBreak = Math.round(message.harshBreak);
8454
- }
8455
- if (message.harshCorner !== 0) {
8456
- obj.harshCorner = Math.round(message.harshCorner);
8457
- }
8458
- if (message.minTemp01 !== undefined) {
8459
- obj.minTemp01 = Math.round(message.minTemp01);
8460
- }
8461
- if (message.maxTemp01 !== undefined) {
8462
- obj.maxTemp01 = Math.round(message.maxTemp01);
8463
- }
8464
- if (message.minTemp02 !== undefined) {
8465
- obj.minTemp02 = Math.round(message.minTemp02);
8466
- }
8467
- if (message.maxTemp02 !== undefined) {
8468
- obj.maxTemp02 = Math.round(message.maxTemp02);
8469
- }
8470
- if (message.minTemp03 !== undefined) {
8471
- obj.minTemp03 = Math.round(message.minTemp03);
8472
- }
8473
- if (message.maxTemp03 !== undefined) {
8474
- obj.maxTemp03 = Math.round(message.maxTemp03);
8475
- }
8476
- if (message.minTemp04 !== undefined) {
8477
- obj.minTemp04 = Math.round(message.minTemp04);
8478
- }
8479
- if (message.maxTemp04 !== undefined) {
8480
- obj.maxTemp04 = Math.round(message.maxTemp04);
8481
- }
8482
- if (message.minHumidity !== undefined) {
8483
- obj.minHumidity = Math.round(message.minHumidity);
8484
- }
8485
- if (message.maxHumidity !== undefined) {
8486
- obj.maxHumidity = Math.round(message.maxHumidity);
8487
- }
8488
- if (message.startLat !== undefined) {
8489
- obj.startLat = message.startLat;
8490
- }
8491
- if (message.startLng !== undefined) {
8492
- obj.startLng = message.startLng;
8493
- }
8494
- if (message.finishLat !== undefined) {
8495
- obj.finishLat = message.finishLat;
8496
- }
8497
- if (message.finishLng !== undefined) {
8498
- obj.finishLng = message.finishLng;
8499
- }
8500
- if (message.startedAt !== undefined) {
8501
- obj.startedAt = message.startedAt.toISOString();
8502
- }
8503
- if (message.finishedAt !== undefined) {
8504
- obj.finishedAt = message.finishedAt.toISOString();
8505
- }
8506
- if (message.createdAt !== undefined) {
8507
- obj.createdAt = message.createdAt.toISOString();
8508
- }
8509
- if (message.updatedAt !== undefined) {
8510
- obj.updatedAt = message.updatedAt.toISOString();
8511
- }
8512
- return obj;
8513
- },
8514
6124
  create(base) {
8515
6125
  return ShiftResponse_Shift.fromPartial(base ?? {});
8516
6126
  },
@@ -8619,26 +6229,6 @@ export const ShiftSummaryRequest = {
8619
6229
  }
8620
6230
  return message;
8621
6231
  },
8622
- fromJSON(object) {
8623
- return {
8624
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
8625
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
8626
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
8627
- };
8628
- },
8629
- toJSON(message) {
8630
- const obj = {};
8631
- if (message.startedAt !== undefined) {
8632
- obj.startedAt = message.startedAt.toISOString();
8633
- }
8634
- if (message.finishedAt !== undefined) {
8635
- obj.finishedAt = message.finishedAt.toISOString();
8636
- }
8637
- if (message.deviceIds?.length) {
8638
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
8639
- }
8640
- return obj;
8641
- },
8642
6232
  create(base) {
8643
6233
  return ShiftSummaryRequest.fromPartial(base ?? {});
8644
6234
  },
@@ -8682,20 +6272,6 @@ export const DailyTrafficResponse = {
8682
6272
  }
8683
6273
  return message;
8684
6274
  },
8685
- fromJSON(object) {
8686
- return {
8687
- Reports: globalThis.Array.isArray(object?.reports)
8688
- ? object.reports.map((e) => DailyTrafficResponse_DailyTraffic.fromJSON(e))
8689
- : [],
8690
- };
8691
- },
8692
- toJSON(message) {
8693
- const obj = {};
8694
- if (message.Reports?.length) {
8695
- obj.reports = message.Reports.map((e) => DailyTrafficResponse_DailyTraffic.toJSON(e));
8696
- }
8697
- return obj;
8698
- },
8699
6275
  create(base) {
8700
6276
  return DailyTrafficResponse.fromPartial(base ?? {});
8701
6277
  },
@@ -8777,34 +6353,6 @@ export const DailyTrafficResponse_Traffic = {
8777
6353
  }
8778
6354
  return message;
8779
6355
  },
8780
- fromJSON(object) {
8781
- return {
8782
- enteredAt: isSet(object.entered_at) ? fromJsonTimestamp(object.entered_at) : undefined,
8783
- exitedAt: isSet(object.exited_at) ? fromJsonTimestamp(object.exited_at) : undefined,
8784
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
8785
- geoId: isSet(object.geo_id) ? Long.fromValue(object.geo_id) : Long.UZERO,
8786
- geoName: isSet(object.geo_name) ? globalThis.String(object.geo_name) : undefined,
8787
- };
8788
- },
8789
- toJSON(message) {
8790
- const obj = {};
8791
- if (message.enteredAt !== undefined) {
8792
- obj.entered_at = message.enteredAt.toISOString();
8793
- }
8794
- if (message.exitedAt !== undefined) {
8795
- obj.exited_at = message.exitedAt.toISOString();
8796
- }
8797
- if (message.mileage !== 0) {
8798
- obj.mileage = Math.round(message.mileage);
8799
- }
8800
- if (!message.geoId.equals(Long.UZERO)) {
8801
- obj.geo_id = (message.geoId || Long.UZERO).toString();
8802
- }
8803
- if (message.geoName !== undefined) {
8804
- obj.geo_name = message.geoName;
8805
- }
8806
- return obj;
8807
- },
8808
6356
  create(base) {
8809
6357
  return DailyTrafficResponse_Traffic.fromPartial(base ?? {});
8810
6358
  },
@@ -8870,28 +6418,6 @@ export const DailyTrafficResponse_DailyTraffic = {
8870
6418
  }
8871
6419
  return message;
8872
6420
  },
8873
- fromJSON(object) {
8874
- return {
8875
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
8876
- date: isSet(object.date) ? fromJsonTimestamp(object.date) : undefined,
8877
- traffics: globalThis.Array.isArray(object?.traffics)
8878
- ? object.traffics.map((e) => DailyTrafficResponse_Traffic.fromJSON(e))
8879
- : [],
8880
- };
8881
- },
8882
- toJSON(message) {
8883
- const obj = {};
8884
- if (!message.deviceId.equals(Long.UZERO)) {
8885
- obj.device_id = (message.deviceId || Long.UZERO).toString();
8886
- }
8887
- if (message.date !== undefined) {
8888
- obj.date = message.date.toISOString();
8889
- }
8890
- if (message.traffics?.length) {
8891
- obj.traffics = message.traffics.map((e) => DailyTrafficResponse_Traffic.toJSON(e));
8892
- }
8893
- return obj;
8894
- },
8895
6421
  create(base) {
8896
6422
  return DailyTrafficResponse_DailyTraffic.fromPartial(base ?? {});
8897
6423
  },
@@ -8976,32 +6502,6 @@ export const DailyTrafficRequest = {
8976
6502
  }
8977
6503
  return message;
8978
6504
  },
8979
- fromJSON(object) {
8980
- return {
8981
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
8982
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
8983
- between: isSet(object.between) ? globalThis.Boolean(object.between) : false,
8984
- deviceIds: globalThis.Array.isArray(object?.device_ids)
8985
- ? object.device_ids.map((e) => Long.fromValue(e))
8986
- : [],
8987
- };
8988
- },
8989
- toJSON(message) {
8990
- const obj = {};
8991
- if (message.startedAt !== undefined) {
8992
- obj.started_at = message.startedAt.toISOString();
8993
- }
8994
- if (message.finishedAt !== undefined) {
8995
- obj.finished_at = message.finishedAt.toISOString();
8996
- }
8997
- if (message.between !== false) {
8998
- obj.between = message.between;
8999
- }
9000
- if (message.deviceIds?.length) {
9001
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
9002
- }
9003
- return obj;
9004
- },
9005
6505
  create(base) {
9006
6506
  return DailyTrafficRequest.fromPartial(base ?? {});
9007
6507
  },
@@ -9086,34 +6586,6 @@ export const RouteStopPoint = {
9086
6586
  }
9087
6587
  return message;
9088
6588
  },
9089
- fromJSON(object) {
9090
- return {
9091
- duration: isSet(object.duration) ? Long.fromValue(object.duration) : Long.ZERO,
9092
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
9093
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
9094
- type: isSet(object.type) ? routeStopTypeFromJSON(object.type) : 0,
9095
- point: isSet(object.point) ? Point.fromJSON(object.point) : undefined,
9096
- };
9097
- },
9098
- toJSON(message) {
9099
- const obj = {};
9100
- if (!message.duration.equals(Long.ZERO)) {
9101
- obj.duration = (message.duration || Long.ZERO).toString();
9102
- }
9103
- if (message.startedAt !== undefined) {
9104
- obj.started_at = message.startedAt.toISOString();
9105
- }
9106
- if (message.finishedAt !== undefined) {
9107
- obj.finished_at = message.finishedAt.toISOString();
9108
- }
9109
- if (message.type !== 0) {
9110
- obj.type = routeStopTypeToJSON(message.type);
9111
- }
9112
- if (message.point !== undefined) {
9113
- obj.point = Point.toJSON(message.point);
9114
- }
9115
- return obj;
9116
- },
9117
6589
  create(base) {
9118
6590
  return RouteStopPoint.fromPartial(base ?? {});
9119
6591
  },
@@ -9191,30 +6663,6 @@ export const RouteStopResponse = {
9191
6663
  }
9192
6664
  return message;
9193
6665
  },
9194
- fromJSON(object) {
9195
- return {
9196
- list: globalThis.Array.isArray(object?.list) ? object.list.map((e) => RouteStopPoint.fromJSON(e)) : [],
9197
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
9198
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
9199
- threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
9200
- };
9201
- },
9202
- toJSON(message) {
9203
- const obj = {};
9204
- if (message.list?.length) {
9205
- obj.list = message.list.map((e) => RouteStopPoint.toJSON(e));
9206
- }
9207
- if (message.records !== 0) {
9208
- obj.records = Math.round(message.records);
9209
- }
9210
- if (message.cost !== 0) {
9211
- obj.cost = Math.round(message.cost);
9212
- }
9213
- if (message.threads !== 0) {
9214
- obj.threads = Math.round(message.threads);
9215
- }
9216
- return obj;
9217
- },
9218
6666
  create(base) {
9219
6667
  return RouteStopResponse.fromPartial(base ?? {});
9220
6668
  },
@@ -9299,34 +6747,6 @@ export const RouteStopRequest = {
9299
6747
  }
9300
6748
  return message;
9301
6749
  },
9302
- fromJSON(object) {
9303
- return {
9304
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
9305
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
9306
- source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
9307
- stopType: isSet(object.stop_type) ? stopCalculateIoFromJSON(object.stop_type) : 0,
9308
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
9309
- };
9310
- },
9311
- toJSON(message) {
9312
- const obj = {};
9313
- if (message.startedAt !== undefined) {
9314
- obj.started_at = message.startedAt.toISOString();
9315
- }
9316
- if (message.finishedAt !== undefined) {
9317
- obj.finished_at = message.finishedAt.toISOString();
9318
- }
9319
- if (message.source !== 0) {
9320
- obj.source = sourceToJSON(message.source);
9321
- }
9322
- if (message.stopType !== 0) {
9323
- obj.stop_type = stopCalculateIoToJSON(message.stopType);
9324
- }
9325
- if (!message.deviceId.equals(Long.UZERO)) {
9326
- obj.device_id = (message.deviceId || Long.UZERO).toString();
9327
- }
9328
- return obj;
9329
- },
9330
6750
  create(base) {
9331
6751
  return RouteStopRequest.fromPartial(base ?? {});
9332
6752
  },
@@ -9431,38 +6851,6 @@ export const RouteReviewRequest = {
9431
6851
  }
9432
6852
  return message;
9433
6853
  },
9434
- fromJSON(object) {
9435
- return {
9436
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
9437
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
9438
- source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
9439
- stopType: isSet(object.stop_type) ? stopCalculateIoFromJSON(object.stop_type) : 0,
9440
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
9441
- includeTrip: isSet(object.include_trip) ? globalThis.Boolean(object.include_trip) : false,
9442
- };
9443
- },
9444
- toJSON(message) {
9445
- const obj = {};
9446
- if (message.startedAt !== undefined) {
9447
- obj.started_at = message.startedAt.toISOString();
9448
- }
9449
- if (message.finishedAt !== undefined) {
9450
- obj.finished_at = message.finishedAt.toISOString();
9451
- }
9452
- if (message.source !== 0) {
9453
- obj.source = sourceToJSON(message.source);
9454
- }
9455
- if (message.stopType !== 0) {
9456
- obj.stop_type = stopCalculateIoToJSON(message.stopType);
9457
- }
9458
- if (!message.deviceId.equals(Long.UZERO)) {
9459
- obj.device_id = (message.deviceId || Long.UZERO).toString();
9460
- }
9461
- if (message.includeTrip !== false) {
9462
- obj.include_trip = message.includeTrip;
9463
- }
9464
- return obj;
9465
- },
9466
6854
  create(base) {
9467
6855
  return RouteReviewRequest.fromPartial(base ?? {});
9468
6856
  },
@@ -9561,42 +6949,6 @@ export const RouteReviewResponse = {
9561
6949
  }
9562
6950
  return message;
9563
6951
  },
9564
- fromJSON(object) {
9565
- return {
9566
- routeList: globalThis.Array.isArray(object?.route_list)
9567
- ? object.route_list.map((e) => Data.fromJSON(e))
9568
- : [],
9569
- stopList: globalThis.Array.isArray(object?.stop_list)
9570
- ? object.stop_list.map((e) => RouteStopPoint.fromJSON(e))
9571
- : [],
9572
- tripList: globalThis.Array.isArray(object?.trip_list) ? object.trip_list.map((e) => Trip.fromJSON(e)) : [],
9573
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
9574
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
9575
- threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
9576
- };
9577
- },
9578
- toJSON(message) {
9579
- const obj = {};
9580
- if (message.routeList?.length) {
9581
- obj.route_list = message.routeList.map((e) => Data.toJSON(e));
9582
- }
9583
- if (message.stopList?.length) {
9584
- obj.stop_list = message.stopList.map((e) => RouteStopPoint.toJSON(e));
9585
- }
9586
- if (message.tripList?.length) {
9587
- obj.trip_list = message.tripList.map((e) => Trip.toJSON(e));
9588
- }
9589
- if (message.records !== 0) {
9590
- obj.records = Math.round(message.records);
9591
- }
9592
- if (message.cost !== 0) {
9593
- obj.cost = Math.round(message.cost);
9594
- }
9595
- if (message.threads !== 0) {
9596
- obj.threads = Math.round(message.threads);
9597
- }
9598
- return obj;
9599
- },
9600
6952
  create(base) {
9601
6953
  return RouteReviewResponse.fromPartial(base ?? {});
9602
6954
  },
@@ -9673,30 +7025,6 @@ export const DeviceDataRequest = {
9673
7025
  }
9674
7026
  return message;
9675
7027
  },
9676
- fromJSON(object) {
9677
- return {
9678
- limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
9679
- deviceId: isSet(object.deviceId) ? Long.fromValue(object.deviceId) : Long.UZERO,
9680
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
9681
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
9682
- };
9683
- },
9684
- toJSON(message) {
9685
- const obj = {};
9686
- if (message.limit !== 0) {
9687
- obj.limit = Math.round(message.limit);
9688
- }
9689
- if (!message.deviceId.equals(Long.UZERO)) {
9690
- obj.deviceId = (message.deviceId || Long.UZERO).toString();
9691
- }
9692
- if (message.startedAt !== undefined) {
9693
- obj.startedAt = message.startedAt.toISOString();
9694
- }
9695
- if (message.finishedAt !== undefined) {
9696
- obj.finishedAt = message.finishedAt.toISOString();
9697
- }
9698
- return obj;
9699
- },
9700
7028
  create(base) {
9701
7029
  return DeviceDataRequest.fromPartial(base ?? {});
9702
7030
  },
@@ -9743,18 +7071,6 @@ export const DeviceDataResponse = {
9743
7071
  }
9744
7072
  return message;
9745
7073
  },
9746
- fromJSON(object) {
9747
- return {
9748
- reports: globalThis.Array.isArray(object?.reports) ? object.reports.map((e) => Data.fromJSON(e)) : [],
9749
- };
9750
- },
9751
- toJSON(message) {
9752
- const obj = {};
9753
- if (message.reports?.length) {
9754
- obj.reports = message.reports.map((e) => Data.toJSON(e));
9755
- }
9756
- return obj;
9757
- },
9758
7074
  create(base) {
9759
7075
  return DeviceDataResponse.fromPartial(base ?? {});
9760
7076
  },
@@ -9846,38 +7162,6 @@ export const LogResponse = {
9846
7162
  }
9847
7163
  return message;
9848
7164
  },
9849
- fromJSON(object) {
9850
- return {
9851
- total: isSet(object.total) ? Long.fromValue(object.total) : Long.ZERO,
9852
- records: isSet(object.records) ? globalThis.Number(object.records) : 0,
9853
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
9854
- currentPage: isSet(object.current_page) ? Long.fromValue(object.current_page) : Long.ZERO,
9855
- lastPage: isSet(object.last_page) ? Long.fromValue(object.last_page) : Long.ZERO,
9856
- data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => Log.fromJSON(e)) : [],
9857
- };
9858
- },
9859
- toJSON(message) {
9860
- const obj = {};
9861
- if (!message.total.equals(Long.ZERO)) {
9862
- obj.total = (message.total || Long.ZERO).toString();
9863
- }
9864
- if (message.records !== 0) {
9865
- obj.records = Math.round(message.records);
9866
- }
9867
- if (message.cost !== 0) {
9868
- obj.cost = Math.round(message.cost);
9869
- }
9870
- if (!message.currentPage.equals(Long.ZERO)) {
9871
- obj.current_page = (message.currentPage || Long.ZERO).toString();
9872
- }
9873
- if (!message.lastPage.equals(Long.ZERO)) {
9874
- obj.last_page = (message.lastPage || Long.ZERO).toString();
9875
- }
9876
- if (message.data?.length) {
9877
- obj.data = message.data.map((e) => Log.toJSON(e));
9878
- }
9879
- return obj;
9880
- },
9881
7165
  create(base) {
9882
7166
  return LogResponse.fromPartial(base ?? {});
9883
7167
  },
@@ -9996,42 +7280,6 @@ export const LogRequest = {
9996
7280
  }
9997
7281
  return message;
9998
7282
  },
9999
- fromJSON(object) {
10000
- return {
10001
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
10002
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
10003
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
10004
- page: isSet(object.page) ? Long.fromValue(object.page) : Long.ZERO,
10005
- limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.ZERO,
10006
- sort: isSet(object.sort) ? Long.fromValue(object.sort) : Long.ZERO,
10007
- type: isSet(object.type) ? globalThis.Number(object.type) : undefined,
10008
- };
10009
- },
10010
- toJSON(message) {
10011
- const obj = {};
10012
- if (!message.deviceId.equals(Long.UZERO)) {
10013
- obj.device_id = (message.deviceId || Long.UZERO).toString();
10014
- }
10015
- if (message.startedAt !== undefined) {
10016
- obj.started_at = message.startedAt.toISOString();
10017
- }
10018
- if (message.finishedAt !== undefined) {
10019
- obj.finished_at = message.finishedAt.toISOString();
10020
- }
10021
- if (!message.page.equals(Long.ZERO)) {
10022
- obj.page = (message.page || Long.ZERO).toString();
10023
- }
10024
- if (!message.limit.equals(Long.ZERO)) {
10025
- obj.limit = (message.limit || Long.ZERO).toString();
10026
- }
10027
- if (!message.sort.equals(Long.ZERO)) {
10028
- obj.sort = (message.sort || Long.ZERO).toString();
10029
- }
10030
- if (message.type !== undefined) {
10031
- obj.type = Math.round(message.type);
10032
- }
10033
- return obj;
10034
- },
10035
7283
  create(base) {
10036
7284
  return LogRequest.fromPartial(base ?? {});
10037
7285
  },
@@ -10120,30 +7368,6 @@ export const TrafficRequest = {
10120
7368
  }
10121
7369
  return message;
10122
7370
  },
10123
- fromJSON(object) {
10124
- return {
10125
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
10126
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
10127
- dataset: isSet(object.dataset) ? globalThis.String(object.dataset) : "",
10128
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
10129
- };
10130
- },
10131
- toJSON(message) {
10132
- const obj = {};
10133
- if (message.startedAt !== undefined) {
10134
- obj.startedAt = message.startedAt.toISOString();
10135
- }
10136
- if (message.finishedAt !== undefined) {
10137
- obj.finishedAt = message.finishedAt.toISOString();
10138
- }
10139
- if (message.dataset !== "") {
10140
- obj.dataset = message.dataset;
10141
- }
10142
- if (message.deviceIds?.length) {
10143
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
10144
- }
10145
- return obj;
10146
- },
10147
7371
  create(base) {
10148
7372
  return TrafficRequest.fromPartial(base ?? {});
10149
7373
  },
@@ -10188,20 +7412,6 @@ export const TrafficResponse = {
10188
7412
  }
10189
7413
  return message;
10190
7414
  },
10191
- fromJSON(object) {
10192
- return {
10193
- reports: globalThis.Array.isArray(object?.reports)
10194
- ? object.reports.map((e) => TrafficResponse_Traffic.fromJSON(e))
10195
- : [],
10196
- };
10197
- },
10198
- toJSON(message) {
10199
- const obj = {};
10200
- if (message.reports?.length) {
10201
- obj.reports = message.reports.map((e) => TrafficResponse_Traffic.toJSON(e));
10202
- }
10203
- return obj;
10204
- },
10205
7415
  create(base) {
10206
7416
  return TrafficResponse.fromPartial(base ?? {});
10207
7417
  },
@@ -10300,38 +7510,6 @@ export const TrafficResponse_Traffic = {
10300
7510
  }
10301
7511
  return message;
10302
7512
  },
10303
- fromJSON(object) {
10304
- return {
10305
- type: isSet(object.type) ? trafficResponse_Traffic_EventTypeFromJSON(object.type) : 0,
10306
- area: isSet(object.area) ? globalThis.String(object.area) : undefined,
10307
- dateTime: isSet(object.dateTime) ? fromJsonTimestamp(object.dateTime) : undefined,
10308
- areaId: isSet(object.areaId) ? Long.fromValue(object.areaId) : Long.UZERO,
10309
- deviceId: isSet(object.deviceId) ? Long.fromValue(object.deviceId) : Long.UZERO,
10310
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : undefined,
10311
- };
10312
- },
10313
- toJSON(message) {
10314
- const obj = {};
10315
- if (message.type !== 0) {
10316
- obj.type = trafficResponse_Traffic_EventTypeToJSON(message.type);
10317
- }
10318
- if (message.area !== undefined) {
10319
- obj.area = message.area;
10320
- }
10321
- if (message.dateTime !== undefined) {
10322
- obj.dateTime = message.dateTime.toISOString();
10323
- }
10324
- if (!message.areaId.equals(Long.UZERO)) {
10325
- obj.areaId = (message.areaId || Long.UZERO).toString();
10326
- }
10327
- if (!message.deviceId.equals(Long.UZERO)) {
10328
- obj.deviceId = (message.deviceId || Long.UZERO).toString();
10329
- }
10330
- if (message.mileage !== undefined) {
10331
- obj.mileage = Math.round(message.mileage);
10332
- }
10333
- return obj;
10334
- },
10335
7513
  create(base) {
10336
7514
  return TrafficResponse_Traffic.fromPartial(base ?? {});
10337
7515
  },
@@ -10411,26 +7589,6 @@ export const AttendanceRequest = {
10411
7589
  }
10412
7590
  return message;
10413
7591
  },
10414
- fromJSON(object) {
10415
- return {
10416
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
10417
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
10418
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
10419
- };
10420
- },
10421
- toJSON(message) {
10422
- const obj = {};
10423
- if (message.deviceIds?.length) {
10424
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
10425
- }
10426
- if (message.startedAt !== undefined) {
10427
- obj.startedAt = message.startedAt.toISOString();
10428
- }
10429
- if (message.finishedAt !== undefined) {
10430
- obj.finishedAt = message.finishedAt.toISOString();
10431
- }
10432
- return obj;
10433
- },
10434
7592
  create(base) {
10435
7593
  return AttendanceRequest.fromPartial(base ?? {});
10436
7594
  },
@@ -10523,36 +7681,6 @@ export const AttendanceXRequest = {
10523
7681
  }
10524
7682
  return message;
10525
7683
  },
10526
- fromJSON(object) {
10527
- return {
10528
- deviceIds: globalThis.Array.isArray(object?.device_ids)
10529
- ? object.device_ids.map((e) => Long.fromValue(e))
10530
- : [],
10531
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
10532
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
10533
- excludeLeaves: isSet(object.exclude_leaves) ? globalThis.Boolean(object.exclude_leaves) : false,
10534
- source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
10535
- };
10536
- },
10537
- toJSON(message) {
10538
- const obj = {};
10539
- if (message.deviceIds?.length) {
10540
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
10541
- }
10542
- if (message.startedAt !== undefined) {
10543
- obj.started_at = message.startedAt.toISOString();
10544
- }
10545
- if (message.finishedAt !== undefined) {
10546
- obj.finished_at = message.finishedAt.toISOString();
10547
- }
10548
- if (message.excludeLeaves !== false) {
10549
- obj.exclude_leaves = message.excludeLeaves;
10550
- }
10551
- if (message.source !== 0) {
10552
- obj.source = sourceToJSON(message.source);
10553
- }
10554
- return obj;
10555
- },
10556
7684
  create(base) {
10557
7685
  return AttendanceXRequest.fromPartial(base ?? {});
10558
7686
  },
@@ -10598,20 +7726,6 @@ export const AttendanceResponse = {
10598
7726
  }
10599
7727
  return message;
10600
7728
  },
10601
- fromJSON(object) {
10602
- return {
10603
- reports: globalThis.Array.isArray(object?.reports)
10604
- ? object.reports.map((e) => AttendanceResponse_Attendance.fromJSON(e))
10605
- : [],
10606
- };
10607
- },
10608
- toJSON(message) {
10609
- const obj = {};
10610
- if (message.reports?.length) {
10611
- obj.reports = message.reports.map((e) => AttendanceResponse_Attendance.toJSON(e));
10612
- }
10613
- return obj;
10614
- },
10615
7729
  create(base) {
10616
7730
  return AttendanceResponse.fromPartial(base ?? {});
10617
7731
  },
@@ -10683,30 +7797,6 @@ export const AttendanceResponse_Event = {
10683
7797
  }
10684
7798
  return message;
10685
7799
  },
10686
- fromJSON(object) {
10687
- return {
10688
- dateTime: isSet(object.date_time) ? fromJsonTimestamp(object.date_time) : undefined,
10689
- type: isSet(object.type) ? attendanceResponse_EventTypeFromJSON(object.type) : 0,
10690
- duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
10691
- mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
10692
- };
10693
- },
10694
- toJSON(message) {
10695
- const obj = {};
10696
- if (message.dateTime !== undefined) {
10697
- obj.date_time = message.dateTime.toISOString();
10698
- }
10699
- if (message.type !== 0) {
10700
- obj.type = attendanceResponse_EventTypeToJSON(message.type);
10701
- }
10702
- if (message.duration !== 0) {
10703
- obj.duration = Math.round(message.duration);
10704
- }
10705
- if (message.mileage !== 0) {
10706
- obj.mileage = Math.round(message.mileage);
10707
- }
10708
- return obj;
10709
- },
10710
7800
  create(base) {
10711
7801
  return AttendanceResponse_Event.fromPartial(base ?? {});
10712
7802
  },
@@ -10951,92 +8041,6 @@ export const AttendanceResponse_Attendance = {
10951
8041
  }
10952
8042
  return message;
10953
8043
  },
10954
- fromJSON(object) {
10955
- return {
10956
- enteredAt: isSet(object.entered_at) ? fromJsonTimestamp(object.entered_at) : undefined,
10957
- exitedAt: isSet(object.exited_at) ? fromJsonTimestamp(object.exited_at) : undefined,
10958
- deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
10959
- areaId: isSet(object.area_id) ? Long.fromValue(object.area_id) : Long.UZERO,
10960
- areaName: isSet(object.area_name) ? globalThis.String(object.area_name) : "",
10961
- geoName: isSet(object.geo_name) ? globalThis.String(object.geo_name) : undefined,
10962
- overtime: isSet(object.overtime) ? globalThis.Number(object.overtime) : 0,
10963
- shortage: isSet(object.shortage) ? globalThis.Number(object.shortage) : 0,
10964
- workTime: isSet(object.work_time) ? globalThis.Number(object.work_time) : 0,
10965
- pricePerHour: isSet(object.price_per_hour) ? Long.fromValue(object.price_per_hour) : Long.UZERO,
10966
- overtimePrice: isSet(object.overtime_price) ? Long.fromValue(object.overtime_price) : Long.UZERO,
10967
- shortagePrice: isSet(object.shortage_price) ? Long.fromValue(object.shortage_price) : Long.UZERO,
10968
- workTimePrice: isSet(object.work_time_price) ? Long.fromValue(object.work_time_price) : Long.UZERO,
10969
- shiftStartsAt: isSet(object.shift_starts_at) ? globalThis.String(object.shift_starts_at) : "",
10970
- shiftEndsAt: isSet(object.shift_ends_at) ? globalThis.String(object.shift_ends_at) : "",
10971
- subtotal: isSet(object.subtotal) ? Long.fromValue(object.subtotal) : Long.ZERO,
10972
- mileageInside: isSet(object.mileage_inside) ? globalThis.Number(object.mileage_inside) : 0,
10973
- mileageOutside: isSet(object.mileage_outside) ? globalThis.Number(object.mileage_outside) : 0,
10974
- events: globalThis.Array.isArray(object?.events)
10975
- ? object.events.map((e) => AttendanceResponse_Event.fromJSON(e))
10976
- : [],
10977
- };
10978
- },
10979
- toJSON(message) {
10980
- const obj = {};
10981
- if (message.enteredAt !== undefined) {
10982
- obj.entered_at = message.enteredAt.toISOString();
10983
- }
10984
- if (message.exitedAt !== undefined) {
10985
- obj.exited_at = message.exitedAt.toISOString();
10986
- }
10987
- if (!message.deviceId.equals(Long.UZERO)) {
10988
- obj.device_id = (message.deviceId || Long.UZERO).toString();
10989
- }
10990
- if (!message.areaId.equals(Long.UZERO)) {
10991
- obj.area_id = (message.areaId || Long.UZERO).toString();
10992
- }
10993
- if (message.areaName !== "") {
10994
- obj.area_name = message.areaName;
10995
- }
10996
- if (message.geoName !== undefined) {
10997
- obj.geo_name = message.geoName;
10998
- }
10999
- if (message.overtime !== 0) {
11000
- obj.overtime = Math.round(message.overtime);
11001
- }
11002
- if (message.shortage !== 0) {
11003
- obj.shortage = Math.round(message.shortage);
11004
- }
11005
- if (message.workTime !== 0) {
11006
- obj.work_time = Math.round(message.workTime);
11007
- }
11008
- if (!message.pricePerHour.equals(Long.UZERO)) {
11009
- obj.price_per_hour = (message.pricePerHour || Long.UZERO).toString();
11010
- }
11011
- if (!message.overtimePrice.equals(Long.UZERO)) {
11012
- obj.overtime_price = (message.overtimePrice || Long.UZERO).toString();
11013
- }
11014
- if (!message.shortagePrice.equals(Long.UZERO)) {
11015
- obj.shortage_price = (message.shortagePrice || Long.UZERO).toString();
11016
- }
11017
- if (!message.workTimePrice.equals(Long.UZERO)) {
11018
- obj.work_time_price = (message.workTimePrice || Long.UZERO).toString();
11019
- }
11020
- if (message.shiftStartsAt !== "") {
11021
- obj.shift_starts_at = message.shiftStartsAt;
11022
- }
11023
- if (message.shiftEndsAt !== "") {
11024
- obj.shift_ends_at = message.shiftEndsAt;
11025
- }
11026
- if (!message.subtotal.equals(Long.ZERO)) {
11027
- obj.subtotal = (message.subtotal || Long.ZERO).toString();
11028
- }
11029
- if (message.mileageInside !== 0) {
11030
- obj.mileage_inside = Math.round(message.mileageInside);
11031
- }
11032
- if (message.mileageOutside !== 0) {
11033
- obj.mileage_outside = Math.round(message.mileageOutside);
11034
- }
11035
- if (message.events?.length) {
11036
- obj.events = message.events.map((e) => AttendanceResponse_Event.toJSON(e));
11037
- }
11038
- return obj;
11039
- },
11040
8044
  create(base) {
11041
8045
  return AttendanceResponse_Attendance.fromPartial(base ?? {});
11042
8046
  },
@@ -11139,26 +8143,6 @@ export const TripsRequest = {
11139
8143
  }
11140
8144
  return message;
11141
8145
  },
11142
- fromJSON(object) {
11143
- return {
11144
- startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
11145
- finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
11146
- deviceIds: globalThis.Array.isArray(object?.deviceIds) ? object.deviceIds.map((e) => Long.fromValue(e)) : [],
11147
- };
11148
- },
11149
- toJSON(message) {
11150
- const obj = {};
11151
- if (message.startedAt !== undefined) {
11152
- obj.startedAt = message.startedAt.toISOString();
11153
- }
11154
- if (message.finishedAt !== undefined) {
11155
- obj.finishedAt = message.finishedAt.toISOString();
11156
- }
11157
- if (message.deviceIds?.length) {
11158
- obj.deviceIds = message.deviceIds.map((e) => (e || Long.UZERO).toString());
11159
- }
11160
- return obj;
11161
- },
11162
8146
  create(base) {
11163
8147
  return TripsRequest.fromPartial(base ?? {});
11164
8148
  },
@@ -11202,18 +8186,6 @@ export const TripsResponse = {
11202
8186
  }
11203
8187
  return message;
11204
8188
  },
11205
- fromJSON(object) {
11206
- return {
11207
- Reports: globalThis.Array.isArray(object?.Reports) ? object.Reports.map((e) => FusionTrip.fromJSON(e)) : [],
11208
- };
11209
- },
11210
- toJSON(message) {
11211
- const obj = {};
11212
- if (message.Reports?.length) {
11213
- obj.Reports = message.Reports.map((e) => FusionTrip.toJSON(e));
11214
- }
11215
- return obj;
11216
- },
11217
8189
  create(base) {
11218
8190
  return TripsResponse.fromPartial(base ?? {});
11219
8191
  },
@@ -11294,32 +8266,6 @@ export const TripsSummaryRequest = {
11294
8266
  }
11295
8267
  return message;
11296
8268
  },
11297
- fromJSON(object) {
11298
- return {
11299
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
11300
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
11301
- deviceIds: globalThis.Array.isArray(object?.device_ids)
11302
- ? object.device_ids.map((e) => Long.fromValue(e))
11303
- : [],
11304
- groupBy: isSet(object.group_by) ? tripsSummaryRequest_GroupByFromJSON(object.group_by) : 0,
11305
- };
11306
- },
11307
- toJSON(message) {
11308
- const obj = {};
11309
- if (message.startedAt !== undefined) {
11310
- obj.started_at = message.startedAt.toISOString();
11311
- }
11312
- if (message.finishedAt !== undefined) {
11313
- obj.finished_at = message.finishedAt.toISOString();
11314
- }
11315
- if (message.deviceIds?.length) {
11316
- obj.device_ids = message.deviceIds.map((e) => (e || Long.UZERO).toString());
11317
- }
11318
- if (message.groupBy !== 0) {
11319
- obj.group_by = tripsSummaryRequest_GroupByToJSON(message.groupBy);
11320
- }
11321
- return obj;
11322
- },
11323
8269
  create(base) {
11324
8270
  return TripsSummaryRequest.fromPartial(base ?? {});
11325
8271
  },
@@ -11404,34 +8350,6 @@ export const TripsSummaryResponse = {
11404
8350
  }
11405
8351
  return message;
11406
8352
  },
11407
- fromJSON(object) {
11408
- return {
11409
- Reports: globalThis.Array.isArray(object?.reports) ? object.reports.map((e) => FusionTrip.fromJSON(e)) : [],
11410
- records: isSet(object.records) ? Long.fromValue(object.records) : Long.UZERO,
11411
- cost: isSet(object.cost) ? Long.fromValue(object.cost) : Long.ZERO,
11412
- startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
11413
- finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
11414
- };
11415
- },
11416
- toJSON(message) {
11417
- const obj = {};
11418
- if (message.Reports?.length) {
11419
- obj.reports = message.Reports.map((e) => FusionTrip.toJSON(e));
11420
- }
11421
- if (!message.records.equals(Long.UZERO)) {
11422
- obj.records = (message.records || Long.UZERO).toString();
11423
- }
11424
- if (!message.cost.equals(Long.ZERO)) {
11425
- obj.cost = (message.cost || Long.ZERO).toString();
11426
- }
11427
- if (message.startedAt !== undefined) {
11428
- obj.started_at = message.startedAt.toISOString();
11429
- }
11430
- if (message.finishedAt !== undefined) {
11431
- obj.finished_at = message.finishedAt.toISOString();
11432
- }
11433
- return obj;
11434
- },
11435
8353
  create(base) {
11436
8354
  return TripsSummaryResponse.fromPartial(base ?? {});
11437
8355
  },
@@ -11457,33 +8375,6 @@ function fromTimestamp(t) {
11457
8375
  millis += (t.nanos || 0) / 1_000_000;
11458
8376
  return new globalThis.Date(millis);
11459
8377
  }
11460
- function fromJsonTimestamp(o) {
11461
- if (o instanceof globalThis.Date) {
11462
- return o;
11463
- }
11464
- else if (typeof o === "string") {
11465
- return new globalThis.Date(o);
11466
- }
11467
- else {
11468
- return fromTimestamp(Timestamp.fromJSON(o));
11469
- }
11470
- }
11471
8378
  function numberToLong(number) {
11472
8379
  return Long.fromNumber(number);
11473
8380
  }
11474
- function longToNumber(int64) {
11475
- const num = globalThis.Number(int64.toString());
11476
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
11477
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
11478
- }
11479
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
11480
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
11481
- }
11482
- return num;
11483
- }
11484
- function isObject(value) {
11485
- return typeof value === "object" && value !== null;
11486
- }
11487
- function isSet(value) {
11488
- return value !== null && value !== undefined;
11489
- }