@fatehan/tsrp 1.3.45 → 1.3.47
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/apis/client.d.ts +45 -0
- package/dist/fatehan/apis/client.d.ts.map +1 -1
- package/dist/fatehan/apis/client.js +655 -1
- package/dist/fatehan/devices/maintenance.d.ts +68 -0
- package/dist/fatehan/devices/maintenance.d.ts.map +1 -0
- package/dist/fatehan/devices/maintenance.js +683 -0
- package/dist/fatehan/identities/identities.d.ts +34 -2
- package/dist/fatehan/identities/identities.d.ts.map +1 -1
- package/dist/fatehan/identities/identities.js +69 -2
- package/dist/fatehan/notifies/notify.d.ts +146 -4
- package/dist/fatehan/notifies/notify.d.ts.map +1 -1
- package/dist/fatehan/notifies/notify.js +1869 -80
- package/dist/fatehan/packets/dataModel.d.ts +5 -0
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +30 -0
- package/dist/fatehan/packets/messages.d.ts +2 -2
- package/dist/fatehan/packets/messages.d.ts.map +1 -1
- package/dist/fatehan/packets/messages.js +14 -14
- package/dist/fatehan/reports/report.d.ts +0 -130
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +297 -2126
- package/dist/fatehan/services/api.d.ts +62 -2
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +850 -4
- package/dist/system.io.d.ts +1 -0
- package/dist/system.io.d.ts.map +1 -1
- package/dist/system.io.js +22 -35
- package/package.json +1 -1
|
@@ -8,17 +8,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.
|
|
12
|
-
exports.TripsSummaryRequest = exports.TripsResponse = exports.TripsRequest = exports.AttendanceResponse_Attendance = exports.AttendanceResponse_Event = exports.AttendanceResponse = exports.AttendanceXRequest = exports.AttendanceRequest = exports.TrafficResponse_Traffic = exports.TrafficResponse = exports.TrafficRequest = exports.LogRequest = exports.LogResponse = exports.DeviceDataResponse = exports.DeviceDataRequest = exports.
|
|
13
|
-
exports.TripsSummaryResponse = void 0;
|
|
11
|
+
exports.TraffixRequest = exports.Traffix_STOP = exports.Traffix_Event = exports.Traffix = exports.TraffixResponse = exports.DashboardIndividualRequest = exports.DashboardIndividualResponse_SpeedsEntry = exports.DashboardIndividualResponse_GreenDrivingEntry = exports.DashboardIndividualResponse_Environmental_HumidityEntry = exports.DashboardIndividualResponse_Environmental_TemperatureEntry = exports.DashboardIndividualResponse_Environmental = exports.DashboardIndividualResponse = exports.TripPerformance_SpeedsEntry = exports.TripPerformance_CrashesEntry = exports.TripPerformance_HumidityEntry = exports.TripPerformance_TemperatureEntry = exports.TripPerformance_DrivingEntry = exports.TripPerformance_Average = exports.TripPerformance = exports.TripPerformanceResponse = exports.TripPerformanceRequest = exports.AreaSplitterResponse_Record = exports.AreaSplitterResponse_Area = exports.AreaSplitterResponse = exports.AreaSplitterRequest = exports.TripReportRequest = exports.WorkCycleResponse = exports.WorkCycleRequest = exports.CommandHistoryResponse = exports.CommandHistoryRequest = exports.ChartResponse_ChartEntry = exports.ChartResponse_Chart_IosEntry = exports.ChartResponse_Chart = exports.ChartResponse_Series = exports.ChartResponse = exports.ChartRequest = exports.WorkflowResponse = exports.WorkflowRequest = exports.TripsSummaryRequest_GroupBy = exports.AttendanceResponse_EventType = exports.TrafficResponse_Traffic_EventType = exports.AreaSummaryReviewResponse_trafficType = exports.AreaSummaryReviewRequest_AreaSourceEnum = exports.AreaSummaryReviewRequest_ScopeEnum = exports.Traffix_Event_Type = exports.TripPerformanceRequest_GroupBy = exports.StopCalculateIo = exports.RouteStopType = exports.Source = exports.protobufPackage = void 0;
|
|
12
|
+
exports.TripsSummaryResponse = exports.TripsSummaryRequest = exports.TripsResponse = exports.TripsRequest = exports.AttendanceResponse_Attendance = exports.AttendanceResponse_Event = exports.AttendanceResponse = exports.AttendanceXRequest = exports.AttendanceRequest = exports.TrafficResponse_Traffic = exports.TrafficResponse = exports.TrafficRequest = exports.LogRequest = exports.LogResponse = exports.DeviceDataResponse = exports.DeviceDataRequest = exports.RouteReviewResponse = exports.RouteReviewRequest = exports.RouteStopRequest = exports.RouteStopResponse = exports.RouteStopPoint = exports.DailyTrafficRequest = exports.DailyTrafficResponse_DailyTraffic = exports.DailyTrafficResponse_Traffic = exports.DailyTrafficResponse = exports.ShiftSummaryRequest = exports.ShiftResponse_Shift = exports.ShiftResponse = exports.ShiftRequest = exports.ShiftSummaryResponse_Summary = exports.ShiftSummaryResponse = exports.AreaSummaryReviewResponse_Review = exports.AreaSummaryReviewResponse = exports.AreaSummaryReviewRequest = exports.TripReportResponse = void 0;
|
|
14
13
|
exports.sourceFromJSON = sourceFromJSON;
|
|
15
14
|
exports.sourceToJSON = sourceToJSON;
|
|
16
15
|
exports.routeStopTypeFromJSON = routeStopTypeFromJSON;
|
|
17
16
|
exports.routeStopTypeToJSON = routeStopTypeToJSON;
|
|
18
17
|
exports.stopCalculateIoFromJSON = stopCalculateIoFromJSON;
|
|
19
18
|
exports.stopCalculateIoToJSON = stopCalculateIoToJSON;
|
|
20
|
-
exports.maintenanceRequest_GroupByFromJSON = maintenanceRequest_GroupByFromJSON;
|
|
21
|
-
exports.maintenanceRequest_GroupByToJSON = maintenanceRequest_GroupByToJSON;
|
|
22
19
|
exports.tripPerformanceRequest_GroupByFromJSON = tripPerformanceRequest_GroupByFromJSON;
|
|
23
20
|
exports.tripPerformanceRequest_GroupByToJSON = tripPerformanceRequest_GroupByToJSON;
|
|
24
21
|
exports.traffix_Event_TypeFromJSON = traffix_Event_TypeFromJSON;
|
|
@@ -29,8 +26,6 @@ exports.areaSummaryReviewRequest_AreaSourceEnumFromJSON = areaSummaryReviewReque
|
|
|
29
26
|
exports.areaSummaryReviewRequest_AreaSourceEnumToJSON = areaSummaryReviewRequest_AreaSourceEnumToJSON;
|
|
30
27
|
exports.areaSummaryReviewResponse_trafficTypeFromJSON = areaSummaryReviewResponse_trafficTypeFromJSON;
|
|
31
28
|
exports.areaSummaryReviewResponse_trafficTypeToJSON = areaSummaryReviewResponse_trafficTypeToJSON;
|
|
32
|
-
exports.areaReviewResponse_AreaReview_AreaEventTypeFromJSON = areaReviewResponse_AreaReview_AreaEventTypeFromJSON;
|
|
33
|
-
exports.areaReviewResponse_AreaReview_AreaEventTypeToJSON = areaReviewResponse_AreaReview_AreaEventTypeToJSON;
|
|
34
29
|
exports.trafficResponse_Traffic_EventTypeFromJSON = trafficResponse_Traffic_EventTypeFromJSON;
|
|
35
30
|
exports.trafficResponse_Traffic_EventTypeToJSON = trafficResponse_Traffic_EventTypeToJSON;
|
|
36
31
|
exports.attendanceResponse_EventTypeFromJSON = attendanceResponse_EventTypeFromJSON;
|
|
@@ -152,55 +147,6 @@ function stopCalculateIoToJSON(object) {
|
|
|
152
147
|
return "UNRECOGNIZED";
|
|
153
148
|
}
|
|
154
149
|
}
|
|
155
|
-
var MaintenanceRequest_GroupBy;
|
|
156
|
-
(function (MaintenanceRequest_GroupBy) {
|
|
157
|
-
MaintenanceRequest_GroupBy[MaintenanceRequest_GroupBy["None"] = 0] = "None";
|
|
158
|
-
MaintenanceRequest_GroupBy[MaintenanceRequest_GroupBy["Day"] = 1] = "Day";
|
|
159
|
-
MaintenanceRequest_GroupBy[MaintenanceRequest_GroupBy["Week"] = 2] = "Week";
|
|
160
|
-
MaintenanceRequest_GroupBy[MaintenanceRequest_GroupBy["Month"] = 3] = "Month";
|
|
161
|
-
MaintenanceRequest_GroupBy[MaintenanceRequest_GroupBy["Year"] = 4] = "Year";
|
|
162
|
-
MaintenanceRequest_GroupBy[MaintenanceRequest_GroupBy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
163
|
-
})(MaintenanceRequest_GroupBy || (exports.MaintenanceRequest_GroupBy = MaintenanceRequest_GroupBy = {}));
|
|
164
|
-
function maintenanceRequest_GroupByFromJSON(object) {
|
|
165
|
-
switch (object) {
|
|
166
|
-
case 0:
|
|
167
|
-
case "None":
|
|
168
|
-
return MaintenanceRequest_GroupBy.None;
|
|
169
|
-
case 1:
|
|
170
|
-
case "Day":
|
|
171
|
-
return MaintenanceRequest_GroupBy.Day;
|
|
172
|
-
case 2:
|
|
173
|
-
case "Week":
|
|
174
|
-
return MaintenanceRequest_GroupBy.Week;
|
|
175
|
-
case 3:
|
|
176
|
-
case "Month":
|
|
177
|
-
return MaintenanceRequest_GroupBy.Month;
|
|
178
|
-
case 4:
|
|
179
|
-
case "Year":
|
|
180
|
-
return MaintenanceRequest_GroupBy.Year;
|
|
181
|
-
case -1:
|
|
182
|
-
case "UNRECOGNIZED":
|
|
183
|
-
default:
|
|
184
|
-
return MaintenanceRequest_GroupBy.UNRECOGNIZED;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
function maintenanceRequest_GroupByToJSON(object) {
|
|
188
|
-
switch (object) {
|
|
189
|
-
case MaintenanceRequest_GroupBy.None:
|
|
190
|
-
return "None";
|
|
191
|
-
case MaintenanceRequest_GroupBy.Day:
|
|
192
|
-
return "Day";
|
|
193
|
-
case MaintenanceRequest_GroupBy.Week:
|
|
194
|
-
return "Week";
|
|
195
|
-
case MaintenanceRequest_GroupBy.Month:
|
|
196
|
-
return "Month";
|
|
197
|
-
case MaintenanceRequest_GroupBy.Year:
|
|
198
|
-
return "Year";
|
|
199
|
-
case MaintenanceRequest_GroupBy.UNRECOGNIZED:
|
|
200
|
-
default:
|
|
201
|
-
return "UNRECOGNIZED";
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
150
|
var TripPerformanceRequest_GroupBy;
|
|
205
151
|
(function (TripPerformanceRequest_GroupBy) {
|
|
206
152
|
TripPerformanceRequest_GroupBy[TripPerformanceRequest_GroupBy["All"] = 0] = "All";
|
|
@@ -386,43 +332,6 @@ function areaSummaryReviewResponse_trafficTypeToJSON(object) {
|
|
|
386
332
|
return "UNRECOGNIZED";
|
|
387
333
|
}
|
|
388
334
|
}
|
|
389
|
-
var AreaReviewResponse_AreaReview_AreaEventType;
|
|
390
|
-
(function (AreaReviewResponse_AreaReview_AreaEventType) {
|
|
391
|
-
AreaReviewResponse_AreaReview_AreaEventType[AreaReviewResponse_AreaReview_AreaEventType["NONE"] = 0] = "NONE";
|
|
392
|
-
AreaReviewResponse_AreaReview_AreaEventType[AreaReviewResponse_AreaReview_AreaEventType["ENTER"] = 1] = "ENTER";
|
|
393
|
-
AreaReviewResponse_AreaReview_AreaEventType[AreaReviewResponse_AreaReview_AreaEventType["EXIT"] = 2] = "EXIT";
|
|
394
|
-
AreaReviewResponse_AreaReview_AreaEventType[AreaReviewResponse_AreaReview_AreaEventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
395
|
-
})(AreaReviewResponse_AreaReview_AreaEventType || (exports.AreaReviewResponse_AreaReview_AreaEventType = AreaReviewResponse_AreaReview_AreaEventType = {}));
|
|
396
|
-
function areaReviewResponse_AreaReview_AreaEventTypeFromJSON(object) {
|
|
397
|
-
switch (object) {
|
|
398
|
-
case 0:
|
|
399
|
-
case "NONE":
|
|
400
|
-
return AreaReviewResponse_AreaReview_AreaEventType.NONE;
|
|
401
|
-
case 1:
|
|
402
|
-
case "ENTER":
|
|
403
|
-
return AreaReviewResponse_AreaReview_AreaEventType.ENTER;
|
|
404
|
-
case 2:
|
|
405
|
-
case "EXIT":
|
|
406
|
-
return AreaReviewResponse_AreaReview_AreaEventType.EXIT;
|
|
407
|
-
case -1:
|
|
408
|
-
case "UNRECOGNIZED":
|
|
409
|
-
default:
|
|
410
|
-
return AreaReviewResponse_AreaReview_AreaEventType.UNRECOGNIZED;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
function areaReviewResponse_AreaReview_AreaEventTypeToJSON(object) {
|
|
414
|
-
switch (object) {
|
|
415
|
-
case AreaReviewResponse_AreaReview_AreaEventType.NONE:
|
|
416
|
-
return "NONE";
|
|
417
|
-
case AreaReviewResponse_AreaReview_AreaEventType.ENTER:
|
|
418
|
-
return "ENTER";
|
|
419
|
-
case AreaReviewResponse_AreaReview_AreaEventType.EXIT:
|
|
420
|
-
return "EXIT";
|
|
421
|
-
case AreaReviewResponse_AreaReview_AreaEventType.UNRECOGNIZED:
|
|
422
|
-
default:
|
|
423
|
-
return "UNRECOGNIZED";
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
335
|
var TrafficResponse_Traffic_EventType;
|
|
427
336
|
(function (TrafficResponse_Traffic_EventType) {
|
|
428
337
|
TrafficResponse_Traffic_EventType[TrafficResponse_Traffic_EventType["NONE_EVENT"] = 0] = "NONE_EVENT";
|
|
@@ -2406,13 +2315,20 @@ exports.AreaSplitterResponse_Record = {
|
|
|
2406
2315
|
return message;
|
|
2407
2316
|
},
|
|
2408
2317
|
};
|
|
2409
|
-
function
|
|
2410
|
-
return {
|
|
2318
|
+
function createBaseTripPerformanceRequest() {
|
|
2319
|
+
return {
|
|
2320
|
+
deviceId: [],
|
|
2321
|
+
startedAt: undefined,
|
|
2322
|
+
finishedAt: undefined,
|
|
2323
|
+
groupByDevice: false,
|
|
2324
|
+
groupByDatetime: 0,
|
|
2325
|
+
hourly: false,
|
|
2326
|
+
};
|
|
2411
2327
|
}
|
|
2412
|
-
exports.
|
|
2328
|
+
exports.TripPerformanceRequest = {
|
|
2413
2329
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2414
2330
|
writer.uint32(10).fork();
|
|
2415
|
-
for (const v of message.
|
|
2331
|
+
for (const v of message.deviceId) {
|
|
2416
2332
|
writer.uint64(v.toString());
|
|
2417
2333
|
}
|
|
2418
2334
|
writer.join();
|
|
@@ -2422,27 +2338,33 @@ exports.MaintenanceRequest = {
|
|
|
2422
2338
|
if (message.finishedAt !== undefined) {
|
|
2423
2339
|
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(26).fork()).join();
|
|
2424
2340
|
}
|
|
2425
|
-
if (message.
|
|
2426
|
-
writer.uint32(32).
|
|
2341
|
+
if (message.groupByDevice !== false) {
|
|
2342
|
+
writer.uint32(32).bool(message.groupByDevice);
|
|
2343
|
+
}
|
|
2344
|
+
if (message.groupByDatetime !== 0) {
|
|
2345
|
+
writer.uint32(40).int32(message.groupByDatetime);
|
|
2346
|
+
}
|
|
2347
|
+
if (message.hourly !== false) {
|
|
2348
|
+
writer.uint32(48).bool(message.hourly);
|
|
2427
2349
|
}
|
|
2428
2350
|
return writer;
|
|
2429
2351
|
},
|
|
2430
2352
|
decode(input, length) {
|
|
2431
2353
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2432
2354
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2433
|
-
const message =
|
|
2355
|
+
const message = createBaseTripPerformanceRequest();
|
|
2434
2356
|
while (reader.pos < end) {
|
|
2435
2357
|
const tag = reader.uint32();
|
|
2436
2358
|
switch (tag >>> 3) {
|
|
2437
2359
|
case 1: {
|
|
2438
2360
|
if (tag === 8) {
|
|
2439
|
-
message.
|
|
2361
|
+
message.deviceId.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
2440
2362
|
continue;
|
|
2441
2363
|
}
|
|
2442
2364
|
if (tag === 10) {
|
|
2443
2365
|
const end2 = reader.uint32() + reader.pos;
|
|
2444
2366
|
while (reader.pos < end2) {
|
|
2445
|
-
message.
|
|
2367
|
+
message.deviceId.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
2446
2368
|
}
|
|
2447
2369
|
continue;
|
|
2448
2370
|
}
|
|
@@ -2466,7 +2388,21 @@ exports.MaintenanceRequest = {
|
|
|
2466
2388
|
if (tag !== 32) {
|
|
2467
2389
|
break;
|
|
2468
2390
|
}
|
|
2469
|
-
message.
|
|
2391
|
+
message.groupByDevice = reader.bool();
|
|
2392
|
+
continue;
|
|
2393
|
+
}
|
|
2394
|
+
case 5: {
|
|
2395
|
+
if (tag !== 40) {
|
|
2396
|
+
break;
|
|
2397
|
+
}
|
|
2398
|
+
message.groupByDatetime = reader.int32();
|
|
2399
|
+
continue;
|
|
2400
|
+
}
|
|
2401
|
+
case 6: {
|
|
2402
|
+
if (tag !== 48) {
|
|
2403
|
+
break;
|
|
2404
|
+
}
|
|
2405
|
+
message.hourly = reader.bool();
|
|
2470
2406
|
continue;
|
|
2471
2407
|
}
|
|
2472
2408
|
}
|
|
@@ -2479,143 +2415,106 @@ exports.MaintenanceRequest = {
|
|
|
2479
2415
|
},
|
|
2480
2416
|
fromJSON(object) {
|
|
2481
2417
|
return {
|
|
2482
|
-
|
|
2483
|
-
startedAt: isSet(object.
|
|
2484
|
-
finishedAt: isSet(object.
|
|
2485
|
-
|
|
2418
|
+
deviceId: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_id) ? object.device_id.map((e) => long_1.default.fromValue(e)) : [],
|
|
2419
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
2420
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
2421
|
+
groupByDevice: isSet(object.group_by_device) ? globalThis.Boolean(object.group_by_device) : false,
|
|
2422
|
+
groupByDatetime: isSet(object.group_by_datetime)
|
|
2423
|
+
? tripPerformanceRequest_GroupByFromJSON(object.group_by_datetime)
|
|
2424
|
+
: 0,
|
|
2425
|
+
hourly: isSet(object.hourly) ? globalThis.Boolean(object.hourly) : false,
|
|
2486
2426
|
};
|
|
2487
2427
|
},
|
|
2488
2428
|
toJSON(message) {
|
|
2489
2429
|
var _a;
|
|
2490
2430
|
const obj = {};
|
|
2491
|
-
if ((_a = message.
|
|
2492
|
-
obj.
|
|
2431
|
+
if ((_a = message.deviceId) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2432
|
+
obj.device_id = message.deviceId.map((e) => (e || long_1.default.UZERO).toString());
|
|
2493
2433
|
}
|
|
2494
2434
|
if (message.startedAt !== undefined) {
|
|
2495
|
-
obj.
|
|
2435
|
+
obj.started_at = message.startedAt.toISOString();
|
|
2496
2436
|
}
|
|
2497
2437
|
if (message.finishedAt !== undefined) {
|
|
2498
|
-
obj.
|
|
2438
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
2499
2439
|
}
|
|
2500
|
-
if (message.
|
|
2501
|
-
obj.
|
|
2440
|
+
if (message.groupByDevice !== false) {
|
|
2441
|
+
obj.group_by_device = message.groupByDevice;
|
|
2442
|
+
}
|
|
2443
|
+
if (message.groupByDatetime !== 0) {
|
|
2444
|
+
obj.group_by_datetime = tripPerformanceRequest_GroupByToJSON(message.groupByDatetime);
|
|
2445
|
+
}
|
|
2446
|
+
if (message.hourly !== false) {
|
|
2447
|
+
obj.hourly = message.hourly;
|
|
2502
2448
|
}
|
|
2503
2449
|
return obj;
|
|
2504
2450
|
},
|
|
2505
2451
|
create(base) {
|
|
2506
|
-
return exports.
|
|
2452
|
+
return exports.TripPerformanceRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2507
2453
|
},
|
|
2508
2454
|
fromPartial(object) {
|
|
2509
|
-
var _a, _b, _c, _d;
|
|
2510
|
-
const message =
|
|
2511
|
-
message.
|
|
2455
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2456
|
+
const message = createBaseTripPerformanceRequest();
|
|
2457
|
+
message.deviceId = ((_a = object.deviceId) === null || _a === void 0 ? void 0 : _a.map((e) => long_1.default.fromValue(e))) || [];
|
|
2512
2458
|
message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
2513
2459
|
message.finishedAt = (_c = object.finishedAt) !== null && _c !== void 0 ? _c : undefined;
|
|
2514
|
-
message.
|
|
2460
|
+
message.groupByDevice = (_d = object.groupByDevice) !== null && _d !== void 0 ? _d : false;
|
|
2461
|
+
message.groupByDatetime = (_e = object.groupByDatetime) !== null && _e !== void 0 ? _e : 0;
|
|
2462
|
+
message.hourly = (_f = object.hourly) !== null && _f !== void 0 ? _f : false;
|
|
2515
2463
|
return message;
|
|
2516
2464
|
},
|
|
2517
2465
|
};
|
|
2518
|
-
function
|
|
2519
|
-
return {
|
|
2520
|
-
organizationId: long_1.default.UZERO,
|
|
2521
|
-
uptime: long_1.default.UZERO,
|
|
2522
|
-
mileage: long_1.default.UZERO,
|
|
2523
|
-
price: long_1.default.UZERO,
|
|
2524
|
-
startedAt: undefined,
|
|
2525
|
-
finishedAt: undefined,
|
|
2526
|
-
services: [],
|
|
2527
|
-
devices: [],
|
|
2528
|
-
};
|
|
2466
|
+
function createBaseTripPerformanceResponse() {
|
|
2467
|
+
return { data: [], cost: 0, threads: 0, records: 0 };
|
|
2529
2468
|
}
|
|
2530
|
-
exports.
|
|
2469
|
+
exports.TripPerformanceResponse = {
|
|
2531
2470
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2532
|
-
|
|
2533
|
-
writer.uint32(
|
|
2534
|
-
}
|
|
2535
|
-
if (!message.uptime.equals(long_1.default.UZERO)) {
|
|
2536
|
-
writer.uint32(16).uint64(message.uptime.toString());
|
|
2537
|
-
}
|
|
2538
|
-
if (!message.mileage.equals(long_1.default.UZERO)) {
|
|
2539
|
-
writer.uint32(24).uint64(message.mileage.toString());
|
|
2540
|
-
}
|
|
2541
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
2542
|
-
writer.uint32(32).uint64(message.price.toString());
|
|
2543
|
-
}
|
|
2544
|
-
if (message.startedAt !== undefined) {
|
|
2545
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(42).fork()).join();
|
|
2471
|
+
for (const v of message.data) {
|
|
2472
|
+
exports.TripPerformance.encode(v, writer.uint32(10).fork()).join();
|
|
2546
2473
|
}
|
|
2547
|
-
if (message.
|
|
2548
|
-
|
|
2474
|
+
if (message.cost !== 0) {
|
|
2475
|
+
writer.uint32(16).uint32(message.cost);
|
|
2549
2476
|
}
|
|
2550
|
-
|
|
2551
|
-
|
|
2477
|
+
if (message.threads !== 0) {
|
|
2478
|
+
writer.uint32(24).uint32(message.threads);
|
|
2552
2479
|
}
|
|
2553
|
-
|
|
2554
|
-
|
|
2480
|
+
if (message.records !== 0) {
|
|
2481
|
+
writer.uint32(32).uint32(message.records);
|
|
2555
2482
|
}
|
|
2556
2483
|
return writer;
|
|
2557
2484
|
},
|
|
2558
2485
|
decode(input, length) {
|
|
2559
2486
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2560
2487
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2561
|
-
const message =
|
|
2488
|
+
const message = createBaseTripPerformanceResponse();
|
|
2562
2489
|
while (reader.pos < end) {
|
|
2563
2490
|
const tag = reader.uint32();
|
|
2564
2491
|
switch (tag >>> 3) {
|
|
2565
2492
|
case 1: {
|
|
2566
|
-
if (tag !==
|
|
2493
|
+
if (tag !== 10) {
|
|
2567
2494
|
break;
|
|
2568
2495
|
}
|
|
2569
|
-
message.
|
|
2496
|
+
message.data.push(exports.TripPerformance.decode(reader, reader.uint32()));
|
|
2570
2497
|
continue;
|
|
2571
2498
|
}
|
|
2572
2499
|
case 2: {
|
|
2573
2500
|
if (tag !== 16) {
|
|
2574
2501
|
break;
|
|
2575
2502
|
}
|
|
2576
|
-
message.
|
|
2503
|
+
message.cost = reader.uint32();
|
|
2577
2504
|
continue;
|
|
2578
2505
|
}
|
|
2579
2506
|
case 3: {
|
|
2580
2507
|
if (tag !== 24) {
|
|
2581
2508
|
break;
|
|
2582
2509
|
}
|
|
2583
|
-
message.
|
|
2510
|
+
message.threads = reader.uint32();
|
|
2584
2511
|
continue;
|
|
2585
2512
|
}
|
|
2586
2513
|
case 4: {
|
|
2587
2514
|
if (tag !== 32) {
|
|
2588
2515
|
break;
|
|
2589
2516
|
}
|
|
2590
|
-
message.
|
|
2591
|
-
continue;
|
|
2592
|
-
}
|
|
2593
|
-
case 5: {
|
|
2594
|
-
if (tag !== 42) {
|
|
2595
|
-
break;
|
|
2596
|
-
}
|
|
2597
|
-
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2598
|
-
continue;
|
|
2599
|
-
}
|
|
2600
|
-
case 6: {
|
|
2601
|
-
if (tag !== 50) {
|
|
2602
|
-
break;
|
|
2603
|
-
}
|
|
2604
|
-
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2605
|
-
continue;
|
|
2606
|
-
}
|
|
2607
|
-
case 7: {
|
|
2608
|
-
if (tag !== 58) {
|
|
2609
|
-
break;
|
|
2610
|
-
}
|
|
2611
|
-
message.services.push(exports.MaintenanceResponse_Service.decode(reader, reader.uint32()));
|
|
2612
|
-
continue;
|
|
2613
|
-
}
|
|
2614
|
-
case 8: {
|
|
2615
|
-
if (tag !== 66) {
|
|
2616
|
-
break;
|
|
2617
|
-
}
|
|
2618
|
-
message.devices.push(exports.MaintenanceResponse_Device.decode(reader, reader.uint32()));
|
|
2517
|
+
message.records = reader.uint32();
|
|
2619
2518
|
continue;
|
|
2620
2519
|
}
|
|
2621
2520
|
}
|
|
@@ -2628,1145 +2527,39 @@ exports.MaintenanceResponse = {
|
|
|
2628
2527
|
},
|
|
2629
2528
|
fromJSON(object) {
|
|
2630
2529
|
return {
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
2636
|
-
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
2637
|
-
services: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.services)
|
|
2638
|
-
? object.services.map((e) => exports.MaintenanceResponse_Service.fromJSON(e))
|
|
2639
|
-
: [],
|
|
2640
|
-
devices: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.devices)
|
|
2641
|
-
? object.devices.map((e) => exports.MaintenanceResponse_Device.fromJSON(e))
|
|
2642
|
-
: [],
|
|
2530
|
+
data: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.data) ? object.data.map((e) => exports.TripPerformance.fromJSON(e)) : [],
|
|
2531
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
2532
|
+
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
2533
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
2643
2534
|
};
|
|
2644
2535
|
},
|
|
2645
2536
|
toJSON(message) {
|
|
2646
|
-
var _a
|
|
2537
|
+
var _a;
|
|
2647
2538
|
const obj = {};
|
|
2648
|
-
if (
|
|
2649
|
-
obj.
|
|
2650
|
-
}
|
|
2651
|
-
if (!message.uptime.equals(long_1.default.UZERO)) {
|
|
2652
|
-
obj.uptime = (message.uptime || long_1.default.UZERO).toString();
|
|
2653
|
-
}
|
|
2654
|
-
if (!message.mileage.equals(long_1.default.UZERO)) {
|
|
2655
|
-
obj.mileage = (message.mileage || long_1.default.UZERO).toString();
|
|
2656
|
-
}
|
|
2657
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
2658
|
-
obj.price = (message.price || long_1.default.UZERO).toString();
|
|
2659
|
-
}
|
|
2660
|
-
if (message.startedAt !== undefined) {
|
|
2661
|
-
obj.startedAt = message.startedAt.toISOString();
|
|
2539
|
+
if ((_a = message.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2540
|
+
obj.data = message.data.map((e) => exports.TripPerformance.toJSON(e));
|
|
2662
2541
|
}
|
|
2663
|
-
if (message.
|
|
2664
|
-
obj.
|
|
2542
|
+
if (message.cost !== 0) {
|
|
2543
|
+
obj.cost = Math.round(message.cost);
|
|
2665
2544
|
}
|
|
2666
|
-
if (
|
|
2667
|
-
obj.
|
|
2545
|
+
if (message.threads !== 0) {
|
|
2546
|
+
obj.threads = Math.round(message.threads);
|
|
2668
2547
|
}
|
|
2669
|
-
if (
|
|
2670
|
-
obj.
|
|
2548
|
+
if (message.records !== 0) {
|
|
2549
|
+
obj.records = Math.round(message.records);
|
|
2671
2550
|
}
|
|
2672
2551
|
return obj;
|
|
2673
2552
|
},
|
|
2674
2553
|
create(base) {
|
|
2675
|
-
return exports.
|
|
2554
|
+
return exports.TripPerformanceResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2676
2555
|
},
|
|
2677
2556
|
fromPartial(object) {
|
|
2678
2557
|
var _a, _b, _c, _d;
|
|
2679
|
-
const message =
|
|
2680
|
-
message.
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
message.
|
|
2684
|
-
? long_1.default.fromValue(object.uptime)
|
|
2685
|
-
: long_1.default.UZERO;
|
|
2686
|
-
message.mileage = (object.mileage !== undefined && object.mileage !== null)
|
|
2687
|
-
? long_1.default.fromValue(object.mileage)
|
|
2688
|
-
: long_1.default.UZERO;
|
|
2689
|
-
message.price = (object.price !== undefined && object.price !== null) ? long_1.default.fromValue(object.price) : long_1.default.UZERO;
|
|
2690
|
-
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
2691
|
-
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
2692
|
-
message.services = ((_c = object.services) === null || _c === void 0 ? void 0 : _c.map((e) => exports.MaintenanceResponse_Service.fromPartial(e))) || [];
|
|
2693
|
-
message.devices = ((_d = object.devices) === null || _d === void 0 ? void 0 : _d.map((e) => exports.MaintenanceResponse_Device.fromPartial(e))) || [];
|
|
2694
|
-
return message;
|
|
2695
|
-
},
|
|
2696
|
-
};
|
|
2697
|
-
function createBaseMaintenanceResponse_Cost() {
|
|
2698
|
-
return { name: "", price: long_1.default.UZERO, description: "" };
|
|
2699
|
-
}
|
|
2700
|
-
exports.MaintenanceResponse_Cost = {
|
|
2701
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2702
|
-
if (message.name !== "") {
|
|
2703
|
-
writer.uint32(10).string(message.name);
|
|
2704
|
-
}
|
|
2705
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
2706
|
-
writer.uint32(16).uint64(message.price.toString());
|
|
2707
|
-
}
|
|
2708
|
-
if (message.description !== "") {
|
|
2709
|
-
writer.uint32(26).string(message.description);
|
|
2710
|
-
}
|
|
2711
|
-
return writer;
|
|
2712
|
-
},
|
|
2713
|
-
decode(input, length) {
|
|
2714
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2715
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2716
|
-
const message = createBaseMaintenanceResponse_Cost();
|
|
2717
|
-
while (reader.pos < end) {
|
|
2718
|
-
const tag = reader.uint32();
|
|
2719
|
-
switch (tag >>> 3) {
|
|
2720
|
-
case 1: {
|
|
2721
|
-
if (tag !== 10) {
|
|
2722
|
-
break;
|
|
2723
|
-
}
|
|
2724
|
-
message.name = reader.string();
|
|
2725
|
-
continue;
|
|
2726
|
-
}
|
|
2727
|
-
case 2: {
|
|
2728
|
-
if (tag !== 16) {
|
|
2729
|
-
break;
|
|
2730
|
-
}
|
|
2731
|
-
message.price = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2732
|
-
continue;
|
|
2733
|
-
}
|
|
2734
|
-
case 3: {
|
|
2735
|
-
if (tag !== 26) {
|
|
2736
|
-
break;
|
|
2737
|
-
}
|
|
2738
|
-
message.description = reader.string();
|
|
2739
|
-
continue;
|
|
2740
|
-
}
|
|
2741
|
-
}
|
|
2742
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2743
|
-
break;
|
|
2744
|
-
}
|
|
2745
|
-
reader.skip(tag & 7);
|
|
2746
|
-
}
|
|
2747
|
-
return message;
|
|
2748
|
-
},
|
|
2749
|
-
fromJSON(object) {
|
|
2750
|
-
return {
|
|
2751
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2752
|
-
price: isSet(object.price) ? long_1.default.fromValue(object.price) : long_1.default.UZERO,
|
|
2753
|
-
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
2754
|
-
};
|
|
2755
|
-
},
|
|
2756
|
-
toJSON(message) {
|
|
2757
|
-
const obj = {};
|
|
2758
|
-
if (message.name !== "") {
|
|
2759
|
-
obj.name = message.name;
|
|
2760
|
-
}
|
|
2761
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
2762
|
-
obj.price = (message.price || long_1.default.UZERO).toString();
|
|
2763
|
-
}
|
|
2764
|
-
if (message.description !== "") {
|
|
2765
|
-
obj.description = message.description;
|
|
2766
|
-
}
|
|
2767
|
-
return obj;
|
|
2768
|
-
},
|
|
2769
|
-
create(base) {
|
|
2770
|
-
return exports.MaintenanceResponse_Cost.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2771
|
-
},
|
|
2772
|
-
fromPartial(object) {
|
|
2773
|
-
var _a, _b;
|
|
2774
|
-
const message = createBaseMaintenanceResponse_Cost();
|
|
2775
|
-
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2776
|
-
message.price = (object.price !== undefined && object.price !== null) ? long_1.default.fromValue(object.price) : long_1.default.UZERO;
|
|
2777
|
-
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : "";
|
|
2778
|
-
return message;
|
|
2779
|
-
},
|
|
2780
|
-
};
|
|
2781
|
-
function createBaseMaintenanceResponse_List() {
|
|
2782
|
-
return {
|
|
2783
|
-
id: long_1.default.UZERO,
|
|
2784
|
-
serviceId: long_1.default.UZERO,
|
|
2785
|
-
startedAt: undefined,
|
|
2786
|
-
expiresAt: undefined,
|
|
2787
|
-
durationPercentage: 0,
|
|
2788
|
-
currentUptime: 0,
|
|
2789
|
-
uptime: 0,
|
|
2790
|
-
uptimePercentage: 0,
|
|
2791
|
-
currentMileage: 0,
|
|
2792
|
-
mileage: 0,
|
|
2793
|
-
mileagePercentage: 0,
|
|
2794
|
-
status: 0,
|
|
2795
|
-
cost: [],
|
|
2796
|
-
price: long_1.default.UZERO,
|
|
2797
|
-
count: long_1.default.UZERO,
|
|
2798
|
-
createdAt: undefined,
|
|
2799
|
-
updatedAt: undefined,
|
|
2800
|
-
};
|
|
2801
|
-
}
|
|
2802
|
-
exports.MaintenanceResponse_List = {
|
|
2803
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2804
|
-
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2805
|
-
writer.uint32(8).uint64(message.id.toString());
|
|
2806
|
-
}
|
|
2807
|
-
if (!message.serviceId.equals(long_1.default.UZERO)) {
|
|
2808
|
-
writer.uint32(16).uint64(message.serviceId.toString());
|
|
2809
|
-
}
|
|
2810
|
-
if (message.startedAt !== undefined) {
|
|
2811
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(26).fork()).join();
|
|
2812
|
-
}
|
|
2813
|
-
if (message.expiresAt !== undefined) {
|
|
2814
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(34).fork()).join();
|
|
2815
|
-
}
|
|
2816
|
-
if (message.durationPercentage !== 0) {
|
|
2817
|
-
writer.uint32(40).uint32(message.durationPercentage);
|
|
2818
|
-
}
|
|
2819
|
-
if (message.currentUptime !== 0) {
|
|
2820
|
-
writer.uint32(48).uint32(message.currentUptime);
|
|
2821
|
-
}
|
|
2822
|
-
if (message.uptime !== 0) {
|
|
2823
|
-
writer.uint32(56).uint32(message.uptime);
|
|
2824
|
-
}
|
|
2825
|
-
if (message.uptimePercentage !== 0) {
|
|
2826
|
-
writer.uint32(64).uint32(message.uptimePercentage);
|
|
2827
|
-
}
|
|
2828
|
-
if (message.currentMileage !== 0) {
|
|
2829
|
-
writer.uint32(72).uint32(message.currentMileage);
|
|
2830
|
-
}
|
|
2831
|
-
if (message.mileage !== 0) {
|
|
2832
|
-
writer.uint32(80).uint32(message.mileage);
|
|
2833
|
-
}
|
|
2834
|
-
if (message.mileagePercentage !== 0) {
|
|
2835
|
-
writer.uint32(88).uint32(message.mileagePercentage);
|
|
2836
|
-
}
|
|
2837
|
-
if (message.status !== 0) {
|
|
2838
|
-
writer.uint32(96).uint32(message.status);
|
|
2839
|
-
}
|
|
2840
|
-
for (const v of message.cost) {
|
|
2841
|
-
exports.MaintenanceResponse_Cost.encode(v, writer.uint32(106).fork()).join();
|
|
2842
|
-
}
|
|
2843
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
2844
|
-
writer.uint32(112).uint64(message.price.toString());
|
|
2845
|
-
}
|
|
2846
|
-
if (!message.count.equals(long_1.default.UZERO)) {
|
|
2847
|
-
writer.uint32(120).uint64(message.count.toString());
|
|
2848
|
-
}
|
|
2849
|
-
if (message.createdAt !== undefined) {
|
|
2850
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(130).fork()).join();
|
|
2851
|
-
}
|
|
2852
|
-
if (message.updatedAt !== undefined) {
|
|
2853
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(138).fork()).join();
|
|
2854
|
-
}
|
|
2855
|
-
return writer;
|
|
2856
|
-
},
|
|
2857
|
-
decode(input, length) {
|
|
2858
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2859
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2860
|
-
const message = createBaseMaintenanceResponse_List();
|
|
2861
|
-
while (reader.pos < end) {
|
|
2862
|
-
const tag = reader.uint32();
|
|
2863
|
-
switch (tag >>> 3) {
|
|
2864
|
-
case 1: {
|
|
2865
|
-
if (tag !== 8) {
|
|
2866
|
-
break;
|
|
2867
|
-
}
|
|
2868
|
-
message.id = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2869
|
-
continue;
|
|
2870
|
-
}
|
|
2871
|
-
case 2: {
|
|
2872
|
-
if (tag !== 16) {
|
|
2873
|
-
break;
|
|
2874
|
-
}
|
|
2875
|
-
message.serviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2876
|
-
continue;
|
|
2877
|
-
}
|
|
2878
|
-
case 3: {
|
|
2879
|
-
if (tag !== 26) {
|
|
2880
|
-
break;
|
|
2881
|
-
}
|
|
2882
|
-
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2883
|
-
continue;
|
|
2884
|
-
}
|
|
2885
|
-
case 4: {
|
|
2886
|
-
if (tag !== 34) {
|
|
2887
|
-
break;
|
|
2888
|
-
}
|
|
2889
|
-
message.expiresAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2890
|
-
continue;
|
|
2891
|
-
}
|
|
2892
|
-
case 5: {
|
|
2893
|
-
if (tag !== 40) {
|
|
2894
|
-
break;
|
|
2895
|
-
}
|
|
2896
|
-
message.durationPercentage = reader.uint32();
|
|
2897
|
-
continue;
|
|
2898
|
-
}
|
|
2899
|
-
case 6: {
|
|
2900
|
-
if (tag !== 48) {
|
|
2901
|
-
break;
|
|
2902
|
-
}
|
|
2903
|
-
message.currentUptime = reader.uint32();
|
|
2904
|
-
continue;
|
|
2905
|
-
}
|
|
2906
|
-
case 7: {
|
|
2907
|
-
if (tag !== 56) {
|
|
2908
|
-
break;
|
|
2909
|
-
}
|
|
2910
|
-
message.uptime = reader.uint32();
|
|
2911
|
-
continue;
|
|
2912
|
-
}
|
|
2913
|
-
case 8: {
|
|
2914
|
-
if (tag !== 64) {
|
|
2915
|
-
break;
|
|
2916
|
-
}
|
|
2917
|
-
message.uptimePercentage = reader.uint32();
|
|
2918
|
-
continue;
|
|
2919
|
-
}
|
|
2920
|
-
case 9: {
|
|
2921
|
-
if (tag !== 72) {
|
|
2922
|
-
break;
|
|
2923
|
-
}
|
|
2924
|
-
message.currentMileage = reader.uint32();
|
|
2925
|
-
continue;
|
|
2926
|
-
}
|
|
2927
|
-
case 10: {
|
|
2928
|
-
if (tag !== 80) {
|
|
2929
|
-
break;
|
|
2930
|
-
}
|
|
2931
|
-
message.mileage = reader.uint32();
|
|
2932
|
-
continue;
|
|
2933
|
-
}
|
|
2934
|
-
case 11: {
|
|
2935
|
-
if (tag !== 88) {
|
|
2936
|
-
break;
|
|
2937
|
-
}
|
|
2938
|
-
message.mileagePercentage = reader.uint32();
|
|
2939
|
-
continue;
|
|
2940
|
-
}
|
|
2941
|
-
case 12: {
|
|
2942
|
-
if (tag !== 96) {
|
|
2943
|
-
break;
|
|
2944
|
-
}
|
|
2945
|
-
message.status = reader.uint32();
|
|
2946
|
-
continue;
|
|
2947
|
-
}
|
|
2948
|
-
case 13: {
|
|
2949
|
-
if (tag !== 106) {
|
|
2950
|
-
break;
|
|
2951
|
-
}
|
|
2952
|
-
message.cost.push(exports.MaintenanceResponse_Cost.decode(reader, reader.uint32()));
|
|
2953
|
-
continue;
|
|
2954
|
-
}
|
|
2955
|
-
case 14: {
|
|
2956
|
-
if (tag !== 112) {
|
|
2957
|
-
break;
|
|
2958
|
-
}
|
|
2959
|
-
message.price = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2960
|
-
continue;
|
|
2961
|
-
}
|
|
2962
|
-
case 15: {
|
|
2963
|
-
if (tag !== 120) {
|
|
2964
|
-
break;
|
|
2965
|
-
}
|
|
2966
|
-
message.count = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2967
|
-
continue;
|
|
2968
|
-
}
|
|
2969
|
-
case 16: {
|
|
2970
|
-
if (tag !== 130) {
|
|
2971
|
-
break;
|
|
2972
|
-
}
|
|
2973
|
-
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2974
|
-
continue;
|
|
2975
|
-
}
|
|
2976
|
-
case 17: {
|
|
2977
|
-
if (tag !== 138) {
|
|
2978
|
-
break;
|
|
2979
|
-
}
|
|
2980
|
-
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2981
|
-
continue;
|
|
2982
|
-
}
|
|
2983
|
-
}
|
|
2984
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2985
|
-
break;
|
|
2986
|
-
}
|
|
2987
|
-
reader.skip(tag & 7);
|
|
2988
|
-
}
|
|
2989
|
-
return message;
|
|
2990
|
-
},
|
|
2991
|
-
fromJSON(object) {
|
|
2992
|
-
return {
|
|
2993
|
-
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
2994
|
-
serviceId: isSet(object.serviceId) ? long_1.default.fromValue(object.serviceId) : long_1.default.UZERO,
|
|
2995
|
-
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
2996
|
-
expiresAt: isSet(object.expiresAt) ? fromJsonTimestamp(object.expiresAt) : undefined,
|
|
2997
|
-
durationPercentage: isSet(object.durationPercentage) ? globalThis.Number(object.durationPercentage) : 0,
|
|
2998
|
-
currentUptime: isSet(object.currentUptime) ? globalThis.Number(object.currentUptime) : 0,
|
|
2999
|
-
uptime: isSet(object.uptime) ? globalThis.Number(object.uptime) : 0,
|
|
3000
|
-
uptimePercentage: isSet(object.uptimePercentage) ? globalThis.Number(object.uptimePercentage) : 0,
|
|
3001
|
-
currentMileage: isSet(object.currentMileage) ? globalThis.Number(object.currentMileage) : 0,
|
|
3002
|
-
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
3003
|
-
mileagePercentage: isSet(object.mileagePercentage) ? globalThis.Number(object.mileagePercentage) : 0,
|
|
3004
|
-
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
3005
|
-
cost: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cost)
|
|
3006
|
-
? object.cost.map((e) => exports.MaintenanceResponse_Cost.fromJSON(e))
|
|
3007
|
-
: [],
|
|
3008
|
-
price: isSet(object.price) ? long_1.default.fromValue(object.price) : long_1.default.UZERO,
|
|
3009
|
-
count: isSet(object.count) ? long_1.default.fromValue(object.count) : long_1.default.UZERO,
|
|
3010
|
-
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
3011
|
-
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
3012
|
-
};
|
|
3013
|
-
},
|
|
3014
|
-
toJSON(message) {
|
|
3015
|
-
var _a;
|
|
3016
|
-
const obj = {};
|
|
3017
|
-
if (!message.id.equals(long_1.default.UZERO)) {
|
|
3018
|
-
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
3019
|
-
}
|
|
3020
|
-
if (!message.serviceId.equals(long_1.default.UZERO)) {
|
|
3021
|
-
obj.serviceId = (message.serviceId || long_1.default.UZERO).toString();
|
|
3022
|
-
}
|
|
3023
|
-
if (message.startedAt !== undefined) {
|
|
3024
|
-
obj.startedAt = message.startedAt.toISOString();
|
|
3025
|
-
}
|
|
3026
|
-
if (message.expiresAt !== undefined) {
|
|
3027
|
-
obj.expiresAt = message.expiresAt.toISOString();
|
|
3028
|
-
}
|
|
3029
|
-
if (message.durationPercentage !== 0) {
|
|
3030
|
-
obj.durationPercentage = Math.round(message.durationPercentage);
|
|
3031
|
-
}
|
|
3032
|
-
if (message.currentUptime !== 0) {
|
|
3033
|
-
obj.currentUptime = Math.round(message.currentUptime);
|
|
3034
|
-
}
|
|
3035
|
-
if (message.uptime !== 0) {
|
|
3036
|
-
obj.uptime = Math.round(message.uptime);
|
|
3037
|
-
}
|
|
3038
|
-
if (message.uptimePercentage !== 0) {
|
|
3039
|
-
obj.uptimePercentage = Math.round(message.uptimePercentage);
|
|
3040
|
-
}
|
|
3041
|
-
if (message.currentMileage !== 0) {
|
|
3042
|
-
obj.currentMileage = Math.round(message.currentMileage);
|
|
3043
|
-
}
|
|
3044
|
-
if (message.mileage !== 0) {
|
|
3045
|
-
obj.mileage = Math.round(message.mileage);
|
|
3046
|
-
}
|
|
3047
|
-
if (message.mileagePercentage !== 0) {
|
|
3048
|
-
obj.mileagePercentage = Math.round(message.mileagePercentage);
|
|
3049
|
-
}
|
|
3050
|
-
if (message.status !== 0) {
|
|
3051
|
-
obj.status = Math.round(message.status);
|
|
3052
|
-
}
|
|
3053
|
-
if ((_a = message.cost) === null || _a === void 0 ? void 0 : _a.length) {
|
|
3054
|
-
obj.cost = message.cost.map((e) => exports.MaintenanceResponse_Cost.toJSON(e));
|
|
3055
|
-
}
|
|
3056
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3057
|
-
obj.price = (message.price || long_1.default.UZERO).toString();
|
|
3058
|
-
}
|
|
3059
|
-
if (!message.count.equals(long_1.default.UZERO)) {
|
|
3060
|
-
obj.count = (message.count || long_1.default.UZERO).toString();
|
|
3061
|
-
}
|
|
3062
|
-
if (message.createdAt !== undefined) {
|
|
3063
|
-
obj.createdAt = message.createdAt.toISOString();
|
|
3064
|
-
}
|
|
3065
|
-
if (message.updatedAt !== undefined) {
|
|
3066
|
-
obj.updatedAt = message.updatedAt.toISOString();
|
|
3067
|
-
}
|
|
3068
|
-
return obj;
|
|
3069
|
-
},
|
|
3070
|
-
create(base) {
|
|
3071
|
-
return exports.MaintenanceResponse_List.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3072
|
-
},
|
|
3073
|
-
fromPartial(object) {
|
|
3074
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
3075
|
-
const message = createBaseMaintenanceResponse_List();
|
|
3076
|
-
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
3077
|
-
message.serviceId = (object.serviceId !== undefined && object.serviceId !== null)
|
|
3078
|
-
? long_1.default.fromValue(object.serviceId)
|
|
3079
|
-
: long_1.default.UZERO;
|
|
3080
|
-
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
3081
|
-
message.expiresAt = (_b = object.expiresAt) !== null && _b !== void 0 ? _b : undefined;
|
|
3082
|
-
message.durationPercentage = (_c = object.durationPercentage) !== null && _c !== void 0 ? _c : 0;
|
|
3083
|
-
message.currentUptime = (_d = object.currentUptime) !== null && _d !== void 0 ? _d : 0;
|
|
3084
|
-
message.uptime = (_e = object.uptime) !== null && _e !== void 0 ? _e : 0;
|
|
3085
|
-
message.uptimePercentage = (_f = object.uptimePercentage) !== null && _f !== void 0 ? _f : 0;
|
|
3086
|
-
message.currentMileage = (_g = object.currentMileage) !== null && _g !== void 0 ? _g : 0;
|
|
3087
|
-
message.mileage = (_h = object.mileage) !== null && _h !== void 0 ? _h : 0;
|
|
3088
|
-
message.mileagePercentage = (_j = object.mileagePercentage) !== null && _j !== void 0 ? _j : 0;
|
|
3089
|
-
message.status = (_k = object.status) !== null && _k !== void 0 ? _k : 0;
|
|
3090
|
-
message.cost = ((_l = object.cost) === null || _l === void 0 ? void 0 : _l.map((e) => exports.MaintenanceResponse_Cost.fromPartial(e))) || [];
|
|
3091
|
-
message.price = (object.price !== undefined && object.price !== null) ? long_1.default.fromValue(object.price) : long_1.default.UZERO;
|
|
3092
|
-
message.count = (object.count !== undefined && object.count !== null) ? long_1.default.fromValue(object.count) : long_1.default.UZERO;
|
|
3093
|
-
message.createdAt = (_m = object.createdAt) !== null && _m !== void 0 ? _m : undefined;
|
|
3094
|
-
message.updatedAt = (_o = object.updatedAt) !== null && _o !== void 0 ? _o : undefined;
|
|
3095
|
-
return message;
|
|
3096
|
-
},
|
|
3097
|
-
};
|
|
3098
|
-
function createBaseMaintenanceResponse_Group() {
|
|
3099
|
-
return {
|
|
3100
|
-
uptime: long_1.default.UZERO,
|
|
3101
|
-
mileage: long_1.default.UZERO,
|
|
3102
|
-
price: long_1.default.UZERO,
|
|
3103
|
-
startedAt: undefined,
|
|
3104
|
-
finishedAt: undefined,
|
|
3105
|
-
services: [],
|
|
3106
|
-
list: [],
|
|
3107
|
-
};
|
|
3108
|
-
}
|
|
3109
|
-
exports.MaintenanceResponse_Group = {
|
|
3110
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3111
|
-
if (!message.uptime.equals(long_1.default.UZERO)) {
|
|
3112
|
-
writer.uint32(8).uint64(message.uptime.toString());
|
|
3113
|
-
}
|
|
3114
|
-
if (!message.mileage.equals(long_1.default.UZERO)) {
|
|
3115
|
-
writer.uint32(16).uint64(message.mileage.toString());
|
|
3116
|
-
}
|
|
3117
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3118
|
-
writer.uint32(24).uint64(message.price.toString());
|
|
3119
|
-
}
|
|
3120
|
-
if (message.startedAt !== undefined) {
|
|
3121
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(34).fork()).join();
|
|
3122
|
-
}
|
|
3123
|
-
if (message.finishedAt !== undefined) {
|
|
3124
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(42).fork()).join();
|
|
3125
|
-
}
|
|
3126
|
-
for (const v of message.services) {
|
|
3127
|
-
exports.MaintenanceResponse_Service.encode(v, writer.uint32(50).fork()).join();
|
|
3128
|
-
}
|
|
3129
|
-
for (const v of message.list) {
|
|
3130
|
-
exports.MaintenanceResponse_List.encode(v, writer.uint32(58).fork()).join();
|
|
3131
|
-
}
|
|
3132
|
-
return writer;
|
|
3133
|
-
},
|
|
3134
|
-
decode(input, length) {
|
|
3135
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3136
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3137
|
-
const message = createBaseMaintenanceResponse_Group();
|
|
3138
|
-
while (reader.pos < end) {
|
|
3139
|
-
const tag = reader.uint32();
|
|
3140
|
-
switch (tag >>> 3) {
|
|
3141
|
-
case 1: {
|
|
3142
|
-
if (tag !== 8) {
|
|
3143
|
-
break;
|
|
3144
|
-
}
|
|
3145
|
-
message.uptime = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3146
|
-
continue;
|
|
3147
|
-
}
|
|
3148
|
-
case 2: {
|
|
3149
|
-
if (tag !== 16) {
|
|
3150
|
-
break;
|
|
3151
|
-
}
|
|
3152
|
-
message.mileage = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3153
|
-
continue;
|
|
3154
|
-
}
|
|
3155
|
-
case 3: {
|
|
3156
|
-
if (tag !== 24) {
|
|
3157
|
-
break;
|
|
3158
|
-
}
|
|
3159
|
-
message.price = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3160
|
-
continue;
|
|
3161
|
-
}
|
|
3162
|
-
case 4: {
|
|
3163
|
-
if (tag !== 34) {
|
|
3164
|
-
break;
|
|
3165
|
-
}
|
|
3166
|
-
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3167
|
-
continue;
|
|
3168
|
-
}
|
|
3169
|
-
case 5: {
|
|
3170
|
-
if (tag !== 42) {
|
|
3171
|
-
break;
|
|
3172
|
-
}
|
|
3173
|
-
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3174
|
-
continue;
|
|
3175
|
-
}
|
|
3176
|
-
case 6: {
|
|
3177
|
-
if (tag !== 50) {
|
|
3178
|
-
break;
|
|
3179
|
-
}
|
|
3180
|
-
message.services.push(exports.MaintenanceResponse_Service.decode(reader, reader.uint32()));
|
|
3181
|
-
continue;
|
|
3182
|
-
}
|
|
3183
|
-
case 7: {
|
|
3184
|
-
if (tag !== 58) {
|
|
3185
|
-
break;
|
|
3186
|
-
}
|
|
3187
|
-
message.list.push(exports.MaintenanceResponse_List.decode(reader, reader.uint32()));
|
|
3188
|
-
continue;
|
|
3189
|
-
}
|
|
3190
|
-
}
|
|
3191
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3192
|
-
break;
|
|
3193
|
-
}
|
|
3194
|
-
reader.skip(tag & 7);
|
|
3195
|
-
}
|
|
3196
|
-
return message;
|
|
3197
|
-
},
|
|
3198
|
-
fromJSON(object) {
|
|
3199
|
-
return {
|
|
3200
|
-
uptime: isSet(object.uptime) ? long_1.default.fromValue(object.uptime) : long_1.default.UZERO,
|
|
3201
|
-
mileage: isSet(object.mileage) ? long_1.default.fromValue(object.mileage) : long_1.default.UZERO,
|
|
3202
|
-
price: isSet(object.price) ? long_1.default.fromValue(object.price) : long_1.default.UZERO,
|
|
3203
|
-
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
3204
|
-
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
3205
|
-
services: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.services)
|
|
3206
|
-
? object.services.map((e) => exports.MaintenanceResponse_Service.fromJSON(e))
|
|
3207
|
-
: [],
|
|
3208
|
-
list: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.list)
|
|
3209
|
-
? object.list.map((e) => exports.MaintenanceResponse_List.fromJSON(e))
|
|
3210
|
-
: [],
|
|
3211
|
-
};
|
|
3212
|
-
},
|
|
3213
|
-
toJSON(message) {
|
|
3214
|
-
var _a, _b;
|
|
3215
|
-
const obj = {};
|
|
3216
|
-
if (!message.uptime.equals(long_1.default.UZERO)) {
|
|
3217
|
-
obj.uptime = (message.uptime || long_1.default.UZERO).toString();
|
|
3218
|
-
}
|
|
3219
|
-
if (!message.mileage.equals(long_1.default.UZERO)) {
|
|
3220
|
-
obj.mileage = (message.mileage || long_1.default.UZERO).toString();
|
|
3221
|
-
}
|
|
3222
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3223
|
-
obj.price = (message.price || long_1.default.UZERO).toString();
|
|
3224
|
-
}
|
|
3225
|
-
if (message.startedAt !== undefined) {
|
|
3226
|
-
obj.startedAt = message.startedAt.toISOString();
|
|
3227
|
-
}
|
|
3228
|
-
if (message.finishedAt !== undefined) {
|
|
3229
|
-
obj.finishedAt = message.finishedAt.toISOString();
|
|
3230
|
-
}
|
|
3231
|
-
if ((_a = message.services) === null || _a === void 0 ? void 0 : _a.length) {
|
|
3232
|
-
obj.services = message.services.map((e) => exports.MaintenanceResponse_Service.toJSON(e));
|
|
3233
|
-
}
|
|
3234
|
-
if ((_b = message.list) === null || _b === void 0 ? void 0 : _b.length) {
|
|
3235
|
-
obj.list = message.list.map((e) => exports.MaintenanceResponse_List.toJSON(e));
|
|
3236
|
-
}
|
|
3237
|
-
return obj;
|
|
3238
|
-
},
|
|
3239
|
-
create(base) {
|
|
3240
|
-
return exports.MaintenanceResponse_Group.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3241
|
-
},
|
|
3242
|
-
fromPartial(object) {
|
|
3243
|
-
var _a, _b, _c, _d;
|
|
3244
|
-
const message = createBaseMaintenanceResponse_Group();
|
|
3245
|
-
message.uptime = (object.uptime !== undefined && object.uptime !== null)
|
|
3246
|
-
? long_1.default.fromValue(object.uptime)
|
|
3247
|
-
: long_1.default.UZERO;
|
|
3248
|
-
message.mileage = (object.mileage !== undefined && object.mileage !== null)
|
|
3249
|
-
? long_1.default.fromValue(object.mileage)
|
|
3250
|
-
: long_1.default.UZERO;
|
|
3251
|
-
message.price = (object.price !== undefined && object.price !== null) ? long_1.default.fromValue(object.price) : long_1.default.UZERO;
|
|
3252
|
-
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
3253
|
-
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
3254
|
-
message.services = ((_c = object.services) === null || _c === void 0 ? void 0 : _c.map((e) => exports.MaintenanceResponse_Service.fromPartial(e))) || [];
|
|
3255
|
-
message.list = ((_d = object.list) === null || _d === void 0 ? void 0 : _d.map((e) => exports.MaintenanceResponse_List.fromPartial(e))) || [];
|
|
3256
|
-
return message;
|
|
3257
|
-
},
|
|
3258
|
-
};
|
|
3259
|
-
function createBaseMaintenanceResponse_Service() {
|
|
3260
|
-
return { serviceId: long_1.default.UZERO, name: "", price: long_1.default.UZERO, count: 0 };
|
|
3261
|
-
}
|
|
3262
|
-
exports.MaintenanceResponse_Service = {
|
|
3263
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3264
|
-
if (!message.serviceId.equals(long_1.default.UZERO)) {
|
|
3265
|
-
writer.uint32(8).uint64(message.serviceId.toString());
|
|
3266
|
-
}
|
|
3267
|
-
if (message.name !== "") {
|
|
3268
|
-
writer.uint32(18).string(message.name);
|
|
3269
|
-
}
|
|
3270
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3271
|
-
writer.uint32(24).uint64(message.price.toString());
|
|
3272
|
-
}
|
|
3273
|
-
if (message.count !== 0) {
|
|
3274
|
-
writer.uint32(32).uint32(message.count);
|
|
3275
|
-
}
|
|
3276
|
-
return writer;
|
|
3277
|
-
},
|
|
3278
|
-
decode(input, length) {
|
|
3279
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3280
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3281
|
-
const message = createBaseMaintenanceResponse_Service();
|
|
3282
|
-
while (reader.pos < end) {
|
|
3283
|
-
const tag = reader.uint32();
|
|
3284
|
-
switch (tag >>> 3) {
|
|
3285
|
-
case 1: {
|
|
3286
|
-
if (tag !== 8) {
|
|
3287
|
-
break;
|
|
3288
|
-
}
|
|
3289
|
-
message.serviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3290
|
-
continue;
|
|
3291
|
-
}
|
|
3292
|
-
case 2: {
|
|
3293
|
-
if (tag !== 18) {
|
|
3294
|
-
break;
|
|
3295
|
-
}
|
|
3296
|
-
message.name = reader.string();
|
|
3297
|
-
continue;
|
|
3298
|
-
}
|
|
3299
|
-
case 3: {
|
|
3300
|
-
if (tag !== 24) {
|
|
3301
|
-
break;
|
|
3302
|
-
}
|
|
3303
|
-
message.price = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3304
|
-
continue;
|
|
3305
|
-
}
|
|
3306
|
-
case 4: {
|
|
3307
|
-
if (tag !== 32) {
|
|
3308
|
-
break;
|
|
3309
|
-
}
|
|
3310
|
-
message.count = reader.uint32();
|
|
3311
|
-
continue;
|
|
3312
|
-
}
|
|
3313
|
-
}
|
|
3314
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3315
|
-
break;
|
|
3316
|
-
}
|
|
3317
|
-
reader.skip(tag & 7);
|
|
3318
|
-
}
|
|
3319
|
-
return message;
|
|
3320
|
-
},
|
|
3321
|
-
fromJSON(object) {
|
|
3322
|
-
return {
|
|
3323
|
-
serviceId: isSet(object.serviceId) ? long_1.default.fromValue(object.serviceId) : long_1.default.UZERO,
|
|
3324
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
3325
|
-
price: isSet(object.price) ? long_1.default.fromValue(object.price) : long_1.default.UZERO,
|
|
3326
|
-
count: isSet(object.count) ? globalThis.Number(object.count) : 0,
|
|
3327
|
-
};
|
|
3328
|
-
},
|
|
3329
|
-
toJSON(message) {
|
|
3330
|
-
const obj = {};
|
|
3331
|
-
if (!message.serviceId.equals(long_1.default.UZERO)) {
|
|
3332
|
-
obj.serviceId = (message.serviceId || long_1.default.UZERO).toString();
|
|
3333
|
-
}
|
|
3334
|
-
if (message.name !== "") {
|
|
3335
|
-
obj.name = message.name;
|
|
3336
|
-
}
|
|
3337
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3338
|
-
obj.price = (message.price || long_1.default.UZERO).toString();
|
|
3339
|
-
}
|
|
3340
|
-
if (message.count !== 0) {
|
|
3341
|
-
obj.count = Math.round(message.count);
|
|
3342
|
-
}
|
|
3343
|
-
return obj;
|
|
3344
|
-
},
|
|
3345
|
-
create(base) {
|
|
3346
|
-
return exports.MaintenanceResponse_Service.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3347
|
-
},
|
|
3348
|
-
fromPartial(object) {
|
|
3349
|
-
var _a, _b;
|
|
3350
|
-
const message = createBaseMaintenanceResponse_Service();
|
|
3351
|
-
message.serviceId = (object.serviceId !== undefined && object.serviceId !== null)
|
|
3352
|
-
? long_1.default.fromValue(object.serviceId)
|
|
3353
|
-
: long_1.default.UZERO;
|
|
3354
|
-
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
3355
|
-
message.price = (object.price !== undefined && object.price !== null) ? long_1.default.fromValue(object.price) : long_1.default.UZERO;
|
|
3356
|
-
message.count = (_b = object.count) !== null && _b !== void 0 ? _b : 0;
|
|
3357
|
-
return message;
|
|
3358
|
-
},
|
|
3359
|
-
};
|
|
3360
|
-
function createBaseMaintenanceResponse_Device() {
|
|
3361
|
-
return {
|
|
3362
|
-
deviceId: long_1.default.UZERO,
|
|
3363
|
-
organizationId: long_1.default.UZERO,
|
|
3364
|
-
uptime: long_1.default.UZERO,
|
|
3365
|
-
mileage: long_1.default.UZERO,
|
|
3366
|
-
price: long_1.default.UZERO,
|
|
3367
|
-
services: [],
|
|
3368
|
-
groups: [],
|
|
3369
|
-
};
|
|
3370
|
-
}
|
|
3371
|
-
exports.MaintenanceResponse_Device = {
|
|
3372
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3373
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
3374
|
-
writer.uint32(8).uint64(message.deviceId.toString());
|
|
3375
|
-
}
|
|
3376
|
-
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
3377
|
-
writer.uint32(16).uint64(message.organizationId.toString());
|
|
3378
|
-
}
|
|
3379
|
-
if (!message.uptime.equals(long_1.default.UZERO)) {
|
|
3380
|
-
writer.uint32(24).uint64(message.uptime.toString());
|
|
3381
|
-
}
|
|
3382
|
-
if (!message.mileage.equals(long_1.default.UZERO)) {
|
|
3383
|
-
writer.uint32(32).uint64(message.mileage.toString());
|
|
3384
|
-
}
|
|
3385
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3386
|
-
writer.uint32(40).uint64(message.price.toString());
|
|
3387
|
-
}
|
|
3388
|
-
for (const v of message.services) {
|
|
3389
|
-
exports.MaintenanceResponse_Service.encode(v, writer.uint32(50).fork()).join();
|
|
3390
|
-
}
|
|
3391
|
-
for (const v of message.groups) {
|
|
3392
|
-
exports.MaintenanceResponse_Group.encode(v, writer.uint32(58).fork()).join();
|
|
3393
|
-
}
|
|
3394
|
-
return writer;
|
|
3395
|
-
},
|
|
3396
|
-
decode(input, length) {
|
|
3397
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3398
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3399
|
-
const message = createBaseMaintenanceResponse_Device();
|
|
3400
|
-
while (reader.pos < end) {
|
|
3401
|
-
const tag = reader.uint32();
|
|
3402
|
-
switch (tag >>> 3) {
|
|
3403
|
-
case 1: {
|
|
3404
|
-
if (tag !== 8) {
|
|
3405
|
-
break;
|
|
3406
|
-
}
|
|
3407
|
-
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3408
|
-
continue;
|
|
3409
|
-
}
|
|
3410
|
-
case 2: {
|
|
3411
|
-
if (tag !== 16) {
|
|
3412
|
-
break;
|
|
3413
|
-
}
|
|
3414
|
-
message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3415
|
-
continue;
|
|
3416
|
-
}
|
|
3417
|
-
case 3: {
|
|
3418
|
-
if (tag !== 24) {
|
|
3419
|
-
break;
|
|
3420
|
-
}
|
|
3421
|
-
message.uptime = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3422
|
-
continue;
|
|
3423
|
-
}
|
|
3424
|
-
case 4: {
|
|
3425
|
-
if (tag !== 32) {
|
|
3426
|
-
break;
|
|
3427
|
-
}
|
|
3428
|
-
message.mileage = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3429
|
-
continue;
|
|
3430
|
-
}
|
|
3431
|
-
case 5: {
|
|
3432
|
-
if (tag !== 40) {
|
|
3433
|
-
break;
|
|
3434
|
-
}
|
|
3435
|
-
message.price = long_1.default.fromString(reader.uint64().toString(), true);
|
|
3436
|
-
continue;
|
|
3437
|
-
}
|
|
3438
|
-
case 6: {
|
|
3439
|
-
if (tag !== 50) {
|
|
3440
|
-
break;
|
|
3441
|
-
}
|
|
3442
|
-
message.services.push(exports.MaintenanceResponse_Service.decode(reader, reader.uint32()));
|
|
3443
|
-
continue;
|
|
3444
|
-
}
|
|
3445
|
-
case 7: {
|
|
3446
|
-
if (tag !== 58) {
|
|
3447
|
-
break;
|
|
3448
|
-
}
|
|
3449
|
-
message.groups.push(exports.MaintenanceResponse_Group.decode(reader, reader.uint32()));
|
|
3450
|
-
continue;
|
|
3451
|
-
}
|
|
3452
|
-
}
|
|
3453
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3454
|
-
break;
|
|
3455
|
-
}
|
|
3456
|
-
reader.skip(tag & 7);
|
|
3457
|
-
}
|
|
3458
|
-
return message;
|
|
3459
|
-
},
|
|
3460
|
-
fromJSON(object) {
|
|
3461
|
-
return {
|
|
3462
|
-
deviceId: isSet(object.deviceId) ? long_1.default.fromValue(object.deviceId) : long_1.default.UZERO,
|
|
3463
|
-
organizationId: isSet(object.organizationId) ? long_1.default.fromValue(object.organizationId) : long_1.default.UZERO,
|
|
3464
|
-
uptime: isSet(object.uptime) ? long_1.default.fromValue(object.uptime) : long_1.default.UZERO,
|
|
3465
|
-
mileage: isSet(object.mileage) ? long_1.default.fromValue(object.mileage) : long_1.default.UZERO,
|
|
3466
|
-
price: isSet(object.price) ? long_1.default.fromValue(object.price) : long_1.default.UZERO,
|
|
3467
|
-
services: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.services)
|
|
3468
|
-
? object.services.map((e) => exports.MaintenanceResponse_Service.fromJSON(e))
|
|
3469
|
-
: [],
|
|
3470
|
-
groups: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.groups)
|
|
3471
|
-
? object.groups.map((e) => exports.MaintenanceResponse_Group.fromJSON(e))
|
|
3472
|
-
: [],
|
|
3473
|
-
};
|
|
3474
|
-
},
|
|
3475
|
-
toJSON(message) {
|
|
3476
|
-
var _a, _b;
|
|
3477
|
-
const obj = {};
|
|
3478
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
3479
|
-
obj.deviceId = (message.deviceId || long_1.default.UZERO).toString();
|
|
3480
|
-
}
|
|
3481
|
-
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
3482
|
-
obj.organizationId = (message.organizationId || long_1.default.UZERO).toString();
|
|
3483
|
-
}
|
|
3484
|
-
if (!message.uptime.equals(long_1.default.UZERO)) {
|
|
3485
|
-
obj.uptime = (message.uptime || long_1.default.UZERO).toString();
|
|
3486
|
-
}
|
|
3487
|
-
if (!message.mileage.equals(long_1.default.UZERO)) {
|
|
3488
|
-
obj.mileage = (message.mileage || long_1.default.UZERO).toString();
|
|
3489
|
-
}
|
|
3490
|
-
if (!message.price.equals(long_1.default.UZERO)) {
|
|
3491
|
-
obj.price = (message.price || long_1.default.UZERO).toString();
|
|
3492
|
-
}
|
|
3493
|
-
if ((_a = message.services) === null || _a === void 0 ? void 0 : _a.length) {
|
|
3494
|
-
obj.services = message.services.map((e) => exports.MaintenanceResponse_Service.toJSON(e));
|
|
3495
|
-
}
|
|
3496
|
-
if ((_b = message.groups) === null || _b === void 0 ? void 0 : _b.length) {
|
|
3497
|
-
obj.groups = message.groups.map((e) => exports.MaintenanceResponse_Group.toJSON(e));
|
|
3498
|
-
}
|
|
3499
|
-
return obj;
|
|
3500
|
-
},
|
|
3501
|
-
create(base) {
|
|
3502
|
-
return exports.MaintenanceResponse_Device.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3503
|
-
},
|
|
3504
|
-
fromPartial(object) {
|
|
3505
|
-
var _a, _b;
|
|
3506
|
-
const message = createBaseMaintenanceResponse_Device();
|
|
3507
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
3508
|
-
? long_1.default.fromValue(object.deviceId)
|
|
3509
|
-
: long_1.default.UZERO;
|
|
3510
|
-
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
3511
|
-
? long_1.default.fromValue(object.organizationId)
|
|
3512
|
-
: long_1.default.UZERO;
|
|
3513
|
-
message.uptime = (object.uptime !== undefined && object.uptime !== null)
|
|
3514
|
-
? long_1.default.fromValue(object.uptime)
|
|
3515
|
-
: long_1.default.UZERO;
|
|
3516
|
-
message.mileage = (object.mileage !== undefined && object.mileage !== null)
|
|
3517
|
-
? long_1.default.fromValue(object.mileage)
|
|
3518
|
-
: long_1.default.UZERO;
|
|
3519
|
-
message.price = (object.price !== undefined && object.price !== null) ? long_1.default.fromValue(object.price) : long_1.default.UZERO;
|
|
3520
|
-
message.services = ((_a = object.services) === null || _a === void 0 ? void 0 : _a.map((e) => exports.MaintenanceResponse_Service.fromPartial(e))) || [];
|
|
3521
|
-
message.groups = ((_b = object.groups) === null || _b === void 0 ? void 0 : _b.map((e) => exports.MaintenanceResponse_Group.fromPartial(e))) || [];
|
|
3522
|
-
return message;
|
|
3523
|
-
},
|
|
3524
|
-
};
|
|
3525
|
-
function createBaseTripPerformanceRequest() {
|
|
3526
|
-
return {
|
|
3527
|
-
deviceId: [],
|
|
3528
|
-
startedAt: undefined,
|
|
3529
|
-
finishedAt: undefined,
|
|
3530
|
-
groupByDevice: false,
|
|
3531
|
-
groupByDatetime: 0,
|
|
3532
|
-
hourly: false,
|
|
3533
|
-
};
|
|
3534
|
-
}
|
|
3535
|
-
exports.TripPerformanceRequest = {
|
|
3536
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3537
|
-
writer.uint32(10).fork();
|
|
3538
|
-
for (const v of message.deviceId) {
|
|
3539
|
-
writer.uint64(v.toString());
|
|
3540
|
-
}
|
|
3541
|
-
writer.join();
|
|
3542
|
-
if (message.startedAt !== undefined) {
|
|
3543
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(18).fork()).join();
|
|
3544
|
-
}
|
|
3545
|
-
if (message.finishedAt !== undefined) {
|
|
3546
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(26).fork()).join();
|
|
3547
|
-
}
|
|
3548
|
-
if (message.groupByDevice !== false) {
|
|
3549
|
-
writer.uint32(32).bool(message.groupByDevice);
|
|
3550
|
-
}
|
|
3551
|
-
if (message.groupByDatetime !== 0) {
|
|
3552
|
-
writer.uint32(40).int32(message.groupByDatetime);
|
|
3553
|
-
}
|
|
3554
|
-
if (message.hourly !== false) {
|
|
3555
|
-
writer.uint32(48).bool(message.hourly);
|
|
3556
|
-
}
|
|
3557
|
-
return writer;
|
|
3558
|
-
},
|
|
3559
|
-
decode(input, length) {
|
|
3560
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3561
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3562
|
-
const message = createBaseTripPerformanceRequest();
|
|
3563
|
-
while (reader.pos < end) {
|
|
3564
|
-
const tag = reader.uint32();
|
|
3565
|
-
switch (tag >>> 3) {
|
|
3566
|
-
case 1: {
|
|
3567
|
-
if (tag === 8) {
|
|
3568
|
-
message.deviceId.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
3569
|
-
continue;
|
|
3570
|
-
}
|
|
3571
|
-
if (tag === 10) {
|
|
3572
|
-
const end2 = reader.uint32() + reader.pos;
|
|
3573
|
-
while (reader.pos < end2) {
|
|
3574
|
-
message.deviceId.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
3575
|
-
}
|
|
3576
|
-
continue;
|
|
3577
|
-
}
|
|
3578
|
-
break;
|
|
3579
|
-
}
|
|
3580
|
-
case 2: {
|
|
3581
|
-
if (tag !== 18) {
|
|
3582
|
-
break;
|
|
3583
|
-
}
|
|
3584
|
-
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3585
|
-
continue;
|
|
3586
|
-
}
|
|
3587
|
-
case 3: {
|
|
3588
|
-
if (tag !== 26) {
|
|
3589
|
-
break;
|
|
3590
|
-
}
|
|
3591
|
-
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
3592
|
-
continue;
|
|
3593
|
-
}
|
|
3594
|
-
case 4: {
|
|
3595
|
-
if (tag !== 32) {
|
|
3596
|
-
break;
|
|
3597
|
-
}
|
|
3598
|
-
message.groupByDevice = reader.bool();
|
|
3599
|
-
continue;
|
|
3600
|
-
}
|
|
3601
|
-
case 5: {
|
|
3602
|
-
if (tag !== 40) {
|
|
3603
|
-
break;
|
|
3604
|
-
}
|
|
3605
|
-
message.groupByDatetime = reader.int32();
|
|
3606
|
-
continue;
|
|
3607
|
-
}
|
|
3608
|
-
case 6: {
|
|
3609
|
-
if (tag !== 48) {
|
|
3610
|
-
break;
|
|
3611
|
-
}
|
|
3612
|
-
message.hourly = reader.bool();
|
|
3613
|
-
continue;
|
|
3614
|
-
}
|
|
3615
|
-
}
|
|
3616
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3617
|
-
break;
|
|
3618
|
-
}
|
|
3619
|
-
reader.skip(tag & 7);
|
|
3620
|
-
}
|
|
3621
|
-
return message;
|
|
3622
|
-
},
|
|
3623
|
-
fromJSON(object) {
|
|
3624
|
-
return {
|
|
3625
|
-
deviceId: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_id) ? object.device_id.map((e) => long_1.default.fromValue(e)) : [],
|
|
3626
|
-
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
3627
|
-
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
3628
|
-
groupByDevice: isSet(object.group_by_device) ? globalThis.Boolean(object.group_by_device) : false,
|
|
3629
|
-
groupByDatetime: isSet(object.group_by_datetime)
|
|
3630
|
-
? tripPerformanceRequest_GroupByFromJSON(object.group_by_datetime)
|
|
3631
|
-
: 0,
|
|
3632
|
-
hourly: isSet(object.hourly) ? globalThis.Boolean(object.hourly) : false,
|
|
3633
|
-
};
|
|
3634
|
-
},
|
|
3635
|
-
toJSON(message) {
|
|
3636
|
-
var _a;
|
|
3637
|
-
const obj = {};
|
|
3638
|
-
if ((_a = message.deviceId) === null || _a === void 0 ? void 0 : _a.length) {
|
|
3639
|
-
obj.device_id = message.deviceId.map((e) => (e || long_1.default.UZERO).toString());
|
|
3640
|
-
}
|
|
3641
|
-
if (message.startedAt !== undefined) {
|
|
3642
|
-
obj.started_at = message.startedAt.toISOString();
|
|
3643
|
-
}
|
|
3644
|
-
if (message.finishedAt !== undefined) {
|
|
3645
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
3646
|
-
}
|
|
3647
|
-
if (message.groupByDevice !== false) {
|
|
3648
|
-
obj.group_by_device = message.groupByDevice;
|
|
3649
|
-
}
|
|
3650
|
-
if (message.groupByDatetime !== 0) {
|
|
3651
|
-
obj.group_by_datetime = tripPerformanceRequest_GroupByToJSON(message.groupByDatetime);
|
|
3652
|
-
}
|
|
3653
|
-
if (message.hourly !== false) {
|
|
3654
|
-
obj.hourly = message.hourly;
|
|
3655
|
-
}
|
|
3656
|
-
return obj;
|
|
3657
|
-
},
|
|
3658
|
-
create(base) {
|
|
3659
|
-
return exports.TripPerformanceRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3660
|
-
},
|
|
3661
|
-
fromPartial(object) {
|
|
3662
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3663
|
-
const message = createBaseTripPerformanceRequest();
|
|
3664
|
-
message.deviceId = ((_a = object.deviceId) === null || _a === void 0 ? void 0 : _a.map((e) => long_1.default.fromValue(e))) || [];
|
|
3665
|
-
message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
3666
|
-
message.finishedAt = (_c = object.finishedAt) !== null && _c !== void 0 ? _c : undefined;
|
|
3667
|
-
message.groupByDevice = (_d = object.groupByDevice) !== null && _d !== void 0 ? _d : false;
|
|
3668
|
-
message.groupByDatetime = (_e = object.groupByDatetime) !== null && _e !== void 0 ? _e : 0;
|
|
3669
|
-
message.hourly = (_f = object.hourly) !== null && _f !== void 0 ? _f : false;
|
|
3670
|
-
return message;
|
|
3671
|
-
},
|
|
3672
|
-
};
|
|
3673
|
-
function createBaseTripPerformanceResponse() {
|
|
3674
|
-
return { data: [], cost: 0, threads: 0, records: 0 };
|
|
3675
|
-
}
|
|
3676
|
-
exports.TripPerformanceResponse = {
|
|
3677
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3678
|
-
for (const v of message.data) {
|
|
3679
|
-
exports.TripPerformance.encode(v, writer.uint32(10).fork()).join();
|
|
3680
|
-
}
|
|
3681
|
-
if (message.cost !== 0) {
|
|
3682
|
-
writer.uint32(16).uint32(message.cost);
|
|
3683
|
-
}
|
|
3684
|
-
if (message.threads !== 0) {
|
|
3685
|
-
writer.uint32(24).uint32(message.threads);
|
|
3686
|
-
}
|
|
3687
|
-
if (message.records !== 0) {
|
|
3688
|
-
writer.uint32(32).uint32(message.records);
|
|
3689
|
-
}
|
|
3690
|
-
return writer;
|
|
3691
|
-
},
|
|
3692
|
-
decode(input, length) {
|
|
3693
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3694
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3695
|
-
const message = createBaseTripPerformanceResponse();
|
|
3696
|
-
while (reader.pos < end) {
|
|
3697
|
-
const tag = reader.uint32();
|
|
3698
|
-
switch (tag >>> 3) {
|
|
3699
|
-
case 1: {
|
|
3700
|
-
if (tag !== 10) {
|
|
3701
|
-
break;
|
|
3702
|
-
}
|
|
3703
|
-
message.data.push(exports.TripPerformance.decode(reader, reader.uint32()));
|
|
3704
|
-
continue;
|
|
3705
|
-
}
|
|
3706
|
-
case 2: {
|
|
3707
|
-
if (tag !== 16) {
|
|
3708
|
-
break;
|
|
3709
|
-
}
|
|
3710
|
-
message.cost = reader.uint32();
|
|
3711
|
-
continue;
|
|
3712
|
-
}
|
|
3713
|
-
case 3: {
|
|
3714
|
-
if (tag !== 24) {
|
|
3715
|
-
break;
|
|
3716
|
-
}
|
|
3717
|
-
message.threads = reader.uint32();
|
|
3718
|
-
continue;
|
|
3719
|
-
}
|
|
3720
|
-
case 4: {
|
|
3721
|
-
if (tag !== 32) {
|
|
3722
|
-
break;
|
|
3723
|
-
}
|
|
3724
|
-
message.records = reader.uint32();
|
|
3725
|
-
continue;
|
|
3726
|
-
}
|
|
3727
|
-
}
|
|
3728
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3729
|
-
break;
|
|
3730
|
-
}
|
|
3731
|
-
reader.skip(tag & 7);
|
|
3732
|
-
}
|
|
3733
|
-
return message;
|
|
3734
|
-
},
|
|
3735
|
-
fromJSON(object) {
|
|
3736
|
-
return {
|
|
3737
|
-
data: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.data) ? object.data.map((e) => exports.TripPerformance.fromJSON(e)) : [],
|
|
3738
|
-
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
3739
|
-
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
3740
|
-
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
3741
|
-
};
|
|
3742
|
-
},
|
|
3743
|
-
toJSON(message) {
|
|
3744
|
-
var _a;
|
|
3745
|
-
const obj = {};
|
|
3746
|
-
if ((_a = message.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
3747
|
-
obj.data = message.data.map((e) => exports.TripPerformance.toJSON(e));
|
|
3748
|
-
}
|
|
3749
|
-
if (message.cost !== 0) {
|
|
3750
|
-
obj.cost = Math.round(message.cost);
|
|
3751
|
-
}
|
|
3752
|
-
if (message.threads !== 0) {
|
|
3753
|
-
obj.threads = Math.round(message.threads);
|
|
3754
|
-
}
|
|
3755
|
-
if (message.records !== 0) {
|
|
3756
|
-
obj.records = Math.round(message.records);
|
|
3757
|
-
}
|
|
3758
|
-
return obj;
|
|
3759
|
-
},
|
|
3760
|
-
create(base) {
|
|
3761
|
-
return exports.TripPerformanceResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3762
|
-
},
|
|
3763
|
-
fromPartial(object) {
|
|
3764
|
-
var _a, _b, _c, _d;
|
|
3765
|
-
const message = createBaseTripPerformanceResponse();
|
|
3766
|
-
message.data = ((_a = object.data) === null || _a === void 0 ? void 0 : _a.map((e) => exports.TripPerformance.fromPartial(e))) || [];
|
|
3767
|
-
message.cost = (_b = object.cost) !== null && _b !== void 0 ? _b : 0;
|
|
3768
|
-
message.threads = (_c = object.threads) !== null && _c !== void 0 ? _c : 0;
|
|
3769
|
-
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
2558
|
+
const message = createBaseTripPerformanceResponse();
|
|
2559
|
+
message.data = ((_a = object.data) === null || _a === void 0 ? void 0 : _a.map((e) => exports.TripPerformance.fromPartial(e))) || [];
|
|
2560
|
+
message.cost = (_b = object.cost) !== null && _b !== void 0 ? _b : 0;
|
|
2561
|
+
message.threads = (_c = object.threads) !== null && _c !== void 0 ? _c : 0;
|
|
2562
|
+
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
3770
2563
|
return message;
|
|
3771
2564
|
},
|
|
3772
2565
|
};
|
|
@@ -4798,59 +3591,6 @@ exports.TripPerformance_SpeedsEntry = {
|
|
|
4798
3591
|
return message;
|
|
4799
3592
|
},
|
|
4800
3593
|
};
|
|
4801
|
-
function createBaseLatestDataModelRequest() {
|
|
4802
|
-
return { deviceId: long_1.default.UZERO };
|
|
4803
|
-
}
|
|
4804
|
-
exports.LatestDataModelRequest = {
|
|
4805
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
4806
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
4807
|
-
writer.uint32(8).uint64(message.deviceId.toString());
|
|
4808
|
-
}
|
|
4809
|
-
return writer;
|
|
4810
|
-
},
|
|
4811
|
-
decode(input, length) {
|
|
4812
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4813
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4814
|
-
const message = createBaseLatestDataModelRequest();
|
|
4815
|
-
while (reader.pos < end) {
|
|
4816
|
-
const tag = reader.uint32();
|
|
4817
|
-
switch (tag >>> 3) {
|
|
4818
|
-
case 1: {
|
|
4819
|
-
if (tag !== 8) {
|
|
4820
|
-
break;
|
|
4821
|
-
}
|
|
4822
|
-
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
4823
|
-
continue;
|
|
4824
|
-
}
|
|
4825
|
-
}
|
|
4826
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
4827
|
-
break;
|
|
4828
|
-
}
|
|
4829
|
-
reader.skip(tag & 7);
|
|
4830
|
-
}
|
|
4831
|
-
return message;
|
|
4832
|
-
},
|
|
4833
|
-
fromJSON(object) {
|
|
4834
|
-
return { deviceId: isSet(object.deviceId) ? long_1.default.fromValue(object.deviceId) : long_1.default.UZERO };
|
|
4835
|
-
},
|
|
4836
|
-
toJSON(message) {
|
|
4837
|
-
const obj = {};
|
|
4838
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
4839
|
-
obj.deviceId = (message.deviceId || long_1.default.UZERO).toString();
|
|
4840
|
-
}
|
|
4841
|
-
return obj;
|
|
4842
|
-
},
|
|
4843
|
-
create(base) {
|
|
4844
|
-
return exports.LatestDataModelRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
4845
|
-
},
|
|
4846
|
-
fromPartial(object) {
|
|
4847
|
-
const message = createBaseLatestDataModelRequest();
|
|
4848
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
4849
|
-
? long_1.default.fromValue(object.deviceId)
|
|
4850
|
-
: long_1.default.UZERO;
|
|
4851
|
-
return message;
|
|
4852
|
-
},
|
|
4853
|
-
};
|
|
4854
3594
|
function createBaseDashboardIndividualResponse() {
|
|
4855
3595
|
return {
|
|
4856
3596
|
dataList: [],
|
|
@@ -8597,140 +7337,46 @@ exports.ShiftResponse_Shift = {
|
|
|
8597
7337
|
: long_1.default.UZERO;
|
|
8598
7338
|
message.shiftId = (object.shiftId !== undefined && object.shiftId !== null)
|
|
8599
7339
|
? long_1.default.fromValue(object.shiftId)
|
|
8600
|
-
: long_1.default.UZERO;
|
|
8601
|
-
message.mileage = (_a = object.mileage) !== null && _a !== void 0 ? _a : 0;
|
|
8602
|
-
message.idling = (_b = object.idling) !== null && _b !== void 0 ? _b : 0;
|
|
8603
|
-
message.parking = (_c = object.parking) !== null && _c !== void 0 ? _c : 0;
|
|
8604
|
-
message.moving = (_d = object.moving) !== null && _d !== void 0 ? _d : 0;
|
|
8605
|
-
message.towing = (_e = object.towing) !== null && _e !== void 0 ? _e : 0;
|
|
8606
|
-
message.speedTotal = (_f = object.speedTotal) !== null && _f !== void 0 ? _f : 0;
|
|
8607
|
-
message.speedSum = (_g = object.speedSum) !== null && _g !== void 0 ? _g : 0;
|
|
8608
|
-
message.speedMax = (_h = object.speedMax) !== null && _h !== void 0 ? _h : 0;
|
|
8609
|
-
message.records = (object.records !== undefined && object.records !== null)
|
|
8610
|
-
? long_1.default.fromValue(object.records)
|
|
8611
|
-
: long_1.default.UZERO;
|
|
8612
|
-
message.harshAcceleration = (_j = object.harshAcceleration) !== null && _j !== void 0 ? _j : 0;
|
|
8613
|
-
message.harshBreak = (_k = object.harshBreak) !== null && _k !== void 0 ? _k : 0;
|
|
8614
|
-
message.harshCorner = (_l = object.harshCorner) !== null && _l !== void 0 ? _l : 0;
|
|
8615
|
-
message.minTemp01 = (_m = object.minTemp01) !== null && _m !== void 0 ? _m : undefined;
|
|
8616
|
-
message.maxTemp01 = (_o = object.maxTemp01) !== null && _o !== void 0 ? _o : undefined;
|
|
8617
|
-
message.minTemp02 = (_p = object.minTemp02) !== null && _p !== void 0 ? _p : undefined;
|
|
8618
|
-
message.maxTemp02 = (_q = object.maxTemp02) !== null && _q !== void 0 ? _q : undefined;
|
|
8619
|
-
message.minTemp03 = (_r = object.minTemp03) !== null && _r !== void 0 ? _r : undefined;
|
|
8620
|
-
message.maxTemp03 = (_s = object.maxTemp03) !== null && _s !== void 0 ? _s : undefined;
|
|
8621
|
-
message.minTemp04 = (_t = object.minTemp04) !== null && _t !== void 0 ? _t : undefined;
|
|
8622
|
-
message.maxTemp04 = (_u = object.maxTemp04) !== null && _u !== void 0 ? _u : undefined;
|
|
8623
|
-
message.minHumidity = (_v = object.minHumidity) !== null && _v !== void 0 ? _v : undefined;
|
|
8624
|
-
message.maxHumidity = (_w = object.maxHumidity) !== null && _w !== void 0 ? _w : undefined;
|
|
8625
|
-
message.startLat = (_x = object.startLat) !== null && _x !== void 0 ? _x : undefined;
|
|
8626
|
-
message.startLng = (_y = object.startLng) !== null && _y !== void 0 ? _y : undefined;
|
|
8627
|
-
message.finishLat = (_z = object.finishLat) !== null && _z !== void 0 ? _z : undefined;
|
|
8628
|
-
message.finishLng = (_0 = object.finishLng) !== null && _0 !== void 0 ? _0 : undefined;
|
|
8629
|
-
message.startedAt = (_1 = object.startedAt) !== null && _1 !== void 0 ? _1 : undefined;
|
|
8630
|
-
message.finishedAt = (_2 = object.finishedAt) !== null && _2 !== void 0 ? _2 : undefined;
|
|
8631
|
-
message.createdAt = (_3 = object.createdAt) !== null && _3 !== void 0 ? _3 : undefined;
|
|
8632
|
-
message.updatedAt = (_4 = object.updatedAt) !== null && _4 !== void 0 ? _4 : undefined;
|
|
8633
|
-
return message;
|
|
8634
|
-
},
|
|
8635
|
-
};
|
|
8636
|
-
function createBaseShiftSummaryRequest() {
|
|
8637
|
-
return { startedAt: undefined, finishedAt: undefined, deviceIds: [] };
|
|
8638
|
-
}
|
|
8639
|
-
exports.ShiftSummaryRequest = {
|
|
8640
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8641
|
-
if (message.startedAt !== undefined) {
|
|
8642
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(10).fork()).join();
|
|
8643
|
-
}
|
|
8644
|
-
if (message.finishedAt !== undefined) {
|
|
8645
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(18).fork()).join();
|
|
8646
|
-
}
|
|
8647
|
-
writer.uint32(26).fork();
|
|
8648
|
-
for (const v of message.deviceIds) {
|
|
8649
|
-
writer.uint64(v.toString());
|
|
8650
|
-
}
|
|
8651
|
-
writer.join();
|
|
8652
|
-
return writer;
|
|
8653
|
-
},
|
|
8654
|
-
decode(input, length) {
|
|
8655
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8656
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8657
|
-
const message = createBaseShiftSummaryRequest();
|
|
8658
|
-
while (reader.pos < end) {
|
|
8659
|
-
const tag = reader.uint32();
|
|
8660
|
-
switch (tag >>> 3) {
|
|
8661
|
-
case 1: {
|
|
8662
|
-
if (tag !== 10) {
|
|
8663
|
-
break;
|
|
8664
|
-
}
|
|
8665
|
-
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
8666
|
-
continue;
|
|
8667
|
-
}
|
|
8668
|
-
case 2: {
|
|
8669
|
-
if (tag !== 18) {
|
|
8670
|
-
break;
|
|
8671
|
-
}
|
|
8672
|
-
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
8673
|
-
continue;
|
|
8674
|
-
}
|
|
8675
|
-
case 3: {
|
|
8676
|
-
if (tag === 24) {
|
|
8677
|
-
message.deviceIds.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
8678
|
-
continue;
|
|
8679
|
-
}
|
|
8680
|
-
if (tag === 26) {
|
|
8681
|
-
const end2 = reader.uint32() + reader.pos;
|
|
8682
|
-
while (reader.pos < end2) {
|
|
8683
|
-
message.deviceIds.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
8684
|
-
}
|
|
8685
|
-
continue;
|
|
8686
|
-
}
|
|
8687
|
-
break;
|
|
8688
|
-
}
|
|
8689
|
-
}
|
|
8690
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
8691
|
-
break;
|
|
8692
|
-
}
|
|
8693
|
-
reader.skip(tag & 7);
|
|
8694
|
-
}
|
|
8695
|
-
return message;
|
|
8696
|
-
},
|
|
8697
|
-
fromJSON(object) {
|
|
8698
|
-
return {
|
|
8699
|
-
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
8700
|
-
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
8701
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.deviceIds) ? object.deviceIds.map((e) => long_1.default.fromValue(e)) : [],
|
|
8702
|
-
};
|
|
8703
|
-
},
|
|
8704
|
-
toJSON(message) {
|
|
8705
|
-
var _a;
|
|
8706
|
-
const obj = {};
|
|
8707
|
-
if (message.startedAt !== undefined) {
|
|
8708
|
-
obj.startedAt = message.startedAt.toISOString();
|
|
8709
|
-
}
|
|
8710
|
-
if (message.finishedAt !== undefined) {
|
|
8711
|
-
obj.finishedAt = message.finishedAt.toISOString();
|
|
8712
|
-
}
|
|
8713
|
-
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
8714
|
-
obj.deviceIds = message.deviceIds.map((e) => (e || long_1.default.UZERO).toString());
|
|
8715
|
-
}
|
|
8716
|
-
return obj;
|
|
8717
|
-
},
|
|
8718
|
-
create(base) {
|
|
8719
|
-
return exports.ShiftSummaryRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
8720
|
-
},
|
|
8721
|
-
fromPartial(object) {
|
|
8722
|
-
var _a, _b, _c;
|
|
8723
|
-
const message = createBaseShiftSummaryRequest();
|
|
8724
|
-
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
8725
|
-
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
8726
|
-
message.deviceIds = ((_c = object.deviceIds) === null || _c === void 0 ? void 0 : _c.map((e) => long_1.default.fromValue(e))) || [];
|
|
7340
|
+
: long_1.default.UZERO;
|
|
7341
|
+
message.mileage = (_a = object.mileage) !== null && _a !== void 0 ? _a : 0;
|
|
7342
|
+
message.idling = (_b = object.idling) !== null && _b !== void 0 ? _b : 0;
|
|
7343
|
+
message.parking = (_c = object.parking) !== null && _c !== void 0 ? _c : 0;
|
|
7344
|
+
message.moving = (_d = object.moving) !== null && _d !== void 0 ? _d : 0;
|
|
7345
|
+
message.towing = (_e = object.towing) !== null && _e !== void 0 ? _e : 0;
|
|
7346
|
+
message.speedTotal = (_f = object.speedTotal) !== null && _f !== void 0 ? _f : 0;
|
|
7347
|
+
message.speedSum = (_g = object.speedSum) !== null && _g !== void 0 ? _g : 0;
|
|
7348
|
+
message.speedMax = (_h = object.speedMax) !== null && _h !== void 0 ? _h : 0;
|
|
7349
|
+
message.records = (object.records !== undefined && object.records !== null)
|
|
7350
|
+
? long_1.default.fromValue(object.records)
|
|
7351
|
+
: long_1.default.UZERO;
|
|
7352
|
+
message.harshAcceleration = (_j = object.harshAcceleration) !== null && _j !== void 0 ? _j : 0;
|
|
7353
|
+
message.harshBreak = (_k = object.harshBreak) !== null && _k !== void 0 ? _k : 0;
|
|
7354
|
+
message.harshCorner = (_l = object.harshCorner) !== null && _l !== void 0 ? _l : 0;
|
|
7355
|
+
message.minTemp01 = (_m = object.minTemp01) !== null && _m !== void 0 ? _m : undefined;
|
|
7356
|
+
message.maxTemp01 = (_o = object.maxTemp01) !== null && _o !== void 0 ? _o : undefined;
|
|
7357
|
+
message.minTemp02 = (_p = object.minTemp02) !== null && _p !== void 0 ? _p : undefined;
|
|
7358
|
+
message.maxTemp02 = (_q = object.maxTemp02) !== null && _q !== void 0 ? _q : undefined;
|
|
7359
|
+
message.minTemp03 = (_r = object.minTemp03) !== null && _r !== void 0 ? _r : undefined;
|
|
7360
|
+
message.maxTemp03 = (_s = object.maxTemp03) !== null && _s !== void 0 ? _s : undefined;
|
|
7361
|
+
message.minTemp04 = (_t = object.minTemp04) !== null && _t !== void 0 ? _t : undefined;
|
|
7362
|
+
message.maxTemp04 = (_u = object.maxTemp04) !== null && _u !== void 0 ? _u : undefined;
|
|
7363
|
+
message.minHumidity = (_v = object.minHumidity) !== null && _v !== void 0 ? _v : undefined;
|
|
7364
|
+
message.maxHumidity = (_w = object.maxHumidity) !== null && _w !== void 0 ? _w : undefined;
|
|
7365
|
+
message.startLat = (_x = object.startLat) !== null && _x !== void 0 ? _x : undefined;
|
|
7366
|
+
message.startLng = (_y = object.startLng) !== null && _y !== void 0 ? _y : undefined;
|
|
7367
|
+
message.finishLat = (_z = object.finishLat) !== null && _z !== void 0 ? _z : undefined;
|
|
7368
|
+
message.finishLng = (_0 = object.finishLng) !== null && _0 !== void 0 ? _0 : undefined;
|
|
7369
|
+
message.startedAt = (_1 = object.startedAt) !== null && _1 !== void 0 ? _1 : undefined;
|
|
7370
|
+
message.finishedAt = (_2 = object.finishedAt) !== null && _2 !== void 0 ? _2 : undefined;
|
|
7371
|
+
message.createdAt = (_3 = object.createdAt) !== null && _3 !== void 0 ? _3 : undefined;
|
|
7372
|
+
message.updatedAt = (_4 = object.updatedAt) !== null && _4 !== void 0 ? _4 : undefined;
|
|
8727
7373
|
return message;
|
|
8728
7374
|
},
|
|
8729
7375
|
};
|
|
8730
|
-
function
|
|
7376
|
+
function createBaseShiftSummaryRequest() {
|
|
8731
7377
|
return { startedAt: undefined, finishedAt: undefined, deviceIds: [] };
|
|
8732
7378
|
}
|
|
8733
|
-
exports.
|
|
7379
|
+
exports.ShiftSummaryRequest = {
|
|
8734
7380
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8735
7381
|
if (message.startedAt !== undefined) {
|
|
8736
7382
|
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(10).fork()).join();
|
|
@@ -8748,7 +7394,7 @@ exports.DeviceDataCountRequest = {
|
|
|
8748
7394
|
decode(input, length) {
|
|
8749
7395
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8750
7396
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8751
|
-
const message =
|
|
7397
|
+
const message = createBaseShiftSummaryRequest();
|
|
8752
7398
|
while (reader.pos < end) {
|
|
8753
7399
|
const tag = reader.uint32();
|
|
8754
7400
|
switch (tag >>> 3) {
|
|
@@ -8810,144 +7456,17 @@ exports.DeviceDataCountRequest = {
|
|
|
8810
7456
|
return obj;
|
|
8811
7457
|
},
|
|
8812
7458
|
create(base) {
|
|
8813
|
-
return exports.
|
|
7459
|
+
return exports.ShiftSummaryRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
8814
7460
|
},
|
|
8815
7461
|
fromPartial(object) {
|
|
8816
7462
|
var _a, _b, _c;
|
|
8817
|
-
const message =
|
|
7463
|
+
const message = createBaseShiftSummaryRequest();
|
|
8818
7464
|
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
8819
7465
|
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
8820
7466
|
message.deviceIds = ((_c = object.deviceIds) === null || _c === void 0 ? void 0 : _c.map((e) => long_1.default.fromValue(e))) || [];
|
|
8821
7467
|
return message;
|
|
8822
7468
|
},
|
|
8823
7469
|
};
|
|
8824
|
-
function createBaseDeviceDataCountResponse() {
|
|
8825
|
-
return { Reports: [] };
|
|
8826
|
-
}
|
|
8827
|
-
exports.DeviceDataCountResponse = {
|
|
8828
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8829
|
-
for (const v of message.Reports) {
|
|
8830
|
-
exports.DeviceDataCountResponse_DeviceDataCount.encode(v, writer.uint32(10).fork()).join();
|
|
8831
|
-
}
|
|
8832
|
-
return writer;
|
|
8833
|
-
},
|
|
8834
|
-
decode(input, length) {
|
|
8835
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8836
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8837
|
-
const message = createBaseDeviceDataCountResponse();
|
|
8838
|
-
while (reader.pos < end) {
|
|
8839
|
-
const tag = reader.uint32();
|
|
8840
|
-
switch (tag >>> 3) {
|
|
8841
|
-
case 1: {
|
|
8842
|
-
if (tag !== 10) {
|
|
8843
|
-
break;
|
|
8844
|
-
}
|
|
8845
|
-
message.Reports.push(exports.DeviceDataCountResponse_DeviceDataCount.decode(reader, reader.uint32()));
|
|
8846
|
-
continue;
|
|
8847
|
-
}
|
|
8848
|
-
}
|
|
8849
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
8850
|
-
break;
|
|
8851
|
-
}
|
|
8852
|
-
reader.skip(tag & 7);
|
|
8853
|
-
}
|
|
8854
|
-
return message;
|
|
8855
|
-
},
|
|
8856
|
-
fromJSON(object) {
|
|
8857
|
-
return {
|
|
8858
|
-
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.Reports)
|
|
8859
|
-
? object.Reports.map((e) => exports.DeviceDataCountResponse_DeviceDataCount.fromJSON(e))
|
|
8860
|
-
: [],
|
|
8861
|
-
};
|
|
8862
|
-
},
|
|
8863
|
-
toJSON(message) {
|
|
8864
|
-
var _a;
|
|
8865
|
-
const obj = {};
|
|
8866
|
-
if ((_a = message.Reports) === null || _a === void 0 ? void 0 : _a.length) {
|
|
8867
|
-
obj.Reports = message.Reports.map((e) => exports.DeviceDataCountResponse_DeviceDataCount.toJSON(e));
|
|
8868
|
-
}
|
|
8869
|
-
return obj;
|
|
8870
|
-
},
|
|
8871
|
-
create(base) {
|
|
8872
|
-
return exports.DeviceDataCountResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
8873
|
-
},
|
|
8874
|
-
fromPartial(object) {
|
|
8875
|
-
var _a;
|
|
8876
|
-
const message = createBaseDeviceDataCountResponse();
|
|
8877
|
-
message.Reports = ((_a = object.Reports) === null || _a === void 0 ? void 0 : _a.map((e) => exports.DeviceDataCountResponse_DeviceDataCount.fromPartial(e))) || [];
|
|
8878
|
-
return message;
|
|
8879
|
-
},
|
|
8880
|
-
};
|
|
8881
|
-
function createBaseDeviceDataCountResponse_DeviceDataCount() {
|
|
8882
|
-
return { deviceId: long_1.default.UZERO, count: long_1.default.UZERO };
|
|
8883
|
-
}
|
|
8884
|
-
exports.DeviceDataCountResponse_DeviceDataCount = {
|
|
8885
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8886
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
8887
|
-
writer.uint32(8).uint64(message.deviceId.toString());
|
|
8888
|
-
}
|
|
8889
|
-
if (!message.count.equals(long_1.default.UZERO)) {
|
|
8890
|
-
writer.uint32(16).uint64(message.count.toString());
|
|
8891
|
-
}
|
|
8892
|
-
return writer;
|
|
8893
|
-
},
|
|
8894
|
-
decode(input, length) {
|
|
8895
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8896
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8897
|
-
const message = createBaseDeviceDataCountResponse_DeviceDataCount();
|
|
8898
|
-
while (reader.pos < end) {
|
|
8899
|
-
const tag = reader.uint32();
|
|
8900
|
-
switch (tag >>> 3) {
|
|
8901
|
-
case 1: {
|
|
8902
|
-
if (tag !== 8) {
|
|
8903
|
-
break;
|
|
8904
|
-
}
|
|
8905
|
-
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
8906
|
-
continue;
|
|
8907
|
-
}
|
|
8908
|
-
case 2: {
|
|
8909
|
-
if (tag !== 16) {
|
|
8910
|
-
break;
|
|
8911
|
-
}
|
|
8912
|
-
message.count = long_1.default.fromString(reader.uint64().toString(), true);
|
|
8913
|
-
continue;
|
|
8914
|
-
}
|
|
8915
|
-
}
|
|
8916
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
8917
|
-
break;
|
|
8918
|
-
}
|
|
8919
|
-
reader.skip(tag & 7);
|
|
8920
|
-
}
|
|
8921
|
-
return message;
|
|
8922
|
-
},
|
|
8923
|
-
fromJSON(object) {
|
|
8924
|
-
return {
|
|
8925
|
-
deviceId: isSet(object.deviceId) ? long_1.default.fromValue(object.deviceId) : long_1.default.UZERO,
|
|
8926
|
-
count: isSet(object.count) ? long_1.default.fromValue(object.count) : long_1.default.UZERO,
|
|
8927
|
-
};
|
|
8928
|
-
},
|
|
8929
|
-
toJSON(message) {
|
|
8930
|
-
const obj = {};
|
|
8931
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
8932
|
-
obj.deviceId = (message.deviceId || long_1.default.UZERO).toString();
|
|
8933
|
-
}
|
|
8934
|
-
if (!message.count.equals(long_1.default.UZERO)) {
|
|
8935
|
-
obj.count = (message.count || long_1.default.UZERO).toString();
|
|
8936
|
-
}
|
|
8937
|
-
return obj;
|
|
8938
|
-
},
|
|
8939
|
-
create(base) {
|
|
8940
|
-
return exports.DeviceDataCountResponse_DeviceDataCount.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
8941
|
-
},
|
|
8942
|
-
fromPartial(object) {
|
|
8943
|
-
const message = createBaseDeviceDataCountResponse_DeviceDataCount();
|
|
8944
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
8945
|
-
? long_1.default.fromValue(object.deviceId)
|
|
8946
|
-
: long_1.default.UZERO;
|
|
8947
|
-
message.count = (object.count !== undefined && object.count !== null) ? long_1.default.fromValue(object.count) : long_1.default.UZERO;
|
|
8948
|
-
return message;
|
|
8949
|
-
},
|
|
8950
|
-
};
|
|
8951
7470
|
function createBaseDailyTrafficResponse() {
|
|
8952
7471
|
return { Reports: [] };
|
|
8953
7472
|
}
|
|
@@ -9457,146 +7976,36 @@ exports.RouteStopResponse = {
|
|
|
9457
7976
|
decode(input, length) {
|
|
9458
7977
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
9459
7978
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9460
|
-
const message = createBaseRouteStopResponse();
|
|
9461
|
-
while (reader.pos < end) {
|
|
9462
|
-
const tag = reader.uint32();
|
|
9463
|
-
switch (tag >>> 3) {
|
|
9464
|
-
case 2: {
|
|
9465
|
-
if (tag !== 18) {
|
|
9466
|
-
break;
|
|
9467
|
-
}
|
|
9468
|
-
message.list.push(exports.RouteStopPoint.decode(reader, reader.uint32()));
|
|
9469
|
-
continue;
|
|
9470
|
-
}
|
|
9471
|
-
case 4: {
|
|
9472
|
-
if (tag !== 32) {
|
|
9473
|
-
break;
|
|
9474
|
-
}
|
|
9475
|
-
message.records = reader.uint32();
|
|
9476
|
-
continue;
|
|
9477
|
-
}
|
|
9478
|
-
case 5: {
|
|
9479
|
-
if (tag !== 40) {
|
|
9480
|
-
break;
|
|
9481
|
-
}
|
|
9482
|
-
message.cost = reader.uint32();
|
|
9483
|
-
continue;
|
|
9484
|
-
}
|
|
9485
|
-
case 6: {
|
|
9486
|
-
if (tag !== 48) {
|
|
9487
|
-
break;
|
|
9488
|
-
}
|
|
9489
|
-
message.threads = reader.uint32();
|
|
9490
|
-
continue;
|
|
9491
|
-
}
|
|
9492
|
-
}
|
|
9493
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
9494
|
-
break;
|
|
9495
|
-
}
|
|
9496
|
-
reader.skip(tag & 7);
|
|
9497
|
-
}
|
|
9498
|
-
return message;
|
|
9499
|
-
},
|
|
9500
|
-
fromJSON(object) {
|
|
9501
|
-
return {
|
|
9502
|
-
list: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.list) ? object.list.map((e) => exports.RouteStopPoint.fromJSON(e)) : [],
|
|
9503
|
-
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
9504
|
-
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
9505
|
-
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
9506
|
-
};
|
|
9507
|
-
},
|
|
9508
|
-
toJSON(message) {
|
|
9509
|
-
var _a;
|
|
9510
|
-
const obj = {};
|
|
9511
|
-
if ((_a = message.list) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9512
|
-
obj.list = message.list.map((e) => exports.RouteStopPoint.toJSON(e));
|
|
9513
|
-
}
|
|
9514
|
-
if (message.records !== 0) {
|
|
9515
|
-
obj.records = Math.round(message.records);
|
|
9516
|
-
}
|
|
9517
|
-
if (message.cost !== 0) {
|
|
9518
|
-
obj.cost = Math.round(message.cost);
|
|
9519
|
-
}
|
|
9520
|
-
if (message.threads !== 0) {
|
|
9521
|
-
obj.threads = Math.round(message.threads);
|
|
9522
|
-
}
|
|
9523
|
-
return obj;
|
|
9524
|
-
},
|
|
9525
|
-
create(base) {
|
|
9526
|
-
return exports.RouteStopResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
9527
|
-
},
|
|
9528
|
-
fromPartial(object) {
|
|
9529
|
-
var _a, _b, _c, _d;
|
|
9530
|
-
const message = createBaseRouteStopResponse();
|
|
9531
|
-
message.list = ((_a = object.list) === null || _a === void 0 ? void 0 : _a.map((e) => exports.RouteStopPoint.fromPartial(e))) || [];
|
|
9532
|
-
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
9533
|
-
message.cost = (_c = object.cost) !== null && _c !== void 0 ? _c : 0;
|
|
9534
|
-
message.threads = (_d = object.threads) !== null && _d !== void 0 ? _d : 0;
|
|
9535
|
-
return message;
|
|
9536
|
-
},
|
|
9537
|
-
};
|
|
9538
|
-
function createBaseRouteStopRequest() {
|
|
9539
|
-
return { startedAt: undefined, finishedAt: undefined, source: 0, stopType: 0, deviceId: long_1.default.UZERO };
|
|
9540
|
-
}
|
|
9541
|
-
exports.RouteStopRequest = {
|
|
9542
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
9543
|
-
if (message.startedAt !== undefined) {
|
|
9544
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(10).fork()).join();
|
|
9545
|
-
}
|
|
9546
|
-
if (message.finishedAt !== undefined) {
|
|
9547
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(18).fork()).join();
|
|
9548
|
-
}
|
|
9549
|
-
if (message.source !== 0) {
|
|
9550
|
-
writer.uint32(24).int32(message.source);
|
|
9551
|
-
}
|
|
9552
|
-
if (message.stopType !== 0) {
|
|
9553
|
-
writer.uint32(32).int32(message.stopType);
|
|
9554
|
-
}
|
|
9555
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
9556
|
-
writer.uint32(40).uint64(message.deviceId.toString());
|
|
9557
|
-
}
|
|
9558
|
-
return writer;
|
|
9559
|
-
},
|
|
9560
|
-
decode(input, length) {
|
|
9561
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
9562
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9563
|
-
const message = createBaseRouteStopRequest();
|
|
9564
|
-
while (reader.pos < end) {
|
|
9565
|
-
const tag = reader.uint32();
|
|
9566
|
-
switch (tag >>> 3) {
|
|
9567
|
-
case 1: {
|
|
9568
|
-
if (tag !== 10) {
|
|
9569
|
-
break;
|
|
9570
|
-
}
|
|
9571
|
-
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
9572
|
-
continue;
|
|
9573
|
-
}
|
|
7979
|
+
const message = createBaseRouteStopResponse();
|
|
7980
|
+
while (reader.pos < end) {
|
|
7981
|
+
const tag = reader.uint32();
|
|
7982
|
+
switch (tag >>> 3) {
|
|
9574
7983
|
case 2: {
|
|
9575
7984
|
if (tag !== 18) {
|
|
9576
7985
|
break;
|
|
9577
7986
|
}
|
|
9578
|
-
message.
|
|
9579
|
-
continue;
|
|
9580
|
-
}
|
|
9581
|
-
case 3: {
|
|
9582
|
-
if (tag !== 24) {
|
|
9583
|
-
break;
|
|
9584
|
-
}
|
|
9585
|
-
message.source = reader.int32();
|
|
7987
|
+
message.list.push(exports.RouteStopPoint.decode(reader, reader.uint32()));
|
|
9586
7988
|
continue;
|
|
9587
7989
|
}
|
|
9588
7990
|
case 4: {
|
|
9589
7991
|
if (tag !== 32) {
|
|
9590
7992
|
break;
|
|
9591
7993
|
}
|
|
9592
|
-
message.
|
|
7994
|
+
message.records = reader.uint32();
|
|
9593
7995
|
continue;
|
|
9594
7996
|
}
|
|
9595
7997
|
case 5: {
|
|
9596
7998
|
if (tag !== 40) {
|
|
9597
7999
|
break;
|
|
9598
8000
|
}
|
|
9599
|
-
message.
|
|
8001
|
+
message.cost = reader.uint32();
|
|
8002
|
+
continue;
|
|
8003
|
+
}
|
|
8004
|
+
case 6: {
|
|
8005
|
+
if (tag !== 48) {
|
|
8006
|
+
break;
|
|
8007
|
+
}
|
|
8008
|
+
message.threads = reader.uint32();
|
|
9600
8009
|
continue;
|
|
9601
8010
|
}
|
|
9602
8011
|
}
|
|
@@ -9609,59 +8018,46 @@ exports.RouteStopRequest = {
|
|
|
9609
8018
|
},
|
|
9610
8019
|
fromJSON(object) {
|
|
9611
8020
|
return {
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
8021
|
+
list: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.list) ? object.list.map((e) => exports.RouteStopPoint.fromJSON(e)) : [],
|
|
8022
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
8023
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
8024
|
+
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
9617
8025
|
};
|
|
9618
8026
|
},
|
|
9619
8027
|
toJSON(message) {
|
|
8028
|
+
var _a;
|
|
9620
8029
|
const obj = {};
|
|
9621
|
-
if (message.
|
|
9622
|
-
obj.
|
|
9623
|
-
}
|
|
9624
|
-
if (message.finishedAt !== undefined) {
|
|
9625
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
8030
|
+
if ((_a = message.list) === null || _a === void 0 ? void 0 : _a.length) {
|
|
8031
|
+
obj.list = message.list.map((e) => exports.RouteStopPoint.toJSON(e));
|
|
9626
8032
|
}
|
|
9627
|
-
if (message.
|
|
9628
|
-
obj.
|
|
8033
|
+
if (message.records !== 0) {
|
|
8034
|
+
obj.records = Math.round(message.records);
|
|
9629
8035
|
}
|
|
9630
|
-
if (message.
|
|
9631
|
-
obj.
|
|
8036
|
+
if (message.cost !== 0) {
|
|
8037
|
+
obj.cost = Math.round(message.cost);
|
|
9632
8038
|
}
|
|
9633
|
-
if (
|
|
9634
|
-
obj.
|
|
8039
|
+
if (message.threads !== 0) {
|
|
8040
|
+
obj.threads = Math.round(message.threads);
|
|
9635
8041
|
}
|
|
9636
8042
|
return obj;
|
|
9637
8043
|
},
|
|
9638
8044
|
create(base) {
|
|
9639
|
-
return exports.
|
|
8045
|
+
return exports.RouteStopResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
9640
8046
|
},
|
|
9641
8047
|
fromPartial(object) {
|
|
9642
8048
|
var _a, _b, _c, _d;
|
|
9643
|
-
const message =
|
|
9644
|
-
message.
|
|
9645
|
-
message.
|
|
9646
|
-
message.
|
|
9647
|
-
message.
|
|
9648
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
9649
|
-
? long_1.default.fromValue(object.deviceId)
|
|
9650
|
-
: long_1.default.UZERO;
|
|
8049
|
+
const message = createBaseRouteStopResponse();
|
|
8050
|
+
message.list = ((_a = object.list) === null || _a === void 0 ? void 0 : _a.map((e) => exports.RouteStopPoint.fromPartial(e))) || [];
|
|
8051
|
+
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
8052
|
+
message.cost = (_c = object.cost) !== null && _c !== void 0 ? _c : 0;
|
|
8053
|
+
message.threads = (_d = object.threads) !== null && _d !== void 0 ? _d : 0;
|
|
9651
8054
|
return message;
|
|
9652
8055
|
},
|
|
9653
8056
|
};
|
|
9654
|
-
function
|
|
9655
|
-
return {
|
|
9656
|
-
startedAt: undefined,
|
|
9657
|
-
finishedAt: undefined,
|
|
9658
|
-
source: 0,
|
|
9659
|
-
stopType: 0,
|
|
9660
|
-
deviceId: long_1.default.UZERO,
|
|
9661
|
-
includeTrip: false,
|
|
9662
|
-
};
|
|
8057
|
+
function createBaseRouteStopRequest() {
|
|
8058
|
+
return { startedAt: undefined, finishedAt: undefined, source: 0, stopType: 0, deviceId: long_1.default.UZERO };
|
|
9663
8059
|
}
|
|
9664
|
-
exports.
|
|
8060
|
+
exports.RouteStopRequest = {
|
|
9665
8061
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
9666
8062
|
if (message.startedAt !== undefined) {
|
|
9667
8063
|
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(10).fork()).join();
|
|
@@ -9678,15 +8074,12 @@ exports.RouteReviewRequest = {
|
|
|
9678
8074
|
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
9679
8075
|
writer.uint32(40).uint64(message.deviceId.toString());
|
|
9680
8076
|
}
|
|
9681
|
-
if (message.includeTrip !== false) {
|
|
9682
|
-
writer.uint32(48).bool(message.includeTrip);
|
|
9683
|
-
}
|
|
9684
8077
|
return writer;
|
|
9685
8078
|
},
|
|
9686
8079
|
decode(input, length) {
|
|
9687
8080
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
9688
8081
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9689
|
-
const message =
|
|
8082
|
+
const message = createBaseRouteStopRequest();
|
|
9690
8083
|
while (reader.pos < end) {
|
|
9691
8084
|
const tag = reader.uint32();
|
|
9692
8085
|
switch (tag >>> 3) {
|
|
@@ -9725,13 +8118,6 @@ exports.RouteReviewRequest = {
|
|
|
9725
8118
|
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
9726
8119
|
continue;
|
|
9727
8120
|
}
|
|
9728
|
-
case 6: {
|
|
9729
|
-
if (tag !== 48) {
|
|
9730
|
-
break;
|
|
9731
|
-
}
|
|
9732
|
-
message.includeTrip = reader.bool();
|
|
9733
|
-
continue;
|
|
9734
|
-
}
|
|
9735
8121
|
}
|
|
9736
8122
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9737
8123
|
break;
|
|
@@ -9747,7 +8133,6 @@ exports.RouteReviewRequest = {
|
|
|
9747
8133
|
source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
|
|
9748
8134
|
stopType: isSet(object.stop_type) ? stopCalculateIoFromJSON(object.stop_type) : 0,
|
|
9749
8135
|
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
9750
|
-
includeTrip: isSet(object.include_trip) ? globalThis.Boolean(object.include_trip) : false,
|
|
9751
8136
|
};
|
|
9752
8137
|
},
|
|
9753
8138
|
toJSON(message) {
|
|
@@ -9767,17 +8152,14 @@ exports.RouteReviewRequest = {
|
|
|
9767
8152
|
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
9768
8153
|
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
9769
8154
|
}
|
|
9770
|
-
if (message.includeTrip !== false) {
|
|
9771
|
-
obj.include_trip = message.includeTrip;
|
|
9772
|
-
}
|
|
9773
8155
|
return obj;
|
|
9774
8156
|
},
|
|
9775
8157
|
create(base) {
|
|
9776
|
-
return exports.
|
|
8158
|
+
return exports.RouteStopRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
9777
8159
|
},
|
|
9778
8160
|
fromPartial(object) {
|
|
9779
|
-
var _a, _b, _c, _d
|
|
9780
|
-
const message =
|
|
8161
|
+
var _a, _b, _c, _d;
|
|
8162
|
+
const message = createBaseRouteStopRequest();
|
|
9781
8163
|
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
9782
8164
|
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
9783
8165
|
message.source = (_c = object.source) !== null && _c !== void 0 ? _c : 0;
|
|
@@ -9785,148 +8167,20 @@ exports.RouteReviewRequest = {
|
|
|
9785
8167
|
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
9786
8168
|
? long_1.default.fromValue(object.deviceId)
|
|
9787
8169
|
: long_1.default.UZERO;
|
|
9788
|
-
message.includeTrip = (_e = object.includeTrip) !== null && _e !== void 0 ? _e : false;
|
|
9789
|
-
return message;
|
|
9790
|
-
},
|
|
9791
|
-
};
|
|
9792
|
-
function createBaseRouteReviewResponse() {
|
|
9793
|
-
return { routeList: [], stopList: [], tripList: [], records: 0, cost: 0, threads: 0 };
|
|
9794
|
-
}
|
|
9795
|
-
exports.RouteReviewResponse = {
|
|
9796
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
9797
|
-
for (const v of message.routeList) {
|
|
9798
|
-
dataModel_1.Data.encode(v, writer.uint32(10).fork()).join();
|
|
9799
|
-
}
|
|
9800
|
-
for (const v of message.stopList) {
|
|
9801
|
-
exports.RouteStopPoint.encode(v, writer.uint32(18).fork()).join();
|
|
9802
|
-
}
|
|
9803
|
-
for (const v of message.tripList) {
|
|
9804
|
-
trip_1.Trip.encode(v, writer.uint32(26).fork()).join();
|
|
9805
|
-
}
|
|
9806
|
-
if (message.records !== 0) {
|
|
9807
|
-
writer.uint32(32).uint32(message.records);
|
|
9808
|
-
}
|
|
9809
|
-
if (message.cost !== 0) {
|
|
9810
|
-
writer.uint32(40).uint32(message.cost);
|
|
9811
|
-
}
|
|
9812
|
-
if (message.threads !== 0) {
|
|
9813
|
-
writer.uint32(48).uint32(message.threads);
|
|
9814
|
-
}
|
|
9815
|
-
return writer;
|
|
9816
|
-
},
|
|
9817
|
-
decode(input, length) {
|
|
9818
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
9819
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9820
|
-
const message = createBaseRouteReviewResponse();
|
|
9821
|
-
while (reader.pos < end) {
|
|
9822
|
-
const tag = reader.uint32();
|
|
9823
|
-
switch (tag >>> 3) {
|
|
9824
|
-
case 1: {
|
|
9825
|
-
if (tag !== 10) {
|
|
9826
|
-
break;
|
|
9827
|
-
}
|
|
9828
|
-
message.routeList.push(dataModel_1.Data.decode(reader, reader.uint32()));
|
|
9829
|
-
continue;
|
|
9830
|
-
}
|
|
9831
|
-
case 2: {
|
|
9832
|
-
if (tag !== 18) {
|
|
9833
|
-
break;
|
|
9834
|
-
}
|
|
9835
|
-
message.stopList.push(exports.RouteStopPoint.decode(reader, reader.uint32()));
|
|
9836
|
-
continue;
|
|
9837
|
-
}
|
|
9838
|
-
case 3: {
|
|
9839
|
-
if (tag !== 26) {
|
|
9840
|
-
break;
|
|
9841
|
-
}
|
|
9842
|
-
message.tripList.push(trip_1.Trip.decode(reader, reader.uint32()));
|
|
9843
|
-
continue;
|
|
9844
|
-
}
|
|
9845
|
-
case 4: {
|
|
9846
|
-
if (tag !== 32) {
|
|
9847
|
-
break;
|
|
9848
|
-
}
|
|
9849
|
-
message.records = reader.uint32();
|
|
9850
|
-
continue;
|
|
9851
|
-
}
|
|
9852
|
-
case 5: {
|
|
9853
|
-
if (tag !== 40) {
|
|
9854
|
-
break;
|
|
9855
|
-
}
|
|
9856
|
-
message.cost = reader.uint32();
|
|
9857
|
-
continue;
|
|
9858
|
-
}
|
|
9859
|
-
case 6: {
|
|
9860
|
-
if (tag !== 48) {
|
|
9861
|
-
break;
|
|
9862
|
-
}
|
|
9863
|
-
message.threads = reader.uint32();
|
|
9864
|
-
continue;
|
|
9865
|
-
}
|
|
9866
|
-
}
|
|
9867
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
9868
|
-
break;
|
|
9869
|
-
}
|
|
9870
|
-
reader.skip(tag & 7);
|
|
9871
|
-
}
|
|
9872
|
-
return message;
|
|
9873
|
-
},
|
|
9874
|
-
fromJSON(object) {
|
|
9875
|
-
return {
|
|
9876
|
-
routeList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.route_list)
|
|
9877
|
-
? object.route_list.map((e) => dataModel_1.Data.fromJSON(e))
|
|
9878
|
-
: [],
|
|
9879
|
-
stopList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.stop_list)
|
|
9880
|
-
? object.stop_list.map((e) => exports.RouteStopPoint.fromJSON(e))
|
|
9881
|
-
: [],
|
|
9882
|
-
tripList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.trip_list) ? object.trip_list.map((e) => trip_1.Trip.fromJSON(e)) : [],
|
|
9883
|
-
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
9884
|
-
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
9885
|
-
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
9886
|
-
};
|
|
9887
|
-
},
|
|
9888
|
-
toJSON(message) {
|
|
9889
|
-
var _a, _b, _c;
|
|
9890
|
-
const obj = {};
|
|
9891
|
-
if ((_a = message.routeList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9892
|
-
obj.route_list = message.routeList.map((e) => dataModel_1.Data.toJSON(e));
|
|
9893
|
-
}
|
|
9894
|
-
if ((_b = message.stopList) === null || _b === void 0 ? void 0 : _b.length) {
|
|
9895
|
-
obj.stop_list = message.stopList.map((e) => exports.RouteStopPoint.toJSON(e));
|
|
9896
|
-
}
|
|
9897
|
-
if ((_c = message.tripList) === null || _c === void 0 ? void 0 : _c.length) {
|
|
9898
|
-
obj.trip_list = message.tripList.map((e) => trip_1.Trip.toJSON(e));
|
|
9899
|
-
}
|
|
9900
|
-
if (message.records !== 0) {
|
|
9901
|
-
obj.records = Math.round(message.records);
|
|
9902
|
-
}
|
|
9903
|
-
if (message.cost !== 0) {
|
|
9904
|
-
obj.cost = Math.round(message.cost);
|
|
9905
|
-
}
|
|
9906
|
-
if (message.threads !== 0) {
|
|
9907
|
-
obj.threads = Math.round(message.threads);
|
|
9908
|
-
}
|
|
9909
|
-
return obj;
|
|
9910
|
-
},
|
|
9911
|
-
create(base) {
|
|
9912
|
-
return exports.RouteReviewResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
9913
|
-
},
|
|
9914
|
-
fromPartial(object) {
|
|
9915
|
-
var _a, _b, _c, _d, _e, _f;
|
|
9916
|
-
const message = createBaseRouteReviewResponse();
|
|
9917
|
-
message.routeList = ((_a = object.routeList) === null || _a === void 0 ? void 0 : _a.map((e) => dataModel_1.Data.fromPartial(e))) || [];
|
|
9918
|
-
message.stopList = ((_b = object.stopList) === null || _b === void 0 ? void 0 : _b.map((e) => exports.RouteStopPoint.fromPartial(e))) || [];
|
|
9919
|
-
message.tripList = ((_c = object.tripList) === null || _c === void 0 ? void 0 : _c.map((e) => trip_1.Trip.fromPartial(e))) || [];
|
|
9920
|
-
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
9921
|
-
message.cost = (_e = object.cost) !== null && _e !== void 0 ? _e : 0;
|
|
9922
|
-
message.threads = (_f = object.threads) !== null && _f !== void 0 ? _f : 0;
|
|
9923
8170
|
return message;
|
|
9924
8171
|
},
|
|
9925
8172
|
};
|
|
9926
|
-
function
|
|
9927
|
-
return {
|
|
8173
|
+
function createBaseRouteReviewRequest() {
|
|
8174
|
+
return {
|
|
8175
|
+
startedAt: undefined,
|
|
8176
|
+
finishedAt: undefined,
|
|
8177
|
+
source: 0,
|
|
8178
|
+
stopType: 0,
|
|
8179
|
+
deviceId: long_1.default.UZERO,
|
|
8180
|
+
includeTrip: false,
|
|
8181
|
+
};
|
|
9928
8182
|
}
|
|
9929
|
-
exports.
|
|
8183
|
+
exports.RouteReviewRequest = {
|
|
9930
8184
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
9931
8185
|
if (message.startedAt !== undefined) {
|
|
9932
8186
|
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(10).fork()).join();
|
|
@@ -9934,25 +8188,24 @@ exports.AreaReviewRequest = {
|
|
|
9934
8188
|
if (message.finishedAt !== undefined) {
|
|
9935
8189
|
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(18).fork()).join();
|
|
9936
8190
|
}
|
|
9937
|
-
if (message.
|
|
9938
|
-
writer.uint32(24).
|
|
8191
|
+
if (message.source !== 0) {
|
|
8192
|
+
writer.uint32(24).int32(message.source);
|
|
9939
8193
|
}
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
8194
|
+
if (message.stopType !== 0) {
|
|
8195
|
+
writer.uint32(32).int32(message.stopType);
|
|
8196
|
+
}
|
|
8197
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
8198
|
+
writer.uint32(40).uint64(message.deviceId.toString());
|
|
9943
8199
|
}
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
for (const v of message.deviceIds) {
|
|
9947
|
-
writer.uint64(v.toString());
|
|
8200
|
+
if (message.includeTrip !== false) {
|
|
8201
|
+
writer.uint32(48).bool(message.includeTrip);
|
|
9948
8202
|
}
|
|
9949
|
-
writer.join();
|
|
9950
8203
|
return writer;
|
|
9951
8204
|
},
|
|
9952
8205
|
decode(input, length) {
|
|
9953
8206
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
9954
8207
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9955
|
-
const message =
|
|
8208
|
+
const message = createBaseRouteReviewRequest();
|
|
9956
8209
|
while (reader.pos < end) {
|
|
9957
8210
|
const tag = reader.uint32();
|
|
9958
8211
|
switch (tag >>> 3) {
|
|
@@ -9974,36 +8227,29 @@ exports.AreaReviewRequest = {
|
|
|
9974
8227
|
if (tag !== 24) {
|
|
9975
8228
|
break;
|
|
9976
8229
|
}
|
|
9977
|
-
message.
|
|
8230
|
+
message.source = reader.int32();
|
|
9978
8231
|
continue;
|
|
9979
8232
|
}
|
|
9980
8233
|
case 4: {
|
|
9981
|
-
if (tag
|
|
9982
|
-
|
|
9983
|
-
continue;
|
|
9984
|
-
}
|
|
9985
|
-
if (tag === 34) {
|
|
9986
|
-
const end2 = reader.uint32() + reader.pos;
|
|
9987
|
-
while (reader.pos < end2) {
|
|
9988
|
-
message.areaIds.push(long_1.default.fromString(reader.uint64().toString(), true));
|
|
9989
|
-
}
|
|
9990
|
-
continue;
|
|
8234
|
+
if (tag !== 32) {
|
|
8235
|
+
break;
|
|
9991
8236
|
}
|
|
9992
|
-
|
|
8237
|
+
message.stopType = reader.int32();
|
|
8238
|
+
continue;
|
|
9993
8239
|
}
|
|
9994
8240
|
case 5: {
|
|
9995
|
-
if (tag
|
|
9996
|
-
|
|
9997
|
-
continue;
|
|
8241
|
+
if (tag !== 40) {
|
|
8242
|
+
break;
|
|
9998
8243
|
}
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
8244
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
8245
|
+
continue;
|
|
8246
|
+
}
|
|
8247
|
+
case 6: {
|
|
8248
|
+
if (tag !== 48) {
|
|
8249
|
+
break;
|
|
10005
8250
|
}
|
|
10006
|
-
|
|
8251
|
+
message.includeTrip = reader.bool();
|
|
8252
|
+
continue;
|
|
10007
8253
|
}
|
|
10008
8254
|
}
|
|
10009
8255
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -10015,194 +8261,125 @@ exports.AreaReviewRequest = {
|
|
|
10015
8261
|
},
|
|
10016
8262
|
fromJSON(object) {
|
|
10017
8263
|
return {
|
|
10018
|
-
startedAt: isSet(object.
|
|
10019
|
-
finishedAt: isSet(object.
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
8264
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
8265
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
8266
|
+
source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
|
|
8267
|
+
stopType: isSet(object.stop_type) ? stopCalculateIoFromJSON(object.stop_type) : 0,
|
|
8268
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
8269
|
+
includeTrip: isSet(object.include_trip) ? globalThis.Boolean(object.include_trip) : false,
|
|
10023
8270
|
};
|
|
10024
8271
|
},
|
|
10025
8272
|
toJSON(message) {
|
|
10026
|
-
var _a, _b;
|
|
10027
8273
|
const obj = {};
|
|
10028
8274
|
if (message.startedAt !== undefined) {
|
|
10029
|
-
obj.
|
|
8275
|
+
obj.started_at = message.startedAt.toISOString();
|
|
10030
8276
|
}
|
|
10031
8277
|
if (message.finishedAt !== undefined) {
|
|
10032
|
-
obj.
|
|
8278
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
10033
8279
|
}
|
|
10034
|
-
if (message.
|
|
10035
|
-
obj.
|
|
8280
|
+
if (message.source !== 0) {
|
|
8281
|
+
obj.source = sourceToJSON(message.source);
|
|
10036
8282
|
}
|
|
10037
|
-
if (
|
|
10038
|
-
obj.
|
|
8283
|
+
if (message.stopType !== 0) {
|
|
8284
|
+
obj.stop_type = stopCalculateIoToJSON(message.stopType);
|
|
10039
8285
|
}
|
|
10040
|
-
if (
|
|
10041
|
-
obj.
|
|
8286
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
8287
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
8288
|
+
}
|
|
8289
|
+
if (message.includeTrip !== false) {
|
|
8290
|
+
obj.include_trip = message.includeTrip;
|
|
10042
8291
|
}
|
|
10043
8292
|
return obj;
|
|
10044
8293
|
},
|
|
10045
8294
|
create(base) {
|
|
10046
|
-
return exports.
|
|
8295
|
+
return exports.RouteReviewRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
10047
8296
|
},
|
|
10048
8297
|
fromPartial(object) {
|
|
10049
8298
|
var _a, _b, _c, _d, _e;
|
|
10050
|
-
const message =
|
|
8299
|
+
const message = createBaseRouteReviewRequest();
|
|
10051
8300
|
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
10052
8301
|
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
10053
|
-
message.
|
|
10054
|
-
message.
|
|
10055
|
-
message.
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
function createBaseAreaReviewResponse() {
|
|
10060
|
-
return { reports: [] };
|
|
10061
|
-
}
|
|
10062
|
-
exports.AreaReviewResponse = {
|
|
10063
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
10064
|
-
for (const v of message.reports) {
|
|
10065
|
-
exports.AreaReviewResponse_AreaReview.encode(v, writer.uint32(10).fork()).join();
|
|
10066
|
-
}
|
|
10067
|
-
return writer;
|
|
10068
|
-
},
|
|
10069
|
-
decode(input, length) {
|
|
10070
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
10071
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
10072
|
-
const message = createBaseAreaReviewResponse();
|
|
10073
|
-
while (reader.pos < end) {
|
|
10074
|
-
const tag = reader.uint32();
|
|
10075
|
-
switch (tag >>> 3) {
|
|
10076
|
-
case 1: {
|
|
10077
|
-
if (tag !== 10) {
|
|
10078
|
-
break;
|
|
10079
|
-
}
|
|
10080
|
-
message.reports.push(exports.AreaReviewResponse_AreaReview.decode(reader, reader.uint32()));
|
|
10081
|
-
continue;
|
|
10082
|
-
}
|
|
10083
|
-
}
|
|
10084
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
10085
|
-
break;
|
|
10086
|
-
}
|
|
10087
|
-
reader.skip(tag & 7);
|
|
10088
|
-
}
|
|
10089
|
-
return message;
|
|
10090
|
-
},
|
|
10091
|
-
fromJSON(object) {
|
|
10092
|
-
return {
|
|
10093
|
-
reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports)
|
|
10094
|
-
? object.reports.map((e) => exports.AreaReviewResponse_AreaReview.fromJSON(e))
|
|
10095
|
-
: [],
|
|
10096
|
-
};
|
|
10097
|
-
},
|
|
10098
|
-
toJSON(message) {
|
|
10099
|
-
var _a;
|
|
10100
|
-
const obj = {};
|
|
10101
|
-
if ((_a = message.reports) === null || _a === void 0 ? void 0 : _a.length) {
|
|
10102
|
-
obj.reports = message.reports.map((e) => exports.AreaReviewResponse_AreaReview.toJSON(e));
|
|
10103
|
-
}
|
|
10104
|
-
return obj;
|
|
10105
|
-
},
|
|
10106
|
-
create(base) {
|
|
10107
|
-
return exports.AreaReviewResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
10108
|
-
},
|
|
10109
|
-
fromPartial(object) {
|
|
10110
|
-
var _a;
|
|
10111
|
-
const message = createBaseAreaReviewResponse();
|
|
10112
|
-
message.reports = ((_a = object.reports) === null || _a === void 0 ? void 0 : _a.map((e) => exports.AreaReviewResponse_AreaReview.fromPartial(e))) || [];
|
|
8302
|
+
message.source = (_c = object.source) !== null && _c !== void 0 ? _c : 0;
|
|
8303
|
+
message.stopType = (_d = object.stopType) !== null && _d !== void 0 ? _d : 0;
|
|
8304
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
8305
|
+
? long_1.default.fromValue(object.deviceId)
|
|
8306
|
+
: long_1.default.UZERO;
|
|
8307
|
+
message.includeTrip = (_e = object.includeTrip) !== null && _e !== void 0 ? _e : false;
|
|
10113
8308
|
return message;
|
|
10114
8309
|
},
|
|
10115
8310
|
};
|
|
10116
|
-
function
|
|
10117
|
-
return {
|
|
10118
|
-
deviceId: long_1.default.UZERO,
|
|
10119
|
-
areaId: long_1.default.UZERO,
|
|
10120
|
-
startedAt: undefined,
|
|
10121
|
-
finishedAt: undefined,
|
|
10122
|
-
mileage: long_1.default.UZERO,
|
|
10123
|
-
duration: 0,
|
|
10124
|
-
type: 0,
|
|
10125
|
-
};
|
|
8311
|
+
function createBaseRouteReviewResponse() {
|
|
8312
|
+
return { routeList: [], stopList: [], tripList: [], records: 0, cost: 0, threads: 0 };
|
|
10126
8313
|
}
|
|
10127
|
-
exports.
|
|
8314
|
+
exports.RouteReviewResponse = {
|
|
10128
8315
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
10129
|
-
|
|
10130
|
-
writer.uint32(
|
|
10131
|
-
}
|
|
10132
|
-
if (!message.areaId.equals(long_1.default.UZERO)) {
|
|
10133
|
-
writer.uint32(16).uint64(message.areaId.toString());
|
|
8316
|
+
for (const v of message.routeList) {
|
|
8317
|
+
dataModel_1.Data.encode(v, writer.uint32(10).fork()).join();
|
|
10134
8318
|
}
|
|
10135
|
-
|
|
10136
|
-
|
|
8319
|
+
for (const v of message.stopList) {
|
|
8320
|
+
exports.RouteStopPoint.encode(v, writer.uint32(18).fork()).join();
|
|
10137
8321
|
}
|
|
10138
|
-
|
|
10139
|
-
|
|
8322
|
+
for (const v of message.tripList) {
|
|
8323
|
+
trip_1.Trip.encode(v, writer.uint32(26).fork()).join();
|
|
10140
8324
|
}
|
|
10141
|
-
if (
|
|
10142
|
-
writer.uint32(
|
|
8325
|
+
if (message.records !== 0) {
|
|
8326
|
+
writer.uint32(32).uint32(message.records);
|
|
10143
8327
|
}
|
|
10144
|
-
if (message.
|
|
10145
|
-
writer.uint32(
|
|
8328
|
+
if (message.cost !== 0) {
|
|
8329
|
+
writer.uint32(40).uint32(message.cost);
|
|
10146
8330
|
}
|
|
10147
|
-
if (message.
|
|
10148
|
-
writer.uint32(
|
|
8331
|
+
if (message.threads !== 0) {
|
|
8332
|
+
writer.uint32(48).uint32(message.threads);
|
|
10149
8333
|
}
|
|
10150
8334
|
return writer;
|
|
10151
8335
|
},
|
|
10152
8336
|
decode(input, length) {
|
|
10153
8337
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
10154
8338
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
10155
|
-
const message =
|
|
8339
|
+
const message = createBaseRouteReviewResponse();
|
|
10156
8340
|
while (reader.pos < end) {
|
|
10157
8341
|
const tag = reader.uint32();
|
|
10158
8342
|
switch (tag >>> 3) {
|
|
10159
8343
|
case 1: {
|
|
10160
|
-
if (tag !==
|
|
8344
|
+
if (tag !== 10) {
|
|
10161
8345
|
break;
|
|
10162
8346
|
}
|
|
10163
|
-
message.
|
|
8347
|
+
message.routeList.push(dataModel_1.Data.decode(reader, reader.uint32()));
|
|
10164
8348
|
continue;
|
|
10165
8349
|
}
|
|
10166
8350
|
case 2: {
|
|
10167
|
-
if (tag !==
|
|
8351
|
+
if (tag !== 18) {
|
|
10168
8352
|
break;
|
|
10169
8353
|
}
|
|
10170
|
-
message.
|
|
8354
|
+
message.stopList.push(exports.RouteStopPoint.decode(reader, reader.uint32()));
|
|
10171
8355
|
continue;
|
|
10172
8356
|
}
|
|
10173
8357
|
case 3: {
|
|
10174
8358
|
if (tag !== 26) {
|
|
10175
8359
|
break;
|
|
10176
8360
|
}
|
|
10177
|
-
message.
|
|
8361
|
+
message.tripList.push(trip_1.Trip.decode(reader, reader.uint32()));
|
|
10178
8362
|
continue;
|
|
10179
8363
|
}
|
|
10180
8364
|
case 4: {
|
|
10181
|
-
if (tag !==
|
|
8365
|
+
if (tag !== 32) {
|
|
10182
8366
|
break;
|
|
10183
8367
|
}
|
|
10184
|
-
message.
|
|
8368
|
+
message.records = reader.uint32();
|
|
10185
8369
|
continue;
|
|
10186
8370
|
}
|
|
10187
8371
|
case 5: {
|
|
10188
8372
|
if (tag !== 40) {
|
|
10189
8373
|
break;
|
|
10190
8374
|
}
|
|
10191
|
-
message.
|
|
8375
|
+
message.cost = reader.uint32();
|
|
10192
8376
|
continue;
|
|
10193
8377
|
}
|
|
10194
8378
|
case 6: {
|
|
10195
8379
|
if (tag !== 48) {
|
|
10196
8380
|
break;
|
|
10197
8381
|
}
|
|
10198
|
-
message.
|
|
10199
|
-
continue;
|
|
10200
|
-
}
|
|
10201
|
-
case 7: {
|
|
10202
|
-
if (tag !== 56) {
|
|
10203
|
-
break;
|
|
10204
|
-
}
|
|
10205
|
-
message.type = reader.int32();
|
|
8382
|
+
message.threads = reader.uint32();
|
|
10206
8383
|
continue;
|
|
10207
8384
|
}
|
|
10208
8385
|
}
|
|
@@ -10215,59 +8392,53 @@ exports.AreaReviewResponse_AreaReview = {
|
|
|
10215
8392
|
},
|
|
10216
8393
|
fromJSON(object) {
|
|
10217
8394
|
return {
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
8395
|
+
routeList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.route_list)
|
|
8396
|
+
? object.route_list.map((e) => dataModel_1.Data.fromJSON(e))
|
|
8397
|
+
: [],
|
|
8398
|
+
stopList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.stop_list)
|
|
8399
|
+
? object.stop_list.map((e) => exports.RouteStopPoint.fromJSON(e))
|
|
8400
|
+
: [],
|
|
8401
|
+
tripList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.trip_list) ? object.trip_list.map((e) => trip_1.Trip.fromJSON(e)) : [],
|
|
8402
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
8403
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
8404
|
+
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
10225
8405
|
};
|
|
10226
8406
|
},
|
|
10227
8407
|
toJSON(message) {
|
|
8408
|
+
var _a, _b, _c;
|
|
10228
8409
|
const obj = {};
|
|
10229
|
-
if (
|
|
10230
|
-
obj.
|
|
10231
|
-
}
|
|
10232
|
-
if (!message.areaId.equals(long_1.default.UZERO)) {
|
|
10233
|
-
obj.areaId = (message.areaId || long_1.default.UZERO).toString();
|
|
8410
|
+
if ((_a = message.routeList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
8411
|
+
obj.route_list = message.routeList.map((e) => dataModel_1.Data.toJSON(e));
|
|
10234
8412
|
}
|
|
10235
|
-
if (message.
|
|
10236
|
-
obj.
|
|
8413
|
+
if ((_b = message.stopList) === null || _b === void 0 ? void 0 : _b.length) {
|
|
8414
|
+
obj.stop_list = message.stopList.map((e) => exports.RouteStopPoint.toJSON(e));
|
|
10237
8415
|
}
|
|
10238
|
-
if (message.
|
|
10239
|
-
obj.
|
|
8416
|
+
if ((_c = message.tripList) === null || _c === void 0 ? void 0 : _c.length) {
|
|
8417
|
+
obj.trip_list = message.tripList.map((e) => trip_1.Trip.toJSON(e));
|
|
10240
8418
|
}
|
|
10241
|
-
if (
|
|
10242
|
-
obj.
|
|
8419
|
+
if (message.records !== 0) {
|
|
8420
|
+
obj.records = Math.round(message.records);
|
|
10243
8421
|
}
|
|
10244
|
-
if (message.
|
|
10245
|
-
obj.
|
|
8422
|
+
if (message.cost !== 0) {
|
|
8423
|
+
obj.cost = Math.round(message.cost);
|
|
10246
8424
|
}
|
|
10247
|
-
if (message.
|
|
10248
|
-
obj.
|
|
8425
|
+
if (message.threads !== 0) {
|
|
8426
|
+
obj.threads = Math.round(message.threads);
|
|
10249
8427
|
}
|
|
10250
8428
|
return obj;
|
|
10251
8429
|
},
|
|
10252
8430
|
create(base) {
|
|
10253
|
-
return exports.
|
|
8431
|
+
return exports.RouteReviewResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
10254
8432
|
},
|
|
10255
8433
|
fromPartial(object) {
|
|
10256
|
-
var _a, _b, _c, _d;
|
|
10257
|
-
const message =
|
|
10258
|
-
message.
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
message.
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
10265
|
-
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
10266
|
-
message.mileage = (object.mileage !== undefined && object.mileage !== null)
|
|
10267
|
-
? long_1.default.fromValue(object.mileage)
|
|
10268
|
-
: long_1.default.UZERO;
|
|
10269
|
-
message.duration = (_c = object.duration) !== null && _c !== void 0 ? _c : 0;
|
|
10270
|
-
message.type = (_d = object.type) !== null && _d !== void 0 ? _d : 0;
|
|
8434
|
+
var _a, _b, _c, _d, _e, _f;
|
|
8435
|
+
const message = createBaseRouteReviewResponse();
|
|
8436
|
+
message.routeList = ((_a = object.routeList) === null || _a === void 0 ? void 0 : _a.map((e) => dataModel_1.Data.fromPartial(e))) || [];
|
|
8437
|
+
message.stopList = ((_b = object.stopList) === null || _b === void 0 ? void 0 : _b.map((e) => exports.RouteStopPoint.fromPartial(e))) || [];
|
|
8438
|
+
message.tripList = ((_c = object.tripList) === null || _c === void 0 ? void 0 : _c.map((e) => trip_1.Trip.fromPartial(e))) || [];
|
|
8439
|
+
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
8440
|
+
message.cost = (_e = object.cost) !== null && _e !== void 0 ? _e : 0;
|
|
8441
|
+
message.threads = (_f = object.threads) !== null && _f !== void 0 ? _f : 0;
|
|
10271
8442
|
return message;
|
|
10272
8443
|
},
|
|
10273
8444
|
};
|