All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.geotab.model.entity.device.XDevice Maven / Gradle / Ivy

package com.geotab.model.entity.device;

import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;

import com.geotab.model.CustomParameter;
import com.geotab.model.entity.group.Group;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

/**
 * The base device for all Geotab GO products. Additional properties can be seen
 * in {@link Device}.
 */
@Getter @Setter
@NoArgsConstructor
@SuperBuilder(builderMethodName = "xDeviceBuilder")
public class XDevice extends Device {
  /**
   * The messaging status {@link Group}(s). Drivers with Garmin-equipped vehicles can update their working status by choosing one from a set
   * of common statuses. This status update is shared with their team. For example, when drivers finish their work, they can set their statuses to
   * 'Available'. Their dispatcher is notified of this and can begin to assign work based on both the location and availability of the drivers.
   * Default [Empty].
   */
  public List autoGroups;

  /**
   * The set of CustomParameter(s) associated with this device. Custom parameters allow the activation of special features — limited to custom and
   * beta firmware. Custom parameters are issued only when necessary. Default [Empty].
   */
  public List customParameters;

  /**
   * Gets or sets flag to force the parameters to be updated between the store and a go device, the store will be updated with the parameter version
   * of the go device +1.
   */
  public Boolean enableMustReprogram;

  /**
   * The Vehicles Identity Number reported by the engine.
   */
  public String engineVehicleIdentificationNumber;

  /**
   * Value indicating whether to wake up the GPS while the vehicle is parked: this will allow for a faster GPS latch when the vehicle begins its
   * trip. Note: This will drain the vehicle's battery at a faster rate and should not be used with newer devices. Default [false].
   */
  public Boolean ensureHotStart;

  /**
   * The GPS off delay in minutes. When enabled this allows the device to keep the GPS on for a period after the vehicle has been turned off.
   * Normally, the GPS turns off immediately. Keeping the GPS on can improve tracking on older devices when many stops are made. Default [0].
   */
  public Integer gpsOffDelay;

  /**
   * The vehicle license plate details of the vehicle associated with the device. Maximum length [50] Default [""].
   */
  public String licensePlate;

  /**
   * The state or province of the vehicle associated with the device. Maximum length [50] Default [""].
   */
  public String licenseState;

  /**
   * The device major firmware version. Newer versions have more functionality. Live device firmware versions are managed automatically. Default
   * [0].
   */
  public Integer major;

  /**
   * The device minor firmware version. Newer versions have more functionality. Live device firmware versions are managed automatically. Default
   * [0].
   */
  public Integer minor;

  /**
   * The parameter version that is stored in MyGeotab. The parameter version should be increased by one when the parameters have been modified and
   * need to be synced with the physical device. Default [2].
   */
  public Integer parameterVersion;

  /**
   * Toggle that determines whether or not a device is under automatic vehicle management. Default [true].
   */
  public Boolean pinDevice;

  /**
   * The Vehicle Identification Number (VIN) of the vehicle associated with the device. Maximum length [50] Default [""].
   */
  public String vehicleIdentificationNumber;

  /**
   * The parameter version that is on the device. Can be used to track the parameter version currently on the device by comparing to
   * ParameterVersion. Default [0].
   */
  public Integer parameterVersionOnDevice;

  @Override
  public void populateDefaults() {
    super.populateDefaults();
    this.autoGroups = new ArrayList<>();
    this.customParameters = new ArrayList<>();
    this.ensureHotStart = FALSE;
    this.gpsOffDelay = 0;
    this.licensePlate = "";
    this.licenseState = "";
    this.major = 0;
    this.minor = 0;
    this.parameterVersion = 2;
    this.pinDevice = TRUE;
    this.vehicleIdentificationNumber = "";
    this.parameterVersionOnDevice = 0;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy