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

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

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

package com.geotab.model.entity.user;

import com.geotab.model.entity.Entity;
import com.geotab.model.enumeration.DriverKeyType;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * Represent the key used to identify a {@link Driver}.
 */
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class Key extends Entity {

  /**
   * The driver key type.
   */
  private DriverKeyType driverKeyType;

  /**
   * The ID of the driver key. Represents the decoded serial number. USB blue keys are assigned a
   * key ID.
   */
  private Long keyId;

  /**
   * The Serial Number of the driver key. Represents the key ID encoded as a serial number. NFC keys
   * are assigned a serial number.
   */
  private String serialNumber;

  @Builder
  public Key(String id, DriverKeyType driverKeyType, Long keyId, String serialNumber) {
    super(id);
    this.driverKeyType = driverKeyType;
    this.keyId = keyId;
    this.serialNumber = serialNumber;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy