@fatehan/tsrp 1.0.2
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.
- package/dist/fatehan/areas/area.d.ts +51 -0
- package/dist/fatehan/areas/area.js +401 -0
- package/dist/fatehan/google/protobuf/timestamp.d.ts +128 -0
- package/dist/fatehan/google/protobuf/timestamp.js +93 -0
- package/dist/fatehan/models/fusion.d.ts +70 -0
- package/dist/fatehan/models/fusion.js +802 -0
- package/dist/fatehan/models/models.d.ts +65 -0
- package/dist/fatehan/models/models.js +701 -0
- package/dist/fatehan/models/operation.d.ts +81 -0
- package/dist/fatehan/models/operation.js +874 -0
- package/dist/fatehan/notifies/notify.d.ts +147 -0
- package/dist/fatehan/notifies/notify.js +1634 -0
- package/dist/fatehan/packets/dataModel.d.ts +1254 -0
- package/dist/fatehan/packets/dataModel.js +16880 -0
- package/dist/fatehan/packets/messages.d.ts +52 -0
- package/dist/fatehan/packets/messages.js +402 -0
- package/dist/fatehan/reports/ReportServiceClientPb.js +265 -0
- package/dist/fatehan/reports/report.d.ts +916 -0
- package/dist/fatehan/reports/report.js +12050 -0
- package/dist/fatehan/trips/trip.d.ts +358 -0
- package/dist/fatehan/trips/trip.js +3752 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +59 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +38 -0
- package/package.json +32 -0
- package/readme.md +11 -0
|
@@ -0,0 +1,3752 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: trips/trip.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.TripTask = exports.FusionTrip = exports.TripDurationStat = exports.TripPoint = exports.TripCompact_SpeedsEntry = exports.TripCompact_CrashesEntry = exports.TripCompact_HumidityEntry = exports.TripCompact_TemperatureEntry = exports.TripCompact_GreenDrivingEntry = exports.TripCompact = exports.Trip = exports.MonthlyCompact_SpeedsEntry = exports.MonthlyCompact_CrashesEntry = exports.MonthlyCompact_HumidityEntry = exports.MonthlyCompact_TemperatureEntry = exports.MonthlyCompact_GreenDrivingEntry = exports.MonthlyCompact = exports.Monthly = exports.TripTask_EventType = exports.TemperatureEnum = exports.HumidityEnum = exports.GreenDrivingTypeEnum = exports.CrashEnum = exports.protobufPackage = void 0;
|
|
9
|
+
exports.crashEnumFromJSON = crashEnumFromJSON;
|
|
10
|
+
exports.crashEnumToJSON = crashEnumToJSON;
|
|
11
|
+
exports.greenDrivingTypeEnumFromJSON = greenDrivingTypeEnumFromJSON;
|
|
12
|
+
exports.greenDrivingTypeEnumToJSON = greenDrivingTypeEnumToJSON;
|
|
13
|
+
exports.humidityEnumFromJSON = humidityEnumFromJSON;
|
|
14
|
+
exports.humidityEnumToJSON = humidityEnumToJSON;
|
|
15
|
+
exports.temperatureEnumFromJSON = temperatureEnumFromJSON;
|
|
16
|
+
exports.temperatureEnumToJSON = temperatureEnumToJSON;
|
|
17
|
+
exports.tripTask_EventTypeFromJSON = tripTask_EventTypeFromJSON;
|
|
18
|
+
exports.tripTask_EventTypeToJSON = tripTask_EventTypeToJSON;
|
|
19
|
+
/* eslint-disable */
|
|
20
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
21
|
+
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
22
|
+
exports.protobufPackage = "fatehan";
|
|
23
|
+
var CrashEnum;
|
|
24
|
+
(function (CrashEnum) {
|
|
25
|
+
CrashEnum[CrashEnum["CrashNone"] = 0] = "CrashNone";
|
|
26
|
+
CrashEnum[CrashEnum["RealCrash"] = 1] = "RealCrash";
|
|
27
|
+
CrashEnum[CrashEnum["LimitedCrashTrace"] = 2] = "LimitedCrashTrace";
|
|
28
|
+
CrashEnum[CrashEnum["LimitedCrashTraceNotCalibrated"] = 3] = "LimitedCrashTraceNotCalibrated";
|
|
29
|
+
CrashEnum[CrashEnum["FullCrashTraceNotCalibrated"] = 4] = "FullCrashTraceNotCalibrated";
|
|
30
|
+
CrashEnum[CrashEnum["FullCrashTrace"] = 5] = "FullCrashTrace";
|
|
31
|
+
CrashEnum[CrashEnum["RealCrashNotCalibrated"] = 6] = "RealCrashNotCalibrated";
|
|
32
|
+
CrashEnum[CrashEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
33
|
+
})(CrashEnum || (exports.CrashEnum = CrashEnum = {}));
|
|
34
|
+
function crashEnumFromJSON(object) {
|
|
35
|
+
switch (object) {
|
|
36
|
+
case 0:
|
|
37
|
+
case "CrashNone":
|
|
38
|
+
return CrashEnum.CrashNone;
|
|
39
|
+
case 1:
|
|
40
|
+
case "RealCrash":
|
|
41
|
+
return CrashEnum.RealCrash;
|
|
42
|
+
case 2:
|
|
43
|
+
case "LimitedCrashTrace":
|
|
44
|
+
return CrashEnum.LimitedCrashTrace;
|
|
45
|
+
case 3:
|
|
46
|
+
case "LimitedCrashTraceNotCalibrated":
|
|
47
|
+
return CrashEnum.LimitedCrashTraceNotCalibrated;
|
|
48
|
+
case 4:
|
|
49
|
+
case "FullCrashTraceNotCalibrated":
|
|
50
|
+
return CrashEnum.FullCrashTraceNotCalibrated;
|
|
51
|
+
case 5:
|
|
52
|
+
case "FullCrashTrace":
|
|
53
|
+
return CrashEnum.FullCrashTrace;
|
|
54
|
+
case 6:
|
|
55
|
+
case "RealCrashNotCalibrated":
|
|
56
|
+
return CrashEnum.RealCrashNotCalibrated;
|
|
57
|
+
case -1:
|
|
58
|
+
case "UNRECOGNIZED":
|
|
59
|
+
default:
|
|
60
|
+
return CrashEnum.UNRECOGNIZED;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function crashEnumToJSON(object) {
|
|
64
|
+
switch (object) {
|
|
65
|
+
case CrashEnum.CrashNone:
|
|
66
|
+
return "CrashNone";
|
|
67
|
+
case CrashEnum.RealCrash:
|
|
68
|
+
return "RealCrash";
|
|
69
|
+
case CrashEnum.LimitedCrashTrace:
|
|
70
|
+
return "LimitedCrashTrace";
|
|
71
|
+
case CrashEnum.LimitedCrashTraceNotCalibrated:
|
|
72
|
+
return "LimitedCrashTraceNotCalibrated";
|
|
73
|
+
case CrashEnum.FullCrashTraceNotCalibrated:
|
|
74
|
+
return "FullCrashTraceNotCalibrated";
|
|
75
|
+
case CrashEnum.FullCrashTrace:
|
|
76
|
+
return "FullCrashTrace";
|
|
77
|
+
case CrashEnum.RealCrashNotCalibrated:
|
|
78
|
+
return "RealCrashNotCalibrated";
|
|
79
|
+
case CrashEnum.UNRECOGNIZED:
|
|
80
|
+
default:
|
|
81
|
+
return "UNRECOGNIZED";
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var GreenDrivingTypeEnum;
|
|
85
|
+
(function (GreenDrivingTypeEnum) {
|
|
86
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["none"] = 0] = "none";
|
|
87
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["harshAcceleration"] = 1] = "harshAcceleration";
|
|
88
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["harshBraking"] = 2] = "harshBraking";
|
|
89
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["harshCornering"] = 3] = "harshCornering";
|
|
90
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["bloodAlcoholContent"] = 4] = "bloodAlcoholContent";
|
|
91
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["overSpeeding"] = 5] = "overSpeeding";
|
|
92
|
+
GreenDrivingTypeEnum[GreenDrivingTypeEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
93
|
+
})(GreenDrivingTypeEnum || (exports.GreenDrivingTypeEnum = GreenDrivingTypeEnum = {}));
|
|
94
|
+
function greenDrivingTypeEnumFromJSON(object) {
|
|
95
|
+
switch (object) {
|
|
96
|
+
case 0:
|
|
97
|
+
case "none":
|
|
98
|
+
return GreenDrivingTypeEnum.none;
|
|
99
|
+
case 1:
|
|
100
|
+
case "harshAcceleration":
|
|
101
|
+
return GreenDrivingTypeEnum.harshAcceleration;
|
|
102
|
+
case 2:
|
|
103
|
+
case "harshBraking":
|
|
104
|
+
return GreenDrivingTypeEnum.harshBraking;
|
|
105
|
+
case 3:
|
|
106
|
+
case "harshCornering":
|
|
107
|
+
return GreenDrivingTypeEnum.harshCornering;
|
|
108
|
+
case 4:
|
|
109
|
+
case "bloodAlcoholContent":
|
|
110
|
+
return GreenDrivingTypeEnum.bloodAlcoholContent;
|
|
111
|
+
case 5:
|
|
112
|
+
case "overSpeeding":
|
|
113
|
+
return GreenDrivingTypeEnum.overSpeeding;
|
|
114
|
+
case -1:
|
|
115
|
+
case "UNRECOGNIZED":
|
|
116
|
+
default:
|
|
117
|
+
return GreenDrivingTypeEnum.UNRECOGNIZED;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function greenDrivingTypeEnumToJSON(object) {
|
|
121
|
+
switch (object) {
|
|
122
|
+
case GreenDrivingTypeEnum.none:
|
|
123
|
+
return "none";
|
|
124
|
+
case GreenDrivingTypeEnum.harshAcceleration:
|
|
125
|
+
return "harshAcceleration";
|
|
126
|
+
case GreenDrivingTypeEnum.harshBraking:
|
|
127
|
+
return "harshBraking";
|
|
128
|
+
case GreenDrivingTypeEnum.harshCornering:
|
|
129
|
+
return "harshCornering";
|
|
130
|
+
case GreenDrivingTypeEnum.bloodAlcoholContent:
|
|
131
|
+
return "bloodAlcoholContent";
|
|
132
|
+
case GreenDrivingTypeEnum.overSpeeding:
|
|
133
|
+
return "overSpeeding";
|
|
134
|
+
case GreenDrivingTypeEnum.UNRECOGNIZED:
|
|
135
|
+
default:
|
|
136
|
+
return "UNRECOGNIZED";
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
var HumidityEnum;
|
|
140
|
+
(function (HumidityEnum) {
|
|
141
|
+
HumidityEnum[HumidityEnum["DefaultHumidityMin"] = 0] = "DefaultHumidityMin";
|
|
142
|
+
HumidityEnum[HumidityEnum["DefaultHumidityMax"] = 1] = "DefaultHumidityMax";
|
|
143
|
+
HumidityEnum[HumidityEnum["DefaultHumidityAvg"] = 2] = "DefaultHumidityAvg";
|
|
144
|
+
HumidityEnum[HumidityEnum["EyeHumidity1Min"] = 3] = "EyeHumidity1Min";
|
|
145
|
+
HumidityEnum[HumidityEnum["EyeHumidity1Max"] = 4] = "EyeHumidity1Max";
|
|
146
|
+
HumidityEnum[HumidityEnum["EyeHumidity1Avg"] = 5] = "EyeHumidity1Avg";
|
|
147
|
+
HumidityEnum[HumidityEnum["EyeHumidity2Min"] = 6] = "EyeHumidity2Min";
|
|
148
|
+
HumidityEnum[HumidityEnum["EyeHumidity2Max"] = 7] = "EyeHumidity2Max";
|
|
149
|
+
HumidityEnum[HumidityEnum["EyeHumidity2Avg"] = 8] = "EyeHumidity2Avg";
|
|
150
|
+
HumidityEnum[HumidityEnum["EyeHumidity3Min"] = 9] = "EyeHumidity3Min";
|
|
151
|
+
HumidityEnum[HumidityEnum["EyeHumidity3Max"] = 10] = "EyeHumidity3Max";
|
|
152
|
+
HumidityEnum[HumidityEnum["EyeHumidity3Avg"] = 11] = "EyeHumidity3Avg";
|
|
153
|
+
HumidityEnum[HumidityEnum["EyeHumidity4Min"] = 12] = "EyeHumidity4Min";
|
|
154
|
+
HumidityEnum[HumidityEnum["EyeHumidity4Max"] = 13] = "EyeHumidity4Max";
|
|
155
|
+
HumidityEnum[HumidityEnum["EyeHumidity4Avg"] = 14] = "EyeHumidity4Avg";
|
|
156
|
+
HumidityEnum[HumidityEnum["BLEHumidity01Min"] = 15] = "BLEHumidity01Min";
|
|
157
|
+
HumidityEnum[HumidityEnum["BLEHumidity01Max"] = 16] = "BLEHumidity01Max";
|
|
158
|
+
HumidityEnum[HumidityEnum["BLEHumidity01Avg"] = 17] = "BLEHumidity01Avg";
|
|
159
|
+
HumidityEnum[HumidityEnum["BLEHumidity02Min"] = 18] = "BLEHumidity02Min";
|
|
160
|
+
HumidityEnum[HumidityEnum["BLEHumidity02Max"] = 19] = "BLEHumidity02Max";
|
|
161
|
+
HumidityEnum[HumidityEnum["BLEHumidity02Avg"] = 20] = "BLEHumidity02Avg";
|
|
162
|
+
HumidityEnum[HumidityEnum["BLEHumidity03Min"] = 21] = "BLEHumidity03Min";
|
|
163
|
+
HumidityEnum[HumidityEnum["BLEHumidity03Max"] = 22] = "BLEHumidity03Max";
|
|
164
|
+
HumidityEnum[HumidityEnum["BLEHumidity03Avg"] = 23] = "BLEHumidity03Avg";
|
|
165
|
+
HumidityEnum[HumidityEnum["BLEHumidity04Min"] = 24] = "BLEHumidity04Min";
|
|
166
|
+
HumidityEnum[HumidityEnum["BLEHumidity04Max"] = 25] = "BLEHumidity04Max";
|
|
167
|
+
HumidityEnum[HumidityEnum["BLEHumidity04Avg"] = 26] = "BLEHumidity04Avg";
|
|
168
|
+
HumidityEnum[HumidityEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
169
|
+
})(HumidityEnum || (exports.HumidityEnum = HumidityEnum = {}));
|
|
170
|
+
function humidityEnumFromJSON(object) {
|
|
171
|
+
switch (object) {
|
|
172
|
+
case 0:
|
|
173
|
+
case "DefaultHumidityMin":
|
|
174
|
+
return HumidityEnum.DefaultHumidityMin;
|
|
175
|
+
case 1:
|
|
176
|
+
case "DefaultHumidityMax":
|
|
177
|
+
return HumidityEnum.DefaultHumidityMax;
|
|
178
|
+
case 2:
|
|
179
|
+
case "DefaultHumidityAvg":
|
|
180
|
+
return HumidityEnum.DefaultHumidityAvg;
|
|
181
|
+
case 3:
|
|
182
|
+
case "EyeHumidity1Min":
|
|
183
|
+
return HumidityEnum.EyeHumidity1Min;
|
|
184
|
+
case 4:
|
|
185
|
+
case "EyeHumidity1Max":
|
|
186
|
+
return HumidityEnum.EyeHumidity1Max;
|
|
187
|
+
case 5:
|
|
188
|
+
case "EyeHumidity1Avg":
|
|
189
|
+
return HumidityEnum.EyeHumidity1Avg;
|
|
190
|
+
case 6:
|
|
191
|
+
case "EyeHumidity2Min":
|
|
192
|
+
return HumidityEnum.EyeHumidity2Min;
|
|
193
|
+
case 7:
|
|
194
|
+
case "EyeHumidity2Max":
|
|
195
|
+
return HumidityEnum.EyeHumidity2Max;
|
|
196
|
+
case 8:
|
|
197
|
+
case "EyeHumidity2Avg":
|
|
198
|
+
return HumidityEnum.EyeHumidity2Avg;
|
|
199
|
+
case 9:
|
|
200
|
+
case "EyeHumidity3Min":
|
|
201
|
+
return HumidityEnum.EyeHumidity3Min;
|
|
202
|
+
case 10:
|
|
203
|
+
case "EyeHumidity3Max":
|
|
204
|
+
return HumidityEnum.EyeHumidity3Max;
|
|
205
|
+
case 11:
|
|
206
|
+
case "EyeHumidity3Avg":
|
|
207
|
+
return HumidityEnum.EyeHumidity3Avg;
|
|
208
|
+
case 12:
|
|
209
|
+
case "EyeHumidity4Min":
|
|
210
|
+
return HumidityEnum.EyeHumidity4Min;
|
|
211
|
+
case 13:
|
|
212
|
+
case "EyeHumidity4Max":
|
|
213
|
+
return HumidityEnum.EyeHumidity4Max;
|
|
214
|
+
case 14:
|
|
215
|
+
case "EyeHumidity4Avg":
|
|
216
|
+
return HumidityEnum.EyeHumidity4Avg;
|
|
217
|
+
case 15:
|
|
218
|
+
case "BLEHumidity01Min":
|
|
219
|
+
return HumidityEnum.BLEHumidity01Min;
|
|
220
|
+
case 16:
|
|
221
|
+
case "BLEHumidity01Max":
|
|
222
|
+
return HumidityEnum.BLEHumidity01Max;
|
|
223
|
+
case 17:
|
|
224
|
+
case "BLEHumidity01Avg":
|
|
225
|
+
return HumidityEnum.BLEHumidity01Avg;
|
|
226
|
+
case 18:
|
|
227
|
+
case "BLEHumidity02Min":
|
|
228
|
+
return HumidityEnum.BLEHumidity02Min;
|
|
229
|
+
case 19:
|
|
230
|
+
case "BLEHumidity02Max":
|
|
231
|
+
return HumidityEnum.BLEHumidity02Max;
|
|
232
|
+
case 20:
|
|
233
|
+
case "BLEHumidity02Avg":
|
|
234
|
+
return HumidityEnum.BLEHumidity02Avg;
|
|
235
|
+
case 21:
|
|
236
|
+
case "BLEHumidity03Min":
|
|
237
|
+
return HumidityEnum.BLEHumidity03Min;
|
|
238
|
+
case 22:
|
|
239
|
+
case "BLEHumidity03Max":
|
|
240
|
+
return HumidityEnum.BLEHumidity03Max;
|
|
241
|
+
case 23:
|
|
242
|
+
case "BLEHumidity03Avg":
|
|
243
|
+
return HumidityEnum.BLEHumidity03Avg;
|
|
244
|
+
case 24:
|
|
245
|
+
case "BLEHumidity04Min":
|
|
246
|
+
return HumidityEnum.BLEHumidity04Min;
|
|
247
|
+
case 25:
|
|
248
|
+
case "BLEHumidity04Max":
|
|
249
|
+
return HumidityEnum.BLEHumidity04Max;
|
|
250
|
+
case 26:
|
|
251
|
+
case "BLEHumidity04Avg":
|
|
252
|
+
return HumidityEnum.BLEHumidity04Avg;
|
|
253
|
+
case -1:
|
|
254
|
+
case "UNRECOGNIZED":
|
|
255
|
+
default:
|
|
256
|
+
return HumidityEnum.UNRECOGNIZED;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function humidityEnumToJSON(object) {
|
|
260
|
+
switch (object) {
|
|
261
|
+
case HumidityEnum.DefaultHumidityMin:
|
|
262
|
+
return "DefaultHumidityMin";
|
|
263
|
+
case HumidityEnum.DefaultHumidityMax:
|
|
264
|
+
return "DefaultHumidityMax";
|
|
265
|
+
case HumidityEnum.DefaultHumidityAvg:
|
|
266
|
+
return "DefaultHumidityAvg";
|
|
267
|
+
case HumidityEnum.EyeHumidity1Min:
|
|
268
|
+
return "EyeHumidity1Min";
|
|
269
|
+
case HumidityEnum.EyeHumidity1Max:
|
|
270
|
+
return "EyeHumidity1Max";
|
|
271
|
+
case HumidityEnum.EyeHumidity1Avg:
|
|
272
|
+
return "EyeHumidity1Avg";
|
|
273
|
+
case HumidityEnum.EyeHumidity2Min:
|
|
274
|
+
return "EyeHumidity2Min";
|
|
275
|
+
case HumidityEnum.EyeHumidity2Max:
|
|
276
|
+
return "EyeHumidity2Max";
|
|
277
|
+
case HumidityEnum.EyeHumidity2Avg:
|
|
278
|
+
return "EyeHumidity2Avg";
|
|
279
|
+
case HumidityEnum.EyeHumidity3Min:
|
|
280
|
+
return "EyeHumidity3Min";
|
|
281
|
+
case HumidityEnum.EyeHumidity3Max:
|
|
282
|
+
return "EyeHumidity3Max";
|
|
283
|
+
case HumidityEnum.EyeHumidity3Avg:
|
|
284
|
+
return "EyeHumidity3Avg";
|
|
285
|
+
case HumidityEnum.EyeHumidity4Min:
|
|
286
|
+
return "EyeHumidity4Min";
|
|
287
|
+
case HumidityEnum.EyeHumidity4Max:
|
|
288
|
+
return "EyeHumidity4Max";
|
|
289
|
+
case HumidityEnum.EyeHumidity4Avg:
|
|
290
|
+
return "EyeHumidity4Avg";
|
|
291
|
+
case HumidityEnum.BLEHumidity01Min:
|
|
292
|
+
return "BLEHumidity01Min";
|
|
293
|
+
case HumidityEnum.BLEHumidity01Max:
|
|
294
|
+
return "BLEHumidity01Max";
|
|
295
|
+
case HumidityEnum.BLEHumidity01Avg:
|
|
296
|
+
return "BLEHumidity01Avg";
|
|
297
|
+
case HumidityEnum.BLEHumidity02Min:
|
|
298
|
+
return "BLEHumidity02Min";
|
|
299
|
+
case HumidityEnum.BLEHumidity02Max:
|
|
300
|
+
return "BLEHumidity02Max";
|
|
301
|
+
case HumidityEnum.BLEHumidity02Avg:
|
|
302
|
+
return "BLEHumidity02Avg";
|
|
303
|
+
case HumidityEnum.BLEHumidity03Min:
|
|
304
|
+
return "BLEHumidity03Min";
|
|
305
|
+
case HumidityEnum.BLEHumidity03Max:
|
|
306
|
+
return "BLEHumidity03Max";
|
|
307
|
+
case HumidityEnum.BLEHumidity03Avg:
|
|
308
|
+
return "BLEHumidity03Avg";
|
|
309
|
+
case HumidityEnum.BLEHumidity04Min:
|
|
310
|
+
return "BLEHumidity04Min";
|
|
311
|
+
case HumidityEnum.BLEHumidity04Max:
|
|
312
|
+
return "BLEHumidity04Max";
|
|
313
|
+
case HumidityEnum.BLEHumidity04Avg:
|
|
314
|
+
return "BLEHumidity04Avg";
|
|
315
|
+
case HumidityEnum.UNRECOGNIZED:
|
|
316
|
+
default:
|
|
317
|
+
return "UNRECOGNIZED";
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
var TemperatureEnum;
|
|
321
|
+
(function (TemperatureEnum) {
|
|
322
|
+
TemperatureEnum[TemperatureEnum["DefaultTemperatureMin"] = 0] = "DefaultTemperatureMin";
|
|
323
|
+
TemperatureEnum[TemperatureEnum["DefaultTemperatureMax"] = 1] = "DefaultTemperatureMax";
|
|
324
|
+
TemperatureEnum[TemperatureEnum["DefaultTemperatureAvg"] = 2] = "DefaultTemperatureAvg";
|
|
325
|
+
TemperatureEnum[TemperatureEnum["IntakeAirTemperatureMin"] = 3] = "IntakeAirTemperatureMin";
|
|
326
|
+
TemperatureEnum[TemperatureEnum["IntakeAirTemperatureMax"] = 4] = "IntakeAirTemperatureMax";
|
|
327
|
+
TemperatureEnum[TemperatureEnum["IntakeAirTemperatureAvg"] = 5] = "IntakeAirTemperatureAvg";
|
|
328
|
+
TemperatureEnum[TemperatureEnum["AmbientAirTemperatureMin"] = 6] = "AmbientAirTemperatureMin";
|
|
329
|
+
TemperatureEnum[TemperatureEnum["AmbientAirTemperatureMax"] = 7] = "AmbientAirTemperatureMax";
|
|
330
|
+
TemperatureEnum[TemperatureEnum["AmbientAirTemperatureAvg"] = 8] = "AmbientAirTemperatureAvg";
|
|
331
|
+
TemperatureEnum[TemperatureEnum["EngineOilTemperatureMin"] = 9] = "EngineOilTemperatureMin";
|
|
332
|
+
TemperatureEnum[TemperatureEnum["EngineOilTemperatureMax"] = 10] = "EngineOilTemperatureMax";
|
|
333
|
+
TemperatureEnum[TemperatureEnum["EngineOilTemperatureAvg"] = 11] = "EngineOilTemperatureAvg";
|
|
334
|
+
TemperatureEnum[TemperatureEnum["CoolantTemperatureMin"] = 12] = "CoolantTemperatureMin";
|
|
335
|
+
TemperatureEnum[TemperatureEnum["CoolantTemperatureMax"] = 13] = "CoolantTemperatureMax";
|
|
336
|
+
TemperatureEnum[TemperatureEnum["CoolantTemperatureAvg"] = 14] = "CoolantTemperatureAvg";
|
|
337
|
+
TemperatureEnum[TemperatureEnum["BLETemperature01Min"] = 15] = "BLETemperature01Min";
|
|
338
|
+
TemperatureEnum[TemperatureEnum["BLETemperature01Max"] = 16] = "BLETemperature01Max";
|
|
339
|
+
TemperatureEnum[TemperatureEnum["BLETemperature01Avg"] = 17] = "BLETemperature01Avg";
|
|
340
|
+
TemperatureEnum[TemperatureEnum["BLETemperature02Min"] = 18] = "BLETemperature02Min";
|
|
341
|
+
TemperatureEnum[TemperatureEnum["BLETemperature02Max"] = 19] = "BLETemperature02Max";
|
|
342
|
+
TemperatureEnum[TemperatureEnum["BLETemperature02Avg"] = 20] = "BLETemperature02Avg";
|
|
343
|
+
TemperatureEnum[TemperatureEnum["BLETemperature03Min"] = 21] = "BLETemperature03Min";
|
|
344
|
+
TemperatureEnum[TemperatureEnum["BLETemperature03Max"] = 22] = "BLETemperature03Max";
|
|
345
|
+
TemperatureEnum[TemperatureEnum["BLETemperature03Avg"] = 23] = "BLETemperature03Avg";
|
|
346
|
+
TemperatureEnum[TemperatureEnum["BLETemperature04Min"] = 24] = "BLETemperature04Min";
|
|
347
|
+
TemperatureEnum[TemperatureEnum["BLETemperature04Max"] = 25] = "BLETemperature04Max";
|
|
348
|
+
TemperatureEnum[TemperatureEnum["BLETemperature04Avg"] = 27] = "BLETemperature04Avg";
|
|
349
|
+
TemperatureEnum[TemperatureEnum["EngineTemperatureMin"] = 28] = "EngineTemperatureMin";
|
|
350
|
+
TemperatureEnum[TemperatureEnum["EngineTemperatureMax"] = 29] = "EngineTemperatureMax";
|
|
351
|
+
TemperatureEnum[TemperatureEnum["EngineTemperatureAvg"] = 30] = "EngineTemperatureAvg";
|
|
352
|
+
TemperatureEnum[TemperatureEnum["BatteryTemperatureMin"] = 31] = "BatteryTemperatureMin";
|
|
353
|
+
TemperatureEnum[TemperatureEnum["BatteryTemperatureMax"] = 32] = "BatteryTemperatureMax";
|
|
354
|
+
TemperatureEnum[TemperatureEnum["BatteryTemperatureAvg"] = 33] = "BatteryTemperatureAvg";
|
|
355
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature1Min"] = 34] = "DallasTemperature1Min";
|
|
356
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature1Max"] = 35] = "DallasTemperature1Max";
|
|
357
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature1Avg"] = 36] = "DallasTemperature1Avg";
|
|
358
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature2Min"] = 37] = "DallasTemperature2Min";
|
|
359
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature2Max"] = 38] = "DallasTemperature2Max";
|
|
360
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature2Avg"] = 39] = "DallasTemperature2Avg";
|
|
361
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature3Min"] = 40] = "DallasTemperature3Min";
|
|
362
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature3Max"] = 41] = "DallasTemperature3Max";
|
|
363
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature3Avg"] = 42] = "DallasTemperature3Avg";
|
|
364
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature4Min"] = 43] = "DallasTemperature4Min";
|
|
365
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature4Max"] = 44] = "DallasTemperature4Max";
|
|
366
|
+
TemperatureEnum[TemperatureEnum["DallasTemperature4Avg"] = 45] = "DallasTemperature4Avg";
|
|
367
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature01Min"] = 46] = "LLSTemperature01Min";
|
|
368
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature01Max"] = 47] = "LLSTemperature01Max";
|
|
369
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature01Avg"] = 48] = "LLSTemperature01Avg";
|
|
370
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature02Min"] = 49] = "LLSTemperature02Min";
|
|
371
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature02Max"] = 50] = "LLSTemperature02Max";
|
|
372
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature02Avg"] = 51] = "LLSTemperature02Avg";
|
|
373
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature03Min"] = 52] = "LLSTemperature03Min";
|
|
374
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature03Max"] = 53] = "LLSTemperature03Max";
|
|
375
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature03Avg"] = 54] = "LLSTemperature03Avg";
|
|
376
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature04Min"] = 55] = "LLSTemperature04Min";
|
|
377
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature04Max"] = 56] = "LLSTemperature04Max";
|
|
378
|
+
TemperatureEnum[TemperatureEnum["LLSTemperature04Avg"] = 59] = "LLSTemperature04Avg";
|
|
379
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature01Min"] = 60] = "EyeTemperature01Min";
|
|
380
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature01Max"] = 61] = "EyeTemperature01Max";
|
|
381
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature01Avg"] = 62] = "EyeTemperature01Avg";
|
|
382
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature02Min"] = 63] = "EyeTemperature02Min";
|
|
383
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature02Max"] = 64] = "EyeTemperature02Max";
|
|
384
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature02Avg"] = 65] = "EyeTemperature02Avg";
|
|
385
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature03Min"] = 66] = "EyeTemperature03Min";
|
|
386
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature03Max"] = 67] = "EyeTemperature03Max";
|
|
387
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature03Avg"] = 68] = "EyeTemperature03Avg";
|
|
388
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature04Min"] = 69] = "EyeTemperature04Min";
|
|
389
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature04Max"] = 70] = "EyeTemperature04Max";
|
|
390
|
+
TemperatureEnum[TemperatureEnum["EyeTemperature04Avg"] = 71] = "EyeTemperature04Avg";
|
|
391
|
+
TemperatureEnum[TemperatureEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
392
|
+
})(TemperatureEnum || (exports.TemperatureEnum = TemperatureEnum = {}));
|
|
393
|
+
function temperatureEnumFromJSON(object) {
|
|
394
|
+
switch (object) {
|
|
395
|
+
case 0:
|
|
396
|
+
case "DefaultTemperatureMin":
|
|
397
|
+
return TemperatureEnum.DefaultTemperatureMin;
|
|
398
|
+
case 1:
|
|
399
|
+
case "DefaultTemperatureMax":
|
|
400
|
+
return TemperatureEnum.DefaultTemperatureMax;
|
|
401
|
+
case 2:
|
|
402
|
+
case "DefaultTemperatureAvg":
|
|
403
|
+
return TemperatureEnum.DefaultTemperatureAvg;
|
|
404
|
+
case 3:
|
|
405
|
+
case "IntakeAirTemperatureMin":
|
|
406
|
+
return TemperatureEnum.IntakeAirTemperatureMin;
|
|
407
|
+
case 4:
|
|
408
|
+
case "IntakeAirTemperatureMax":
|
|
409
|
+
return TemperatureEnum.IntakeAirTemperatureMax;
|
|
410
|
+
case 5:
|
|
411
|
+
case "IntakeAirTemperatureAvg":
|
|
412
|
+
return TemperatureEnum.IntakeAirTemperatureAvg;
|
|
413
|
+
case 6:
|
|
414
|
+
case "AmbientAirTemperatureMin":
|
|
415
|
+
return TemperatureEnum.AmbientAirTemperatureMin;
|
|
416
|
+
case 7:
|
|
417
|
+
case "AmbientAirTemperatureMax":
|
|
418
|
+
return TemperatureEnum.AmbientAirTemperatureMax;
|
|
419
|
+
case 8:
|
|
420
|
+
case "AmbientAirTemperatureAvg":
|
|
421
|
+
return TemperatureEnum.AmbientAirTemperatureAvg;
|
|
422
|
+
case 9:
|
|
423
|
+
case "EngineOilTemperatureMin":
|
|
424
|
+
return TemperatureEnum.EngineOilTemperatureMin;
|
|
425
|
+
case 10:
|
|
426
|
+
case "EngineOilTemperatureMax":
|
|
427
|
+
return TemperatureEnum.EngineOilTemperatureMax;
|
|
428
|
+
case 11:
|
|
429
|
+
case "EngineOilTemperatureAvg":
|
|
430
|
+
return TemperatureEnum.EngineOilTemperatureAvg;
|
|
431
|
+
case 12:
|
|
432
|
+
case "CoolantTemperatureMin":
|
|
433
|
+
return TemperatureEnum.CoolantTemperatureMin;
|
|
434
|
+
case 13:
|
|
435
|
+
case "CoolantTemperatureMax":
|
|
436
|
+
return TemperatureEnum.CoolantTemperatureMax;
|
|
437
|
+
case 14:
|
|
438
|
+
case "CoolantTemperatureAvg":
|
|
439
|
+
return TemperatureEnum.CoolantTemperatureAvg;
|
|
440
|
+
case 15:
|
|
441
|
+
case "BLETemperature01Min":
|
|
442
|
+
return TemperatureEnum.BLETemperature01Min;
|
|
443
|
+
case 16:
|
|
444
|
+
case "BLETemperature01Max":
|
|
445
|
+
return TemperatureEnum.BLETemperature01Max;
|
|
446
|
+
case 17:
|
|
447
|
+
case "BLETemperature01Avg":
|
|
448
|
+
return TemperatureEnum.BLETemperature01Avg;
|
|
449
|
+
case 18:
|
|
450
|
+
case "BLETemperature02Min":
|
|
451
|
+
return TemperatureEnum.BLETemperature02Min;
|
|
452
|
+
case 19:
|
|
453
|
+
case "BLETemperature02Max":
|
|
454
|
+
return TemperatureEnum.BLETemperature02Max;
|
|
455
|
+
case 20:
|
|
456
|
+
case "BLETemperature02Avg":
|
|
457
|
+
return TemperatureEnum.BLETemperature02Avg;
|
|
458
|
+
case 21:
|
|
459
|
+
case "BLETemperature03Min":
|
|
460
|
+
return TemperatureEnum.BLETemperature03Min;
|
|
461
|
+
case 22:
|
|
462
|
+
case "BLETemperature03Max":
|
|
463
|
+
return TemperatureEnum.BLETemperature03Max;
|
|
464
|
+
case 23:
|
|
465
|
+
case "BLETemperature03Avg":
|
|
466
|
+
return TemperatureEnum.BLETemperature03Avg;
|
|
467
|
+
case 24:
|
|
468
|
+
case "BLETemperature04Min":
|
|
469
|
+
return TemperatureEnum.BLETemperature04Min;
|
|
470
|
+
case 25:
|
|
471
|
+
case "BLETemperature04Max":
|
|
472
|
+
return TemperatureEnum.BLETemperature04Max;
|
|
473
|
+
case 27:
|
|
474
|
+
case "BLETemperature04Avg":
|
|
475
|
+
return TemperatureEnum.BLETemperature04Avg;
|
|
476
|
+
case 28:
|
|
477
|
+
case "EngineTemperatureMin":
|
|
478
|
+
return TemperatureEnum.EngineTemperatureMin;
|
|
479
|
+
case 29:
|
|
480
|
+
case "EngineTemperatureMax":
|
|
481
|
+
return TemperatureEnum.EngineTemperatureMax;
|
|
482
|
+
case 30:
|
|
483
|
+
case "EngineTemperatureAvg":
|
|
484
|
+
return TemperatureEnum.EngineTemperatureAvg;
|
|
485
|
+
case 31:
|
|
486
|
+
case "BatteryTemperatureMin":
|
|
487
|
+
return TemperatureEnum.BatteryTemperatureMin;
|
|
488
|
+
case 32:
|
|
489
|
+
case "BatteryTemperatureMax":
|
|
490
|
+
return TemperatureEnum.BatteryTemperatureMax;
|
|
491
|
+
case 33:
|
|
492
|
+
case "BatteryTemperatureAvg":
|
|
493
|
+
return TemperatureEnum.BatteryTemperatureAvg;
|
|
494
|
+
case 34:
|
|
495
|
+
case "DallasTemperature1Min":
|
|
496
|
+
return TemperatureEnum.DallasTemperature1Min;
|
|
497
|
+
case 35:
|
|
498
|
+
case "DallasTemperature1Max":
|
|
499
|
+
return TemperatureEnum.DallasTemperature1Max;
|
|
500
|
+
case 36:
|
|
501
|
+
case "DallasTemperature1Avg":
|
|
502
|
+
return TemperatureEnum.DallasTemperature1Avg;
|
|
503
|
+
case 37:
|
|
504
|
+
case "DallasTemperature2Min":
|
|
505
|
+
return TemperatureEnum.DallasTemperature2Min;
|
|
506
|
+
case 38:
|
|
507
|
+
case "DallasTemperature2Max":
|
|
508
|
+
return TemperatureEnum.DallasTemperature2Max;
|
|
509
|
+
case 39:
|
|
510
|
+
case "DallasTemperature2Avg":
|
|
511
|
+
return TemperatureEnum.DallasTemperature2Avg;
|
|
512
|
+
case 40:
|
|
513
|
+
case "DallasTemperature3Min":
|
|
514
|
+
return TemperatureEnum.DallasTemperature3Min;
|
|
515
|
+
case 41:
|
|
516
|
+
case "DallasTemperature3Max":
|
|
517
|
+
return TemperatureEnum.DallasTemperature3Max;
|
|
518
|
+
case 42:
|
|
519
|
+
case "DallasTemperature3Avg":
|
|
520
|
+
return TemperatureEnum.DallasTemperature3Avg;
|
|
521
|
+
case 43:
|
|
522
|
+
case "DallasTemperature4Min":
|
|
523
|
+
return TemperatureEnum.DallasTemperature4Min;
|
|
524
|
+
case 44:
|
|
525
|
+
case "DallasTemperature4Max":
|
|
526
|
+
return TemperatureEnum.DallasTemperature4Max;
|
|
527
|
+
case 45:
|
|
528
|
+
case "DallasTemperature4Avg":
|
|
529
|
+
return TemperatureEnum.DallasTemperature4Avg;
|
|
530
|
+
case 46:
|
|
531
|
+
case "LLSTemperature01Min":
|
|
532
|
+
return TemperatureEnum.LLSTemperature01Min;
|
|
533
|
+
case 47:
|
|
534
|
+
case "LLSTemperature01Max":
|
|
535
|
+
return TemperatureEnum.LLSTemperature01Max;
|
|
536
|
+
case 48:
|
|
537
|
+
case "LLSTemperature01Avg":
|
|
538
|
+
return TemperatureEnum.LLSTemperature01Avg;
|
|
539
|
+
case 49:
|
|
540
|
+
case "LLSTemperature02Min":
|
|
541
|
+
return TemperatureEnum.LLSTemperature02Min;
|
|
542
|
+
case 50:
|
|
543
|
+
case "LLSTemperature02Max":
|
|
544
|
+
return TemperatureEnum.LLSTemperature02Max;
|
|
545
|
+
case 51:
|
|
546
|
+
case "LLSTemperature02Avg":
|
|
547
|
+
return TemperatureEnum.LLSTemperature02Avg;
|
|
548
|
+
case 52:
|
|
549
|
+
case "LLSTemperature03Min":
|
|
550
|
+
return TemperatureEnum.LLSTemperature03Min;
|
|
551
|
+
case 53:
|
|
552
|
+
case "LLSTemperature03Max":
|
|
553
|
+
return TemperatureEnum.LLSTemperature03Max;
|
|
554
|
+
case 54:
|
|
555
|
+
case "LLSTemperature03Avg":
|
|
556
|
+
return TemperatureEnum.LLSTemperature03Avg;
|
|
557
|
+
case 55:
|
|
558
|
+
case "LLSTemperature04Min":
|
|
559
|
+
return TemperatureEnum.LLSTemperature04Min;
|
|
560
|
+
case 56:
|
|
561
|
+
case "LLSTemperature04Max":
|
|
562
|
+
return TemperatureEnum.LLSTemperature04Max;
|
|
563
|
+
case 59:
|
|
564
|
+
case "LLSTemperature04Avg":
|
|
565
|
+
return TemperatureEnum.LLSTemperature04Avg;
|
|
566
|
+
case 60:
|
|
567
|
+
case "EyeTemperature01Min":
|
|
568
|
+
return TemperatureEnum.EyeTemperature01Min;
|
|
569
|
+
case 61:
|
|
570
|
+
case "EyeTemperature01Max":
|
|
571
|
+
return TemperatureEnum.EyeTemperature01Max;
|
|
572
|
+
case 62:
|
|
573
|
+
case "EyeTemperature01Avg":
|
|
574
|
+
return TemperatureEnum.EyeTemperature01Avg;
|
|
575
|
+
case 63:
|
|
576
|
+
case "EyeTemperature02Min":
|
|
577
|
+
return TemperatureEnum.EyeTemperature02Min;
|
|
578
|
+
case 64:
|
|
579
|
+
case "EyeTemperature02Max":
|
|
580
|
+
return TemperatureEnum.EyeTemperature02Max;
|
|
581
|
+
case 65:
|
|
582
|
+
case "EyeTemperature02Avg":
|
|
583
|
+
return TemperatureEnum.EyeTemperature02Avg;
|
|
584
|
+
case 66:
|
|
585
|
+
case "EyeTemperature03Min":
|
|
586
|
+
return TemperatureEnum.EyeTemperature03Min;
|
|
587
|
+
case 67:
|
|
588
|
+
case "EyeTemperature03Max":
|
|
589
|
+
return TemperatureEnum.EyeTemperature03Max;
|
|
590
|
+
case 68:
|
|
591
|
+
case "EyeTemperature03Avg":
|
|
592
|
+
return TemperatureEnum.EyeTemperature03Avg;
|
|
593
|
+
case 69:
|
|
594
|
+
case "EyeTemperature04Min":
|
|
595
|
+
return TemperatureEnum.EyeTemperature04Min;
|
|
596
|
+
case 70:
|
|
597
|
+
case "EyeTemperature04Max":
|
|
598
|
+
return TemperatureEnum.EyeTemperature04Max;
|
|
599
|
+
case 71:
|
|
600
|
+
case "EyeTemperature04Avg":
|
|
601
|
+
return TemperatureEnum.EyeTemperature04Avg;
|
|
602
|
+
case -1:
|
|
603
|
+
case "UNRECOGNIZED":
|
|
604
|
+
default:
|
|
605
|
+
return TemperatureEnum.UNRECOGNIZED;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
function temperatureEnumToJSON(object) {
|
|
609
|
+
switch (object) {
|
|
610
|
+
case TemperatureEnum.DefaultTemperatureMin:
|
|
611
|
+
return "DefaultTemperatureMin";
|
|
612
|
+
case TemperatureEnum.DefaultTemperatureMax:
|
|
613
|
+
return "DefaultTemperatureMax";
|
|
614
|
+
case TemperatureEnum.DefaultTemperatureAvg:
|
|
615
|
+
return "DefaultTemperatureAvg";
|
|
616
|
+
case TemperatureEnum.IntakeAirTemperatureMin:
|
|
617
|
+
return "IntakeAirTemperatureMin";
|
|
618
|
+
case TemperatureEnum.IntakeAirTemperatureMax:
|
|
619
|
+
return "IntakeAirTemperatureMax";
|
|
620
|
+
case TemperatureEnum.IntakeAirTemperatureAvg:
|
|
621
|
+
return "IntakeAirTemperatureAvg";
|
|
622
|
+
case TemperatureEnum.AmbientAirTemperatureMin:
|
|
623
|
+
return "AmbientAirTemperatureMin";
|
|
624
|
+
case TemperatureEnum.AmbientAirTemperatureMax:
|
|
625
|
+
return "AmbientAirTemperatureMax";
|
|
626
|
+
case TemperatureEnum.AmbientAirTemperatureAvg:
|
|
627
|
+
return "AmbientAirTemperatureAvg";
|
|
628
|
+
case TemperatureEnum.EngineOilTemperatureMin:
|
|
629
|
+
return "EngineOilTemperatureMin";
|
|
630
|
+
case TemperatureEnum.EngineOilTemperatureMax:
|
|
631
|
+
return "EngineOilTemperatureMax";
|
|
632
|
+
case TemperatureEnum.EngineOilTemperatureAvg:
|
|
633
|
+
return "EngineOilTemperatureAvg";
|
|
634
|
+
case TemperatureEnum.CoolantTemperatureMin:
|
|
635
|
+
return "CoolantTemperatureMin";
|
|
636
|
+
case TemperatureEnum.CoolantTemperatureMax:
|
|
637
|
+
return "CoolantTemperatureMax";
|
|
638
|
+
case TemperatureEnum.CoolantTemperatureAvg:
|
|
639
|
+
return "CoolantTemperatureAvg";
|
|
640
|
+
case TemperatureEnum.BLETemperature01Min:
|
|
641
|
+
return "BLETemperature01Min";
|
|
642
|
+
case TemperatureEnum.BLETemperature01Max:
|
|
643
|
+
return "BLETemperature01Max";
|
|
644
|
+
case TemperatureEnum.BLETemperature01Avg:
|
|
645
|
+
return "BLETemperature01Avg";
|
|
646
|
+
case TemperatureEnum.BLETemperature02Min:
|
|
647
|
+
return "BLETemperature02Min";
|
|
648
|
+
case TemperatureEnum.BLETemperature02Max:
|
|
649
|
+
return "BLETemperature02Max";
|
|
650
|
+
case TemperatureEnum.BLETemperature02Avg:
|
|
651
|
+
return "BLETemperature02Avg";
|
|
652
|
+
case TemperatureEnum.BLETemperature03Min:
|
|
653
|
+
return "BLETemperature03Min";
|
|
654
|
+
case TemperatureEnum.BLETemperature03Max:
|
|
655
|
+
return "BLETemperature03Max";
|
|
656
|
+
case TemperatureEnum.BLETemperature03Avg:
|
|
657
|
+
return "BLETemperature03Avg";
|
|
658
|
+
case TemperatureEnum.BLETemperature04Min:
|
|
659
|
+
return "BLETemperature04Min";
|
|
660
|
+
case TemperatureEnum.BLETemperature04Max:
|
|
661
|
+
return "BLETemperature04Max";
|
|
662
|
+
case TemperatureEnum.BLETemperature04Avg:
|
|
663
|
+
return "BLETemperature04Avg";
|
|
664
|
+
case TemperatureEnum.EngineTemperatureMin:
|
|
665
|
+
return "EngineTemperatureMin";
|
|
666
|
+
case TemperatureEnum.EngineTemperatureMax:
|
|
667
|
+
return "EngineTemperatureMax";
|
|
668
|
+
case TemperatureEnum.EngineTemperatureAvg:
|
|
669
|
+
return "EngineTemperatureAvg";
|
|
670
|
+
case TemperatureEnum.BatteryTemperatureMin:
|
|
671
|
+
return "BatteryTemperatureMin";
|
|
672
|
+
case TemperatureEnum.BatteryTemperatureMax:
|
|
673
|
+
return "BatteryTemperatureMax";
|
|
674
|
+
case TemperatureEnum.BatteryTemperatureAvg:
|
|
675
|
+
return "BatteryTemperatureAvg";
|
|
676
|
+
case TemperatureEnum.DallasTemperature1Min:
|
|
677
|
+
return "DallasTemperature1Min";
|
|
678
|
+
case TemperatureEnum.DallasTemperature1Max:
|
|
679
|
+
return "DallasTemperature1Max";
|
|
680
|
+
case TemperatureEnum.DallasTemperature1Avg:
|
|
681
|
+
return "DallasTemperature1Avg";
|
|
682
|
+
case TemperatureEnum.DallasTemperature2Min:
|
|
683
|
+
return "DallasTemperature2Min";
|
|
684
|
+
case TemperatureEnum.DallasTemperature2Max:
|
|
685
|
+
return "DallasTemperature2Max";
|
|
686
|
+
case TemperatureEnum.DallasTemperature2Avg:
|
|
687
|
+
return "DallasTemperature2Avg";
|
|
688
|
+
case TemperatureEnum.DallasTemperature3Min:
|
|
689
|
+
return "DallasTemperature3Min";
|
|
690
|
+
case TemperatureEnum.DallasTemperature3Max:
|
|
691
|
+
return "DallasTemperature3Max";
|
|
692
|
+
case TemperatureEnum.DallasTemperature3Avg:
|
|
693
|
+
return "DallasTemperature3Avg";
|
|
694
|
+
case TemperatureEnum.DallasTemperature4Min:
|
|
695
|
+
return "DallasTemperature4Min";
|
|
696
|
+
case TemperatureEnum.DallasTemperature4Max:
|
|
697
|
+
return "DallasTemperature4Max";
|
|
698
|
+
case TemperatureEnum.DallasTemperature4Avg:
|
|
699
|
+
return "DallasTemperature4Avg";
|
|
700
|
+
case TemperatureEnum.LLSTemperature01Min:
|
|
701
|
+
return "LLSTemperature01Min";
|
|
702
|
+
case TemperatureEnum.LLSTemperature01Max:
|
|
703
|
+
return "LLSTemperature01Max";
|
|
704
|
+
case TemperatureEnum.LLSTemperature01Avg:
|
|
705
|
+
return "LLSTemperature01Avg";
|
|
706
|
+
case TemperatureEnum.LLSTemperature02Min:
|
|
707
|
+
return "LLSTemperature02Min";
|
|
708
|
+
case TemperatureEnum.LLSTemperature02Max:
|
|
709
|
+
return "LLSTemperature02Max";
|
|
710
|
+
case TemperatureEnum.LLSTemperature02Avg:
|
|
711
|
+
return "LLSTemperature02Avg";
|
|
712
|
+
case TemperatureEnum.LLSTemperature03Min:
|
|
713
|
+
return "LLSTemperature03Min";
|
|
714
|
+
case TemperatureEnum.LLSTemperature03Max:
|
|
715
|
+
return "LLSTemperature03Max";
|
|
716
|
+
case TemperatureEnum.LLSTemperature03Avg:
|
|
717
|
+
return "LLSTemperature03Avg";
|
|
718
|
+
case TemperatureEnum.LLSTemperature04Min:
|
|
719
|
+
return "LLSTemperature04Min";
|
|
720
|
+
case TemperatureEnum.LLSTemperature04Max:
|
|
721
|
+
return "LLSTemperature04Max";
|
|
722
|
+
case TemperatureEnum.LLSTemperature04Avg:
|
|
723
|
+
return "LLSTemperature04Avg";
|
|
724
|
+
case TemperatureEnum.EyeTemperature01Min:
|
|
725
|
+
return "EyeTemperature01Min";
|
|
726
|
+
case TemperatureEnum.EyeTemperature01Max:
|
|
727
|
+
return "EyeTemperature01Max";
|
|
728
|
+
case TemperatureEnum.EyeTemperature01Avg:
|
|
729
|
+
return "EyeTemperature01Avg";
|
|
730
|
+
case TemperatureEnum.EyeTemperature02Min:
|
|
731
|
+
return "EyeTemperature02Min";
|
|
732
|
+
case TemperatureEnum.EyeTemperature02Max:
|
|
733
|
+
return "EyeTemperature02Max";
|
|
734
|
+
case TemperatureEnum.EyeTemperature02Avg:
|
|
735
|
+
return "EyeTemperature02Avg";
|
|
736
|
+
case TemperatureEnum.EyeTemperature03Min:
|
|
737
|
+
return "EyeTemperature03Min";
|
|
738
|
+
case TemperatureEnum.EyeTemperature03Max:
|
|
739
|
+
return "EyeTemperature03Max";
|
|
740
|
+
case TemperatureEnum.EyeTemperature03Avg:
|
|
741
|
+
return "EyeTemperature03Avg";
|
|
742
|
+
case TemperatureEnum.EyeTemperature04Min:
|
|
743
|
+
return "EyeTemperature04Min";
|
|
744
|
+
case TemperatureEnum.EyeTemperature04Max:
|
|
745
|
+
return "EyeTemperature04Max";
|
|
746
|
+
case TemperatureEnum.EyeTemperature04Avg:
|
|
747
|
+
return "EyeTemperature04Avg";
|
|
748
|
+
case TemperatureEnum.UNRECOGNIZED:
|
|
749
|
+
default:
|
|
750
|
+
return "UNRECOGNIZED";
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
var TripTask_EventType;
|
|
754
|
+
(function (TripTask_EventType) {
|
|
755
|
+
TripTask_EventType[TripTask_EventType["None"] = 0] = "None";
|
|
756
|
+
TripTask_EventType[TripTask_EventType["Odyssey"] = 1] = "Odyssey";
|
|
757
|
+
TripTask_EventType[TripTask_EventType["Fusion"] = 2] = "Fusion";
|
|
758
|
+
TripTask_EventType[TripTask_EventType["Monthly"] = 3] = "Monthly";
|
|
759
|
+
TripTask_EventType[TripTask_EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
760
|
+
})(TripTask_EventType || (exports.TripTask_EventType = TripTask_EventType = {}));
|
|
761
|
+
function tripTask_EventTypeFromJSON(object) {
|
|
762
|
+
switch (object) {
|
|
763
|
+
case 0:
|
|
764
|
+
case "None":
|
|
765
|
+
return TripTask_EventType.None;
|
|
766
|
+
case 1:
|
|
767
|
+
case "Odyssey":
|
|
768
|
+
return TripTask_EventType.Odyssey;
|
|
769
|
+
case 2:
|
|
770
|
+
case "Fusion":
|
|
771
|
+
return TripTask_EventType.Fusion;
|
|
772
|
+
case 3:
|
|
773
|
+
case "Monthly":
|
|
774
|
+
return TripTask_EventType.Monthly;
|
|
775
|
+
case -1:
|
|
776
|
+
case "UNRECOGNIZED":
|
|
777
|
+
default:
|
|
778
|
+
return TripTask_EventType.UNRECOGNIZED;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
function tripTask_EventTypeToJSON(object) {
|
|
782
|
+
switch (object) {
|
|
783
|
+
case TripTask_EventType.None:
|
|
784
|
+
return "None";
|
|
785
|
+
case TripTask_EventType.Odyssey:
|
|
786
|
+
return "Odyssey";
|
|
787
|
+
case TripTask_EventType.Fusion:
|
|
788
|
+
return "Fusion";
|
|
789
|
+
case TripTask_EventType.Monthly:
|
|
790
|
+
return "Monthly";
|
|
791
|
+
case TripTask_EventType.UNRECOGNIZED:
|
|
792
|
+
default:
|
|
793
|
+
return "UNRECOGNIZED";
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
function createBaseMonthly() {
|
|
797
|
+
return {
|
|
798
|
+
id: 0,
|
|
799
|
+
deviceId: 0,
|
|
800
|
+
mileage: 0,
|
|
801
|
+
idling: 0,
|
|
802
|
+
parking: 0,
|
|
803
|
+
moving: 0,
|
|
804
|
+
towing: 0,
|
|
805
|
+
totalSpeed: 0,
|
|
806
|
+
sumSpeed: 0,
|
|
807
|
+
maxSpeed: 0,
|
|
808
|
+
trips: 0,
|
|
809
|
+
compact: undefined,
|
|
810
|
+
startedAt: undefined,
|
|
811
|
+
finishedAt: undefined,
|
|
812
|
+
createdAt: undefined,
|
|
813
|
+
updatedAt: undefined,
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
exports.Monthly = {
|
|
817
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
818
|
+
if (message.id !== 0) {
|
|
819
|
+
writer.uint32(8).uint64(message.id);
|
|
820
|
+
}
|
|
821
|
+
if (message.deviceId !== 0) {
|
|
822
|
+
writer.uint32(16).uint64(message.deviceId);
|
|
823
|
+
}
|
|
824
|
+
if (message.mileage !== 0) {
|
|
825
|
+
writer.uint32(24).uint32(message.mileage);
|
|
826
|
+
}
|
|
827
|
+
if (message.idling !== 0) {
|
|
828
|
+
writer.uint32(32).uint32(message.idling);
|
|
829
|
+
}
|
|
830
|
+
if (message.parking !== 0) {
|
|
831
|
+
writer.uint32(40).uint32(message.parking);
|
|
832
|
+
}
|
|
833
|
+
if (message.moving !== 0) {
|
|
834
|
+
writer.uint32(48).uint32(message.moving);
|
|
835
|
+
}
|
|
836
|
+
if (message.towing !== 0) {
|
|
837
|
+
writer.uint32(56).uint32(message.towing);
|
|
838
|
+
}
|
|
839
|
+
if (message.totalSpeed !== 0) {
|
|
840
|
+
writer.uint32(64).uint32(message.totalSpeed);
|
|
841
|
+
}
|
|
842
|
+
if (message.sumSpeed !== 0) {
|
|
843
|
+
writer.uint32(72).uint64(message.sumSpeed);
|
|
844
|
+
}
|
|
845
|
+
if (message.maxSpeed !== 0) {
|
|
846
|
+
writer.uint32(80).uint32(message.maxSpeed);
|
|
847
|
+
}
|
|
848
|
+
if (message.trips !== 0) {
|
|
849
|
+
writer.uint32(88).uint32(message.trips);
|
|
850
|
+
}
|
|
851
|
+
if (message.compact !== undefined) {
|
|
852
|
+
exports.MonthlyCompact.encode(message.compact, writer.uint32(98).fork()).join();
|
|
853
|
+
}
|
|
854
|
+
if (message.startedAt !== undefined) {
|
|
855
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(106).fork()).join();
|
|
856
|
+
}
|
|
857
|
+
if (message.finishedAt !== undefined) {
|
|
858
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(114).fork()).join();
|
|
859
|
+
}
|
|
860
|
+
if (message.createdAt !== undefined) {
|
|
861
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
|
|
862
|
+
}
|
|
863
|
+
if (message.updatedAt !== undefined) {
|
|
864
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
|
|
865
|
+
}
|
|
866
|
+
return writer;
|
|
867
|
+
},
|
|
868
|
+
decode(input, length) {
|
|
869
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
870
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
871
|
+
const message = createBaseMonthly();
|
|
872
|
+
while (reader.pos < end) {
|
|
873
|
+
const tag = reader.uint32();
|
|
874
|
+
switch (tag >>> 3) {
|
|
875
|
+
case 1: {
|
|
876
|
+
if (tag !== 8) {
|
|
877
|
+
break;
|
|
878
|
+
}
|
|
879
|
+
message.id = longToNumber(reader.uint64());
|
|
880
|
+
continue;
|
|
881
|
+
}
|
|
882
|
+
case 2: {
|
|
883
|
+
if (tag !== 16) {
|
|
884
|
+
break;
|
|
885
|
+
}
|
|
886
|
+
message.deviceId = longToNumber(reader.uint64());
|
|
887
|
+
continue;
|
|
888
|
+
}
|
|
889
|
+
case 3: {
|
|
890
|
+
if (tag !== 24) {
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
message.mileage = reader.uint32();
|
|
894
|
+
continue;
|
|
895
|
+
}
|
|
896
|
+
case 4: {
|
|
897
|
+
if (tag !== 32) {
|
|
898
|
+
break;
|
|
899
|
+
}
|
|
900
|
+
message.idling = reader.uint32();
|
|
901
|
+
continue;
|
|
902
|
+
}
|
|
903
|
+
case 5: {
|
|
904
|
+
if (tag !== 40) {
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
message.parking = reader.uint32();
|
|
908
|
+
continue;
|
|
909
|
+
}
|
|
910
|
+
case 6: {
|
|
911
|
+
if (tag !== 48) {
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
message.moving = reader.uint32();
|
|
915
|
+
continue;
|
|
916
|
+
}
|
|
917
|
+
case 7: {
|
|
918
|
+
if (tag !== 56) {
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
message.towing = reader.uint32();
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
case 8: {
|
|
925
|
+
if (tag !== 64) {
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
message.totalSpeed = reader.uint32();
|
|
929
|
+
continue;
|
|
930
|
+
}
|
|
931
|
+
case 9: {
|
|
932
|
+
if (tag !== 72) {
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
message.sumSpeed = longToNumber(reader.uint64());
|
|
936
|
+
continue;
|
|
937
|
+
}
|
|
938
|
+
case 10: {
|
|
939
|
+
if (tag !== 80) {
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
message.maxSpeed = reader.uint32();
|
|
943
|
+
continue;
|
|
944
|
+
}
|
|
945
|
+
case 11: {
|
|
946
|
+
if (tag !== 88) {
|
|
947
|
+
break;
|
|
948
|
+
}
|
|
949
|
+
message.trips = reader.uint32();
|
|
950
|
+
continue;
|
|
951
|
+
}
|
|
952
|
+
case 12: {
|
|
953
|
+
if (tag !== 98) {
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
message.compact = exports.MonthlyCompact.decode(reader, reader.uint32());
|
|
957
|
+
continue;
|
|
958
|
+
}
|
|
959
|
+
case 13: {
|
|
960
|
+
if (tag !== 106) {
|
|
961
|
+
break;
|
|
962
|
+
}
|
|
963
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
case 14: {
|
|
967
|
+
if (tag !== 114) {
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
971
|
+
continue;
|
|
972
|
+
}
|
|
973
|
+
case 15: {
|
|
974
|
+
if (tag !== 122) {
|
|
975
|
+
break;
|
|
976
|
+
}
|
|
977
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
978
|
+
continue;
|
|
979
|
+
}
|
|
980
|
+
case 16: {
|
|
981
|
+
if (tag !== 130) {
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
985
|
+
continue;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
989
|
+
break;
|
|
990
|
+
}
|
|
991
|
+
reader.skip(tag & 7);
|
|
992
|
+
}
|
|
993
|
+
return message;
|
|
994
|
+
},
|
|
995
|
+
fromJSON(object) {
|
|
996
|
+
return {
|
|
997
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
998
|
+
deviceId: isSet(object.deviceId) ? globalThis.Number(object.deviceId) : 0,
|
|
999
|
+
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
1000
|
+
idling: isSet(object.idling) ? globalThis.Number(object.idling) : 0,
|
|
1001
|
+
parking: isSet(object.parking) ? globalThis.Number(object.parking) : 0,
|
|
1002
|
+
moving: isSet(object.moving) ? globalThis.Number(object.moving) : 0,
|
|
1003
|
+
towing: isSet(object.towing) ? globalThis.Number(object.towing) : 0,
|
|
1004
|
+
totalSpeed: isSet(object.totalSpeed) ? globalThis.Number(object.totalSpeed) : 0,
|
|
1005
|
+
sumSpeed: isSet(object.sumSpeed) ? globalThis.Number(object.sumSpeed) : 0,
|
|
1006
|
+
maxSpeed: isSet(object.maxSpeed) ? globalThis.Number(object.maxSpeed) : 0,
|
|
1007
|
+
trips: isSet(object.trips) ? globalThis.Number(object.trips) : 0,
|
|
1008
|
+
compact: isSet(object.compact) ? exports.MonthlyCompact.fromJSON(object.compact) : undefined,
|
|
1009
|
+
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
1010
|
+
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
1011
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
1012
|
+
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
1013
|
+
};
|
|
1014
|
+
},
|
|
1015
|
+
toJSON(message) {
|
|
1016
|
+
const obj = {};
|
|
1017
|
+
if (message.id !== 0) {
|
|
1018
|
+
obj.id = Math.round(message.id);
|
|
1019
|
+
}
|
|
1020
|
+
if (message.deviceId !== 0) {
|
|
1021
|
+
obj.deviceId = Math.round(message.deviceId);
|
|
1022
|
+
}
|
|
1023
|
+
if (message.mileage !== 0) {
|
|
1024
|
+
obj.mileage = Math.round(message.mileage);
|
|
1025
|
+
}
|
|
1026
|
+
if (message.idling !== 0) {
|
|
1027
|
+
obj.idling = Math.round(message.idling);
|
|
1028
|
+
}
|
|
1029
|
+
if (message.parking !== 0) {
|
|
1030
|
+
obj.parking = Math.round(message.parking);
|
|
1031
|
+
}
|
|
1032
|
+
if (message.moving !== 0) {
|
|
1033
|
+
obj.moving = Math.round(message.moving);
|
|
1034
|
+
}
|
|
1035
|
+
if (message.towing !== 0) {
|
|
1036
|
+
obj.towing = Math.round(message.towing);
|
|
1037
|
+
}
|
|
1038
|
+
if (message.totalSpeed !== 0) {
|
|
1039
|
+
obj.totalSpeed = Math.round(message.totalSpeed);
|
|
1040
|
+
}
|
|
1041
|
+
if (message.sumSpeed !== 0) {
|
|
1042
|
+
obj.sumSpeed = Math.round(message.sumSpeed);
|
|
1043
|
+
}
|
|
1044
|
+
if (message.maxSpeed !== 0) {
|
|
1045
|
+
obj.maxSpeed = Math.round(message.maxSpeed);
|
|
1046
|
+
}
|
|
1047
|
+
if (message.trips !== 0) {
|
|
1048
|
+
obj.trips = Math.round(message.trips);
|
|
1049
|
+
}
|
|
1050
|
+
if (message.compact !== undefined) {
|
|
1051
|
+
obj.compact = exports.MonthlyCompact.toJSON(message.compact);
|
|
1052
|
+
}
|
|
1053
|
+
if (message.startedAt !== undefined) {
|
|
1054
|
+
obj.startedAt = message.startedAt.toISOString();
|
|
1055
|
+
}
|
|
1056
|
+
if (message.finishedAt !== undefined) {
|
|
1057
|
+
obj.finishedAt = message.finishedAt.toISOString();
|
|
1058
|
+
}
|
|
1059
|
+
if (message.createdAt !== undefined) {
|
|
1060
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
1061
|
+
}
|
|
1062
|
+
if (message.updatedAt !== undefined) {
|
|
1063
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
1064
|
+
}
|
|
1065
|
+
return obj;
|
|
1066
|
+
},
|
|
1067
|
+
create(base) {
|
|
1068
|
+
return exports.Monthly.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1069
|
+
},
|
|
1070
|
+
fromPartial(object) {
|
|
1071
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1072
|
+
const message = createBaseMonthly();
|
|
1073
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
1074
|
+
message.deviceId = (_b = object.deviceId) !== null && _b !== void 0 ? _b : 0;
|
|
1075
|
+
message.mileage = (_c = object.mileage) !== null && _c !== void 0 ? _c : 0;
|
|
1076
|
+
message.idling = (_d = object.idling) !== null && _d !== void 0 ? _d : 0;
|
|
1077
|
+
message.parking = (_e = object.parking) !== null && _e !== void 0 ? _e : 0;
|
|
1078
|
+
message.moving = (_f = object.moving) !== null && _f !== void 0 ? _f : 0;
|
|
1079
|
+
message.towing = (_g = object.towing) !== null && _g !== void 0 ? _g : 0;
|
|
1080
|
+
message.totalSpeed = (_h = object.totalSpeed) !== null && _h !== void 0 ? _h : 0;
|
|
1081
|
+
message.sumSpeed = (_j = object.sumSpeed) !== null && _j !== void 0 ? _j : 0;
|
|
1082
|
+
message.maxSpeed = (_k = object.maxSpeed) !== null && _k !== void 0 ? _k : 0;
|
|
1083
|
+
message.trips = (_l = object.trips) !== null && _l !== void 0 ? _l : 0;
|
|
1084
|
+
message.compact = (object.compact !== undefined && object.compact !== null)
|
|
1085
|
+
? exports.MonthlyCompact.fromPartial(object.compact)
|
|
1086
|
+
: undefined;
|
|
1087
|
+
message.startedAt = (_m = object.startedAt) !== null && _m !== void 0 ? _m : undefined;
|
|
1088
|
+
message.finishedAt = (_o = object.finishedAt) !== null && _o !== void 0 ? _o : undefined;
|
|
1089
|
+
message.createdAt = (_p = object.createdAt) !== null && _p !== void 0 ? _p : undefined;
|
|
1090
|
+
message.updatedAt = (_q = object.updatedAt) !== null && _q !== void 0 ? _q : undefined;
|
|
1091
|
+
return message;
|
|
1092
|
+
},
|
|
1093
|
+
};
|
|
1094
|
+
function createBaseMonthlyCompact() {
|
|
1095
|
+
return {
|
|
1096
|
+
cost: 0,
|
|
1097
|
+
records: 0,
|
|
1098
|
+
greenDriving: {},
|
|
1099
|
+
temperature: {},
|
|
1100
|
+
humidity: {},
|
|
1101
|
+
ignition: undefined,
|
|
1102
|
+
doorOpened: undefined,
|
|
1103
|
+
fuelUsed: undefined,
|
|
1104
|
+
fuelRate: undefined,
|
|
1105
|
+
engineRpm: undefined,
|
|
1106
|
+
engineLoad: undefined,
|
|
1107
|
+
crashes: {},
|
|
1108
|
+
speeds: {},
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
exports.MonthlyCompact = {
|
|
1112
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1113
|
+
if (message.cost !== 0) {
|
|
1114
|
+
writer.uint32(8).uint32(message.cost);
|
|
1115
|
+
}
|
|
1116
|
+
if (message.records !== 0) {
|
|
1117
|
+
writer.uint32(16).uint32(message.records);
|
|
1118
|
+
}
|
|
1119
|
+
Object.entries(message.greenDriving).forEach(([key, value]) => {
|
|
1120
|
+
exports.MonthlyCompact_GreenDrivingEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
1121
|
+
});
|
|
1122
|
+
Object.entries(message.temperature).forEach(([key, value]) => {
|
|
1123
|
+
exports.MonthlyCompact_TemperatureEntry.encode({ key: key, value }, writer.uint32(34).fork()).join();
|
|
1124
|
+
});
|
|
1125
|
+
Object.entries(message.humidity).forEach(([key, value]) => {
|
|
1126
|
+
exports.MonthlyCompact_HumidityEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
|
|
1127
|
+
});
|
|
1128
|
+
if (message.ignition !== undefined) {
|
|
1129
|
+
writer.uint32(56).uint32(message.ignition);
|
|
1130
|
+
}
|
|
1131
|
+
if (message.doorOpened !== undefined) {
|
|
1132
|
+
writer.uint32(64).uint32(message.doorOpened);
|
|
1133
|
+
}
|
|
1134
|
+
if (message.fuelUsed !== undefined) {
|
|
1135
|
+
writer.uint32(72).uint32(message.fuelUsed);
|
|
1136
|
+
}
|
|
1137
|
+
if (message.fuelRate !== undefined) {
|
|
1138
|
+
writer.uint32(80).uint32(message.fuelRate);
|
|
1139
|
+
}
|
|
1140
|
+
if (message.engineRpm !== undefined) {
|
|
1141
|
+
writer.uint32(88).uint32(message.engineRpm);
|
|
1142
|
+
}
|
|
1143
|
+
if (message.engineLoad !== undefined) {
|
|
1144
|
+
writer.uint32(96).uint32(message.engineLoad);
|
|
1145
|
+
}
|
|
1146
|
+
Object.entries(message.crashes).forEach(([key, value]) => {
|
|
1147
|
+
exports.MonthlyCompact_CrashesEntry.encode({ key: key, value }, writer.uint32(106).fork()).join();
|
|
1148
|
+
});
|
|
1149
|
+
Object.entries(message.speeds).forEach(([key, value]) => {
|
|
1150
|
+
exports.MonthlyCompact_SpeedsEntry.encode({ key: key, value }, writer.uint32(114).fork()).join();
|
|
1151
|
+
});
|
|
1152
|
+
return writer;
|
|
1153
|
+
},
|
|
1154
|
+
decode(input, length) {
|
|
1155
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1156
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1157
|
+
const message = createBaseMonthlyCompact();
|
|
1158
|
+
while (reader.pos < end) {
|
|
1159
|
+
const tag = reader.uint32();
|
|
1160
|
+
switch (tag >>> 3) {
|
|
1161
|
+
case 1: {
|
|
1162
|
+
if (tag !== 8) {
|
|
1163
|
+
break;
|
|
1164
|
+
}
|
|
1165
|
+
message.cost = reader.uint32();
|
|
1166
|
+
continue;
|
|
1167
|
+
}
|
|
1168
|
+
case 2: {
|
|
1169
|
+
if (tag !== 16) {
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
message.records = reader.uint32();
|
|
1173
|
+
continue;
|
|
1174
|
+
}
|
|
1175
|
+
case 3: {
|
|
1176
|
+
if (tag !== 26) {
|
|
1177
|
+
break;
|
|
1178
|
+
}
|
|
1179
|
+
const entry3 = exports.MonthlyCompact_GreenDrivingEntry.decode(reader, reader.uint32());
|
|
1180
|
+
if (entry3.value !== undefined) {
|
|
1181
|
+
message.greenDriving[entry3.key] = entry3.value;
|
|
1182
|
+
}
|
|
1183
|
+
continue;
|
|
1184
|
+
}
|
|
1185
|
+
case 4: {
|
|
1186
|
+
if (tag !== 34) {
|
|
1187
|
+
break;
|
|
1188
|
+
}
|
|
1189
|
+
const entry4 = exports.MonthlyCompact_TemperatureEntry.decode(reader, reader.uint32());
|
|
1190
|
+
if (entry4.value !== undefined) {
|
|
1191
|
+
message.temperature[entry4.key] = entry4.value;
|
|
1192
|
+
}
|
|
1193
|
+
continue;
|
|
1194
|
+
}
|
|
1195
|
+
case 5: {
|
|
1196
|
+
if (tag !== 42) {
|
|
1197
|
+
break;
|
|
1198
|
+
}
|
|
1199
|
+
const entry5 = exports.MonthlyCompact_HumidityEntry.decode(reader, reader.uint32());
|
|
1200
|
+
if (entry5.value !== undefined) {
|
|
1201
|
+
message.humidity[entry5.key] = entry5.value;
|
|
1202
|
+
}
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
case 7: {
|
|
1206
|
+
if (tag !== 56) {
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
message.ignition = reader.uint32();
|
|
1210
|
+
continue;
|
|
1211
|
+
}
|
|
1212
|
+
case 8: {
|
|
1213
|
+
if (tag !== 64) {
|
|
1214
|
+
break;
|
|
1215
|
+
}
|
|
1216
|
+
message.doorOpened = reader.uint32();
|
|
1217
|
+
continue;
|
|
1218
|
+
}
|
|
1219
|
+
case 9: {
|
|
1220
|
+
if (tag !== 72) {
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
message.fuelUsed = reader.uint32();
|
|
1224
|
+
continue;
|
|
1225
|
+
}
|
|
1226
|
+
case 10: {
|
|
1227
|
+
if (tag !== 80) {
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
message.fuelRate = reader.uint32();
|
|
1231
|
+
continue;
|
|
1232
|
+
}
|
|
1233
|
+
case 11: {
|
|
1234
|
+
if (tag !== 88) {
|
|
1235
|
+
break;
|
|
1236
|
+
}
|
|
1237
|
+
message.engineRpm = reader.uint32();
|
|
1238
|
+
continue;
|
|
1239
|
+
}
|
|
1240
|
+
case 12: {
|
|
1241
|
+
if (tag !== 96) {
|
|
1242
|
+
break;
|
|
1243
|
+
}
|
|
1244
|
+
message.engineLoad = reader.uint32();
|
|
1245
|
+
continue;
|
|
1246
|
+
}
|
|
1247
|
+
case 13: {
|
|
1248
|
+
if (tag !== 106) {
|
|
1249
|
+
break;
|
|
1250
|
+
}
|
|
1251
|
+
const entry13 = exports.MonthlyCompact_CrashesEntry.decode(reader, reader.uint32());
|
|
1252
|
+
if (entry13.value !== undefined) {
|
|
1253
|
+
message.crashes[entry13.key] = entry13.value;
|
|
1254
|
+
}
|
|
1255
|
+
continue;
|
|
1256
|
+
}
|
|
1257
|
+
case 14: {
|
|
1258
|
+
if (tag !== 114) {
|
|
1259
|
+
break;
|
|
1260
|
+
}
|
|
1261
|
+
const entry14 = exports.MonthlyCompact_SpeedsEntry.decode(reader, reader.uint32());
|
|
1262
|
+
if (entry14.value !== undefined) {
|
|
1263
|
+
message.speeds[entry14.key] = entry14.value;
|
|
1264
|
+
}
|
|
1265
|
+
continue;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1269
|
+
break;
|
|
1270
|
+
}
|
|
1271
|
+
reader.skip(tag & 7);
|
|
1272
|
+
}
|
|
1273
|
+
return message;
|
|
1274
|
+
},
|
|
1275
|
+
fromJSON(object) {
|
|
1276
|
+
return {
|
|
1277
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
1278
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
1279
|
+
greenDriving: isObject(object.greenDriving)
|
|
1280
|
+
? Object.entries(object.greenDriving).reduce((acc, [key, value]) => {
|
|
1281
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
1282
|
+
return acc;
|
|
1283
|
+
}, {})
|
|
1284
|
+
: {},
|
|
1285
|
+
temperature: isObject(object.temperature)
|
|
1286
|
+
? Object.entries(object.temperature).reduce((acc, [key, value]) => {
|
|
1287
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
1288
|
+
return acc;
|
|
1289
|
+
}, {})
|
|
1290
|
+
: {},
|
|
1291
|
+
humidity: isObject(object.humidity)
|
|
1292
|
+
? Object.entries(object.humidity).reduce((acc, [key, value]) => {
|
|
1293
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
1294
|
+
return acc;
|
|
1295
|
+
}, {})
|
|
1296
|
+
: {},
|
|
1297
|
+
ignition: isSet(object.ignition) ? globalThis.Number(object.ignition) : undefined,
|
|
1298
|
+
doorOpened: isSet(object.doorOpened) ? globalThis.Number(object.doorOpened) : undefined,
|
|
1299
|
+
fuelUsed: isSet(object.fuelUsed) ? globalThis.Number(object.fuelUsed) : undefined,
|
|
1300
|
+
fuelRate: isSet(object.fuelRate) ? globalThis.Number(object.fuelRate) : undefined,
|
|
1301
|
+
engineRpm: isSet(object.engineRpm) ? globalThis.Number(object.engineRpm) : undefined,
|
|
1302
|
+
engineLoad: isSet(object.engineLoad) ? globalThis.Number(object.engineLoad) : undefined,
|
|
1303
|
+
crashes: isObject(object.crashes)
|
|
1304
|
+
? Object.entries(object.crashes).reduce((acc, [key, value]) => {
|
|
1305
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
1306
|
+
return acc;
|
|
1307
|
+
}, {})
|
|
1308
|
+
: {},
|
|
1309
|
+
speeds: isObject(object.speeds)
|
|
1310
|
+
? Object.entries(object.speeds).reduce((acc, [key, value]) => {
|
|
1311
|
+
acc[globalThis.Number(key)] = exports.TripDurationStat.fromJSON(value);
|
|
1312
|
+
return acc;
|
|
1313
|
+
}, {})
|
|
1314
|
+
: {},
|
|
1315
|
+
};
|
|
1316
|
+
},
|
|
1317
|
+
toJSON(message) {
|
|
1318
|
+
const obj = {};
|
|
1319
|
+
if (message.cost !== 0) {
|
|
1320
|
+
obj.cost = Math.round(message.cost);
|
|
1321
|
+
}
|
|
1322
|
+
if (message.records !== 0) {
|
|
1323
|
+
obj.records = Math.round(message.records);
|
|
1324
|
+
}
|
|
1325
|
+
if (message.greenDriving) {
|
|
1326
|
+
const entries = Object.entries(message.greenDriving);
|
|
1327
|
+
if (entries.length > 0) {
|
|
1328
|
+
obj.greenDriving = {};
|
|
1329
|
+
entries.forEach(([k, v]) => {
|
|
1330
|
+
obj.greenDriving[k] = Math.round(v);
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
if (message.temperature) {
|
|
1335
|
+
const entries = Object.entries(message.temperature);
|
|
1336
|
+
if (entries.length > 0) {
|
|
1337
|
+
obj.temperature = {};
|
|
1338
|
+
entries.forEach(([k, v]) => {
|
|
1339
|
+
obj.temperature[k] = Math.round(v);
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
if (message.humidity) {
|
|
1344
|
+
const entries = Object.entries(message.humidity);
|
|
1345
|
+
if (entries.length > 0) {
|
|
1346
|
+
obj.humidity = {};
|
|
1347
|
+
entries.forEach(([k, v]) => {
|
|
1348
|
+
obj.humidity[k] = Math.round(v);
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
if (message.ignition !== undefined) {
|
|
1353
|
+
obj.ignition = Math.round(message.ignition);
|
|
1354
|
+
}
|
|
1355
|
+
if (message.doorOpened !== undefined) {
|
|
1356
|
+
obj.doorOpened = Math.round(message.doorOpened);
|
|
1357
|
+
}
|
|
1358
|
+
if (message.fuelUsed !== undefined) {
|
|
1359
|
+
obj.fuelUsed = Math.round(message.fuelUsed);
|
|
1360
|
+
}
|
|
1361
|
+
if (message.fuelRate !== undefined) {
|
|
1362
|
+
obj.fuelRate = Math.round(message.fuelRate);
|
|
1363
|
+
}
|
|
1364
|
+
if (message.engineRpm !== undefined) {
|
|
1365
|
+
obj.engineRpm = Math.round(message.engineRpm);
|
|
1366
|
+
}
|
|
1367
|
+
if (message.engineLoad !== undefined) {
|
|
1368
|
+
obj.engineLoad = Math.round(message.engineLoad);
|
|
1369
|
+
}
|
|
1370
|
+
if (message.crashes) {
|
|
1371
|
+
const entries = Object.entries(message.crashes);
|
|
1372
|
+
if (entries.length > 0) {
|
|
1373
|
+
obj.crashes = {};
|
|
1374
|
+
entries.forEach(([k, v]) => {
|
|
1375
|
+
obj.crashes[k] = Math.round(v);
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
if (message.speeds) {
|
|
1380
|
+
const entries = Object.entries(message.speeds);
|
|
1381
|
+
if (entries.length > 0) {
|
|
1382
|
+
obj.speeds = {};
|
|
1383
|
+
entries.forEach(([k, v]) => {
|
|
1384
|
+
obj.speeds[k] = exports.TripDurationStat.toJSON(v);
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
return obj;
|
|
1389
|
+
},
|
|
1390
|
+
create(base) {
|
|
1391
|
+
return exports.MonthlyCompact.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1392
|
+
},
|
|
1393
|
+
fromPartial(object) {
|
|
1394
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1395
|
+
const message = createBaseMonthlyCompact();
|
|
1396
|
+
message.cost = (_a = object.cost) !== null && _a !== void 0 ? _a : 0;
|
|
1397
|
+
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
1398
|
+
message.greenDriving = Object.entries((_c = object.greenDriving) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
1399
|
+
if (value !== undefined) {
|
|
1400
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
1401
|
+
}
|
|
1402
|
+
return acc;
|
|
1403
|
+
}, {});
|
|
1404
|
+
message.temperature = Object.entries((_d = object.temperature) !== null && _d !== void 0 ? _d : {}).reduce((acc, [key, value]) => {
|
|
1405
|
+
if (value !== undefined) {
|
|
1406
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
1407
|
+
}
|
|
1408
|
+
return acc;
|
|
1409
|
+
}, {});
|
|
1410
|
+
message.humidity = Object.entries((_e = object.humidity) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
|
|
1411
|
+
if (value !== undefined) {
|
|
1412
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
1413
|
+
}
|
|
1414
|
+
return acc;
|
|
1415
|
+
}, {});
|
|
1416
|
+
message.ignition = (_f = object.ignition) !== null && _f !== void 0 ? _f : undefined;
|
|
1417
|
+
message.doorOpened = (_g = object.doorOpened) !== null && _g !== void 0 ? _g : undefined;
|
|
1418
|
+
message.fuelUsed = (_h = object.fuelUsed) !== null && _h !== void 0 ? _h : undefined;
|
|
1419
|
+
message.fuelRate = (_j = object.fuelRate) !== null && _j !== void 0 ? _j : undefined;
|
|
1420
|
+
message.engineRpm = (_k = object.engineRpm) !== null && _k !== void 0 ? _k : undefined;
|
|
1421
|
+
message.engineLoad = (_l = object.engineLoad) !== null && _l !== void 0 ? _l : undefined;
|
|
1422
|
+
message.crashes = Object.entries((_m = object.crashes) !== null && _m !== void 0 ? _m : {}).reduce((acc, [key, value]) => {
|
|
1423
|
+
if (value !== undefined) {
|
|
1424
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
1425
|
+
}
|
|
1426
|
+
return acc;
|
|
1427
|
+
}, {});
|
|
1428
|
+
message.speeds = Object.entries((_o = object.speeds) !== null && _o !== void 0 ? _o : {}).reduce((acc, [key, value]) => {
|
|
1429
|
+
if (value !== undefined) {
|
|
1430
|
+
acc[globalThis.Number(key)] = exports.TripDurationStat.fromPartial(value);
|
|
1431
|
+
}
|
|
1432
|
+
return acc;
|
|
1433
|
+
}, {});
|
|
1434
|
+
return message;
|
|
1435
|
+
},
|
|
1436
|
+
};
|
|
1437
|
+
function createBaseMonthlyCompact_GreenDrivingEntry() {
|
|
1438
|
+
return { key: 0, value: 0 };
|
|
1439
|
+
}
|
|
1440
|
+
exports.MonthlyCompact_GreenDrivingEntry = {
|
|
1441
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1442
|
+
if (message.key !== 0) {
|
|
1443
|
+
writer.uint32(8).uint32(message.key);
|
|
1444
|
+
}
|
|
1445
|
+
if (message.value !== 0) {
|
|
1446
|
+
writer.uint32(16).uint32(message.value);
|
|
1447
|
+
}
|
|
1448
|
+
return writer;
|
|
1449
|
+
},
|
|
1450
|
+
decode(input, length) {
|
|
1451
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1452
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1453
|
+
const message = createBaseMonthlyCompact_GreenDrivingEntry();
|
|
1454
|
+
while (reader.pos < end) {
|
|
1455
|
+
const tag = reader.uint32();
|
|
1456
|
+
switch (tag >>> 3) {
|
|
1457
|
+
case 1: {
|
|
1458
|
+
if (tag !== 8) {
|
|
1459
|
+
break;
|
|
1460
|
+
}
|
|
1461
|
+
message.key = reader.uint32();
|
|
1462
|
+
continue;
|
|
1463
|
+
}
|
|
1464
|
+
case 2: {
|
|
1465
|
+
if (tag !== 16) {
|
|
1466
|
+
break;
|
|
1467
|
+
}
|
|
1468
|
+
message.value = reader.uint32();
|
|
1469
|
+
continue;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1473
|
+
break;
|
|
1474
|
+
}
|
|
1475
|
+
reader.skip(tag & 7);
|
|
1476
|
+
}
|
|
1477
|
+
return message;
|
|
1478
|
+
},
|
|
1479
|
+
fromJSON(object) {
|
|
1480
|
+
return {
|
|
1481
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
1482
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
1483
|
+
};
|
|
1484
|
+
},
|
|
1485
|
+
toJSON(message) {
|
|
1486
|
+
const obj = {};
|
|
1487
|
+
if (message.key !== 0) {
|
|
1488
|
+
obj.key = Math.round(message.key);
|
|
1489
|
+
}
|
|
1490
|
+
if (message.value !== 0) {
|
|
1491
|
+
obj.value = Math.round(message.value);
|
|
1492
|
+
}
|
|
1493
|
+
return obj;
|
|
1494
|
+
},
|
|
1495
|
+
create(base) {
|
|
1496
|
+
return exports.MonthlyCompact_GreenDrivingEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1497
|
+
},
|
|
1498
|
+
fromPartial(object) {
|
|
1499
|
+
var _a, _b;
|
|
1500
|
+
const message = createBaseMonthlyCompact_GreenDrivingEntry();
|
|
1501
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
1502
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
1503
|
+
return message;
|
|
1504
|
+
},
|
|
1505
|
+
};
|
|
1506
|
+
function createBaseMonthlyCompact_TemperatureEntry() {
|
|
1507
|
+
return { key: 0, value: 0 };
|
|
1508
|
+
}
|
|
1509
|
+
exports.MonthlyCompact_TemperatureEntry = {
|
|
1510
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1511
|
+
if (message.key !== 0) {
|
|
1512
|
+
writer.uint32(8).uint32(message.key);
|
|
1513
|
+
}
|
|
1514
|
+
if (message.value !== 0) {
|
|
1515
|
+
writer.uint32(16).sint32(message.value);
|
|
1516
|
+
}
|
|
1517
|
+
return writer;
|
|
1518
|
+
},
|
|
1519
|
+
decode(input, length) {
|
|
1520
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1521
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1522
|
+
const message = createBaseMonthlyCompact_TemperatureEntry();
|
|
1523
|
+
while (reader.pos < end) {
|
|
1524
|
+
const tag = reader.uint32();
|
|
1525
|
+
switch (tag >>> 3) {
|
|
1526
|
+
case 1: {
|
|
1527
|
+
if (tag !== 8) {
|
|
1528
|
+
break;
|
|
1529
|
+
}
|
|
1530
|
+
message.key = reader.uint32();
|
|
1531
|
+
continue;
|
|
1532
|
+
}
|
|
1533
|
+
case 2: {
|
|
1534
|
+
if (tag !== 16) {
|
|
1535
|
+
break;
|
|
1536
|
+
}
|
|
1537
|
+
message.value = reader.sint32();
|
|
1538
|
+
continue;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1542
|
+
break;
|
|
1543
|
+
}
|
|
1544
|
+
reader.skip(tag & 7);
|
|
1545
|
+
}
|
|
1546
|
+
return message;
|
|
1547
|
+
},
|
|
1548
|
+
fromJSON(object) {
|
|
1549
|
+
return {
|
|
1550
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
1551
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
1552
|
+
};
|
|
1553
|
+
},
|
|
1554
|
+
toJSON(message) {
|
|
1555
|
+
const obj = {};
|
|
1556
|
+
if (message.key !== 0) {
|
|
1557
|
+
obj.key = Math.round(message.key);
|
|
1558
|
+
}
|
|
1559
|
+
if (message.value !== 0) {
|
|
1560
|
+
obj.value = Math.round(message.value);
|
|
1561
|
+
}
|
|
1562
|
+
return obj;
|
|
1563
|
+
},
|
|
1564
|
+
create(base) {
|
|
1565
|
+
return exports.MonthlyCompact_TemperatureEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1566
|
+
},
|
|
1567
|
+
fromPartial(object) {
|
|
1568
|
+
var _a, _b;
|
|
1569
|
+
const message = createBaseMonthlyCompact_TemperatureEntry();
|
|
1570
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
1571
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
1572
|
+
return message;
|
|
1573
|
+
},
|
|
1574
|
+
};
|
|
1575
|
+
function createBaseMonthlyCompact_HumidityEntry() {
|
|
1576
|
+
return { key: 0, value: 0 };
|
|
1577
|
+
}
|
|
1578
|
+
exports.MonthlyCompact_HumidityEntry = {
|
|
1579
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1580
|
+
if (message.key !== 0) {
|
|
1581
|
+
writer.uint32(8).uint32(message.key);
|
|
1582
|
+
}
|
|
1583
|
+
if (message.value !== 0) {
|
|
1584
|
+
writer.uint32(16).uint32(message.value);
|
|
1585
|
+
}
|
|
1586
|
+
return writer;
|
|
1587
|
+
},
|
|
1588
|
+
decode(input, length) {
|
|
1589
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1590
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1591
|
+
const message = createBaseMonthlyCompact_HumidityEntry();
|
|
1592
|
+
while (reader.pos < end) {
|
|
1593
|
+
const tag = reader.uint32();
|
|
1594
|
+
switch (tag >>> 3) {
|
|
1595
|
+
case 1: {
|
|
1596
|
+
if (tag !== 8) {
|
|
1597
|
+
break;
|
|
1598
|
+
}
|
|
1599
|
+
message.key = reader.uint32();
|
|
1600
|
+
continue;
|
|
1601
|
+
}
|
|
1602
|
+
case 2: {
|
|
1603
|
+
if (tag !== 16) {
|
|
1604
|
+
break;
|
|
1605
|
+
}
|
|
1606
|
+
message.value = reader.uint32();
|
|
1607
|
+
continue;
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1611
|
+
break;
|
|
1612
|
+
}
|
|
1613
|
+
reader.skip(tag & 7);
|
|
1614
|
+
}
|
|
1615
|
+
return message;
|
|
1616
|
+
},
|
|
1617
|
+
fromJSON(object) {
|
|
1618
|
+
return {
|
|
1619
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
1620
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
1621
|
+
};
|
|
1622
|
+
},
|
|
1623
|
+
toJSON(message) {
|
|
1624
|
+
const obj = {};
|
|
1625
|
+
if (message.key !== 0) {
|
|
1626
|
+
obj.key = Math.round(message.key);
|
|
1627
|
+
}
|
|
1628
|
+
if (message.value !== 0) {
|
|
1629
|
+
obj.value = Math.round(message.value);
|
|
1630
|
+
}
|
|
1631
|
+
return obj;
|
|
1632
|
+
},
|
|
1633
|
+
create(base) {
|
|
1634
|
+
return exports.MonthlyCompact_HumidityEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1635
|
+
},
|
|
1636
|
+
fromPartial(object) {
|
|
1637
|
+
var _a, _b;
|
|
1638
|
+
const message = createBaseMonthlyCompact_HumidityEntry();
|
|
1639
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
1640
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
1641
|
+
return message;
|
|
1642
|
+
},
|
|
1643
|
+
};
|
|
1644
|
+
function createBaseMonthlyCompact_CrashesEntry() {
|
|
1645
|
+
return { key: 0, value: 0 };
|
|
1646
|
+
}
|
|
1647
|
+
exports.MonthlyCompact_CrashesEntry = {
|
|
1648
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1649
|
+
if (message.key !== 0) {
|
|
1650
|
+
writer.uint32(8).uint32(message.key);
|
|
1651
|
+
}
|
|
1652
|
+
if (message.value !== 0) {
|
|
1653
|
+
writer.uint32(16).uint32(message.value);
|
|
1654
|
+
}
|
|
1655
|
+
return writer;
|
|
1656
|
+
},
|
|
1657
|
+
decode(input, length) {
|
|
1658
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1659
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1660
|
+
const message = createBaseMonthlyCompact_CrashesEntry();
|
|
1661
|
+
while (reader.pos < end) {
|
|
1662
|
+
const tag = reader.uint32();
|
|
1663
|
+
switch (tag >>> 3) {
|
|
1664
|
+
case 1: {
|
|
1665
|
+
if (tag !== 8) {
|
|
1666
|
+
break;
|
|
1667
|
+
}
|
|
1668
|
+
message.key = reader.uint32();
|
|
1669
|
+
continue;
|
|
1670
|
+
}
|
|
1671
|
+
case 2: {
|
|
1672
|
+
if (tag !== 16) {
|
|
1673
|
+
break;
|
|
1674
|
+
}
|
|
1675
|
+
message.value = reader.uint32();
|
|
1676
|
+
continue;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1680
|
+
break;
|
|
1681
|
+
}
|
|
1682
|
+
reader.skip(tag & 7);
|
|
1683
|
+
}
|
|
1684
|
+
return message;
|
|
1685
|
+
},
|
|
1686
|
+
fromJSON(object) {
|
|
1687
|
+
return {
|
|
1688
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
1689
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
1690
|
+
};
|
|
1691
|
+
},
|
|
1692
|
+
toJSON(message) {
|
|
1693
|
+
const obj = {};
|
|
1694
|
+
if (message.key !== 0) {
|
|
1695
|
+
obj.key = Math.round(message.key);
|
|
1696
|
+
}
|
|
1697
|
+
if (message.value !== 0) {
|
|
1698
|
+
obj.value = Math.round(message.value);
|
|
1699
|
+
}
|
|
1700
|
+
return obj;
|
|
1701
|
+
},
|
|
1702
|
+
create(base) {
|
|
1703
|
+
return exports.MonthlyCompact_CrashesEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1704
|
+
},
|
|
1705
|
+
fromPartial(object) {
|
|
1706
|
+
var _a, _b;
|
|
1707
|
+
const message = createBaseMonthlyCompact_CrashesEntry();
|
|
1708
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
1709
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
1710
|
+
return message;
|
|
1711
|
+
},
|
|
1712
|
+
};
|
|
1713
|
+
function createBaseMonthlyCompact_SpeedsEntry() {
|
|
1714
|
+
return { key: 0, value: undefined };
|
|
1715
|
+
}
|
|
1716
|
+
exports.MonthlyCompact_SpeedsEntry = {
|
|
1717
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1718
|
+
if (message.key !== 0) {
|
|
1719
|
+
writer.uint32(8).uint32(message.key);
|
|
1720
|
+
}
|
|
1721
|
+
if (message.value !== undefined) {
|
|
1722
|
+
exports.TripDurationStat.encode(message.value, writer.uint32(18).fork()).join();
|
|
1723
|
+
}
|
|
1724
|
+
return writer;
|
|
1725
|
+
},
|
|
1726
|
+
decode(input, length) {
|
|
1727
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1728
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1729
|
+
const message = createBaseMonthlyCompact_SpeedsEntry();
|
|
1730
|
+
while (reader.pos < end) {
|
|
1731
|
+
const tag = reader.uint32();
|
|
1732
|
+
switch (tag >>> 3) {
|
|
1733
|
+
case 1: {
|
|
1734
|
+
if (tag !== 8) {
|
|
1735
|
+
break;
|
|
1736
|
+
}
|
|
1737
|
+
message.key = reader.uint32();
|
|
1738
|
+
continue;
|
|
1739
|
+
}
|
|
1740
|
+
case 2: {
|
|
1741
|
+
if (tag !== 18) {
|
|
1742
|
+
break;
|
|
1743
|
+
}
|
|
1744
|
+
message.value = exports.TripDurationStat.decode(reader, reader.uint32());
|
|
1745
|
+
continue;
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1749
|
+
break;
|
|
1750
|
+
}
|
|
1751
|
+
reader.skip(tag & 7);
|
|
1752
|
+
}
|
|
1753
|
+
return message;
|
|
1754
|
+
},
|
|
1755
|
+
fromJSON(object) {
|
|
1756
|
+
return {
|
|
1757
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
1758
|
+
value: isSet(object.value) ? exports.TripDurationStat.fromJSON(object.value) : undefined,
|
|
1759
|
+
};
|
|
1760
|
+
},
|
|
1761
|
+
toJSON(message) {
|
|
1762
|
+
const obj = {};
|
|
1763
|
+
if (message.key !== 0) {
|
|
1764
|
+
obj.key = Math.round(message.key);
|
|
1765
|
+
}
|
|
1766
|
+
if (message.value !== undefined) {
|
|
1767
|
+
obj.value = exports.TripDurationStat.toJSON(message.value);
|
|
1768
|
+
}
|
|
1769
|
+
return obj;
|
|
1770
|
+
},
|
|
1771
|
+
create(base) {
|
|
1772
|
+
return exports.MonthlyCompact_SpeedsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1773
|
+
},
|
|
1774
|
+
fromPartial(object) {
|
|
1775
|
+
var _a;
|
|
1776
|
+
const message = createBaseMonthlyCompact_SpeedsEntry();
|
|
1777
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
1778
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
1779
|
+
? exports.TripDurationStat.fromPartial(object.value)
|
|
1780
|
+
: undefined;
|
|
1781
|
+
return message;
|
|
1782
|
+
},
|
|
1783
|
+
};
|
|
1784
|
+
function createBaseTrip() {
|
|
1785
|
+
return {
|
|
1786
|
+
id: 0,
|
|
1787
|
+
deviceId: 0,
|
|
1788
|
+
mileage: 0,
|
|
1789
|
+
idling: 0,
|
|
1790
|
+
parking: 0,
|
|
1791
|
+
moving: 0,
|
|
1792
|
+
towing: 0,
|
|
1793
|
+
totalSpeed: 0,
|
|
1794
|
+
sumSpeed: 0,
|
|
1795
|
+
maxSpeed: 0,
|
|
1796
|
+
compact: undefined,
|
|
1797
|
+
startedAt: undefined,
|
|
1798
|
+
finishedAt: undefined,
|
|
1799
|
+
createdAt: undefined,
|
|
1800
|
+
updatedAt: undefined,
|
|
1801
|
+
};
|
|
1802
|
+
}
|
|
1803
|
+
exports.Trip = {
|
|
1804
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1805
|
+
if (message.id !== 0) {
|
|
1806
|
+
writer.uint32(8).uint64(message.id);
|
|
1807
|
+
}
|
|
1808
|
+
if (message.deviceId !== 0) {
|
|
1809
|
+
writer.uint32(16).uint64(message.deviceId);
|
|
1810
|
+
}
|
|
1811
|
+
if (message.mileage !== 0) {
|
|
1812
|
+
writer.uint32(24).uint32(message.mileage);
|
|
1813
|
+
}
|
|
1814
|
+
if (message.idling !== 0) {
|
|
1815
|
+
writer.uint32(32).uint32(message.idling);
|
|
1816
|
+
}
|
|
1817
|
+
if (message.parking !== 0) {
|
|
1818
|
+
writer.uint32(40).uint32(message.parking);
|
|
1819
|
+
}
|
|
1820
|
+
if (message.moving !== 0) {
|
|
1821
|
+
writer.uint32(48).uint32(message.moving);
|
|
1822
|
+
}
|
|
1823
|
+
if (message.towing !== 0) {
|
|
1824
|
+
writer.uint32(56).uint32(message.towing);
|
|
1825
|
+
}
|
|
1826
|
+
if (message.totalSpeed !== 0) {
|
|
1827
|
+
writer.uint32(64).uint32(message.totalSpeed);
|
|
1828
|
+
}
|
|
1829
|
+
if (message.sumSpeed !== 0) {
|
|
1830
|
+
writer.uint32(72).uint32(message.sumSpeed);
|
|
1831
|
+
}
|
|
1832
|
+
if (message.maxSpeed !== 0) {
|
|
1833
|
+
writer.uint32(80).uint32(message.maxSpeed);
|
|
1834
|
+
}
|
|
1835
|
+
if (message.compact !== undefined) {
|
|
1836
|
+
exports.TripCompact.encode(message.compact, writer.uint32(90).fork()).join();
|
|
1837
|
+
}
|
|
1838
|
+
if (message.startedAt !== undefined) {
|
|
1839
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(98).fork()).join();
|
|
1840
|
+
}
|
|
1841
|
+
if (message.finishedAt !== undefined) {
|
|
1842
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(106).fork()).join();
|
|
1843
|
+
}
|
|
1844
|
+
if (message.createdAt !== undefined) {
|
|
1845
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(114).fork()).join();
|
|
1846
|
+
}
|
|
1847
|
+
if (message.updatedAt !== undefined) {
|
|
1848
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(122).fork()).join();
|
|
1849
|
+
}
|
|
1850
|
+
return writer;
|
|
1851
|
+
},
|
|
1852
|
+
decode(input, length) {
|
|
1853
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1854
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1855
|
+
const message = createBaseTrip();
|
|
1856
|
+
while (reader.pos < end) {
|
|
1857
|
+
const tag = reader.uint32();
|
|
1858
|
+
switch (tag >>> 3) {
|
|
1859
|
+
case 1: {
|
|
1860
|
+
if (tag !== 8) {
|
|
1861
|
+
break;
|
|
1862
|
+
}
|
|
1863
|
+
message.id = longToNumber(reader.uint64());
|
|
1864
|
+
continue;
|
|
1865
|
+
}
|
|
1866
|
+
case 2: {
|
|
1867
|
+
if (tag !== 16) {
|
|
1868
|
+
break;
|
|
1869
|
+
}
|
|
1870
|
+
message.deviceId = longToNumber(reader.uint64());
|
|
1871
|
+
continue;
|
|
1872
|
+
}
|
|
1873
|
+
case 3: {
|
|
1874
|
+
if (tag !== 24) {
|
|
1875
|
+
break;
|
|
1876
|
+
}
|
|
1877
|
+
message.mileage = reader.uint32();
|
|
1878
|
+
continue;
|
|
1879
|
+
}
|
|
1880
|
+
case 4: {
|
|
1881
|
+
if (tag !== 32) {
|
|
1882
|
+
break;
|
|
1883
|
+
}
|
|
1884
|
+
message.idling = reader.uint32();
|
|
1885
|
+
continue;
|
|
1886
|
+
}
|
|
1887
|
+
case 5: {
|
|
1888
|
+
if (tag !== 40) {
|
|
1889
|
+
break;
|
|
1890
|
+
}
|
|
1891
|
+
message.parking = reader.uint32();
|
|
1892
|
+
continue;
|
|
1893
|
+
}
|
|
1894
|
+
case 6: {
|
|
1895
|
+
if (tag !== 48) {
|
|
1896
|
+
break;
|
|
1897
|
+
}
|
|
1898
|
+
message.moving = reader.uint32();
|
|
1899
|
+
continue;
|
|
1900
|
+
}
|
|
1901
|
+
case 7: {
|
|
1902
|
+
if (tag !== 56) {
|
|
1903
|
+
break;
|
|
1904
|
+
}
|
|
1905
|
+
message.towing = reader.uint32();
|
|
1906
|
+
continue;
|
|
1907
|
+
}
|
|
1908
|
+
case 8: {
|
|
1909
|
+
if (tag !== 64) {
|
|
1910
|
+
break;
|
|
1911
|
+
}
|
|
1912
|
+
message.totalSpeed = reader.uint32();
|
|
1913
|
+
continue;
|
|
1914
|
+
}
|
|
1915
|
+
case 9: {
|
|
1916
|
+
if (tag !== 72) {
|
|
1917
|
+
break;
|
|
1918
|
+
}
|
|
1919
|
+
message.sumSpeed = reader.uint32();
|
|
1920
|
+
continue;
|
|
1921
|
+
}
|
|
1922
|
+
case 10: {
|
|
1923
|
+
if (tag !== 80) {
|
|
1924
|
+
break;
|
|
1925
|
+
}
|
|
1926
|
+
message.maxSpeed = reader.uint32();
|
|
1927
|
+
continue;
|
|
1928
|
+
}
|
|
1929
|
+
case 11: {
|
|
1930
|
+
if (tag !== 90) {
|
|
1931
|
+
break;
|
|
1932
|
+
}
|
|
1933
|
+
message.compact = exports.TripCompact.decode(reader, reader.uint32());
|
|
1934
|
+
continue;
|
|
1935
|
+
}
|
|
1936
|
+
case 12: {
|
|
1937
|
+
if (tag !== 98) {
|
|
1938
|
+
break;
|
|
1939
|
+
}
|
|
1940
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1941
|
+
continue;
|
|
1942
|
+
}
|
|
1943
|
+
case 13: {
|
|
1944
|
+
if (tag !== 106) {
|
|
1945
|
+
break;
|
|
1946
|
+
}
|
|
1947
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1948
|
+
continue;
|
|
1949
|
+
}
|
|
1950
|
+
case 14: {
|
|
1951
|
+
if (tag !== 114) {
|
|
1952
|
+
break;
|
|
1953
|
+
}
|
|
1954
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1955
|
+
continue;
|
|
1956
|
+
}
|
|
1957
|
+
case 15: {
|
|
1958
|
+
if (tag !== 122) {
|
|
1959
|
+
break;
|
|
1960
|
+
}
|
|
1961
|
+
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1962
|
+
continue;
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1966
|
+
break;
|
|
1967
|
+
}
|
|
1968
|
+
reader.skip(tag & 7);
|
|
1969
|
+
}
|
|
1970
|
+
return message;
|
|
1971
|
+
},
|
|
1972
|
+
fromJSON(object) {
|
|
1973
|
+
return {
|
|
1974
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
1975
|
+
deviceId: isSet(object.deviceId) ? globalThis.Number(object.deviceId) : 0,
|
|
1976
|
+
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
1977
|
+
idling: isSet(object.idling) ? globalThis.Number(object.idling) : 0,
|
|
1978
|
+
parking: isSet(object.parking) ? globalThis.Number(object.parking) : 0,
|
|
1979
|
+
moving: isSet(object.moving) ? globalThis.Number(object.moving) : 0,
|
|
1980
|
+
towing: isSet(object.towing) ? globalThis.Number(object.towing) : 0,
|
|
1981
|
+
totalSpeed: isSet(object.totalSpeed) ? globalThis.Number(object.totalSpeed) : 0,
|
|
1982
|
+
sumSpeed: isSet(object.sumSpeed) ? globalThis.Number(object.sumSpeed) : 0,
|
|
1983
|
+
maxSpeed: isSet(object.maxSpeed) ? globalThis.Number(object.maxSpeed) : 0,
|
|
1984
|
+
compact: isSet(object.compact) ? exports.TripCompact.fromJSON(object.compact) : undefined,
|
|
1985
|
+
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
1986
|
+
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
1987
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
1988
|
+
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
1989
|
+
};
|
|
1990
|
+
},
|
|
1991
|
+
toJSON(message) {
|
|
1992
|
+
const obj = {};
|
|
1993
|
+
if (message.id !== 0) {
|
|
1994
|
+
obj.id = Math.round(message.id);
|
|
1995
|
+
}
|
|
1996
|
+
if (message.deviceId !== 0) {
|
|
1997
|
+
obj.deviceId = Math.round(message.deviceId);
|
|
1998
|
+
}
|
|
1999
|
+
if (message.mileage !== 0) {
|
|
2000
|
+
obj.mileage = Math.round(message.mileage);
|
|
2001
|
+
}
|
|
2002
|
+
if (message.idling !== 0) {
|
|
2003
|
+
obj.idling = Math.round(message.idling);
|
|
2004
|
+
}
|
|
2005
|
+
if (message.parking !== 0) {
|
|
2006
|
+
obj.parking = Math.round(message.parking);
|
|
2007
|
+
}
|
|
2008
|
+
if (message.moving !== 0) {
|
|
2009
|
+
obj.moving = Math.round(message.moving);
|
|
2010
|
+
}
|
|
2011
|
+
if (message.towing !== 0) {
|
|
2012
|
+
obj.towing = Math.round(message.towing);
|
|
2013
|
+
}
|
|
2014
|
+
if (message.totalSpeed !== 0) {
|
|
2015
|
+
obj.totalSpeed = Math.round(message.totalSpeed);
|
|
2016
|
+
}
|
|
2017
|
+
if (message.sumSpeed !== 0) {
|
|
2018
|
+
obj.sumSpeed = Math.round(message.sumSpeed);
|
|
2019
|
+
}
|
|
2020
|
+
if (message.maxSpeed !== 0) {
|
|
2021
|
+
obj.maxSpeed = Math.round(message.maxSpeed);
|
|
2022
|
+
}
|
|
2023
|
+
if (message.compact !== undefined) {
|
|
2024
|
+
obj.compact = exports.TripCompact.toJSON(message.compact);
|
|
2025
|
+
}
|
|
2026
|
+
if (message.startedAt !== undefined) {
|
|
2027
|
+
obj.startedAt = message.startedAt.toISOString();
|
|
2028
|
+
}
|
|
2029
|
+
if (message.finishedAt !== undefined) {
|
|
2030
|
+
obj.finishedAt = message.finishedAt.toISOString();
|
|
2031
|
+
}
|
|
2032
|
+
if (message.createdAt !== undefined) {
|
|
2033
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
2034
|
+
}
|
|
2035
|
+
if (message.updatedAt !== undefined) {
|
|
2036
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
2037
|
+
}
|
|
2038
|
+
return obj;
|
|
2039
|
+
},
|
|
2040
|
+
create(base) {
|
|
2041
|
+
return exports.Trip.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2042
|
+
},
|
|
2043
|
+
fromPartial(object) {
|
|
2044
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
2045
|
+
const message = createBaseTrip();
|
|
2046
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
2047
|
+
message.deviceId = (_b = object.deviceId) !== null && _b !== void 0 ? _b : 0;
|
|
2048
|
+
message.mileage = (_c = object.mileage) !== null && _c !== void 0 ? _c : 0;
|
|
2049
|
+
message.idling = (_d = object.idling) !== null && _d !== void 0 ? _d : 0;
|
|
2050
|
+
message.parking = (_e = object.parking) !== null && _e !== void 0 ? _e : 0;
|
|
2051
|
+
message.moving = (_f = object.moving) !== null && _f !== void 0 ? _f : 0;
|
|
2052
|
+
message.towing = (_g = object.towing) !== null && _g !== void 0 ? _g : 0;
|
|
2053
|
+
message.totalSpeed = (_h = object.totalSpeed) !== null && _h !== void 0 ? _h : 0;
|
|
2054
|
+
message.sumSpeed = (_j = object.sumSpeed) !== null && _j !== void 0 ? _j : 0;
|
|
2055
|
+
message.maxSpeed = (_k = object.maxSpeed) !== null && _k !== void 0 ? _k : 0;
|
|
2056
|
+
message.compact = (object.compact !== undefined && object.compact !== null)
|
|
2057
|
+
? exports.TripCompact.fromPartial(object.compact)
|
|
2058
|
+
: undefined;
|
|
2059
|
+
message.startedAt = (_l = object.startedAt) !== null && _l !== void 0 ? _l : undefined;
|
|
2060
|
+
message.finishedAt = (_m = object.finishedAt) !== null && _m !== void 0 ? _m : undefined;
|
|
2061
|
+
message.createdAt = (_o = object.createdAt) !== null && _o !== void 0 ? _o : undefined;
|
|
2062
|
+
message.updatedAt = (_p = object.updatedAt) !== null && _p !== void 0 ? _p : undefined;
|
|
2063
|
+
return message;
|
|
2064
|
+
},
|
|
2065
|
+
};
|
|
2066
|
+
function createBaseTripCompact() {
|
|
2067
|
+
return {
|
|
2068
|
+
cost: 0,
|
|
2069
|
+
records: 0,
|
|
2070
|
+
start: undefined,
|
|
2071
|
+
finish: undefined,
|
|
2072
|
+
greenDriving: {},
|
|
2073
|
+
temperature: {},
|
|
2074
|
+
humidity: {},
|
|
2075
|
+
iButton: undefined,
|
|
2076
|
+
ignition: undefined,
|
|
2077
|
+
doorOpened: undefined,
|
|
2078
|
+
fuelUsed: undefined,
|
|
2079
|
+
fuelRate: undefined,
|
|
2080
|
+
engineRpm: undefined,
|
|
2081
|
+
engineLoad: undefined,
|
|
2082
|
+
crashes: {},
|
|
2083
|
+
speeds: {},
|
|
2084
|
+
points: [],
|
|
2085
|
+
};
|
|
2086
|
+
}
|
|
2087
|
+
exports.TripCompact = {
|
|
2088
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2089
|
+
if (message.cost !== 0) {
|
|
2090
|
+
writer.uint32(8).uint32(message.cost);
|
|
2091
|
+
}
|
|
2092
|
+
if (message.records !== 0) {
|
|
2093
|
+
writer.uint32(16).uint32(message.records);
|
|
2094
|
+
}
|
|
2095
|
+
if (message.start !== undefined) {
|
|
2096
|
+
exports.TripPoint.encode(message.start, writer.uint32(26).fork()).join();
|
|
2097
|
+
}
|
|
2098
|
+
if (message.finish !== undefined) {
|
|
2099
|
+
exports.TripPoint.encode(message.finish, writer.uint32(34).fork()).join();
|
|
2100
|
+
}
|
|
2101
|
+
Object.entries(message.greenDriving).forEach(([key, value]) => {
|
|
2102
|
+
exports.TripCompact_GreenDrivingEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
|
|
2103
|
+
});
|
|
2104
|
+
Object.entries(message.temperature).forEach(([key, value]) => {
|
|
2105
|
+
exports.TripCompact_TemperatureEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
|
|
2106
|
+
});
|
|
2107
|
+
Object.entries(message.humidity).forEach(([key, value]) => {
|
|
2108
|
+
exports.TripCompact_HumidityEntry.encode({ key: key, value }, writer.uint32(58).fork()).join();
|
|
2109
|
+
});
|
|
2110
|
+
if (message.iButton !== undefined) {
|
|
2111
|
+
writer.uint32(64).uint64(message.iButton);
|
|
2112
|
+
}
|
|
2113
|
+
if (message.ignition !== undefined) {
|
|
2114
|
+
writer.uint32(72).uint32(message.ignition);
|
|
2115
|
+
}
|
|
2116
|
+
if (message.doorOpened !== undefined) {
|
|
2117
|
+
writer.uint32(80).uint32(message.doorOpened);
|
|
2118
|
+
}
|
|
2119
|
+
if (message.fuelUsed !== undefined) {
|
|
2120
|
+
writer.uint32(88).uint32(message.fuelUsed);
|
|
2121
|
+
}
|
|
2122
|
+
if (message.fuelRate !== undefined) {
|
|
2123
|
+
writer.uint32(96).uint32(message.fuelRate);
|
|
2124
|
+
}
|
|
2125
|
+
if (message.engineRpm !== undefined) {
|
|
2126
|
+
writer.uint32(104).uint32(message.engineRpm);
|
|
2127
|
+
}
|
|
2128
|
+
if (message.engineLoad !== undefined) {
|
|
2129
|
+
writer.uint32(112).uint32(message.engineLoad);
|
|
2130
|
+
}
|
|
2131
|
+
Object.entries(message.crashes).forEach(([key, value]) => {
|
|
2132
|
+
exports.TripCompact_CrashesEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
|
|
2133
|
+
});
|
|
2134
|
+
Object.entries(message.speeds).forEach(([key, value]) => {
|
|
2135
|
+
exports.TripCompact_SpeedsEntry.encode({ key: key, value }, writer.uint32(130).fork()).join();
|
|
2136
|
+
});
|
|
2137
|
+
writer.uint32(138).fork();
|
|
2138
|
+
for (const v of message.points) {
|
|
2139
|
+
writer.uint64(v);
|
|
2140
|
+
}
|
|
2141
|
+
writer.join();
|
|
2142
|
+
return writer;
|
|
2143
|
+
},
|
|
2144
|
+
decode(input, length) {
|
|
2145
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2146
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2147
|
+
const message = createBaseTripCompact();
|
|
2148
|
+
while (reader.pos < end) {
|
|
2149
|
+
const tag = reader.uint32();
|
|
2150
|
+
switch (tag >>> 3) {
|
|
2151
|
+
case 1: {
|
|
2152
|
+
if (tag !== 8) {
|
|
2153
|
+
break;
|
|
2154
|
+
}
|
|
2155
|
+
message.cost = reader.uint32();
|
|
2156
|
+
continue;
|
|
2157
|
+
}
|
|
2158
|
+
case 2: {
|
|
2159
|
+
if (tag !== 16) {
|
|
2160
|
+
break;
|
|
2161
|
+
}
|
|
2162
|
+
message.records = reader.uint32();
|
|
2163
|
+
continue;
|
|
2164
|
+
}
|
|
2165
|
+
case 3: {
|
|
2166
|
+
if (tag !== 26) {
|
|
2167
|
+
break;
|
|
2168
|
+
}
|
|
2169
|
+
message.start = exports.TripPoint.decode(reader, reader.uint32());
|
|
2170
|
+
continue;
|
|
2171
|
+
}
|
|
2172
|
+
case 4: {
|
|
2173
|
+
if (tag !== 34) {
|
|
2174
|
+
break;
|
|
2175
|
+
}
|
|
2176
|
+
message.finish = exports.TripPoint.decode(reader, reader.uint32());
|
|
2177
|
+
continue;
|
|
2178
|
+
}
|
|
2179
|
+
case 5: {
|
|
2180
|
+
if (tag !== 42) {
|
|
2181
|
+
break;
|
|
2182
|
+
}
|
|
2183
|
+
const entry5 = exports.TripCompact_GreenDrivingEntry.decode(reader, reader.uint32());
|
|
2184
|
+
if (entry5.value !== undefined) {
|
|
2185
|
+
message.greenDriving[entry5.key] = entry5.value;
|
|
2186
|
+
}
|
|
2187
|
+
continue;
|
|
2188
|
+
}
|
|
2189
|
+
case 6: {
|
|
2190
|
+
if (tag !== 50) {
|
|
2191
|
+
break;
|
|
2192
|
+
}
|
|
2193
|
+
const entry6 = exports.TripCompact_TemperatureEntry.decode(reader, reader.uint32());
|
|
2194
|
+
if (entry6.value !== undefined) {
|
|
2195
|
+
message.temperature[entry6.key] = entry6.value;
|
|
2196
|
+
}
|
|
2197
|
+
continue;
|
|
2198
|
+
}
|
|
2199
|
+
case 7: {
|
|
2200
|
+
if (tag !== 58) {
|
|
2201
|
+
break;
|
|
2202
|
+
}
|
|
2203
|
+
const entry7 = exports.TripCompact_HumidityEntry.decode(reader, reader.uint32());
|
|
2204
|
+
if (entry7.value !== undefined) {
|
|
2205
|
+
message.humidity[entry7.key] = entry7.value;
|
|
2206
|
+
}
|
|
2207
|
+
continue;
|
|
2208
|
+
}
|
|
2209
|
+
case 8: {
|
|
2210
|
+
if (tag !== 64) {
|
|
2211
|
+
break;
|
|
2212
|
+
}
|
|
2213
|
+
message.iButton = longToNumber(reader.uint64());
|
|
2214
|
+
continue;
|
|
2215
|
+
}
|
|
2216
|
+
case 9: {
|
|
2217
|
+
if (tag !== 72) {
|
|
2218
|
+
break;
|
|
2219
|
+
}
|
|
2220
|
+
message.ignition = reader.uint32();
|
|
2221
|
+
continue;
|
|
2222
|
+
}
|
|
2223
|
+
case 10: {
|
|
2224
|
+
if (tag !== 80) {
|
|
2225
|
+
break;
|
|
2226
|
+
}
|
|
2227
|
+
message.doorOpened = reader.uint32();
|
|
2228
|
+
continue;
|
|
2229
|
+
}
|
|
2230
|
+
case 11: {
|
|
2231
|
+
if (tag !== 88) {
|
|
2232
|
+
break;
|
|
2233
|
+
}
|
|
2234
|
+
message.fuelUsed = reader.uint32();
|
|
2235
|
+
continue;
|
|
2236
|
+
}
|
|
2237
|
+
case 12: {
|
|
2238
|
+
if (tag !== 96) {
|
|
2239
|
+
break;
|
|
2240
|
+
}
|
|
2241
|
+
message.fuelRate = reader.uint32();
|
|
2242
|
+
continue;
|
|
2243
|
+
}
|
|
2244
|
+
case 13: {
|
|
2245
|
+
if (tag !== 104) {
|
|
2246
|
+
break;
|
|
2247
|
+
}
|
|
2248
|
+
message.engineRpm = reader.uint32();
|
|
2249
|
+
continue;
|
|
2250
|
+
}
|
|
2251
|
+
case 14: {
|
|
2252
|
+
if (tag !== 112) {
|
|
2253
|
+
break;
|
|
2254
|
+
}
|
|
2255
|
+
message.engineLoad = reader.uint32();
|
|
2256
|
+
continue;
|
|
2257
|
+
}
|
|
2258
|
+
case 15: {
|
|
2259
|
+
if (tag !== 122) {
|
|
2260
|
+
break;
|
|
2261
|
+
}
|
|
2262
|
+
const entry15 = exports.TripCompact_CrashesEntry.decode(reader, reader.uint32());
|
|
2263
|
+
if (entry15.value !== undefined) {
|
|
2264
|
+
message.crashes[entry15.key] = entry15.value;
|
|
2265
|
+
}
|
|
2266
|
+
continue;
|
|
2267
|
+
}
|
|
2268
|
+
case 16: {
|
|
2269
|
+
if (tag !== 130) {
|
|
2270
|
+
break;
|
|
2271
|
+
}
|
|
2272
|
+
const entry16 = exports.TripCompact_SpeedsEntry.decode(reader, reader.uint32());
|
|
2273
|
+
if (entry16.value !== undefined) {
|
|
2274
|
+
message.speeds[entry16.key] = entry16.value;
|
|
2275
|
+
}
|
|
2276
|
+
continue;
|
|
2277
|
+
}
|
|
2278
|
+
case 17: {
|
|
2279
|
+
if (tag === 136) {
|
|
2280
|
+
message.points.push(longToNumber(reader.uint64()));
|
|
2281
|
+
continue;
|
|
2282
|
+
}
|
|
2283
|
+
if (tag === 138) {
|
|
2284
|
+
const end2 = reader.uint32() + reader.pos;
|
|
2285
|
+
while (reader.pos < end2) {
|
|
2286
|
+
message.points.push(longToNumber(reader.uint64()));
|
|
2287
|
+
}
|
|
2288
|
+
continue;
|
|
2289
|
+
}
|
|
2290
|
+
break;
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2294
|
+
break;
|
|
2295
|
+
}
|
|
2296
|
+
reader.skip(tag & 7);
|
|
2297
|
+
}
|
|
2298
|
+
return message;
|
|
2299
|
+
},
|
|
2300
|
+
fromJSON(object) {
|
|
2301
|
+
return {
|
|
2302
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
2303
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
2304
|
+
start: isSet(object.start) ? exports.TripPoint.fromJSON(object.start) : undefined,
|
|
2305
|
+
finish: isSet(object.finish) ? exports.TripPoint.fromJSON(object.finish) : undefined,
|
|
2306
|
+
greenDriving: isObject(object.greenDriving)
|
|
2307
|
+
? Object.entries(object.greenDriving).reduce((acc, [key, value]) => {
|
|
2308
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
2309
|
+
return acc;
|
|
2310
|
+
}, {})
|
|
2311
|
+
: {},
|
|
2312
|
+
temperature: isObject(object.temperature)
|
|
2313
|
+
? Object.entries(object.temperature).reduce((acc, [key, value]) => {
|
|
2314
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
2315
|
+
return acc;
|
|
2316
|
+
}, {})
|
|
2317
|
+
: {},
|
|
2318
|
+
humidity: isObject(object.humidity)
|
|
2319
|
+
? Object.entries(object.humidity).reduce((acc, [key, value]) => {
|
|
2320
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
2321
|
+
return acc;
|
|
2322
|
+
}, {})
|
|
2323
|
+
: {},
|
|
2324
|
+
iButton: isSet(object.iButton) ? globalThis.Number(object.iButton) : undefined,
|
|
2325
|
+
ignition: isSet(object.ignition) ? globalThis.Number(object.ignition) : undefined,
|
|
2326
|
+
doorOpened: isSet(object.doorOpened) ? globalThis.Number(object.doorOpened) : undefined,
|
|
2327
|
+
fuelUsed: isSet(object.fuelUsed) ? globalThis.Number(object.fuelUsed) : undefined,
|
|
2328
|
+
fuelRate: isSet(object.fuelRate) ? globalThis.Number(object.fuelRate) : undefined,
|
|
2329
|
+
engineRpm: isSet(object.engineRpm) ? globalThis.Number(object.engineRpm) : undefined,
|
|
2330
|
+
engineLoad: isSet(object.engineLoad) ? globalThis.Number(object.engineLoad) : undefined,
|
|
2331
|
+
crashes: isObject(object.crashes)
|
|
2332
|
+
? Object.entries(object.crashes).reduce((acc, [key, value]) => {
|
|
2333
|
+
acc[globalThis.Number(key)] = Number(value);
|
|
2334
|
+
return acc;
|
|
2335
|
+
}, {})
|
|
2336
|
+
: {},
|
|
2337
|
+
speeds: isObject(object.speeds)
|
|
2338
|
+
? Object.entries(object.speeds).reduce((acc, [key, value]) => {
|
|
2339
|
+
acc[globalThis.Number(key)] = exports.TripDurationStat.fromJSON(value);
|
|
2340
|
+
return acc;
|
|
2341
|
+
}, {})
|
|
2342
|
+
: {},
|
|
2343
|
+
points: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.points)
|
|
2344
|
+
? object.points.map((e) => globalThis.Number(e))
|
|
2345
|
+
: [],
|
|
2346
|
+
};
|
|
2347
|
+
},
|
|
2348
|
+
toJSON(message) {
|
|
2349
|
+
var _a;
|
|
2350
|
+
const obj = {};
|
|
2351
|
+
if (message.cost !== 0) {
|
|
2352
|
+
obj.cost = Math.round(message.cost);
|
|
2353
|
+
}
|
|
2354
|
+
if (message.records !== 0) {
|
|
2355
|
+
obj.records = Math.round(message.records);
|
|
2356
|
+
}
|
|
2357
|
+
if (message.start !== undefined) {
|
|
2358
|
+
obj.start = exports.TripPoint.toJSON(message.start);
|
|
2359
|
+
}
|
|
2360
|
+
if (message.finish !== undefined) {
|
|
2361
|
+
obj.finish = exports.TripPoint.toJSON(message.finish);
|
|
2362
|
+
}
|
|
2363
|
+
if (message.greenDriving) {
|
|
2364
|
+
const entries = Object.entries(message.greenDriving);
|
|
2365
|
+
if (entries.length > 0) {
|
|
2366
|
+
obj.greenDriving = {};
|
|
2367
|
+
entries.forEach(([k, v]) => {
|
|
2368
|
+
obj.greenDriving[k] = Math.round(v);
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
if (message.temperature) {
|
|
2373
|
+
const entries = Object.entries(message.temperature);
|
|
2374
|
+
if (entries.length > 0) {
|
|
2375
|
+
obj.temperature = {};
|
|
2376
|
+
entries.forEach(([k, v]) => {
|
|
2377
|
+
obj.temperature[k] = Math.round(v);
|
|
2378
|
+
});
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
if (message.humidity) {
|
|
2382
|
+
const entries = Object.entries(message.humidity);
|
|
2383
|
+
if (entries.length > 0) {
|
|
2384
|
+
obj.humidity = {};
|
|
2385
|
+
entries.forEach(([k, v]) => {
|
|
2386
|
+
obj.humidity[k] = Math.round(v);
|
|
2387
|
+
});
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
if (message.iButton !== undefined) {
|
|
2391
|
+
obj.iButton = Math.round(message.iButton);
|
|
2392
|
+
}
|
|
2393
|
+
if (message.ignition !== undefined) {
|
|
2394
|
+
obj.ignition = Math.round(message.ignition);
|
|
2395
|
+
}
|
|
2396
|
+
if (message.doorOpened !== undefined) {
|
|
2397
|
+
obj.doorOpened = Math.round(message.doorOpened);
|
|
2398
|
+
}
|
|
2399
|
+
if (message.fuelUsed !== undefined) {
|
|
2400
|
+
obj.fuelUsed = Math.round(message.fuelUsed);
|
|
2401
|
+
}
|
|
2402
|
+
if (message.fuelRate !== undefined) {
|
|
2403
|
+
obj.fuelRate = Math.round(message.fuelRate);
|
|
2404
|
+
}
|
|
2405
|
+
if (message.engineRpm !== undefined) {
|
|
2406
|
+
obj.engineRpm = Math.round(message.engineRpm);
|
|
2407
|
+
}
|
|
2408
|
+
if (message.engineLoad !== undefined) {
|
|
2409
|
+
obj.engineLoad = Math.round(message.engineLoad);
|
|
2410
|
+
}
|
|
2411
|
+
if (message.crashes) {
|
|
2412
|
+
const entries = Object.entries(message.crashes);
|
|
2413
|
+
if (entries.length > 0) {
|
|
2414
|
+
obj.crashes = {};
|
|
2415
|
+
entries.forEach(([k, v]) => {
|
|
2416
|
+
obj.crashes[k] = Math.round(v);
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
if (message.speeds) {
|
|
2421
|
+
const entries = Object.entries(message.speeds);
|
|
2422
|
+
if (entries.length > 0) {
|
|
2423
|
+
obj.speeds = {};
|
|
2424
|
+
entries.forEach(([k, v]) => {
|
|
2425
|
+
obj.speeds[k] = exports.TripDurationStat.toJSON(v);
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
if ((_a = message.points) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2430
|
+
obj.points = message.points.map((e) => Math.round(e));
|
|
2431
|
+
}
|
|
2432
|
+
return obj;
|
|
2433
|
+
},
|
|
2434
|
+
create(base) {
|
|
2435
|
+
return exports.TripCompact.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2436
|
+
},
|
|
2437
|
+
fromPartial(object) {
|
|
2438
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
2439
|
+
const message = createBaseTripCompact();
|
|
2440
|
+
message.cost = (_a = object.cost) !== null && _a !== void 0 ? _a : 0;
|
|
2441
|
+
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
2442
|
+
message.start = (object.start !== undefined && object.start !== null)
|
|
2443
|
+
? exports.TripPoint.fromPartial(object.start)
|
|
2444
|
+
: undefined;
|
|
2445
|
+
message.finish = (object.finish !== undefined && object.finish !== null)
|
|
2446
|
+
? exports.TripPoint.fromPartial(object.finish)
|
|
2447
|
+
: undefined;
|
|
2448
|
+
message.greenDriving = Object.entries((_c = object.greenDriving) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
2449
|
+
if (value !== undefined) {
|
|
2450
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
2451
|
+
}
|
|
2452
|
+
return acc;
|
|
2453
|
+
}, {});
|
|
2454
|
+
message.temperature = Object.entries((_d = object.temperature) !== null && _d !== void 0 ? _d : {}).reduce((acc, [key, value]) => {
|
|
2455
|
+
if (value !== undefined) {
|
|
2456
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
2457
|
+
}
|
|
2458
|
+
return acc;
|
|
2459
|
+
}, {});
|
|
2460
|
+
message.humidity = Object.entries((_e = object.humidity) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
|
|
2461
|
+
if (value !== undefined) {
|
|
2462
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
2463
|
+
}
|
|
2464
|
+
return acc;
|
|
2465
|
+
}, {});
|
|
2466
|
+
message.iButton = (_f = object.iButton) !== null && _f !== void 0 ? _f : undefined;
|
|
2467
|
+
message.ignition = (_g = object.ignition) !== null && _g !== void 0 ? _g : undefined;
|
|
2468
|
+
message.doorOpened = (_h = object.doorOpened) !== null && _h !== void 0 ? _h : undefined;
|
|
2469
|
+
message.fuelUsed = (_j = object.fuelUsed) !== null && _j !== void 0 ? _j : undefined;
|
|
2470
|
+
message.fuelRate = (_k = object.fuelRate) !== null && _k !== void 0 ? _k : undefined;
|
|
2471
|
+
message.engineRpm = (_l = object.engineRpm) !== null && _l !== void 0 ? _l : undefined;
|
|
2472
|
+
message.engineLoad = (_m = object.engineLoad) !== null && _m !== void 0 ? _m : undefined;
|
|
2473
|
+
message.crashes = Object.entries((_o = object.crashes) !== null && _o !== void 0 ? _o : {}).reduce((acc, [key, value]) => {
|
|
2474
|
+
if (value !== undefined) {
|
|
2475
|
+
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
2476
|
+
}
|
|
2477
|
+
return acc;
|
|
2478
|
+
}, {});
|
|
2479
|
+
message.speeds = Object.entries((_p = object.speeds) !== null && _p !== void 0 ? _p : {}).reduce((acc, [key, value]) => {
|
|
2480
|
+
if (value !== undefined) {
|
|
2481
|
+
acc[globalThis.Number(key)] = exports.TripDurationStat.fromPartial(value);
|
|
2482
|
+
}
|
|
2483
|
+
return acc;
|
|
2484
|
+
}, {});
|
|
2485
|
+
message.points = ((_q = object.points) === null || _q === void 0 ? void 0 : _q.map((e) => e)) || [];
|
|
2486
|
+
return message;
|
|
2487
|
+
},
|
|
2488
|
+
};
|
|
2489
|
+
function createBaseTripCompact_GreenDrivingEntry() {
|
|
2490
|
+
return { key: 0, value: 0 };
|
|
2491
|
+
}
|
|
2492
|
+
exports.TripCompact_GreenDrivingEntry = {
|
|
2493
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2494
|
+
if (message.key !== 0) {
|
|
2495
|
+
writer.uint32(8).uint32(message.key);
|
|
2496
|
+
}
|
|
2497
|
+
if (message.value !== 0) {
|
|
2498
|
+
writer.uint32(16).uint32(message.value);
|
|
2499
|
+
}
|
|
2500
|
+
return writer;
|
|
2501
|
+
},
|
|
2502
|
+
decode(input, length) {
|
|
2503
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2504
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2505
|
+
const message = createBaseTripCompact_GreenDrivingEntry();
|
|
2506
|
+
while (reader.pos < end) {
|
|
2507
|
+
const tag = reader.uint32();
|
|
2508
|
+
switch (tag >>> 3) {
|
|
2509
|
+
case 1: {
|
|
2510
|
+
if (tag !== 8) {
|
|
2511
|
+
break;
|
|
2512
|
+
}
|
|
2513
|
+
message.key = reader.uint32();
|
|
2514
|
+
continue;
|
|
2515
|
+
}
|
|
2516
|
+
case 2: {
|
|
2517
|
+
if (tag !== 16) {
|
|
2518
|
+
break;
|
|
2519
|
+
}
|
|
2520
|
+
message.value = reader.uint32();
|
|
2521
|
+
continue;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2525
|
+
break;
|
|
2526
|
+
}
|
|
2527
|
+
reader.skip(tag & 7);
|
|
2528
|
+
}
|
|
2529
|
+
return message;
|
|
2530
|
+
},
|
|
2531
|
+
fromJSON(object) {
|
|
2532
|
+
return {
|
|
2533
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
2534
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
2535
|
+
};
|
|
2536
|
+
},
|
|
2537
|
+
toJSON(message) {
|
|
2538
|
+
const obj = {};
|
|
2539
|
+
if (message.key !== 0) {
|
|
2540
|
+
obj.key = Math.round(message.key);
|
|
2541
|
+
}
|
|
2542
|
+
if (message.value !== 0) {
|
|
2543
|
+
obj.value = Math.round(message.value);
|
|
2544
|
+
}
|
|
2545
|
+
return obj;
|
|
2546
|
+
},
|
|
2547
|
+
create(base) {
|
|
2548
|
+
return exports.TripCompact_GreenDrivingEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2549
|
+
},
|
|
2550
|
+
fromPartial(object) {
|
|
2551
|
+
var _a, _b;
|
|
2552
|
+
const message = createBaseTripCompact_GreenDrivingEntry();
|
|
2553
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
2554
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
2555
|
+
return message;
|
|
2556
|
+
},
|
|
2557
|
+
};
|
|
2558
|
+
function createBaseTripCompact_TemperatureEntry() {
|
|
2559
|
+
return { key: 0, value: 0 };
|
|
2560
|
+
}
|
|
2561
|
+
exports.TripCompact_TemperatureEntry = {
|
|
2562
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2563
|
+
if (message.key !== 0) {
|
|
2564
|
+
writer.uint32(8).uint32(message.key);
|
|
2565
|
+
}
|
|
2566
|
+
if (message.value !== 0) {
|
|
2567
|
+
writer.uint32(16).sint32(message.value);
|
|
2568
|
+
}
|
|
2569
|
+
return writer;
|
|
2570
|
+
},
|
|
2571
|
+
decode(input, length) {
|
|
2572
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2573
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2574
|
+
const message = createBaseTripCompact_TemperatureEntry();
|
|
2575
|
+
while (reader.pos < end) {
|
|
2576
|
+
const tag = reader.uint32();
|
|
2577
|
+
switch (tag >>> 3) {
|
|
2578
|
+
case 1: {
|
|
2579
|
+
if (tag !== 8) {
|
|
2580
|
+
break;
|
|
2581
|
+
}
|
|
2582
|
+
message.key = reader.uint32();
|
|
2583
|
+
continue;
|
|
2584
|
+
}
|
|
2585
|
+
case 2: {
|
|
2586
|
+
if (tag !== 16) {
|
|
2587
|
+
break;
|
|
2588
|
+
}
|
|
2589
|
+
message.value = reader.sint32();
|
|
2590
|
+
continue;
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2594
|
+
break;
|
|
2595
|
+
}
|
|
2596
|
+
reader.skip(tag & 7);
|
|
2597
|
+
}
|
|
2598
|
+
return message;
|
|
2599
|
+
},
|
|
2600
|
+
fromJSON(object) {
|
|
2601
|
+
return {
|
|
2602
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
2603
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
2604
|
+
};
|
|
2605
|
+
},
|
|
2606
|
+
toJSON(message) {
|
|
2607
|
+
const obj = {};
|
|
2608
|
+
if (message.key !== 0) {
|
|
2609
|
+
obj.key = Math.round(message.key);
|
|
2610
|
+
}
|
|
2611
|
+
if (message.value !== 0) {
|
|
2612
|
+
obj.value = Math.round(message.value);
|
|
2613
|
+
}
|
|
2614
|
+
return obj;
|
|
2615
|
+
},
|
|
2616
|
+
create(base) {
|
|
2617
|
+
return exports.TripCompact_TemperatureEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2618
|
+
},
|
|
2619
|
+
fromPartial(object) {
|
|
2620
|
+
var _a, _b;
|
|
2621
|
+
const message = createBaseTripCompact_TemperatureEntry();
|
|
2622
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
2623
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
2624
|
+
return message;
|
|
2625
|
+
},
|
|
2626
|
+
};
|
|
2627
|
+
function createBaseTripCompact_HumidityEntry() {
|
|
2628
|
+
return { key: 0, value: 0 };
|
|
2629
|
+
}
|
|
2630
|
+
exports.TripCompact_HumidityEntry = {
|
|
2631
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2632
|
+
if (message.key !== 0) {
|
|
2633
|
+
writer.uint32(8).uint32(message.key);
|
|
2634
|
+
}
|
|
2635
|
+
if (message.value !== 0) {
|
|
2636
|
+
writer.uint32(16).uint32(message.value);
|
|
2637
|
+
}
|
|
2638
|
+
return writer;
|
|
2639
|
+
},
|
|
2640
|
+
decode(input, length) {
|
|
2641
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2642
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2643
|
+
const message = createBaseTripCompact_HumidityEntry();
|
|
2644
|
+
while (reader.pos < end) {
|
|
2645
|
+
const tag = reader.uint32();
|
|
2646
|
+
switch (tag >>> 3) {
|
|
2647
|
+
case 1: {
|
|
2648
|
+
if (tag !== 8) {
|
|
2649
|
+
break;
|
|
2650
|
+
}
|
|
2651
|
+
message.key = reader.uint32();
|
|
2652
|
+
continue;
|
|
2653
|
+
}
|
|
2654
|
+
case 2: {
|
|
2655
|
+
if (tag !== 16) {
|
|
2656
|
+
break;
|
|
2657
|
+
}
|
|
2658
|
+
message.value = reader.uint32();
|
|
2659
|
+
continue;
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2663
|
+
break;
|
|
2664
|
+
}
|
|
2665
|
+
reader.skip(tag & 7);
|
|
2666
|
+
}
|
|
2667
|
+
return message;
|
|
2668
|
+
},
|
|
2669
|
+
fromJSON(object) {
|
|
2670
|
+
return {
|
|
2671
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
2672
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
2673
|
+
};
|
|
2674
|
+
},
|
|
2675
|
+
toJSON(message) {
|
|
2676
|
+
const obj = {};
|
|
2677
|
+
if (message.key !== 0) {
|
|
2678
|
+
obj.key = Math.round(message.key);
|
|
2679
|
+
}
|
|
2680
|
+
if (message.value !== 0) {
|
|
2681
|
+
obj.value = Math.round(message.value);
|
|
2682
|
+
}
|
|
2683
|
+
return obj;
|
|
2684
|
+
},
|
|
2685
|
+
create(base) {
|
|
2686
|
+
return exports.TripCompact_HumidityEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2687
|
+
},
|
|
2688
|
+
fromPartial(object) {
|
|
2689
|
+
var _a, _b;
|
|
2690
|
+
const message = createBaseTripCompact_HumidityEntry();
|
|
2691
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
2692
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
2693
|
+
return message;
|
|
2694
|
+
},
|
|
2695
|
+
};
|
|
2696
|
+
function createBaseTripCompact_CrashesEntry() {
|
|
2697
|
+
return { key: 0, value: 0 };
|
|
2698
|
+
}
|
|
2699
|
+
exports.TripCompact_CrashesEntry = {
|
|
2700
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2701
|
+
if (message.key !== 0) {
|
|
2702
|
+
writer.uint32(8).uint32(message.key);
|
|
2703
|
+
}
|
|
2704
|
+
if (message.value !== 0) {
|
|
2705
|
+
writer.uint32(16).uint32(message.value);
|
|
2706
|
+
}
|
|
2707
|
+
return writer;
|
|
2708
|
+
},
|
|
2709
|
+
decode(input, length) {
|
|
2710
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2711
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2712
|
+
const message = createBaseTripCompact_CrashesEntry();
|
|
2713
|
+
while (reader.pos < end) {
|
|
2714
|
+
const tag = reader.uint32();
|
|
2715
|
+
switch (tag >>> 3) {
|
|
2716
|
+
case 1: {
|
|
2717
|
+
if (tag !== 8) {
|
|
2718
|
+
break;
|
|
2719
|
+
}
|
|
2720
|
+
message.key = reader.uint32();
|
|
2721
|
+
continue;
|
|
2722
|
+
}
|
|
2723
|
+
case 2: {
|
|
2724
|
+
if (tag !== 16) {
|
|
2725
|
+
break;
|
|
2726
|
+
}
|
|
2727
|
+
message.value = reader.uint32();
|
|
2728
|
+
continue;
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2732
|
+
break;
|
|
2733
|
+
}
|
|
2734
|
+
reader.skip(tag & 7);
|
|
2735
|
+
}
|
|
2736
|
+
return message;
|
|
2737
|
+
},
|
|
2738
|
+
fromJSON(object) {
|
|
2739
|
+
return {
|
|
2740
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
2741
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
2742
|
+
};
|
|
2743
|
+
},
|
|
2744
|
+
toJSON(message) {
|
|
2745
|
+
const obj = {};
|
|
2746
|
+
if (message.key !== 0) {
|
|
2747
|
+
obj.key = Math.round(message.key);
|
|
2748
|
+
}
|
|
2749
|
+
if (message.value !== 0) {
|
|
2750
|
+
obj.value = Math.round(message.value);
|
|
2751
|
+
}
|
|
2752
|
+
return obj;
|
|
2753
|
+
},
|
|
2754
|
+
create(base) {
|
|
2755
|
+
return exports.TripCompact_CrashesEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2756
|
+
},
|
|
2757
|
+
fromPartial(object) {
|
|
2758
|
+
var _a, _b;
|
|
2759
|
+
const message = createBaseTripCompact_CrashesEntry();
|
|
2760
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
2761
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
2762
|
+
return message;
|
|
2763
|
+
},
|
|
2764
|
+
};
|
|
2765
|
+
function createBaseTripCompact_SpeedsEntry() {
|
|
2766
|
+
return { key: 0, value: undefined };
|
|
2767
|
+
}
|
|
2768
|
+
exports.TripCompact_SpeedsEntry = {
|
|
2769
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2770
|
+
if (message.key !== 0) {
|
|
2771
|
+
writer.uint32(8).uint32(message.key);
|
|
2772
|
+
}
|
|
2773
|
+
if (message.value !== undefined) {
|
|
2774
|
+
exports.TripDurationStat.encode(message.value, writer.uint32(18).fork()).join();
|
|
2775
|
+
}
|
|
2776
|
+
return writer;
|
|
2777
|
+
},
|
|
2778
|
+
decode(input, length) {
|
|
2779
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2780
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2781
|
+
const message = createBaseTripCompact_SpeedsEntry();
|
|
2782
|
+
while (reader.pos < end) {
|
|
2783
|
+
const tag = reader.uint32();
|
|
2784
|
+
switch (tag >>> 3) {
|
|
2785
|
+
case 1: {
|
|
2786
|
+
if (tag !== 8) {
|
|
2787
|
+
break;
|
|
2788
|
+
}
|
|
2789
|
+
message.key = reader.uint32();
|
|
2790
|
+
continue;
|
|
2791
|
+
}
|
|
2792
|
+
case 2: {
|
|
2793
|
+
if (tag !== 18) {
|
|
2794
|
+
break;
|
|
2795
|
+
}
|
|
2796
|
+
message.value = exports.TripDurationStat.decode(reader, reader.uint32());
|
|
2797
|
+
continue;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2801
|
+
break;
|
|
2802
|
+
}
|
|
2803
|
+
reader.skip(tag & 7);
|
|
2804
|
+
}
|
|
2805
|
+
return message;
|
|
2806
|
+
},
|
|
2807
|
+
fromJSON(object) {
|
|
2808
|
+
return {
|
|
2809
|
+
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
2810
|
+
value: isSet(object.value) ? exports.TripDurationStat.fromJSON(object.value) : undefined,
|
|
2811
|
+
};
|
|
2812
|
+
},
|
|
2813
|
+
toJSON(message) {
|
|
2814
|
+
const obj = {};
|
|
2815
|
+
if (message.key !== 0) {
|
|
2816
|
+
obj.key = Math.round(message.key);
|
|
2817
|
+
}
|
|
2818
|
+
if (message.value !== undefined) {
|
|
2819
|
+
obj.value = exports.TripDurationStat.toJSON(message.value);
|
|
2820
|
+
}
|
|
2821
|
+
return obj;
|
|
2822
|
+
},
|
|
2823
|
+
create(base) {
|
|
2824
|
+
return exports.TripCompact_SpeedsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2825
|
+
},
|
|
2826
|
+
fromPartial(object) {
|
|
2827
|
+
var _a;
|
|
2828
|
+
const message = createBaseTripCompact_SpeedsEntry();
|
|
2829
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : 0;
|
|
2830
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
2831
|
+
? exports.TripDurationStat.fromPartial(object.value)
|
|
2832
|
+
: undefined;
|
|
2833
|
+
return message;
|
|
2834
|
+
},
|
|
2835
|
+
};
|
|
2836
|
+
function createBaseTripPoint() {
|
|
2837
|
+
return { latitude: 0, longitude: 0, angle: 0 };
|
|
2838
|
+
}
|
|
2839
|
+
exports.TripPoint = {
|
|
2840
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2841
|
+
if (message.latitude !== 0) {
|
|
2842
|
+
writer.uint32(13).float(message.latitude);
|
|
2843
|
+
}
|
|
2844
|
+
if (message.longitude !== 0) {
|
|
2845
|
+
writer.uint32(21).float(message.longitude);
|
|
2846
|
+
}
|
|
2847
|
+
if (message.angle !== 0) {
|
|
2848
|
+
writer.uint32(24).uint32(message.angle);
|
|
2849
|
+
}
|
|
2850
|
+
return writer;
|
|
2851
|
+
},
|
|
2852
|
+
decode(input, length) {
|
|
2853
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2854
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2855
|
+
const message = createBaseTripPoint();
|
|
2856
|
+
while (reader.pos < end) {
|
|
2857
|
+
const tag = reader.uint32();
|
|
2858
|
+
switch (tag >>> 3) {
|
|
2859
|
+
case 1: {
|
|
2860
|
+
if (tag !== 13) {
|
|
2861
|
+
break;
|
|
2862
|
+
}
|
|
2863
|
+
message.latitude = reader.float();
|
|
2864
|
+
continue;
|
|
2865
|
+
}
|
|
2866
|
+
case 2: {
|
|
2867
|
+
if (tag !== 21) {
|
|
2868
|
+
break;
|
|
2869
|
+
}
|
|
2870
|
+
message.longitude = reader.float();
|
|
2871
|
+
continue;
|
|
2872
|
+
}
|
|
2873
|
+
case 3: {
|
|
2874
|
+
if (tag !== 24) {
|
|
2875
|
+
break;
|
|
2876
|
+
}
|
|
2877
|
+
message.angle = reader.uint32();
|
|
2878
|
+
continue;
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2882
|
+
break;
|
|
2883
|
+
}
|
|
2884
|
+
reader.skip(tag & 7);
|
|
2885
|
+
}
|
|
2886
|
+
return message;
|
|
2887
|
+
},
|
|
2888
|
+
fromJSON(object) {
|
|
2889
|
+
return {
|
|
2890
|
+
latitude: isSet(object.latitude) ? globalThis.Number(object.latitude) : 0,
|
|
2891
|
+
longitude: isSet(object.longitude) ? globalThis.Number(object.longitude) : 0,
|
|
2892
|
+
angle: isSet(object.angle) ? globalThis.Number(object.angle) : 0,
|
|
2893
|
+
};
|
|
2894
|
+
},
|
|
2895
|
+
toJSON(message) {
|
|
2896
|
+
const obj = {};
|
|
2897
|
+
if (message.latitude !== 0) {
|
|
2898
|
+
obj.latitude = message.latitude;
|
|
2899
|
+
}
|
|
2900
|
+
if (message.longitude !== 0) {
|
|
2901
|
+
obj.longitude = message.longitude;
|
|
2902
|
+
}
|
|
2903
|
+
if (message.angle !== 0) {
|
|
2904
|
+
obj.angle = Math.round(message.angle);
|
|
2905
|
+
}
|
|
2906
|
+
return obj;
|
|
2907
|
+
},
|
|
2908
|
+
create(base) {
|
|
2909
|
+
return exports.TripPoint.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2910
|
+
},
|
|
2911
|
+
fromPartial(object) {
|
|
2912
|
+
var _a, _b, _c;
|
|
2913
|
+
const message = createBaseTripPoint();
|
|
2914
|
+
message.latitude = (_a = object.latitude) !== null && _a !== void 0 ? _a : 0;
|
|
2915
|
+
message.longitude = (_b = object.longitude) !== null && _b !== void 0 ? _b : 0;
|
|
2916
|
+
message.angle = (_c = object.angle) !== null && _c !== void 0 ? _c : 0;
|
|
2917
|
+
return message;
|
|
2918
|
+
},
|
|
2919
|
+
};
|
|
2920
|
+
function createBaseTripDurationStat() {
|
|
2921
|
+
return { duration: 0, mileage: 0 };
|
|
2922
|
+
}
|
|
2923
|
+
exports.TripDurationStat = {
|
|
2924
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2925
|
+
if (message.duration !== 0) {
|
|
2926
|
+
writer.uint32(8).uint32(message.duration);
|
|
2927
|
+
}
|
|
2928
|
+
if (message.mileage !== 0) {
|
|
2929
|
+
writer.uint32(16).uint32(message.mileage);
|
|
2930
|
+
}
|
|
2931
|
+
return writer;
|
|
2932
|
+
},
|
|
2933
|
+
decode(input, length) {
|
|
2934
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2935
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2936
|
+
const message = createBaseTripDurationStat();
|
|
2937
|
+
while (reader.pos < end) {
|
|
2938
|
+
const tag = reader.uint32();
|
|
2939
|
+
switch (tag >>> 3) {
|
|
2940
|
+
case 1: {
|
|
2941
|
+
if (tag !== 8) {
|
|
2942
|
+
break;
|
|
2943
|
+
}
|
|
2944
|
+
message.duration = reader.uint32();
|
|
2945
|
+
continue;
|
|
2946
|
+
}
|
|
2947
|
+
case 2: {
|
|
2948
|
+
if (tag !== 16) {
|
|
2949
|
+
break;
|
|
2950
|
+
}
|
|
2951
|
+
message.mileage = reader.uint32();
|
|
2952
|
+
continue;
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2956
|
+
break;
|
|
2957
|
+
}
|
|
2958
|
+
reader.skip(tag & 7);
|
|
2959
|
+
}
|
|
2960
|
+
return message;
|
|
2961
|
+
},
|
|
2962
|
+
fromJSON(object) {
|
|
2963
|
+
return {
|
|
2964
|
+
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
2965
|
+
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
2966
|
+
};
|
|
2967
|
+
},
|
|
2968
|
+
toJSON(message) {
|
|
2969
|
+
const obj = {};
|
|
2970
|
+
if (message.duration !== 0) {
|
|
2971
|
+
obj.duration = Math.round(message.duration);
|
|
2972
|
+
}
|
|
2973
|
+
if (message.mileage !== 0) {
|
|
2974
|
+
obj.mileage = Math.round(message.mileage);
|
|
2975
|
+
}
|
|
2976
|
+
return obj;
|
|
2977
|
+
},
|
|
2978
|
+
create(base) {
|
|
2979
|
+
return exports.TripDurationStat.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2980
|
+
},
|
|
2981
|
+
fromPartial(object) {
|
|
2982
|
+
var _a, _b;
|
|
2983
|
+
const message = createBaseTripDurationStat();
|
|
2984
|
+
message.duration = (_a = object.duration) !== null && _a !== void 0 ? _a : 0;
|
|
2985
|
+
message.mileage = (_b = object.mileage) !== null && _b !== void 0 ? _b : 0;
|
|
2986
|
+
return message;
|
|
2987
|
+
},
|
|
2988
|
+
};
|
|
2989
|
+
function createBaseFusionTrip() {
|
|
2990
|
+
return {
|
|
2991
|
+
id: 0,
|
|
2992
|
+
deviceId: 0,
|
|
2993
|
+
mileage: 0,
|
|
2994
|
+
idling: 0,
|
|
2995
|
+
parking: 0,
|
|
2996
|
+
moving: 0,
|
|
2997
|
+
towing: 0,
|
|
2998
|
+
speedTotal: 0,
|
|
2999
|
+
speedSum: 0,
|
|
3000
|
+
speedMax: 0,
|
|
3001
|
+
records: 0,
|
|
3002
|
+
harshAcceleration: 0,
|
|
3003
|
+
harshBreak: 0,
|
|
3004
|
+
harshCorner: 0,
|
|
3005
|
+
minTemp01: undefined,
|
|
3006
|
+
maxTemp01: undefined,
|
|
3007
|
+
minTemp02: undefined,
|
|
3008
|
+
maxTemp02: undefined,
|
|
3009
|
+
minTemp03: undefined,
|
|
3010
|
+
maxTemp03: undefined,
|
|
3011
|
+
minTemp04: undefined,
|
|
3012
|
+
maxTemp04: undefined,
|
|
3013
|
+
minHumidity: undefined,
|
|
3014
|
+
maxHumidity: undefined,
|
|
3015
|
+
startLat: undefined,
|
|
3016
|
+
startLng: undefined,
|
|
3017
|
+
finishLat: undefined,
|
|
3018
|
+
finishLng: undefined,
|
|
3019
|
+
startedAt: undefined,
|
|
3020
|
+
finishedAt: undefined,
|
|
3021
|
+
createdAt: undefined,
|
|
3022
|
+
updatedAt: undefined,
|
|
3023
|
+
Logs: "",
|
|
3024
|
+
Fug: undefined,
|
|
3025
|
+
};
|
|
3026
|
+
}
|
|
3027
|
+
exports.FusionTrip = {
|
|
3028
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3029
|
+
if (message.id !== 0) {
|
|
3030
|
+
writer.uint32(8).uint64(message.id);
|
|
3031
|
+
}
|
|
3032
|
+
if (message.deviceId !== 0) {
|
|
3033
|
+
writer.uint32(16).uint64(message.deviceId);
|
|
3034
|
+
}
|
|
3035
|
+
if (message.mileage !== 0) {
|
|
3036
|
+
writer.uint32(24).uint32(message.mileage);
|
|
3037
|
+
}
|
|
3038
|
+
if (message.idling !== 0) {
|
|
3039
|
+
writer.uint32(32).uint32(message.idling);
|
|
3040
|
+
}
|
|
3041
|
+
if (message.parking !== 0) {
|
|
3042
|
+
writer.uint32(40).uint32(message.parking);
|
|
3043
|
+
}
|
|
3044
|
+
if (message.moving !== 0) {
|
|
3045
|
+
writer.uint32(48).uint32(message.moving);
|
|
3046
|
+
}
|
|
3047
|
+
if (message.towing !== 0) {
|
|
3048
|
+
writer.uint32(56).uint32(message.towing);
|
|
3049
|
+
}
|
|
3050
|
+
if (message.speedTotal !== 0) {
|
|
3051
|
+
writer.uint32(64).uint32(message.speedTotal);
|
|
3052
|
+
}
|
|
3053
|
+
if (message.speedSum !== 0) {
|
|
3054
|
+
writer.uint32(72).uint32(message.speedSum);
|
|
3055
|
+
}
|
|
3056
|
+
if (message.speedMax !== 0) {
|
|
3057
|
+
writer.uint32(80).uint32(message.speedMax);
|
|
3058
|
+
}
|
|
3059
|
+
if (message.records !== 0) {
|
|
3060
|
+
writer.uint32(88).uint32(message.records);
|
|
3061
|
+
}
|
|
3062
|
+
if (message.harshAcceleration !== 0) {
|
|
3063
|
+
writer.uint32(96).uint32(message.harshAcceleration);
|
|
3064
|
+
}
|
|
3065
|
+
if (message.harshBreak !== 0) {
|
|
3066
|
+
writer.uint32(104).uint32(message.harshBreak);
|
|
3067
|
+
}
|
|
3068
|
+
if (message.harshCorner !== 0) {
|
|
3069
|
+
writer.uint32(112).uint32(message.harshCorner);
|
|
3070
|
+
}
|
|
3071
|
+
if (message.minTemp01 !== undefined) {
|
|
3072
|
+
writer.uint32(120).sint32(message.minTemp01);
|
|
3073
|
+
}
|
|
3074
|
+
if (message.maxTemp01 !== undefined) {
|
|
3075
|
+
writer.uint32(128).sint32(message.maxTemp01);
|
|
3076
|
+
}
|
|
3077
|
+
if (message.minTemp02 !== undefined) {
|
|
3078
|
+
writer.uint32(136).sint32(message.minTemp02);
|
|
3079
|
+
}
|
|
3080
|
+
if (message.maxTemp02 !== undefined) {
|
|
3081
|
+
writer.uint32(144).sint32(message.maxTemp02);
|
|
3082
|
+
}
|
|
3083
|
+
if (message.minTemp03 !== undefined) {
|
|
3084
|
+
writer.uint32(152).sint32(message.minTemp03);
|
|
3085
|
+
}
|
|
3086
|
+
if (message.maxTemp03 !== undefined) {
|
|
3087
|
+
writer.uint32(160).sint32(message.maxTemp03);
|
|
3088
|
+
}
|
|
3089
|
+
if (message.minTemp04 !== undefined) {
|
|
3090
|
+
writer.uint32(168).sint32(message.minTemp04);
|
|
3091
|
+
}
|
|
3092
|
+
if (message.maxTemp04 !== undefined) {
|
|
3093
|
+
writer.uint32(176).sint32(message.maxTemp04);
|
|
3094
|
+
}
|
|
3095
|
+
if (message.minHumidity !== undefined) {
|
|
3096
|
+
writer.uint32(184).uint32(message.minHumidity);
|
|
3097
|
+
}
|
|
3098
|
+
if (message.maxHumidity !== undefined) {
|
|
3099
|
+
writer.uint32(192).uint32(message.maxHumidity);
|
|
3100
|
+
}
|
|
3101
|
+
if (message.startLat !== undefined) {
|
|
3102
|
+
writer.uint32(205).float(message.startLat);
|
|
3103
|
+
}
|
|
3104
|
+
if (message.startLng !== undefined) {
|
|
3105
|
+
writer.uint32(213).float(message.startLng);
|
|
3106
|
+
}
|
|
3107
|
+
if (message.finishLat !== undefined) {
|
|
3108
|
+
writer.uint32(221).float(message.finishLat);
|
|
3109
|
+
}
|
|
3110
|
+
if (message.finishLng !== undefined) {
|
|
3111
|
+
writer.uint32(229).float(message.finishLng);
|
|
3112
|
+
}
|
|
3113
|
+
if (message.startedAt !== undefined) {
|
|
3114
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(234).fork()).join();
|
|
3115
|
+
}
|
|
3116
|
+
if (message.finishedAt !== undefined) {
|
|
3117
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(242).fork()).join();
|
|
3118
|
+
}
|
|
3119
|
+
if (message.createdAt !== undefined) {
|
|
3120
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(250).fork()).join();
|
|
3121
|
+
}
|
|
3122
|
+
if (message.updatedAt !== undefined) {
|
|
3123
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(258).fork()).join();
|
|
3124
|
+
}
|
|
3125
|
+
if (message.Logs !== "") {
|
|
3126
|
+
writer.uint32(266).string(message.Logs);
|
|
3127
|
+
}
|
|
3128
|
+
if (message.Fug !== undefined) {
|
|
3129
|
+
writer.uint32(272).uint32(message.Fug);
|
|
3130
|
+
}
|
|
3131
|
+
return writer;
|
|
3132
|
+
},
|
|
3133
|
+
decode(input, length) {
|
|
3134
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3135
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3136
|
+
const message = createBaseFusionTrip();
|
|
3137
|
+
while (reader.pos < end) {
|
|
3138
|
+
const tag = reader.uint32();
|
|
3139
|
+
switch (tag >>> 3) {
|
|
3140
|
+
case 1: {
|
|
3141
|
+
if (tag !== 8) {
|
|
3142
|
+
break;
|
|
3143
|
+
}
|
|
3144
|
+
message.id = longToNumber(reader.uint64());
|
|
3145
|
+
continue;
|
|
3146
|
+
}
|
|
3147
|
+
case 2: {
|
|
3148
|
+
if (tag !== 16) {
|
|
3149
|
+
break;
|
|
3150
|
+
}
|
|
3151
|
+
message.deviceId = longToNumber(reader.uint64());
|
|
3152
|
+
continue;
|
|
3153
|
+
}
|
|
3154
|
+
case 3: {
|
|
3155
|
+
if (tag !== 24) {
|
|
3156
|
+
break;
|
|
3157
|
+
}
|
|
3158
|
+
message.mileage = reader.uint32();
|
|
3159
|
+
continue;
|
|
3160
|
+
}
|
|
3161
|
+
case 4: {
|
|
3162
|
+
if (tag !== 32) {
|
|
3163
|
+
break;
|
|
3164
|
+
}
|
|
3165
|
+
message.idling = reader.uint32();
|
|
3166
|
+
continue;
|
|
3167
|
+
}
|
|
3168
|
+
case 5: {
|
|
3169
|
+
if (tag !== 40) {
|
|
3170
|
+
break;
|
|
3171
|
+
}
|
|
3172
|
+
message.parking = reader.uint32();
|
|
3173
|
+
continue;
|
|
3174
|
+
}
|
|
3175
|
+
case 6: {
|
|
3176
|
+
if (tag !== 48) {
|
|
3177
|
+
break;
|
|
3178
|
+
}
|
|
3179
|
+
message.moving = reader.uint32();
|
|
3180
|
+
continue;
|
|
3181
|
+
}
|
|
3182
|
+
case 7: {
|
|
3183
|
+
if (tag !== 56) {
|
|
3184
|
+
break;
|
|
3185
|
+
}
|
|
3186
|
+
message.towing = reader.uint32();
|
|
3187
|
+
continue;
|
|
3188
|
+
}
|
|
3189
|
+
case 8: {
|
|
3190
|
+
if (tag !== 64) {
|
|
3191
|
+
break;
|
|
3192
|
+
}
|
|
3193
|
+
message.speedTotal = reader.uint32();
|
|
3194
|
+
continue;
|
|
3195
|
+
}
|
|
3196
|
+
case 9: {
|
|
3197
|
+
if (tag !== 72) {
|
|
3198
|
+
break;
|
|
3199
|
+
}
|
|
3200
|
+
message.speedSum = reader.uint32();
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3203
|
+
case 10: {
|
|
3204
|
+
if (tag !== 80) {
|
|
3205
|
+
break;
|
|
3206
|
+
}
|
|
3207
|
+
message.speedMax = reader.uint32();
|
|
3208
|
+
continue;
|
|
3209
|
+
}
|
|
3210
|
+
case 11: {
|
|
3211
|
+
if (tag !== 88) {
|
|
3212
|
+
break;
|
|
3213
|
+
}
|
|
3214
|
+
message.records = reader.uint32();
|
|
3215
|
+
continue;
|
|
3216
|
+
}
|
|
3217
|
+
case 12: {
|
|
3218
|
+
if (tag !== 96) {
|
|
3219
|
+
break;
|
|
3220
|
+
}
|
|
3221
|
+
message.harshAcceleration = reader.uint32();
|
|
3222
|
+
continue;
|
|
3223
|
+
}
|
|
3224
|
+
case 13: {
|
|
3225
|
+
if (tag !== 104) {
|
|
3226
|
+
break;
|
|
3227
|
+
}
|
|
3228
|
+
message.harshBreak = reader.uint32();
|
|
3229
|
+
continue;
|
|
3230
|
+
}
|
|
3231
|
+
case 14: {
|
|
3232
|
+
if (tag !== 112) {
|
|
3233
|
+
break;
|
|
3234
|
+
}
|
|
3235
|
+
message.harshCorner = reader.uint32();
|
|
3236
|
+
continue;
|
|
3237
|
+
}
|
|
3238
|
+
case 15: {
|
|
3239
|
+
if (tag !== 120) {
|
|
3240
|
+
break;
|
|
3241
|
+
}
|
|
3242
|
+
message.minTemp01 = reader.sint32();
|
|
3243
|
+
continue;
|
|
3244
|
+
}
|
|
3245
|
+
case 16: {
|
|
3246
|
+
if (tag !== 128) {
|
|
3247
|
+
break;
|
|
3248
|
+
}
|
|
3249
|
+
message.maxTemp01 = reader.sint32();
|
|
3250
|
+
continue;
|
|
3251
|
+
}
|
|
3252
|
+
case 17: {
|
|
3253
|
+
if (tag !== 136) {
|
|
3254
|
+
break;
|
|
3255
|
+
}
|
|
3256
|
+
message.minTemp02 = reader.sint32();
|
|
3257
|
+
continue;
|
|
3258
|
+
}
|
|
3259
|
+
case 18: {
|
|
3260
|
+
if (tag !== 144) {
|
|
3261
|
+
break;
|
|
3262
|
+
}
|
|
3263
|
+
message.maxTemp02 = reader.sint32();
|
|
3264
|
+
continue;
|
|
3265
|
+
}
|
|
3266
|
+
case 19: {
|
|
3267
|
+
if (tag !== 152) {
|
|
3268
|
+
break;
|
|
3269
|
+
}
|
|
3270
|
+
message.minTemp03 = reader.sint32();
|
|
3271
|
+
continue;
|
|
3272
|
+
}
|
|
3273
|
+
case 20: {
|
|
3274
|
+
if (tag !== 160) {
|
|
3275
|
+
break;
|
|
3276
|
+
}
|
|
3277
|
+
message.maxTemp03 = reader.sint32();
|
|
3278
|
+
continue;
|
|
3279
|
+
}
|
|
3280
|
+
case 21: {
|
|
3281
|
+
if (tag !== 168) {
|
|
3282
|
+
break;
|
|
3283
|
+
}
|
|
3284
|
+
message.minTemp04 = reader.sint32();
|
|
3285
|
+
continue;
|
|
3286
|
+
}
|
|
3287
|
+
case 22: {
|
|
3288
|
+
if (tag !== 176) {
|
|
3289
|
+
break;
|
|
3290
|
+
}
|
|
3291
|
+
message.maxTemp04 = reader.sint32();
|
|
3292
|
+
continue;
|
|
3293
|
+
}
|
|
3294
|
+
case 23: {
|
|
3295
|
+
if (tag !== 184) {
|
|
3296
|
+
break;
|
|
3297
|
+
}
|
|
3298
|
+
message.minHumidity = reader.uint32();
|
|
3299
|
+
continue;
|
|
3300
|
+
}
|
|
3301
|
+
case 24: {
|
|
3302
|
+
if (tag !== 192) {
|
|
3303
|
+
break;
|
|
3304
|
+
}
|
|
3305
|
+
message.maxHumidity = reader.uint32();
|
|
3306
|
+
continue;
|
|
3307
|
+
}
|
|
3308
|
+
case 25: {
|
|
3309
|
+
if (tag !== 205) {
|
|
3310
|
+
break;
|
|
3311
|
+
}
|
|
3312
|
+
message.startLat = reader.float();
|
|
3313
|
+
continue;
|
|
3314
|
+
}
|
|
3315
|
+
case 26: {
|
|
3316
|
+
if (tag !== 213) {
|
|
3317
|
+
break;
|
|
3318
|
+
}
|
|
3319
|
+
message.startLng = reader.float();
|
|
3320
|
+
continue;
|
|
3321
|
+
}
|
|
3322
|
+
case 27: {
|
|
3323
|
+
if (tag !== 221) {
|
|
3324
|
+
break;
|
|
3325
|
+
}
|
|
3326
|
+
message.finishLat = reader.float();
|
|
3327
|
+
continue;
|
|
3328
|
+
}
|
|
3329
|
+
case 28: {
|
|
3330
|
+
if (tag !== 229) {
|
|
3331
|
+
break;
|
|
3332
|
+
}
|
|
3333
|
+
message.finishLng = reader.float();
|
|
3334
|
+
continue;
|
|
3335
|
+
}
|
|
3336
|
+
case 29: {
|
|
3337
|
+
if (tag !== 234) {
|
|
3338
|
+
break;
|
|
3339
|
+
}
|
|
3340
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3341
|
+
continue;
|
|
3342
|
+
}
|
|
3343
|
+
case 30: {
|
|
3344
|
+
if (tag !== 242) {
|
|
3345
|
+
break;
|
|
3346
|
+
}
|
|
3347
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3348
|
+
continue;
|
|
3349
|
+
}
|
|
3350
|
+
case 31: {
|
|
3351
|
+
if (tag !== 250) {
|
|
3352
|
+
break;
|
|
3353
|
+
}
|
|
3354
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3355
|
+
continue;
|
|
3356
|
+
}
|
|
3357
|
+
case 32: {
|
|
3358
|
+
if (tag !== 258) {
|
|
3359
|
+
break;
|
|
3360
|
+
}
|
|
3361
|
+
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3362
|
+
continue;
|
|
3363
|
+
}
|
|
3364
|
+
case 33: {
|
|
3365
|
+
if (tag !== 266) {
|
|
3366
|
+
break;
|
|
3367
|
+
}
|
|
3368
|
+
message.Logs = reader.string();
|
|
3369
|
+
continue;
|
|
3370
|
+
}
|
|
3371
|
+
case 34: {
|
|
3372
|
+
if (tag !== 272) {
|
|
3373
|
+
break;
|
|
3374
|
+
}
|
|
3375
|
+
message.Fug = reader.uint32();
|
|
3376
|
+
continue;
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3380
|
+
break;
|
|
3381
|
+
}
|
|
3382
|
+
reader.skip(tag & 7);
|
|
3383
|
+
}
|
|
3384
|
+
return message;
|
|
3385
|
+
},
|
|
3386
|
+
fromJSON(object) {
|
|
3387
|
+
return {
|
|
3388
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
3389
|
+
deviceId: isSet(object.deviceId) ? globalThis.Number(object.deviceId) : 0,
|
|
3390
|
+
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
3391
|
+
idling: isSet(object.idling) ? globalThis.Number(object.idling) : 0,
|
|
3392
|
+
parking: isSet(object.parking) ? globalThis.Number(object.parking) : 0,
|
|
3393
|
+
moving: isSet(object.moving) ? globalThis.Number(object.moving) : 0,
|
|
3394
|
+
towing: isSet(object.towing) ? globalThis.Number(object.towing) : 0,
|
|
3395
|
+
speedTotal: isSet(object.speedTotal) ? globalThis.Number(object.speedTotal) : 0,
|
|
3396
|
+
speedSum: isSet(object.speedSum) ? globalThis.Number(object.speedSum) : 0,
|
|
3397
|
+
speedMax: isSet(object.speedMax) ? globalThis.Number(object.speedMax) : 0,
|
|
3398
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
3399
|
+
harshAcceleration: isSet(object.harshAcceleration) ? globalThis.Number(object.harshAcceleration) : 0,
|
|
3400
|
+
harshBreak: isSet(object.harshBreak) ? globalThis.Number(object.harshBreak) : 0,
|
|
3401
|
+
harshCorner: isSet(object.harshCorner) ? globalThis.Number(object.harshCorner) : 0,
|
|
3402
|
+
minTemp01: isSet(object.minTemp01) ? globalThis.Number(object.minTemp01) : undefined,
|
|
3403
|
+
maxTemp01: isSet(object.maxTemp01) ? globalThis.Number(object.maxTemp01) : undefined,
|
|
3404
|
+
minTemp02: isSet(object.minTemp02) ? globalThis.Number(object.minTemp02) : undefined,
|
|
3405
|
+
maxTemp02: isSet(object.maxTemp02) ? globalThis.Number(object.maxTemp02) : undefined,
|
|
3406
|
+
minTemp03: isSet(object.minTemp03) ? globalThis.Number(object.minTemp03) : undefined,
|
|
3407
|
+
maxTemp03: isSet(object.maxTemp03) ? globalThis.Number(object.maxTemp03) : undefined,
|
|
3408
|
+
minTemp04: isSet(object.minTemp04) ? globalThis.Number(object.minTemp04) : undefined,
|
|
3409
|
+
maxTemp04: isSet(object.maxTemp04) ? globalThis.Number(object.maxTemp04) : undefined,
|
|
3410
|
+
minHumidity: isSet(object.minHumidity) ? globalThis.Number(object.minHumidity) : undefined,
|
|
3411
|
+
maxHumidity: isSet(object.maxHumidity) ? globalThis.Number(object.maxHumidity) : undefined,
|
|
3412
|
+
startLat: isSet(object.startLat) ? globalThis.Number(object.startLat) : undefined,
|
|
3413
|
+
startLng: isSet(object.startLng) ? globalThis.Number(object.startLng) : undefined,
|
|
3414
|
+
finishLat: isSet(object.finishLat) ? globalThis.Number(object.finishLat) : undefined,
|
|
3415
|
+
finishLng: isSet(object.finishLng) ? globalThis.Number(object.finishLng) : undefined,
|
|
3416
|
+
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
3417
|
+
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
3418
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
3419
|
+
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
3420
|
+
Logs: isSet(object.Logs) ? globalThis.String(object.Logs) : "",
|
|
3421
|
+
Fug: isSet(object.Fug) ? globalThis.Number(object.Fug) : undefined,
|
|
3422
|
+
};
|
|
3423
|
+
},
|
|
3424
|
+
toJSON(message) {
|
|
3425
|
+
const obj = {};
|
|
3426
|
+
if (message.id !== 0) {
|
|
3427
|
+
obj.id = Math.round(message.id);
|
|
3428
|
+
}
|
|
3429
|
+
if (message.deviceId !== 0) {
|
|
3430
|
+
obj.deviceId = Math.round(message.deviceId);
|
|
3431
|
+
}
|
|
3432
|
+
if (message.mileage !== 0) {
|
|
3433
|
+
obj.mileage = Math.round(message.mileage);
|
|
3434
|
+
}
|
|
3435
|
+
if (message.idling !== 0) {
|
|
3436
|
+
obj.idling = Math.round(message.idling);
|
|
3437
|
+
}
|
|
3438
|
+
if (message.parking !== 0) {
|
|
3439
|
+
obj.parking = Math.round(message.parking);
|
|
3440
|
+
}
|
|
3441
|
+
if (message.moving !== 0) {
|
|
3442
|
+
obj.moving = Math.round(message.moving);
|
|
3443
|
+
}
|
|
3444
|
+
if (message.towing !== 0) {
|
|
3445
|
+
obj.towing = Math.round(message.towing);
|
|
3446
|
+
}
|
|
3447
|
+
if (message.speedTotal !== 0) {
|
|
3448
|
+
obj.speedTotal = Math.round(message.speedTotal);
|
|
3449
|
+
}
|
|
3450
|
+
if (message.speedSum !== 0) {
|
|
3451
|
+
obj.speedSum = Math.round(message.speedSum);
|
|
3452
|
+
}
|
|
3453
|
+
if (message.speedMax !== 0) {
|
|
3454
|
+
obj.speedMax = Math.round(message.speedMax);
|
|
3455
|
+
}
|
|
3456
|
+
if (message.records !== 0) {
|
|
3457
|
+
obj.records = Math.round(message.records);
|
|
3458
|
+
}
|
|
3459
|
+
if (message.harshAcceleration !== 0) {
|
|
3460
|
+
obj.harshAcceleration = Math.round(message.harshAcceleration);
|
|
3461
|
+
}
|
|
3462
|
+
if (message.harshBreak !== 0) {
|
|
3463
|
+
obj.harshBreak = Math.round(message.harshBreak);
|
|
3464
|
+
}
|
|
3465
|
+
if (message.harshCorner !== 0) {
|
|
3466
|
+
obj.harshCorner = Math.round(message.harshCorner);
|
|
3467
|
+
}
|
|
3468
|
+
if (message.minTemp01 !== undefined) {
|
|
3469
|
+
obj.minTemp01 = Math.round(message.minTemp01);
|
|
3470
|
+
}
|
|
3471
|
+
if (message.maxTemp01 !== undefined) {
|
|
3472
|
+
obj.maxTemp01 = Math.round(message.maxTemp01);
|
|
3473
|
+
}
|
|
3474
|
+
if (message.minTemp02 !== undefined) {
|
|
3475
|
+
obj.minTemp02 = Math.round(message.minTemp02);
|
|
3476
|
+
}
|
|
3477
|
+
if (message.maxTemp02 !== undefined) {
|
|
3478
|
+
obj.maxTemp02 = Math.round(message.maxTemp02);
|
|
3479
|
+
}
|
|
3480
|
+
if (message.minTemp03 !== undefined) {
|
|
3481
|
+
obj.minTemp03 = Math.round(message.minTemp03);
|
|
3482
|
+
}
|
|
3483
|
+
if (message.maxTemp03 !== undefined) {
|
|
3484
|
+
obj.maxTemp03 = Math.round(message.maxTemp03);
|
|
3485
|
+
}
|
|
3486
|
+
if (message.minTemp04 !== undefined) {
|
|
3487
|
+
obj.minTemp04 = Math.round(message.minTemp04);
|
|
3488
|
+
}
|
|
3489
|
+
if (message.maxTemp04 !== undefined) {
|
|
3490
|
+
obj.maxTemp04 = Math.round(message.maxTemp04);
|
|
3491
|
+
}
|
|
3492
|
+
if (message.minHumidity !== undefined) {
|
|
3493
|
+
obj.minHumidity = Math.round(message.minHumidity);
|
|
3494
|
+
}
|
|
3495
|
+
if (message.maxHumidity !== undefined) {
|
|
3496
|
+
obj.maxHumidity = Math.round(message.maxHumidity);
|
|
3497
|
+
}
|
|
3498
|
+
if (message.startLat !== undefined) {
|
|
3499
|
+
obj.startLat = message.startLat;
|
|
3500
|
+
}
|
|
3501
|
+
if (message.startLng !== undefined) {
|
|
3502
|
+
obj.startLng = message.startLng;
|
|
3503
|
+
}
|
|
3504
|
+
if (message.finishLat !== undefined) {
|
|
3505
|
+
obj.finishLat = message.finishLat;
|
|
3506
|
+
}
|
|
3507
|
+
if (message.finishLng !== undefined) {
|
|
3508
|
+
obj.finishLng = message.finishLng;
|
|
3509
|
+
}
|
|
3510
|
+
if (message.startedAt !== undefined) {
|
|
3511
|
+
obj.startedAt = message.startedAt.toISOString();
|
|
3512
|
+
}
|
|
3513
|
+
if (message.finishedAt !== undefined) {
|
|
3514
|
+
obj.finishedAt = message.finishedAt.toISOString();
|
|
3515
|
+
}
|
|
3516
|
+
if (message.createdAt !== undefined) {
|
|
3517
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
3518
|
+
}
|
|
3519
|
+
if (message.updatedAt !== undefined) {
|
|
3520
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
3521
|
+
}
|
|
3522
|
+
if (message.Logs !== "") {
|
|
3523
|
+
obj.Logs = message.Logs;
|
|
3524
|
+
}
|
|
3525
|
+
if (message.Fug !== undefined) {
|
|
3526
|
+
obj.Fug = Math.round(message.Fug);
|
|
3527
|
+
}
|
|
3528
|
+
return obj;
|
|
3529
|
+
},
|
|
3530
|
+
create(base) {
|
|
3531
|
+
return exports.FusionTrip.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3532
|
+
},
|
|
3533
|
+
fromPartial(object) {
|
|
3534
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
3535
|
+
const message = createBaseFusionTrip();
|
|
3536
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
3537
|
+
message.deviceId = (_b = object.deviceId) !== null && _b !== void 0 ? _b : 0;
|
|
3538
|
+
message.mileage = (_c = object.mileage) !== null && _c !== void 0 ? _c : 0;
|
|
3539
|
+
message.idling = (_d = object.idling) !== null && _d !== void 0 ? _d : 0;
|
|
3540
|
+
message.parking = (_e = object.parking) !== null && _e !== void 0 ? _e : 0;
|
|
3541
|
+
message.moving = (_f = object.moving) !== null && _f !== void 0 ? _f : 0;
|
|
3542
|
+
message.towing = (_g = object.towing) !== null && _g !== void 0 ? _g : 0;
|
|
3543
|
+
message.speedTotal = (_h = object.speedTotal) !== null && _h !== void 0 ? _h : 0;
|
|
3544
|
+
message.speedSum = (_j = object.speedSum) !== null && _j !== void 0 ? _j : 0;
|
|
3545
|
+
message.speedMax = (_k = object.speedMax) !== null && _k !== void 0 ? _k : 0;
|
|
3546
|
+
message.records = (_l = object.records) !== null && _l !== void 0 ? _l : 0;
|
|
3547
|
+
message.harshAcceleration = (_m = object.harshAcceleration) !== null && _m !== void 0 ? _m : 0;
|
|
3548
|
+
message.harshBreak = (_o = object.harshBreak) !== null && _o !== void 0 ? _o : 0;
|
|
3549
|
+
message.harshCorner = (_p = object.harshCorner) !== null && _p !== void 0 ? _p : 0;
|
|
3550
|
+
message.minTemp01 = (_q = object.minTemp01) !== null && _q !== void 0 ? _q : undefined;
|
|
3551
|
+
message.maxTemp01 = (_r = object.maxTemp01) !== null && _r !== void 0 ? _r : undefined;
|
|
3552
|
+
message.minTemp02 = (_s = object.minTemp02) !== null && _s !== void 0 ? _s : undefined;
|
|
3553
|
+
message.maxTemp02 = (_t = object.maxTemp02) !== null && _t !== void 0 ? _t : undefined;
|
|
3554
|
+
message.minTemp03 = (_u = object.minTemp03) !== null && _u !== void 0 ? _u : undefined;
|
|
3555
|
+
message.maxTemp03 = (_v = object.maxTemp03) !== null && _v !== void 0 ? _v : undefined;
|
|
3556
|
+
message.minTemp04 = (_w = object.minTemp04) !== null && _w !== void 0 ? _w : undefined;
|
|
3557
|
+
message.maxTemp04 = (_x = object.maxTemp04) !== null && _x !== void 0 ? _x : undefined;
|
|
3558
|
+
message.minHumidity = (_y = object.minHumidity) !== null && _y !== void 0 ? _y : undefined;
|
|
3559
|
+
message.maxHumidity = (_z = object.maxHumidity) !== null && _z !== void 0 ? _z : undefined;
|
|
3560
|
+
message.startLat = (_0 = object.startLat) !== null && _0 !== void 0 ? _0 : undefined;
|
|
3561
|
+
message.startLng = (_1 = object.startLng) !== null && _1 !== void 0 ? _1 : undefined;
|
|
3562
|
+
message.finishLat = (_2 = object.finishLat) !== null && _2 !== void 0 ? _2 : undefined;
|
|
3563
|
+
message.finishLng = (_3 = object.finishLng) !== null && _3 !== void 0 ? _3 : undefined;
|
|
3564
|
+
message.startedAt = (_4 = object.startedAt) !== null && _4 !== void 0 ? _4 : undefined;
|
|
3565
|
+
message.finishedAt = (_5 = object.finishedAt) !== null && _5 !== void 0 ? _5 : undefined;
|
|
3566
|
+
message.createdAt = (_6 = object.createdAt) !== null && _6 !== void 0 ? _6 : undefined;
|
|
3567
|
+
message.updatedAt = (_7 = object.updatedAt) !== null && _7 !== void 0 ? _7 : undefined;
|
|
3568
|
+
message.Logs = (_8 = object.Logs) !== null && _8 !== void 0 ? _8 : "";
|
|
3569
|
+
message.Fug = (_9 = object.Fug) !== null && _9 !== void 0 ? _9 : undefined;
|
|
3570
|
+
return message;
|
|
3571
|
+
},
|
|
3572
|
+
};
|
|
3573
|
+
function createBaseTripTask() {
|
|
3574
|
+
return { eventType: 0, trip: undefined, monthly: undefined, fusion: undefined, additional: undefined };
|
|
3575
|
+
}
|
|
3576
|
+
exports.TripTask = {
|
|
3577
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3578
|
+
if (message.eventType !== 0) {
|
|
3579
|
+
writer.uint32(8).int32(message.eventType);
|
|
3580
|
+
}
|
|
3581
|
+
if (message.trip !== undefined) {
|
|
3582
|
+
exports.Trip.encode(message.trip, writer.uint32(18).fork()).join();
|
|
3583
|
+
}
|
|
3584
|
+
if (message.monthly !== undefined) {
|
|
3585
|
+
exports.Monthly.encode(message.monthly, writer.uint32(26).fork()).join();
|
|
3586
|
+
}
|
|
3587
|
+
if (message.fusion !== undefined) {
|
|
3588
|
+
exports.FusionTrip.encode(message.fusion, writer.uint32(42).fork()).join();
|
|
3589
|
+
}
|
|
3590
|
+
if (message.additional !== undefined) {
|
|
3591
|
+
writer.uint32(34).bytes(message.additional);
|
|
3592
|
+
}
|
|
3593
|
+
return writer;
|
|
3594
|
+
},
|
|
3595
|
+
decode(input, length) {
|
|
3596
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3597
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3598
|
+
const message = createBaseTripTask();
|
|
3599
|
+
while (reader.pos < end) {
|
|
3600
|
+
const tag = reader.uint32();
|
|
3601
|
+
switch (tag >>> 3) {
|
|
3602
|
+
case 1: {
|
|
3603
|
+
if (tag !== 8) {
|
|
3604
|
+
break;
|
|
3605
|
+
}
|
|
3606
|
+
message.eventType = reader.int32();
|
|
3607
|
+
continue;
|
|
3608
|
+
}
|
|
3609
|
+
case 2: {
|
|
3610
|
+
if (tag !== 18) {
|
|
3611
|
+
break;
|
|
3612
|
+
}
|
|
3613
|
+
message.trip = exports.Trip.decode(reader, reader.uint32());
|
|
3614
|
+
continue;
|
|
3615
|
+
}
|
|
3616
|
+
case 3: {
|
|
3617
|
+
if (tag !== 26) {
|
|
3618
|
+
break;
|
|
3619
|
+
}
|
|
3620
|
+
message.monthly = exports.Monthly.decode(reader, reader.uint32());
|
|
3621
|
+
continue;
|
|
3622
|
+
}
|
|
3623
|
+
case 5: {
|
|
3624
|
+
if (tag !== 42) {
|
|
3625
|
+
break;
|
|
3626
|
+
}
|
|
3627
|
+
message.fusion = exports.FusionTrip.decode(reader, reader.uint32());
|
|
3628
|
+
continue;
|
|
3629
|
+
}
|
|
3630
|
+
case 4: {
|
|
3631
|
+
if (tag !== 34) {
|
|
3632
|
+
break;
|
|
3633
|
+
}
|
|
3634
|
+
message.additional = reader.bytes();
|
|
3635
|
+
continue;
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3639
|
+
break;
|
|
3640
|
+
}
|
|
3641
|
+
reader.skip(tag & 7);
|
|
3642
|
+
}
|
|
3643
|
+
return message;
|
|
3644
|
+
},
|
|
3645
|
+
fromJSON(object) {
|
|
3646
|
+
return {
|
|
3647
|
+
eventType: isSet(object.eventType) ? tripTask_EventTypeFromJSON(object.eventType) : 0,
|
|
3648
|
+
trip: isSet(object.trip) ? exports.Trip.fromJSON(object.trip) : undefined,
|
|
3649
|
+
monthly: isSet(object.monthly) ? exports.Monthly.fromJSON(object.monthly) : undefined,
|
|
3650
|
+
fusion: isSet(object.fusion) ? exports.FusionTrip.fromJSON(object.fusion) : undefined,
|
|
3651
|
+
additional: isSet(object.additional) ? bytesFromBase64(object.additional) : undefined,
|
|
3652
|
+
};
|
|
3653
|
+
},
|
|
3654
|
+
toJSON(message) {
|
|
3655
|
+
const obj = {};
|
|
3656
|
+
if (message.eventType !== 0) {
|
|
3657
|
+
obj.eventType = tripTask_EventTypeToJSON(message.eventType);
|
|
3658
|
+
}
|
|
3659
|
+
if (message.trip !== undefined) {
|
|
3660
|
+
obj.trip = exports.Trip.toJSON(message.trip);
|
|
3661
|
+
}
|
|
3662
|
+
if (message.monthly !== undefined) {
|
|
3663
|
+
obj.monthly = exports.Monthly.toJSON(message.monthly);
|
|
3664
|
+
}
|
|
3665
|
+
if (message.fusion !== undefined) {
|
|
3666
|
+
obj.fusion = exports.FusionTrip.toJSON(message.fusion);
|
|
3667
|
+
}
|
|
3668
|
+
if (message.additional !== undefined) {
|
|
3669
|
+
obj.additional = base64FromBytes(message.additional);
|
|
3670
|
+
}
|
|
3671
|
+
return obj;
|
|
3672
|
+
},
|
|
3673
|
+
create(base) {
|
|
3674
|
+
return exports.TripTask.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3675
|
+
},
|
|
3676
|
+
fromPartial(object) {
|
|
3677
|
+
var _a, _b;
|
|
3678
|
+
const message = createBaseTripTask();
|
|
3679
|
+
message.eventType = (_a = object.eventType) !== null && _a !== void 0 ? _a : 0;
|
|
3680
|
+
message.trip = (object.trip !== undefined && object.trip !== null) ? exports.Trip.fromPartial(object.trip) : undefined;
|
|
3681
|
+
message.monthly = (object.monthly !== undefined && object.monthly !== null)
|
|
3682
|
+
? exports.Monthly.fromPartial(object.monthly)
|
|
3683
|
+
: undefined;
|
|
3684
|
+
message.fusion = (object.fusion !== undefined && object.fusion !== null)
|
|
3685
|
+
? exports.FusionTrip.fromPartial(object.fusion)
|
|
3686
|
+
: undefined;
|
|
3687
|
+
message.additional = (_b = object.additional) !== null && _b !== void 0 ? _b : undefined;
|
|
3688
|
+
return message;
|
|
3689
|
+
},
|
|
3690
|
+
};
|
|
3691
|
+
function bytesFromBase64(b64) {
|
|
3692
|
+
if (globalThis.Buffer) {
|
|
3693
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
3694
|
+
}
|
|
3695
|
+
else {
|
|
3696
|
+
const bin = globalThis.atob(b64);
|
|
3697
|
+
const arr = new Uint8Array(bin.length);
|
|
3698
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
3699
|
+
arr[i] = bin.charCodeAt(i);
|
|
3700
|
+
}
|
|
3701
|
+
return arr;
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
function base64FromBytes(arr) {
|
|
3705
|
+
if (globalThis.Buffer) {
|
|
3706
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
3707
|
+
}
|
|
3708
|
+
else {
|
|
3709
|
+
const bin = [];
|
|
3710
|
+
arr.forEach((byte) => {
|
|
3711
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
3712
|
+
});
|
|
3713
|
+
return globalThis.btoa(bin.join(""));
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
function toTimestamp(date) {
|
|
3717
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
3718
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
3719
|
+
return { seconds, nanos };
|
|
3720
|
+
}
|
|
3721
|
+
function fromTimestamp(t) {
|
|
3722
|
+
let millis = (t.seconds || 0) * 1000;
|
|
3723
|
+
millis += (t.nanos || 0) / 1000000;
|
|
3724
|
+
return new globalThis.Date(millis);
|
|
3725
|
+
}
|
|
3726
|
+
function fromJsonTimestamp(o) {
|
|
3727
|
+
if (o instanceof globalThis.Date) {
|
|
3728
|
+
return o;
|
|
3729
|
+
}
|
|
3730
|
+
else if (typeof o === "string") {
|
|
3731
|
+
return new globalThis.Date(o);
|
|
3732
|
+
}
|
|
3733
|
+
else {
|
|
3734
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
function longToNumber(int64) {
|
|
3738
|
+
const num = globalThis.Number(int64.toString());
|
|
3739
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
3740
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
3741
|
+
}
|
|
3742
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
3743
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
3744
|
+
}
|
|
3745
|
+
return num;
|
|
3746
|
+
}
|
|
3747
|
+
function isObject(value) {
|
|
3748
|
+
return typeof value === "object" && value !== null;
|
|
3749
|
+
}
|
|
3750
|
+
function isSet(value) {
|
|
3751
|
+
return value !== null && value !== undefined;
|
|
3752
|
+
}
|