package com.ffii.towngas.pojo;

import java.util.HashMap;
import java.util.Map;

public class MqttRawData {

  private String topic;
  private Integer qos;
  private String payload;
  private String customerID;
  private String facilityID;
  private String equipmentType;
  private String equipmentID;
  private Integer gasrating;
  private Integer pilot;
  private Long timestamp;

  public String getTopic() {
    return topic;
  }

  public void setTopic(String topic) {
    this.topic = topic;
  }

  public Integer getQos() {
    return qos;
  }

  public void setQos(Integer qos) {
    this.qos = qos;
  }

  public String getPayload() {
    return payload;
  }

  public void setPayload(String payload) {
    this.payload = payload;
  }

  public String getCustomerID() {
    return customerID;
  }

  public void setCustomerID(String customerID) {
    this.customerID = customerID;
  }

  public String getFacilityID() {
    return facilityID;
  }

  public void setFacilityID(String facilityID) {
    this.facilityID = facilityID;
  }

  public String getEquipmentType() {
    return equipmentType;
  }

  public void setEquipmentType(String equipmentType) {
    this.equipmentType = equipmentType;
  }

  public String getEquipmentID() {
    return equipmentID;
  }

  public void setEquipmentID(String equipmentID) {
    this.equipmentID = equipmentID;
  }

  public Integer getGasrating() {
    return gasrating;
  }

  public void setGasrating(Integer gasrating) {
    this.gasrating = gasrating;
  }

  public Integer getPilot() {
    return pilot;
  }

  public void setPilot(Integer pilot) {
    this.pilot = pilot;
  }

  public Long getTimestamp() {
    return timestamp;
  }

  public void setTimestamp(Long timestamp) {
    this.timestamp = timestamp;
  }

  @Override
  public String toString() {
    return "MqttRawData [topic=" + topic + ", qos=" + qos + ", payload=" + payload + ", customerID=" + customerID
        + ", facilityID=" + facilityID + ", equipmentType=" + equipmentType + ", equipmentID=" + equipmentID
        + ", gasrating=" + gasrating + ", pilot=" + pilot + ", timestamp=" + timestamp + "]";
  }

  public Map<String, Object> toMap() {
    Map<String, Object> map = new HashMap<>();
    map.put("topic", topic);
    map.put("qos", qos);
    map.put("payload", payload);
    map.put("customerId", customerID);
    map.put("facilityId", facilityID);
    map.put("equipmentType", equipmentType);
    map.put("equipmentId", equipmentID);
    map.put("gasRating", gasrating);
    map.put("pilot", pilot);
    map.put("timestamp", timestamp);
    return map;
  }

}
