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

com.geotab.model.entity.user.User Maven / Gradle / Ivy

/*
 *
 * 2020 Copyright (C) Geotab Inc. All rights reserved.
 */

package com.geotab.model.entity.user;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.geotab.model.entity.NameEntityWithVersion;
import com.geotab.model.entity.certificate.Certificate;
import com.geotab.model.entity.group.Group;
import com.geotab.model.enumeration.DayOfWeek;
import com.geotab.model.enumeration.ElectricEnergyEconomyUnit;
import com.geotab.model.enumeration.FuelEconomyUnit;
import com.geotab.model.enumeration.GoogleMapStyle;
import com.geotab.model.enumeration.HereMapStyle;
import com.geotab.model.enumeration.HosRuleSet;
import com.geotab.model.enumeration.OpenStreetMapStyle;
import com.geotab.model.enumeration.UserAuthenticationType;
import com.geotab.model.enumeration.ZoneDisplayMode;
import com.geotab.model.serialization.UserDeserializer;
import com.geotab.model.settings.MapView;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * A user of the system. A user can be a MyGeotab user or a user that is a {@link Driver}.
 */
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonDeserialize(using = UserDeserializer.class)
@SuppressWarnings("AbbreviationAsWordInName")
public class User extends NameEntityWithVersion {

  /**
   * A value indicating the user accepted EULA revision number. Default [0].
   */
  protected int acceptedEULA;

  /**
   * The version of the last drive what's new guide viewed by the user. Default [0].
   */
  protected Integer driveGuideVersion;

  /**
   * Value indicating accepted WiFi-specific EULA version. Default [0].
   */
  protected Integer wifiEULA;

  /**
   * The active dashboard reports.  Default [empty].
   */
  protected List activeDashboardReports;

  /**
   * The date the user is active from. Default [UtcNow].
   */
  protected LocalDateTime activeFrom;

  /**
   * The date the user is active to. Default [MaxDate].
   */
  protected LocalDateTime activeTo;

  /**
   * List of all available dashboard reports to the user. Default [empty].
   */
  protected List availableDashboardReports;

  /**
   * The user's stored list of custom response options to choose from when sending a TextMessage.
   * Each item is a set of predefined response options. Default [empty].
   */
  protected String[][] cannedResponseOptions;

  /**
   * Flag indicating whether the user's password requires resetting. If [true], the user will be
   * forced to change their password on next login. Default [false].
   */
  @JsonProperty("changePassword")
  protected boolean changePassword;

  /**
   * Free text field where any user information can be stored and referenced for this entity.
   * Default [""].
   */
  protected String comment;

  /**
   * List of organization {@link Group}(s) that the user belongs to.
   */
  protected List companyGroups;

  /**
   * The format dates will be displayed to this user. Default ["MM/dd/yy HH:mm:ss"].
   */
  protected String dateFormat;

  /**
   * The user phone number with space separated country phone code. Example +1 5555555555. Maximum
   * length [20] Default [""]
   */
  protected String phoneNumber;

  /**
   * The user two symbols country ISO code (https://www.iso.org/iso-3166-country-codes.html).
   * Maximum length [2] Default [""]
   */
  protected String countryCode;

  /**
   * The user phone number without formatting. Maximum length [5] Default [""]
   */
  protected String phoneNumberExtension;

  /**
   * The default map style for Google maps. Default [Roadmap].
   */
  protected GoogleMapStyle defaultGoogleMapStyle;

  /**
   * The default map engine to use for this user. System map engines are:
   * 
    *
  • * GoogleMaps *
  • *
  • * HereMap *
  • *
  • * MapBox *
  • *
* *

Default ["MapBox"]. */ protected String defaultMapEngine; /** * The default map style for Open Street Maps. Default [MapBox]. */ protected OpenStreetMapStyle defaultOpenStreetMapStyle; /** * The default map style for Here Maps. Default [Roadmap]. */ protected HereMapStyle defaultHereMapStyle; /** * Indicates the default page to view when login complete. Maps to the hash portion of the web * site URL (https://url/enpoint/[#page]). Default [helpGuide]. */ protected String defaultPage; /** * The designation or title of the employee. Maximum length [50] Default [""]. */ protected String designation; /** * The employee number or external identifier. Maximum length [50] Default [""]. */ protected String employeeNo; /** * The first name of the user. Maximum length [255]. */ protected String firstName; /** * The user's preferred {@link FuelEconomyUnit} for viewing fuel economy. Default [{@link * FuelEconomyUnit#LITERS_PER_100_KM}]. */ protected FuelEconomyUnit fuelEconomyUnit; /** * The user's preferred {@link ElectricEnergyEconomyUnit} for viewing fuel economy. Default * [{@link ElectricEnergyEconomyUnit#LITERS_E_PER_100_KM}]. */ protected ElectricEnergyEconomyUnit electricEnergyEconomyUnit; /** * The {@link HosRuleSet} the user follows. Default [{@link HosRuleSet#NONE}]. */ protected HosRuleSet hosRuleSet; /** * Value indicating whether the user is allowed to HOS yard move. Default [false]. */ @JsonProperty("isYardMoveEnabled") protected boolean isYardMoveEnabled; /** * Value indicating whether the user is allowed to HOS personal conveyance. Default [false]. */ @JsonProperty("isPersonalConveyanceEnabled") protected boolean isPersonalConveyanceEnabled; /** * Value indicating whether the user is allowed to HOS personal conveyance. Default [false]. */ @JsonProperty("isExemptHOSEnabled") protected boolean isExemptHOSEnabled; /** * Value indicating the maximum personal conveyance distance per day in meters. Default [0]. */ protected Double maxPCDistancePerDay; /** * The HOS authority name of the user. Default [""]. */ protected String authorityName; /** * The HOS authority address of the user. Default [""]. */ protected String authorityAddress; /** * Value indicating whether the old EULA has been accepted by the end user. Default [false]. */ @JsonProperty("isEULAAccepted") protected boolean isEULAAccepted; /** * Value that indicates whether news notifications are enabled for this user. Default [true]. */ @JsonProperty("isNewsEnabled") protected boolean isNewsEnabled = true; /** * Value indicating whether are service update notifications enabled for this user. Default * [false]. */ @JsonProperty("isServiceUpdatesEnabled") protected Boolean isServiceUpdatesEnabled; /** * Value indicating whether labs are enabled for this user. When set to true this will enable * experimental features that are still in the process of being developed. Default [false]. */ @JsonProperty("isLabsEnabled") protected boolean isLabsEnabled; /** * Whether the current regional settings is in metric units of measurement (or US/Imperial). * Default [true]. */ @JsonProperty("isMetric") protected boolean isMetric = true; /** * The user's language. Default: ["en"] for English. */ protected String language; /** * The user's preferred day to represent the start of the week. Default ["Sunday"]. */ protected DayOfWeek firstDayOfWeek; /** * The last name of the user. Maximum length [255]. */ protected String lastName; /** * The list of the of the available {@link MapView}s from the live map. Default [continent of the * user's selected time zone]. */ protected List mapViews; /** * The user's password. */ protected String password; /** * The private {@link Group}(s) that the user belongs to. */ protected List privateUserGroups; /** * The report {@link Group}(s) for reporting that this user belongs to. The selected reporting * groups will allow the user to sort entities that are children of the selected groups. It will * not allow them to see entities that are outside of their data access. Default [empty]. */ protected List reportGroups; /** * The security {@link Group}(s) this user belongs to; which define the user's access. */ protected List securityGroups; /** * A flag indicating whether to show ClickOnce support warning as the default page. (legacy) * Default [false]. */ @JsonProperty("showClickOnceWarning") protected boolean showClickOnceWarning; /** * The IANA time zone Id of the user. All data will be displayed in this time zone. Default * ["America/New_York"]. */ protected String timeZoneId; /** * The user authentication type. Default [Basic]. */ protected UserAuthenticationType userAuthenticationType; /** * The default zone display mode used on the map. Default [Default]. */ protected ZoneDisplayMode zoneDisplayMode; /** * The issuer certificate for the user. Will only be populated for users not using basic * authentication. */ protected Certificate issuerCertificate; /** * The name of the company for the user. Default [""]. */ protected String companyName; /** * The company address for the user. Default [""]. */ protected String companyAddress; /** * The carrier number. Default [""]. */ protected String carrierNumber; /** * The user's Last access date of the system. */ protected LocalDateTime lastAccessDate; /** * The is driver toggle, if [true] the user is a driver, otherwise [false]. Default [false]. */ @JsonProperty("isDriver") protected Boolean isDriver; /** * If [true] the user will receive the emailed report, otherwise [false]. Default [true]. */ @JsonProperty("isEmailReportEnabled") protected boolean isEmailReportEnabled = true; @Builder(builderMethodName = "userBuilder") public User(String id, String name, Long version, int acceptedEULA, Integer driveGuideVersion, Integer wifiEULA, List activeDashboardReports, LocalDateTime activeFrom, LocalDateTime activeTo, List availableDashboardReports, String[][] cannedResponseOptions, boolean changePassword, String comment, List companyGroups, String dateFormat, String phoneNumber, String countryCode, String phoneNumberExtension, GoogleMapStyle defaultGoogleMapStyle, String defaultMapEngine, OpenStreetMapStyle defaultOpenStreetMapStyle, HereMapStyle defaultHereMapStyle, String defaultPage, String designation, String employeeNo, String firstName, FuelEconomyUnit fuelEconomyUnit, ElectricEnergyEconomyUnit electricEnergyEconomyUnit, HosRuleSet hosRuleSet, boolean isYardMoveEnabled, boolean isPersonalConveyanceEnabled, boolean isExemptHOSEnabled, Double maxPCDistancePerDay, String authorityName, String authorityAddress, boolean isEULAAccepted, boolean isNewsEnabled, Boolean isServiceUpdatesEnabled, boolean isLabsEnabled, boolean isMetric, String language, DayOfWeek firstDayOfWeek, String lastName, List mapViews, String password, List privateUserGroups, List reportGroups, List securityGroups, boolean showClickOnceWarning, String timeZoneId, UserAuthenticationType userAuthenticationType, ZoneDisplayMode zoneDisplayMode, Certificate issuerCertificate, String companyName, String companyAddress, String carrierNumber, LocalDateTime lastAccessDate, Boolean isDriver, boolean isEmailReportEnabled) { super(id, name, version); this.acceptedEULA = acceptedEULA; this.driveGuideVersion = driveGuideVersion; this.wifiEULA = wifiEULA; this.activeDashboardReports = activeDashboardReports; this.activeFrom = activeFrom; this.activeTo = activeTo; this.availableDashboardReports = availableDashboardReports; this.cannedResponseOptions = cannedResponseOptions; this.changePassword = changePassword; this.comment = comment; this.companyGroups = companyGroups; this.dateFormat = dateFormat; this.phoneNumber = phoneNumber; this.countryCode = countryCode; this.phoneNumberExtension = phoneNumberExtension; this.defaultGoogleMapStyle = defaultGoogleMapStyle; this.defaultMapEngine = defaultMapEngine; this.defaultOpenStreetMapStyle = defaultOpenStreetMapStyle; this.defaultHereMapStyle = defaultHereMapStyle; this.defaultPage = defaultPage; this.designation = designation; this.employeeNo = employeeNo; this.firstName = firstName; this.fuelEconomyUnit = fuelEconomyUnit; this.electricEnergyEconomyUnit = electricEnergyEconomyUnit; this.hosRuleSet = hosRuleSet; this.isYardMoveEnabled = isYardMoveEnabled; this.isPersonalConveyanceEnabled = isPersonalConveyanceEnabled; this.isExemptHOSEnabled = isExemptHOSEnabled; this.maxPCDistancePerDay = maxPCDistancePerDay; this.authorityName = authorityName; this.authorityAddress = authorityAddress; this.isEULAAccepted = isEULAAccepted; this.isNewsEnabled = isNewsEnabled; this.isServiceUpdatesEnabled = isServiceUpdatesEnabled; this.isLabsEnabled = isLabsEnabled; this.isMetric = isMetric; this.language = language; this.firstDayOfWeek = firstDayOfWeek; this.lastName = lastName; this.mapViews = mapViews; this.password = password; this.privateUserGroups = privateUserGroups; this.reportGroups = reportGroups; this.securityGroups = securityGroups; this.showClickOnceWarning = showClickOnceWarning; this.timeZoneId = timeZoneId; this.userAuthenticationType = userAuthenticationType; this.zoneDisplayMode = zoneDisplayMode; this.issuerCertificate = issuerCertificate; this.companyName = companyName; this.companyAddress = companyAddress; this.carrierNumber = carrierNumber; this.lastAccessDate = lastAccessDate; this.isDriver = isDriver; this.isEmailReportEnabled = isEmailReportEnabled; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy