@fatehan/tsrp 1.0.24 → 1.0.25

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.
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.7.5
4
+ // protoc-gen-ts_proto v2.7.0
5
5
  // protoc v6.31.1
6
6
  // source: models/fusion.proto
7
7
  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.FusionNotify_Body = exports.FusionNotify = exports.FusionCar = exports.CommandDevice = exports.AlertsListDevice = exports.WorkCycleDeviceList = exports.WorkCycleDevice = exports.protobufPackage = void 0;
11
+ exports.FusionMaintenance = exports.FusionNotify_Body = exports.FusionNotify = exports.FusionCar = exports.CommandDevice = exports.AlertsListDevice = exports.WorkCycleDeviceList = exports.WorkCycleDevice = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const wire_1 = require("@bufbuild/protobuf/wire");
14
14
  const long_1 = __importDefault(require("long"));
@@ -41,7 +41,7 @@ exports.WorkCycleDevice = {
41
41
  },
42
42
  decode(input, length) {
43
43
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
44
- const end = length === undefined ? reader.len : reader.pos + length;
44
+ let end = length === undefined ? reader.len : reader.pos + length;
45
45
  const message = createBaseWorkCycleDevice();
46
46
  while (reader.pos < end) {
47
47
  const tag = reader.uint32();
@@ -159,7 +159,7 @@ exports.WorkCycleDeviceList = {
159
159
  },
160
160
  decode(input, length) {
161
161
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
162
- const end = length === undefined ? reader.len : reader.pos + length;
162
+ let end = length === undefined ? reader.len : reader.pos + length;
163
163
  const message = createBaseWorkCycleDeviceList();
164
164
  while (reader.pos < end) {
165
165
  const tag = reader.uint32();
@@ -300,7 +300,7 @@ exports.AlertsListDevice = {
300
300
  },
301
301
  decode(input, length) {
302
302
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
303
- const end = length === undefined ? reader.len : reader.pos + length;
303
+ let end = length === undefined ? reader.len : reader.pos + length;
304
304
  const message = createBaseAlertsListDevice();
305
305
  while (reader.pos < end) {
306
306
  const tag = reader.uint32();
@@ -664,7 +664,7 @@ exports.CommandDevice = {
664
664
  },
665
665
  decode(input, length) {
666
666
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
667
- const end = length === undefined ? reader.len : reader.pos + length;
667
+ let end = length === undefined ? reader.len : reader.pos + length;
668
668
  const message = createBaseCommandDevice();
669
669
  while (reader.pos < end) {
670
670
  const tag = reader.uint32();
@@ -894,7 +894,7 @@ exports.FusionCar = {
894
894
  },
895
895
  decode(input, length) {
896
896
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
897
- const end = length === undefined ? reader.len : reader.pos + length;
897
+ let end = length === undefined ? reader.len : reader.pos + length;
898
898
  const message = createBaseFusionCar();
899
899
  while (reader.pos < end) {
900
900
  const tag = reader.uint32();
@@ -998,7 +998,7 @@ exports.FusionNotify = {
998
998
  },
999
999
  decode(input, length) {
1000
1000
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1001
- const end = length === undefined ? reader.len : reader.pos + length;
1001
+ let end = length === undefined ? reader.len : reader.pos + length;
1002
1002
  const message = createBaseFusionNotify();
1003
1003
  while (reader.pos < end) {
1004
1004
  const tag = reader.uint32();
@@ -1186,7 +1186,7 @@ exports.FusionNotify_Body = {
1186
1186
  },
1187
1187
  decode(input, length) {
1188
1188
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1189
- const end = length === undefined ? reader.len : reader.pos + length;
1189
+ let end = length === undefined ? reader.len : reader.pos + length;
1190
1190
  const message = createBaseFusionNotify_Body();
1191
1191
  while (reader.pos < end) {
1192
1192
  const tag = reader.uint32();
@@ -1398,6 +1398,594 @@ exports.FusionNotify_Body = {
1398
1398
  return message;
1399
1399
  },
1400
1400
  };
1401
+ function createBaseFusionMaintenance() {
1402
+ return {
1403
+ mcId: 0,
1404
+ carId: 0,
1405
+ maintenanceId: 0,
1406
+ projectId: 0,
1407
+ userId: 0,
1408
+ dateSet: 0,
1409
+ price: 0,
1410
+ expireable: false,
1411
+ expireDate: 0,
1412
+ expireEnginTime: 0,
1413
+ expireOdo: 0,
1414
+ expired: 0,
1415
+ carEnginTime: 0,
1416
+ carOdo: 0,
1417
+ dateCreate: 0,
1418
+ renewable: 0,
1419
+ dateRenew: 0,
1420
+ renewId: 0,
1421
+ sent: 0,
1422
+ dateExpired: 0,
1423
+ parts: undefined,
1424
+ serviceProviderId: 0,
1425
+ lat: undefined,
1426
+ lng: undefined,
1427
+ photo: undefined,
1428
+ userCreatorId: 0,
1429
+ expireDateWarranty: 0,
1430
+ description: undefined,
1431
+ dateEnd: 0,
1432
+ currentMileage: long_1.default.UZERO,
1433
+ currentEngineTime: long_1.default.UZERO,
1434
+ expiredReason: undefined,
1435
+ createdAt: undefined,
1436
+ updatedAt: undefined,
1437
+ };
1438
+ }
1439
+ exports.FusionMaintenance = {
1440
+ encode(message, writer = new wire_1.BinaryWriter()) {
1441
+ if (message.mcId !== 0) {
1442
+ writer.uint32(8).uint32(message.mcId);
1443
+ }
1444
+ if (message.carId !== 0) {
1445
+ writer.uint32(16).uint32(message.carId);
1446
+ }
1447
+ if (message.maintenanceId !== 0) {
1448
+ writer.uint32(24).uint32(message.maintenanceId);
1449
+ }
1450
+ if (message.projectId !== 0) {
1451
+ writer.uint32(32).uint32(message.projectId);
1452
+ }
1453
+ if (message.userId !== 0) {
1454
+ writer.uint32(40).uint32(message.userId);
1455
+ }
1456
+ if (message.dateSet !== 0) {
1457
+ writer.uint32(48).uint32(message.dateSet);
1458
+ }
1459
+ if (message.price !== 0) {
1460
+ writer.uint32(56).uint32(message.price);
1461
+ }
1462
+ if (message.expireable !== false) {
1463
+ writer.uint32(64).bool(message.expireable);
1464
+ }
1465
+ if (message.expireDate !== 0) {
1466
+ writer.uint32(72).uint32(message.expireDate);
1467
+ }
1468
+ if (message.expireEnginTime !== 0) {
1469
+ writer.uint32(80).uint32(message.expireEnginTime);
1470
+ }
1471
+ if (message.expireOdo !== 0) {
1472
+ writer.uint32(88).uint32(message.expireOdo);
1473
+ }
1474
+ if (message.expired !== 0) {
1475
+ writer.uint32(96).uint32(message.expired);
1476
+ }
1477
+ if (message.carEnginTime !== 0) {
1478
+ writer.uint32(104).uint32(message.carEnginTime);
1479
+ }
1480
+ if (message.carOdo !== 0) {
1481
+ writer.uint32(112).uint32(message.carOdo);
1482
+ }
1483
+ if (message.dateCreate !== 0) {
1484
+ writer.uint32(120).uint32(message.dateCreate);
1485
+ }
1486
+ if (message.renewable !== 0) {
1487
+ writer.uint32(128).uint32(message.renewable);
1488
+ }
1489
+ if (message.dateRenew !== 0) {
1490
+ writer.uint32(136).sint32(message.dateRenew);
1491
+ }
1492
+ if (message.renewId !== 0) {
1493
+ writer.uint32(144).sint32(message.renewId);
1494
+ }
1495
+ if (message.sent !== 0) {
1496
+ writer.uint32(152).uint32(message.sent);
1497
+ }
1498
+ if (message.dateExpired !== 0) {
1499
+ writer.uint32(160).sint32(message.dateExpired);
1500
+ }
1501
+ if (message.parts !== undefined) {
1502
+ writer.uint32(170).string(message.parts);
1503
+ }
1504
+ if (message.serviceProviderId !== 0) {
1505
+ writer.uint32(176).uint32(message.serviceProviderId);
1506
+ }
1507
+ if (message.lat !== undefined) {
1508
+ writer.uint32(185).double(message.lat);
1509
+ }
1510
+ if (message.lng !== undefined) {
1511
+ writer.uint32(193).double(message.lng);
1512
+ }
1513
+ if (message.photo !== undefined) {
1514
+ writer.uint32(202).string(message.photo);
1515
+ }
1516
+ if (message.userCreatorId !== 0) {
1517
+ writer.uint32(208).uint32(message.userCreatorId);
1518
+ }
1519
+ if (message.expireDateWarranty !== 0) {
1520
+ writer.uint32(216).uint32(message.expireDateWarranty);
1521
+ }
1522
+ if (message.description !== undefined) {
1523
+ writer.uint32(226).string(message.description);
1524
+ }
1525
+ if (message.dateEnd !== 0) {
1526
+ writer.uint32(232).uint32(message.dateEnd);
1527
+ }
1528
+ if (!message.currentMileage.equals(long_1.default.UZERO)) {
1529
+ writer.uint32(240).uint64(message.currentMileage.toString());
1530
+ }
1531
+ if (!message.currentEngineTime.equals(long_1.default.UZERO)) {
1532
+ writer.uint32(248).uint64(message.currentEngineTime.toString());
1533
+ }
1534
+ if (message.expiredReason !== undefined) {
1535
+ writer.uint32(258).string(message.expiredReason);
1536
+ }
1537
+ if (message.createdAt !== undefined) {
1538
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(266).fork()).join();
1539
+ }
1540
+ if (message.updatedAt !== undefined) {
1541
+ timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(274).fork()).join();
1542
+ }
1543
+ return writer;
1544
+ },
1545
+ decode(input, length) {
1546
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1547
+ let end = length === undefined ? reader.len : reader.pos + length;
1548
+ const message = createBaseFusionMaintenance();
1549
+ while (reader.pos < end) {
1550
+ const tag = reader.uint32();
1551
+ switch (tag >>> 3) {
1552
+ case 1: {
1553
+ if (tag !== 8) {
1554
+ break;
1555
+ }
1556
+ message.mcId = reader.uint32();
1557
+ continue;
1558
+ }
1559
+ case 2: {
1560
+ if (tag !== 16) {
1561
+ break;
1562
+ }
1563
+ message.carId = reader.uint32();
1564
+ continue;
1565
+ }
1566
+ case 3: {
1567
+ if (tag !== 24) {
1568
+ break;
1569
+ }
1570
+ message.maintenanceId = reader.uint32();
1571
+ continue;
1572
+ }
1573
+ case 4: {
1574
+ if (tag !== 32) {
1575
+ break;
1576
+ }
1577
+ message.projectId = reader.uint32();
1578
+ continue;
1579
+ }
1580
+ case 5: {
1581
+ if (tag !== 40) {
1582
+ break;
1583
+ }
1584
+ message.userId = reader.uint32();
1585
+ continue;
1586
+ }
1587
+ case 6: {
1588
+ if (tag !== 48) {
1589
+ break;
1590
+ }
1591
+ message.dateSet = reader.uint32();
1592
+ continue;
1593
+ }
1594
+ case 7: {
1595
+ if (tag !== 56) {
1596
+ break;
1597
+ }
1598
+ message.price = reader.uint32();
1599
+ continue;
1600
+ }
1601
+ case 8: {
1602
+ if (tag !== 64) {
1603
+ break;
1604
+ }
1605
+ message.expireable = reader.bool();
1606
+ continue;
1607
+ }
1608
+ case 9: {
1609
+ if (tag !== 72) {
1610
+ break;
1611
+ }
1612
+ message.expireDate = reader.uint32();
1613
+ continue;
1614
+ }
1615
+ case 10: {
1616
+ if (tag !== 80) {
1617
+ break;
1618
+ }
1619
+ message.expireEnginTime = reader.uint32();
1620
+ continue;
1621
+ }
1622
+ case 11: {
1623
+ if (tag !== 88) {
1624
+ break;
1625
+ }
1626
+ message.expireOdo = reader.uint32();
1627
+ continue;
1628
+ }
1629
+ case 12: {
1630
+ if (tag !== 96) {
1631
+ break;
1632
+ }
1633
+ message.expired = reader.uint32();
1634
+ continue;
1635
+ }
1636
+ case 13: {
1637
+ if (tag !== 104) {
1638
+ break;
1639
+ }
1640
+ message.carEnginTime = reader.uint32();
1641
+ continue;
1642
+ }
1643
+ case 14: {
1644
+ if (tag !== 112) {
1645
+ break;
1646
+ }
1647
+ message.carOdo = reader.uint32();
1648
+ continue;
1649
+ }
1650
+ case 15: {
1651
+ if (tag !== 120) {
1652
+ break;
1653
+ }
1654
+ message.dateCreate = reader.uint32();
1655
+ continue;
1656
+ }
1657
+ case 16: {
1658
+ if (tag !== 128) {
1659
+ break;
1660
+ }
1661
+ message.renewable = reader.uint32();
1662
+ continue;
1663
+ }
1664
+ case 17: {
1665
+ if (tag !== 136) {
1666
+ break;
1667
+ }
1668
+ message.dateRenew = reader.sint32();
1669
+ continue;
1670
+ }
1671
+ case 18: {
1672
+ if (tag !== 144) {
1673
+ break;
1674
+ }
1675
+ message.renewId = reader.sint32();
1676
+ continue;
1677
+ }
1678
+ case 19: {
1679
+ if (tag !== 152) {
1680
+ break;
1681
+ }
1682
+ message.sent = reader.uint32();
1683
+ continue;
1684
+ }
1685
+ case 20: {
1686
+ if (tag !== 160) {
1687
+ break;
1688
+ }
1689
+ message.dateExpired = reader.sint32();
1690
+ continue;
1691
+ }
1692
+ case 21: {
1693
+ if (tag !== 170) {
1694
+ break;
1695
+ }
1696
+ message.parts = reader.string();
1697
+ continue;
1698
+ }
1699
+ case 22: {
1700
+ if (tag !== 176) {
1701
+ break;
1702
+ }
1703
+ message.serviceProviderId = reader.uint32();
1704
+ continue;
1705
+ }
1706
+ case 23: {
1707
+ if (tag !== 185) {
1708
+ break;
1709
+ }
1710
+ message.lat = reader.double();
1711
+ continue;
1712
+ }
1713
+ case 24: {
1714
+ if (tag !== 193) {
1715
+ break;
1716
+ }
1717
+ message.lng = reader.double();
1718
+ continue;
1719
+ }
1720
+ case 25: {
1721
+ if (tag !== 202) {
1722
+ break;
1723
+ }
1724
+ message.photo = reader.string();
1725
+ continue;
1726
+ }
1727
+ case 26: {
1728
+ if (tag !== 208) {
1729
+ break;
1730
+ }
1731
+ message.userCreatorId = reader.uint32();
1732
+ continue;
1733
+ }
1734
+ case 27: {
1735
+ if (tag !== 216) {
1736
+ break;
1737
+ }
1738
+ message.expireDateWarranty = reader.uint32();
1739
+ continue;
1740
+ }
1741
+ case 28: {
1742
+ if (tag !== 226) {
1743
+ break;
1744
+ }
1745
+ message.description = reader.string();
1746
+ continue;
1747
+ }
1748
+ case 29: {
1749
+ if (tag !== 232) {
1750
+ break;
1751
+ }
1752
+ message.dateEnd = reader.uint32();
1753
+ continue;
1754
+ }
1755
+ case 30: {
1756
+ if (tag !== 240) {
1757
+ break;
1758
+ }
1759
+ message.currentMileage = long_1.default.fromString(reader.uint64().toString(), true);
1760
+ continue;
1761
+ }
1762
+ case 31: {
1763
+ if (tag !== 248) {
1764
+ break;
1765
+ }
1766
+ message.currentEngineTime = long_1.default.fromString(reader.uint64().toString(), true);
1767
+ continue;
1768
+ }
1769
+ case 32: {
1770
+ if (tag !== 258) {
1771
+ break;
1772
+ }
1773
+ message.expiredReason = reader.string();
1774
+ continue;
1775
+ }
1776
+ case 33: {
1777
+ if (tag !== 266) {
1778
+ break;
1779
+ }
1780
+ message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1781
+ continue;
1782
+ }
1783
+ case 34: {
1784
+ if (tag !== 274) {
1785
+ break;
1786
+ }
1787
+ message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1788
+ continue;
1789
+ }
1790
+ }
1791
+ if ((tag & 7) === 4 || tag === 0) {
1792
+ break;
1793
+ }
1794
+ reader.skip(tag & 7);
1795
+ }
1796
+ return message;
1797
+ },
1798
+ fromJSON(object) {
1799
+ return {
1800
+ mcId: isSet(object.mc_id) ? globalThis.Number(object.mc_id) : 0,
1801
+ carId: isSet(object.car_id) ? globalThis.Number(object.car_id) : 0,
1802
+ maintenanceId: isSet(object.maintenance_id) ? globalThis.Number(object.maintenance_id) : 0,
1803
+ projectId: isSet(object.project_id) ? globalThis.Number(object.project_id) : 0,
1804
+ userId: isSet(object.user_id) ? globalThis.Number(object.user_id) : 0,
1805
+ dateSet: isSet(object.date_set) ? globalThis.Number(object.date_set) : 0,
1806
+ price: isSet(object.price) ? globalThis.Number(object.price) : 0,
1807
+ expireable: isSet(object.expireable) ? globalThis.Boolean(object.expireable) : false,
1808
+ expireDate: isSet(object.expire_date) ? globalThis.Number(object.expire_date) : 0,
1809
+ expireEnginTime: isSet(object.expire_engin_time) ? globalThis.Number(object.expire_engin_time) : 0,
1810
+ expireOdo: isSet(object.expire_odo) ? globalThis.Number(object.expire_odo) : 0,
1811
+ expired: isSet(object.expired) ? globalThis.Number(object.expired) : 0,
1812
+ carEnginTime: isSet(object.car_engin_time) ? globalThis.Number(object.car_engin_time) : 0,
1813
+ carOdo: isSet(object.car_odo) ? globalThis.Number(object.car_odo) : 0,
1814
+ dateCreate: isSet(object.date_create) ? globalThis.Number(object.date_create) : 0,
1815
+ renewable: isSet(object.renewable) ? globalThis.Number(object.renewable) : 0,
1816
+ dateRenew: isSet(object.date_renew) ? globalThis.Number(object.date_renew) : 0,
1817
+ renewId: isSet(object.renew_id) ? globalThis.Number(object.renew_id) : 0,
1818
+ sent: isSet(object.sent) ? globalThis.Number(object.sent) : 0,
1819
+ dateExpired: isSet(object.date_expired) ? globalThis.Number(object.date_expired) : 0,
1820
+ parts: isSet(object.parts) ? globalThis.String(object.parts) : undefined,
1821
+ serviceProviderId: isSet(object.service_provider_id) ? globalThis.Number(object.service_provider_id) : 0,
1822
+ lat: isSet(object.lat) ? globalThis.Number(object.lat) : undefined,
1823
+ lng: isSet(object.lng) ? globalThis.Number(object.lng) : undefined,
1824
+ photo: isSet(object.photo) ? globalThis.String(object.photo) : undefined,
1825
+ userCreatorId: isSet(object.user_creator_id) ? globalThis.Number(object.user_creator_id) : 0,
1826
+ expireDateWarranty: isSet(object.expire_date_warranty) ? globalThis.Number(object.expire_date_warranty) : 0,
1827
+ description: isSet(object.description) ? globalThis.String(object.description) : undefined,
1828
+ dateEnd: isSet(object.date_end) ? globalThis.Number(object.date_end) : 0,
1829
+ currentMileage: isSet(object.current_mileage) ? long_1.default.fromValue(object.current_mileage) : long_1.default.UZERO,
1830
+ currentEngineTime: isSet(object.current_engine_time) ? long_1.default.fromValue(object.current_engine_time) : long_1.default.UZERO,
1831
+ expiredReason: isSet(object.expired_reason) ? globalThis.String(object.expired_reason) : undefined,
1832
+ createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
1833
+ updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
1834
+ };
1835
+ },
1836
+ toJSON(message) {
1837
+ const obj = {};
1838
+ if (message.mcId !== 0) {
1839
+ obj.mc_id = Math.round(message.mcId);
1840
+ }
1841
+ if (message.carId !== 0) {
1842
+ obj.car_id = Math.round(message.carId);
1843
+ }
1844
+ if (message.maintenanceId !== 0) {
1845
+ obj.maintenance_id = Math.round(message.maintenanceId);
1846
+ }
1847
+ if (message.projectId !== 0) {
1848
+ obj.project_id = Math.round(message.projectId);
1849
+ }
1850
+ if (message.userId !== 0) {
1851
+ obj.user_id = Math.round(message.userId);
1852
+ }
1853
+ if (message.dateSet !== 0) {
1854
+ obj.date_set = Math.round(message.dateSet);
1855
+ }
1856
+ if (message.price !== 0) {
1857
+ obj.price = Math.round(message.price);
1858
+ }
1859
+ if (message.expireable !== false) {
1860
+ obj.expireable = message.expireable;
1861
+ }
1862
+ if (message.expireDate !== 0) {
1863
+ obj.expire_date = Math.round(message.expireDate);
1864
+ }
1865
+ if (message.expireEnginTime !== 0) {
1866
+ obj.expire_engin_time = Math.round(message.expireEnginTime);
1867
+ }
1868
+ if (message.expireOdo !== 0) {
1869
+ obj.expire_odo = Math.round(message.expireOdo);
1870
+ }
1871
+ if (message.expired !== 0) {
1872
+ obj.expired = Math.round(message.expired);
1873
+ }
1874
+ if (message.carEnginTime !== 0) {
1875
+ obj.car_engin_time = Math.round(message.carEnginTime);
1876
+ }
1877
+ if (message.carOdo !== 0) {
1878
+ obj.car_odo = Math.round(message.carOdo);
1879
+ }
1880
+ if (message.dateCreate !== 0) {
1881
+ obj.date_create = Math.round(message.dateCreate);
1882
+ }
1883
+ if (message.renewable !== 0) {
1884
+ obj.renewable = Math.round(message.renewable);
1885
+ }
1886
+ if (message.dateRenew !== 0) {
1887
+ obj.date_renew = Math.round(message.dateRenew);
1888
+ }
1889
+ if (message.renewId !== 0) {
1890
+ obj.renew_id = Math.round(message.renewId);
1891
+ }
1892
+ if (message.sent !== 0) {
1893
+ obj.sent = Math.round(message.sent);
1894
+ }
1895
+ if (message.dateExpired !== 0) {
1896
+ obj.date_expired = Math.round(message.dateExpired);
1897
+ }
1898
+ if (message.parts !== undefined) {
1899
+ obj.parts = message.parts;
1900
+ }
1901
+ if (message.serviceProviderId !== 0) {
1902
+ obj.service_provider_id = Math.round(message.serviceProviderId);
1903
+ }
1904
+ if (message.lat !== undefined) {
1905
+ obj.lat = message.lat;
1906
+ }
1907
+ if (message.lng !== undefined) {
1908
+ obj.lng = message.lng;
1909
+ }
1910
+ if (message.photo !== undefined) {
1911
+ obj.photo = message.photo;
1912
+ }
1913
+ if (message.userCreatorId !== 0) {
1914
+ obj.user_creator_id = Math.round(message.userCreatorId);
1915
+ }
1916
+ if (message.expireDateWarranty !== 0) {
1917
+ obj.expire_date_warranty = Math.round(message.expireDateWarranty);
1918
+ }
1919
+ if (message.description !== undefined) {
1920
+ obj.description = message.description;
1921
+ }
1922
+ if (message.dateEnd !== 0) {
1923
+ obj.date_end = Math.round(message.dateEnd);
1924
+ }
1925
+ if (!message.currentMileage.equals(long_1.default.UZERO)) {
1926
+ obj.current_mileage = (message.currentMileage || long_1.default.UZERO).toString();
1927
+ }
1928
+ if (!message.currentEngineTime.equals(long_1.default.UZERO)) {
1929
+ obj.current_engine_time = (message.currentEngineTime || long_1.default.UZERO).toString();
1930
+ }
1931
+ if (message.expiredReason !== undefined) {
1932
+ obj.expired_reason = message.expiredReason;
1933
+ }
1934
+ if (message.createdAt !== undefined) {
1935
+ obj.created_at = message.createdAt.toISOString();
1936
+ }
1937
+ if (message.updatedAt !== undefined) {
1938
+ obj.updated_at = message.updatedAt.toISOString();
1939
+ }
1940
+ return obj;
1941
+ },
1942
+ create(base) {
1943
+ return exports.FusionMaintenance.fromPartial(base !== null && base !== void 0 ? base : {});
1944
+ },
1945
+ fromPartial(object) {
1946
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
1947
+ const message = createBaseFusionMaintenance();
1948
+ message.mcId = (_a = object.mcId) !== null && _a !== void 0 ? _a : 0;
1949
+ message.carId = (_b = object.carId) !== null && _b !== void 0 ? _b : 0;
1950
+ message.maintenanceId = (_c = object.maintenanceId) !== null && _c !== void 0 ? _c : 0;
1951
+ message.projectId = (_d = object.projectId) !== null && _d !== void 0 ? _d : 0;
1952
+ message.userId = (_e = object.userId) !== null && _e !== void 0 ? _e : 0;
1953
+ message.dateSet = (_f = object.dateSet) !== null && _f !== void 0 ? _f : 0;
1954
+ message.price = (_g = object.price) !== null && _g !== void 0 ? _g : 0;
1955
+ message.expireable = (_h = object.expireable) !== null && _h !== void 0 ? _h : false;
1956
+ message.expireDate = (_j = object.expireDate) !== null && _j !== void 0 ? _j : 0;
1957
+ message.expireEnginTime = (_k = object.expireEnginTime) !== null && _k !== void 0 ? _k : 0;
1958
+ message.expireOdo = (_l = object.expireOdo) !== null && _l !== void 0 ? _l : 0;
1959
+ message.expired = (_m = object.expired) !== null && _m !== void 0 ? _m : 0;
1960
+ message.carEnginTime = (_o = object.carEnginTime) !== null && _o !== void 0 ? _o : 0;
1961
+ message.carOdo = (_p = object.carOdo) !== null && _p !== void 0 ? _p : 0;
1962
+ message.dateCreate = (_q = object.dateCreate) !== null && _q !== void 0 ? _q : 0;
1963
+ message.renewable = (_r = object.renewable) !== null && _r !== void 0 ? _r : 0;
1964
+ message.dateRenew = (_s = object.dateRenew) !== null && _s !== void 0 ? _s : 0;
1965
+ message.renewId = (_t = object.renewId) !== null && _t !== void 0 ? _t : 0;
1966
+ message.sent = (_u = object.sent) !== null && _u !== void 0 ? _u : 0;
1967
+ message.dateExpired = (_v = object.dateExpired) !== null && _v !== void 0 ? _v : 0;
1968
+ message.parts = (_w = object.parts) !== null && _w !== void 0 ? _w : undefined;
1969
+ message.serviceProviderId = (_x = object.serviceProviderId) !== null && _x !== void 0 ? _x : 0;
1970
+ message.lat = (_y = object.lat) !== null && _y !== void 0 ? _y : undefined;
1971
+ message.lng = (_z = object.lng) !== null && _z !== void 0 ? _z : undefined;
1972
+ message.photo = (_0 = object.photo) !== null && _0 !== void 0 ? _0 : undefined;
1973
+ message.userCreatorId = (_1 = object.userCreatorId) !== null && _1 !== void 0 ? _1 : 0;
1974
+ message.expireDateWarranty = (_2 = object.expireDateWarranty) !== null && _2 !== void 0 ? _2 : 0;
1975
+ message.description = (_3 = object.description) !== null && _3 !== void 0 ? _3 : undefined;
1976
+ message.dateEnd = (_4 = object.dateEnd) !== null && _4 !== void 0 ? _4 : 0;
1977
+ message.currentMileage = (object.currentMileage !== undefined && object.currentMileage !== null)
1978
+ ? long_1.default.fromValue(object.currentMileage)
1979
+ : long_1.default.UZERO;
1980
+ message.currentEngineTime = (object.currentEngineTime !== undefined && object.currentEngineTime !== null)
1981
+ ? long_1.default.fromValue(object.currentEngineTime)
1982
+ : long_1.default.UZERO;
1983
+ message.expiredReason = (_5 = object.expiredReason) !== null && _5 !== void 0 ? _5 : undefined;
1984
+ message.createdAt = (_6 = object.createdAt) !== null && _6 !== void 0 ? _6 : undefined;
1985
+ message.updatedAt = (_7 = object.updatedAt) !== null && _7 !== void 0 ? _7 : undefined;
1986
+ return message;
1987
+ },
1988
+ };
1401
1989
  function toTimestamp(date) {
1402
1990
  const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
1403
1991
  const nanos = (date.getTime() % 1000) * 1000000;