src/Document/Device/Device.php line 25

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: hariharan
  5.  * Date: 6/18/19
  6.  * Time: 2:18 PM
  7.  */
  8. namespace App\Document\Device;
  9. use App\Document\Common\Icon;
  10. use App\Document\Common\LegalEntity;
  11. use App\Document\Geo\DeviceGeoHistory;
  12. use App\Document\Payment\DeviceBillingPaymentProfile;
  13. use App\Document\Vehicle\Vehicle;
  14. use App\Document\Vehicle\VehicleFuelFunction;
  15. use Symfony\Component\Validator\Constraints as Assert;
  16. use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique as MongoDBUnique;
  17. use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
  18. /**
  19.  * @MongoDB\Document(repositoryClass="App\Repository\Device\DeviceRepository")
  20.  * @MongoDBUnique(fields="deviceCode")
  21.  */
  22. class Device implements \JsonSerializable
  23. {
  24.     /**
  25.      * @MongoDB\Id
  26.      */
  27.     protected $id;
  28.     /**
  29.      * @MongoDB\Field(type="string")
  30.      */
  31.     protected $deviceName;
  32.     /**
  33.      * @MongoDB\Field(type="string")
  34.      */
  35.     protected $deviceCode;
  36.     /**
  37.      * PENDING|INACTIVE|ACTIVE|REMOVED|
  38.      * @MongoDB\Field(type="string")
  39.      */
  40.     protected $deviceStatus;
  41.     /**
  42.      * url
  43.      * @MongoDB\Field(type="string")
  44.      */
  45.     protected $deviceIcon;
  46.     /**
  47.      * @MongoDB\Field(type="string")
  48.      */
  49.     protected $imei;
  50.     /**
  51.      * @MongoDB\Field(type="string")
  52.      */
  53.     protected $connectionNo;
  54.     /**
  55.      * @MongoDB\Field(type="string")
  56.      */
  57.     protected $vehicleNo;
  58.     /**
  59.      * @MongoDB\Field(type="string")
  60.      */
  61.     protected $vehicleCode;
  62.     /**
  63.      * @MongoDB\ReferenceOne(targetDocument=DeviceType::class)
  64.      */
  65.     protected $deviceType;
  66.     /**
  67.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Device\Sim")
  68.      */
  69.     protected $activeSim;
  70.     /**
  71.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Vehicle\Vehicle")
  72.      */
  73.     protected $activeVehicle;
  74.     /**
  75.      * @MongoDB\Field(type="string")
  76.      * REGISTERED,UNREGISTERED,PENDING_REGISTRATION
  77.      */
  78.     protected $registrationStatus;
  79.     /**
  80.      * Region/Sub Level
  81.      * @MongoDB\Field(type="string")
  82.      */
  83.     protected $authLevel;
  84.     /**
  85.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Common\LegalEntity")
  86.      */
  87.     protected $legalEntity;
  88.     /**
  89.      * document id
  90.      * @MongoDB\Field(type="string")
  91.      */
  92.     protected $legalEntityCode;
  93.     /**
  94.      * document code
  95.      * @MongoDB\Field(type="string")
  96.      */
  97.     protected $registeredRegionCode;
  98.     /**
  99.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Zone\Region")
  100.      */
  101.     protected $region;
  102.     /**
  103.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Zone\ChildLevel")
  104.      */
  105.     protected $childLevel;
  106.     /**
  107.      * @MongoDB\Field(type="string")
  108.      */
  109.     protected $childLevelCode;
  110.     /**
  111.      * @MongoDB\Field(type="integer")
  112.      */
  113.     protected $levelDepth;
  114.     /**
  115.      * km/h
  116.      * @MongoDB\Field(type="float")
  117.      */
  118.     protected $speedLimit;
  119.     /**
  120.      * km/l
  121.      * @MongoDB\Field(type="float")
  122.      */
  123.     protected $averageFuel;
  124.     /**
  125.      * @MongoDB\Field(type="date")
  126.      */
  127.     protected $createdAt;
  128.     /**
  129.      * @MongoDB\Field(type="date")
  130.      */
  131.     protected $updatedAt;
  132.     /**
  133.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Security\User",cascade={"persist"})
  134.      */
  135.     protected $createdBy;
  136.     /**
  137.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Security\User",cascade={"persist"})
  138.      */
  139.     protected $updatedBy;
  140.     /**
  141.      * @MongoDB\Field(type="boolean")
  142.      */
  143.     protected $status;
  144.     /**
  145.      * @MongoDB\Field(type="boolean")
  146.      */
  147.     protected $isActive;
  148.     /**
  149.      * @MongoDB\EmbedMany(targetDocument=Sim::class)
  150.      */
  151.     private $simHistory;
  152.     /**
  153.      * @MongoDB\Field(type="boolean")
  154.      */
  155.     protected $isSyncStarted;
  156.     /**
  157.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Geo\DeviceGeoHistory")
  158.      */
  159.     protected $latestGeoHistory;
  160.     /**
  161.      * geo synced most recent date & time
  162.      * @MongoDB\Field(type="date")
  163.      */
  164.     protected $lastGeoAt;
  165.     /**
  166.      * @MongoDB\Field(type="date")
  167.      */
  168.     protected $renewalDate;
  169.     /**
  170.      * @MongoDB\Field(type="date")
  171.      */
  172.     protected $topUpDate;
  173.     /**
  174.      * @MongoDB\Field(type="collection")
  175.      */
  176.     protected $latestGeo;
  177.     /**
  178.      * @MongoDB\Field(type="date")
  179.      */
  180.     protected $expireAt;
  181.     /**
  182.      * geo sync interval time in min <default 30 min>
  183.      * @MongoDB\Field(type="integer")
  184.      */
  185.     protected $geoDiff;
  186.     /**
  187.      * min time for park (in min)
  188.      * @MongoDB\Field(type="integer")
  189.      */
  190.     protected $idlingTime;
  191.     /**
  192.      * @MongoDB\EmbedOne (targetDocument=App\Document\Geo\TrackingInfo::class)
  193.      */
  194.     protected $latestGeoData;
  195.     /**
  196.      * @MongoDB\Field(type="boolean")
  197.      */
  198.     protected $engineMode;
  199.     /**
  200.      * min time for park (in min)
  201.      * @MongoDB\Field(type="integer")
  202.      */
  203.     protected $parkingBar;
  204.     /**
  205.      * [username]
  206.      * @MongoDB\Field(type="collection")
  207.      */
  208.     protected $accessUsers;
  209.     /**
  210.      * @MongoDB\ReferenceOne(targetDocument="App\Document\Payment\DeviceBillingPaymentProfile")
  211.      */
  212.     protected $billingProfile;
  213.     /**
  214.      * @MongoDB\Field(type="string")
  215.      */
  216.     protected $billingProfileCode;
  217.     /**
  218.      * @MongoDB\Field(type="string")
  219.      */
  220.     protected $activeDeviceVehicleHistory;
  221.     /**
  222.      * @MongoDB\Field(type="boolean")
  223.      */
  224.     protected $isIoSensorEnabled;
  225.     /**
  226.      * @MongoDB\Field(type="string")
  227.      */
  228.     protected $defaultIndicationSensorCode;
  229.     /**
  230.      * @MongoDB\Field(type="float")
  231.      */
  232.     protected $fuelFactor;
  233.     /**
  234.      * @MongoDB\EmbedOne(targetDocument=DeviceBatteryLevel::class)
  235.      */
  236.     protected $batteryLevel;
  237.     /**
  238.      * @MongoDB\EmbedOne(targetDocument=VehicleFuelFunction::class)
  239.      */
  240.     protected $fuelFunction;
  241.     /**
  242.      * @MongoDB\Field(type="boolean")
  243.      */
  244.     protected $isBleTempSensorEnabled;
  245.     /**
  246.      * @MongoDB\EmbedOne(targetDocument=BleTempSensorConfig::class)
  247.      */
  248.     protected $bleTempSensorConfig;
  249.     public function __construct()
  250.     {
  251.         $this->deviceCode uniqid("D-");
  252.         $this->createdAt = new \DateTime('now', new \DateTimeZone('Asia/Colombo'));
  253.         $this->status true;
  254.         $this->isActive true;
  255.         $this->isSyncStarted false;
  256.         $this->isIoSensorEnabled false;
  257.         $this->isBleTempSensorEnabled false;
  258.         $this->geoDiff 30;
  259.         $this->idlingTime 5;
  260.         $this->expireAt = new \DateTime('+1 years', new \DateTimeZone('Asia/Colombo'));
  261.     }
  262.     /**
  263.      * @return mixed
  264.      */
  265.     public function getId()
  266.     {
  267.         return $this->id;
  268.     }
  269.     /**
  270.      * @return DeviceGeoHistory $latestGeoHistory
  271.      */
  272.     public function getLatestGeoHistory()
  273.     {
  274.         return $this->latestGeoHistory;
  275.     }
  276.     /**
  277.      * @param ?DeviceGeoHistory $latestGeoHistory
  278.      * @return self
  279.      */
  280.     public function setLatestGeoHistory($latestGeoHistory): Device
  281.     {
  282.         $this->latestGeoHistory $latestGeoHistory;
  283.         return $this;
  284.     }
  285.     /**
  286.      * @return mixed
  287.      */
  288.     public function getDeviceName()
  289.     {
  290.         return $this->deviceName;
  291.     }
  292.     /**
  293.      * @param mixed $deviceName
  294.      */
  295.     public function setDeviceName($deviceName): void
  296.     {
  297.         $this->deviceName $deviceName;
  298.     }
  299.     /**
  300.      * @return mixed
  301.      */
  302.     public function getDeviceCode()
  303.     {
  304.         return $this->deviceCode;
  305.     }
  306.     /**
  307.      * @param mixed $deviceCode
  308.      */
  309.     public function setDeviceCode($deviceCode): void
  310.     {
  311.         $this->deviceCode $deviceCode;
  312.     }
  313.     /**
  314.      * @return mixed
  315.      */
  316.     public function getDeviceStatus()
  317.     {
  318.         return $this->deviceStatus;
  319.     }
  320.     /**
  321.      * @param mixed $deviceStatus
  322.      */
  323.     public function setDeviceStatus($deviceStatus): void
  324.     {
  325.         $this->deviceStatus $deviceStatus;
  326.     }
  327.     /**
  328.      * @return mixed
  329.      */
  330.     public function getImei()
  331.     {
  332.         return $this->imei;
  333.     }
  334.     /**
  335.      * @param mixed $imei
  336.      */
  337.     public function setImei($imei): void
  338.     {
  339.         $this->imei $imei;
  340.     }
  341.     /**
  342.      * @return Sim $activeSim
  343.      */
  344.     public function getActiveSim()
  345.     {
  346.         return $this->activeSim;
  347.     }
  348.     /**
  349.      * @param Sim|null $activeSim
  350.      * @return $this
  351.      */
  352.     public function setActiveSim($activeSim): Device
  353.     {
  354.         $this->activeSim $activeSim;
  355.         return $this;
  356.     }
  357.     /**
  358.      * @return Vehicle|null $activeVehicle
  359.      */
  360.     public function getActiveVehicle()
  361.     {
  362.         return $this->activeVehicle;
  363.     }
  364.     /**
  365.      * @param Vehicle|null $activeVehicle
  366.      * @return self
  367.      */
  368.     public function setActiveVehicle($activeVehicle): Device
  369.     {
  370.         $this->activeVehicle $activeVehicle;
  371.         return $this;
  372.     }
  373.     /**
  374.      * @return mixed
  375.      */
  376.     public function getRegistrationStatus()
  377.     {
  378.         return $this->registrationStatus;
  379.     }
  380.     /**
  381.      * @param mixed $registrationStatus
  382.      */
  383.     public function setRegistrationStatus($registrationStatus): void
  384.     {
  385.         $this->registrationStatus $registrationStatus;
  386.     }
  387.     /**
  388.      * @return \DateTime
  389.      */
  390.     public function getCreatedAt(): \DateTime
  391.     {
  392.         return $this->createdAt;
  393.     }
  394.     /**
  395.      * @param \DateTime $createdAt
  396.      */
  397.     public function setCreatedAt(\DateTime $createdAt): void
  398.     {
  399.         $this->createdAt $createdAt;
  400.     }
  401.     /**
  402.      * @return mixed
  403.      */
  404.     public function getUpdatedAt()
  405.     {
  406.         return $this->updatedAt;
  407.     }
  408.     /**
  409.      * @param mixed $updatedAt
  410.      */
  411.     public function setUpdatedAt($updatedAt): void
  412.     {
  413.         $this->updatedAt $updatedAt;
  414.     }
  415.     /**
  416.      * @return mixed
  417.      */
  418.     public function getCreatedBy()
  419.     {
  420.         return $this->createdBy;
  421.     }
  422.     /**
  423.      * @param mixed $createdBy
  424.      */
  425.     public function setCreatedBy($createdBy): void
  426.     {
  427.         $this->createdBy $createdBy;
  428.     }
  429.     /**
  430.      * @return mixed
  431.      */
  432.     public function getUpdatedBy()
  433.     {
  434.         return $this->updatedBy;
  435.     }
  436.     /**
  437.      * @param mixed $updatedBy
  438.      */
  439.     public function setUpdatedBy($updatedBy): void
  440.     {
  441.         $this->updatedBy $updatedBy;
  442.     }
  443.     /**
  444.      * @return bool
  445.      */
  446.     public function isStatus(): bool
  447.     {
  448.         return $this->status;
  449.     }
  450.     /**
  451.      * @param bool $status
  452.      */
  453.     public function setStatus(bool $status): void
  454.     {
  455.         $this->status $status;
  456.     }
  457.     /**
  458.      * @return bool
  459.      */
  460.     public function isActive(): bool
  461.     {
  462.         return $this->isActive;
  463.     }
  464.     /**
  465.      * @param bool $isActive
  466.      */
  467.     public function setIsActive(bool $isActive): void
  468.     {
  469.         $this->isActive $isActive;
  470.     }
  471.     /**
  472.      * @return mixed
  473.      */
  474.     public function getSimHistory()
  475.     {
  476.         return $this->simHistory;
  477.     }
  478.     /**
  479.      * @param mixed $simHistory
  480.      */
  481.     public function setSimHistory($simHistory): void
  482.     {
  483.         $this->simHistory $simHistory;
  484.     }
  485.     /**
  486.      * @return false
  487.      */
  488.     public function getIsSyncStarted(): bool
  489.     {
  490.         return $this->isSyncStarted;
  491.     }
  492.     /**
  493.      * @param false $isSyncStarted
  494.      */
  495.     public function setIsSyncStarted(bool $isSyncStarted): void
  496.     {
  497.         $this->isSyncStarted $isSyncStarted;
  498.     }
  499.     /**
  500.      * @return mixed
  501.      */
  502.     public function getAuthLevel()
  503.     {
  504.         return $this->authLevel;
  505.     }
  506.     /**
  507.      * @param mixed $authLevel
  508.      */
  509.     public function setAuthLevel($authLevel): void
  510.     {
  511.         $this->authLevel $authLevel;
  512.     }
  513.     /**
  514.      * @return mixed
  515.      */
  516.     public function getLegalEntity(): ?LegalEntity
  517.     {
  518.         return $this->legalEntity;
  519.     }
  520.     /**
  521.      * @param mixed $legalEntity
  522.      */
  523.     public function setLegalEntity($legalEntity): void
  524.     {
  525.         $this->legalEntity $legalEntity;
  526.     }
  527.     /**
  528.      * @return mixed
  529.      */
  530.     public function getLegalEntityCode()
  531.     {
  532.         return $this->legalEntityCode;
  533.     }
  534.     /**
  535.      * @param mixed $legalEntityCode
  536.      */
  537.     public function setLegalEntityCode($legalEntityCode): void
  538.     {
  539.         $this->legalEntityCode $legalEntityCode;
  540.     }
  541.     /**
  542.      * @return mixed
  543.      */
  544.     public function getRegisteredRegionCode()
  545.     {
  546.         return $this->registeredRegionCode;
  547.     }
  548.     /**
  549.      * @param mixed $registeredRegionCode
  550.      */
  551.     public function setRegisteredRegionCode($registeredRegionCode): void
  552.     {
  553.         $this->registeredRegionCode $registeredRegionCode;
  554.     }
  555.     /**
  556.      * @return mixed
  557.      */
  558.     public function getRegion()
  559.     {
  560.         return $this->region;
  561.     }
  562.     /**
  563.      * @param mixed $region
  564.      */
  565.     public function setRegion($region): void
  566.     {
  567.         $this->region $region;
  568.     }
  569.     /**
  570.      * @return mixed
  571.      */
  572.     public function getChildLevel()
  573.     {
  574.         return $this->childLevel;
  575.     }
  576.     /**
  577.      * @param mixed $childLevel
  578.      */
  579.     public function setChildLevel($childLevel): void
  580.     {
  581.         $this->childLevel $childLevel;
  582.     }
  583.     /**
  584.      * @return mixed
  585.      */
  586.     public function getChildLevelCode()
  587.     {
  588.         return $this->childLevelCode;
  589.     }
  590.     /**
  591.      * @param mixed $childLevelCode
  592.      */
  593.     public function setChildLevelCode($childLevelCode): void
  594.     {
  595.         $this->childLevelCode $childLevelCode;
  596.     }
  597.     /**
  598.      * @return mixed
  599.      */
  600.     public function getLevelDepth()
  601.     {
  602.         return $this->levelDepth;
  603.     }
  604.     /**
  605.      * @param mixed $levelDepth
  606.      */
  607.     public function setLevelDepth($levelDepth): void
  608.     {
  609.         $this->levelDepth $levelDepth;
  610.     }
  611.     /**
  612.      * @return mixed
  613.      */
  614.     public function getLastGeoAt()
  615.     {
  616.         return $this->lastGeoAt;
  617.     }
  618.     /**
  619.      * @param mixed $lastGeoAt
  620.      */
  621.     public function setLastGeoAt($lastGeoAt): void
  622.     {
  623.         $this->lastGeoAt $lastGeoAt;
  624.     }
  625.     public function jsonSerialize()
  626.     {
  627.         return $this->getImei();
  628.     }
  629.     /**
  630.      * @return mixed
  631.      */
  632.     public function getDeviceType():?DeviceType
  633.     {
  634.         return $this->deviceType;
  635.     }
  636.     /**
  637.      * @param mixed $deviceType
  638.      */
  639.     public function setDeviceType($deviceType): void
  640.     {
  641.         $this->deviceType $deviceType;
  642.     }
  643.     /**
  644.      * @return mixed
  645.      */
  646.     public function getRenewalDate()
  647.     {
  648.         return $this->renewalDate;
  649.     }
  650.     /**
  651.      * @param mixed $renewalDate
  652.      */
  653.     public function setRenewalDate($renewalDate): void
  654.     {
  655.         $this->renewalDate $renewalDate;
  656.     }
  657.     /**
  658.      * @return mixed
  659.      */
  660.     public function getTopUpDate()
  661.     {
  662.         return $this->topUpDate;
  663.     }
  664.     /**
  665.      * @param mixed $topUpDate
  666.      */
  667.     public function setTopUpDate($topUpDate): void
  668.     {
  669.         $this->topUpDate $topUpDate;
  670.     }
  671.     /**
  672.      * @return mixed
  673.      */
  674.     public function getConnectionNo()
  675.     {
  676.         return $this->connectionNo;
  677.     }
  678.     /**
  679.      * @param mixed $connectionNo
  680.      */
  681.     public function setConnectionNo($connectionNo): void
  682.     {
  683.         $this->connectionNo $connectionNo;
  684.     }
  685.     /**
  686.      * @return mixed
  687.      */
  688.     public function getVehicleNo()
  689.     {
  690.         return $this->vehicleNo;
  691.     }
  692.     /**
  693.      * @param mixed $vehicleNo
  694.      */
  695.     public function setVehicleNo($vehicleNo): void
  696.     {
  697.         $this->vehicleNo $vehicleNo;
  698.     }
  699.     /**
  700.      * @return mixed
  701.      */
  702.     public function getLatestGeo()
  703.     {
  704.         return $this->latestGeo;
  705.     }
  706.     /**
  707.      * @param mixed $latestGeo
  708.      */
  709.     public function setLatestGeo($latestGeo): void
  710.     {
  711.         $this->latestGeo $latestGeo;
  712.     }
  713.     /**
  714.      * @return false|string
  715.      */
  716.     public function getExpireAt()
  717.     {
  718.         return $this->expireAt;
  719.     }
  720.     /**
  721.      * @param false|string $expireAt
  722.      */
  723.     public function setExpireAt($expireAt): void
  724.     {
  725.         $this->expireAt $expireAt;
  726.     }
  727.     /**
  728.      * @return mixed
  729.      */
  730.     public function getDeviceIcon()
  731.     {
  732.         return $this->deviceIcon;
  733.     }
  734.     /**
  735.      * @param mixed $deviceIcon
  736.      */
  737.     public function setDeviceIcon($deviceIcon): void
  738.     {
  739.         $this->deviceIcon $deviceIcon;
  740.     }
  741.     /**
  742.      * @return mixed
  743.      */
  744.     public function getSpeedLimit()
  745.     {
  746.         return $this->speedLimit;
  747.     }
  748.     /**
  749.      * @param mixed $speedLimit
  750.      */
  751.     public function setSpeedLimit($speedLimit): void
  752.     {
  753.         $this->speedLimit $speedLimit;
  754.     }
  755.     /**
  756.      * @return mixed
  757.      */
  758.     public function getAverageFuel()
  759.     {
  760.         return $this->averageFuel;
  761.     }
  762.     /**
  763.      * @param mixed $averageFuel
  764.      */
  765.     public function setAverageFuel($averageFuel): void
  766.     {
  767.         $this->averageFuel $averageFuel;
  768.     }
  769.     /**
  770.      * @return int
  771.      */
  772.     public function getGeoDiff(): int
  773.     {
  774.         return $this->geoDiff;
  775.     }
  776.     /**
  777.      * @param int $geoDiff
  778.      */
  779.     public function setGeoDiff(int $geoDiff): void
  780.     {
  781.         $this->geoDiff $geoDiff;
  782.     }
  783.     public function getDeviceSimplified(): array
  784.     {
  785.         return array(
  786.             'id'=>$this->getId(),
  787.             'vehicleNo'=>$this->getVehicleNo(),
  788.             'vehicleCode'=>$this->getVehicleCode(),
  789.             'deviceName'=>$this->getDeviceName(),
  790.             'deviceCode'=>$this->getDeviceCode(),
  791.             'imei'=>$this->getImei(),
  792.             'lastGeoAt'=>($this->getLastGeoAt() != null)?$this->getLastGeoAt()->format('Y-m-d H:i:s'):"",
  793.             'latestGeo'=>$this->getLatestGeo(),
  794.             'deviceTypeCode'=>$this->getDeviceType()->getMetaCode(),
  795.             'icon'=>$this->getDeviceIcon(),
  796.             'connectionNo'=>$this->getConnectionNo(),
  797.             'authLevel'=>$this->getAuthLevel(),
  798.             'childLevelCode'=>$this->getChildLevelCode(),
  799.             'geoDiff'=>$this->getGeoDiff(),
  800.             'legalEntityCode'=>$this->getLegalEntityCode(),
  801.             'levelDepth'=>$this->getLevelDepth(),
  802.             'registeredRegionCode'=>$this->getRegisteredRegionCode(),
  803.             'speedLimit'=>$this->getSpeedLimit(),
  804.             'idlingTime'=>$this->getIdlingTime(),
  805.             'engineMode'=>$this->getEngineMode(),
  806.             'parkingBar'=>$this->getParkingBar(),
  807.             'accessUsers'=>$this->getAccessUsers(),
  808.             'billingProfileCode'=>$this->getBillingProfileCode(),
  809.             'averageFuel'=>$this->getAverageFuel(),
  810.         );
  811.     }
  812.     /**
  813.      * @return mixed
  814.      */
  815.     public function getLatestGeoData()
  816.     {
  817.         return $this->latestGeoData;
  818.     }
  819.     /**
  820.      * @param mixed $latestGeoData
  821.      */
  822.     public function setLatestGeoData($latestGeoData): void
  823.     {
  824.         $this->latestGeoData $latestGeoData;
  825.     }
  826.     /**
  827.      * @return mixed
  828.      */
  829.     public function getIdlingTime()
  830.     {
  831.         return ($this->idlingTime != null)?$this->idlingTime:5;
  832.     }
  833.     /**
  834.      * @param mixed $idlingTime
  835.      */
  836.     public function setIdlingTime($idlingTime)
  837.     {
  838.         $this->idlingTime $idlingTime;
  839.     }
  840.     /**
  841.      * @return mixed
  842.      */
  843.     public function getAccessUsers()
  844.     {
  845.         return $this->accessUsers;
  846.     }
  847.     /**
  848.      * @param mixed $accessUsers
  849.      */
  850.     public function setAccessUsers($accessUsers)
  851.     {
  852.         $this->accessUsers $accessUsers;
  853.     }
  854.     /**
  855.      * @return mixed
  856.      */
  857.     public function getEngineMode()
  858.     {
  859.         return $this->engineMode;
  860.     }
  861.     /**
  862.      * @param mixed $engineMode
  863.      */
  864.     public function setEngineMode($engineMode)
  865.     {
  866.         $this->engineMode $engineMode;
  867.     }
  868.     /**
  869.      * @return mixed
  870.      */
  871.     public function getParkingBar()
  872.     {
  873.         return $this->parkingBar;
  874.     }
  875.     /**
  876.      * @param mixed $parkingBar
  877.      */
  878.     public function setParkingBar($parkingBar)
  879.     {
  880.         $this->parkingBar $parkingBar;
  881.     }
  882.     /**
  883.      * @return null|DeviceBillingPaymentProfile
  884.      */
  885.     public function getBillingProfile():?DeviceBillingPaymentProfile
  886.     {
  887.         return $this->billingProfile;
  888.     }
  889.     /**
  890.      * @param mixed $billingProfile
  891.      */
  892.     public function setBillingProfile($billingProfile): void
  893.     {
  894.         $this->billingProfile $billingProfile;
  895.     }
  896.     /**
  897.      * @return mixed
  898.      */
  899.     public function getBillingProfileCode()
  900.     {
  901.         return $this->billingProfileCode;
  902.     }
  903.     /**
  904.      * @param mixed $billingProfileCode
  905.      */
  906.     public function setBillingProfileCode($billingProfileCode): void
  907.     {
  908.         $this->billingProfileCode $billingProfileCode;
  909.     }
  910.     /**
  911.      * @return mixed
  912.      */
  913.     public function getVehicleCode():?string
  914.     {
  915.         return $this->vehicleCode;
  916.     }
  917.     /**
  918.      * @param mixed $vehicleCode
  919.      */
  920.     public function setVehicleCode($vehicleCode): void
  921.     {
  922.         $this->vehicleCode $vehicleCode;
  923.     }
  924.     /**
  925.      * @return mixed
  926.      */
  927.     public function getActiveDeviceVehicleHistory()
  928.     {
  929.         return $this->activeDeviceVehicleHistory;
  930.     }
  931.     /**
  932.      * @param mixed $activeDeviceVehicleHistory
  933.      */
  934.     public function setActiveDeviceVehicleHistory($activeDeviceVehicleHistory): void
  935.     {
  936.         $this->activeDeviceVehicleHistory $activeDeviceVehicleHistory;
  937.     }
  938.     /**
  939.      * @return mixed
  940.      */
  941.     public function getIsIoSensorEnabled()
  942.     {
  943.         return $this->isIoSensorEnabled;
  944.     }
  945.     /**
  946.      * @param mixed $isIoSensorEnabled
  947.      */
  948.     public function setIsIoSensorEnabled($isIoSensorEnabled): void
  949.     {
  950.         $this->isIoSensorEnabled $isIoSensorEnabled;
  951.     }
  952.     /**
  953.      * @return mixed
  954.      */
  955.     public function getDefaultIndicationSensorCode()
  956.     {
  957.         return $this->defaultIndicationSensorCode;
  958.     }
  959.     /**
  960.      * @param mixed $defaultIndicationSensorCode
  961.      */
  962.     public function setDefaultIndicationSensorCode($defaultIndicationSensorCode): void
  963.     {
  964.         $this->defaultIndicationSensorCode $defaultIndicationSensorCode;
  965.     }
  966.     /**
  967.      * @return mixed
  968.      */
  969.     public function getFuelFactor()
  970.     {
  971.         return $this->fuelFactor;
  972.     }
  973.     /**
  974.      * @param mixed $fuelFactor
  975.      */
  976.     public function setFuelFactor($fuelFactor): void
  977.     {
  978.         $this->fuelFactor $fuelFactor;
  979.     }
  980.     /**
  981.      * @return DeviceBatteryLevel|null
  982.      */
  983.     public function getBatteryLevel() : ?DeviceBatteryLevel
  984.     {
  985.         return $this->batteryLevel;
  986.     }
  987.     /**
  988.      * @param mixed $batteryLevel
  989.      */
  990.     public function setBatteryLevel($batteryLevel): void
  991.     {
  992.         $this->batteryLevel $batteryLevel;
  993.     }
  994.     /**
  995.      * @return mixed
  996.      */
  997.     public function getFuelFunction() : ?VehicleFuelFunction
  998.     {
  999.         return $this->fuelFunction;
  1000.     }
  1001.     /**
  1002.      * @param mixed $fuelFunction
  1003.      */
  1004.     public function setFuelFunction($fuelFunction): void
  1005.     {
  1006.         $this->fuelFunction $fuelFunction;
  1007.     }
  1008.     /**
  1009.      * @return false
  1010.      */
  1011.     public function getIsBleTempSensorEnabled()
  1012.     {
  1013.         return $this->isBleTempSensorEnabled;
  1014.     }
  1015.     /**
  1016.      * @param false $isBleTempSensorEnabled
  1017.      */
  1018.     public function setIsBleTempSensorEnabled(bool $isBleTempSensorEnabled): void
  1019.     {
  1020.         $this->isBleTempSensorEnabled $isBleTempSensorEnabled;
  1021.     }
  1022.     /**
  1023.      * @return mixed
  1024.      */
  1025.     public function getBleTempSensorConfig():?BleTempSensorConfig
  1026.     {
  1027.         return $this->bleTempSensorConfig;
  1028.     }
  1029.     /**
  1030.      * @param mixed $bleTempSensorConfig
  1031.      */
  1032.     public function setBleTempSensorConfig($bleTempSensorConfig): void
  1033.     {
  1034.         $this->bleTempSensorConfig $bleTempSensorConfig;
  1035.     }
  1036. }