com.geotab.model.entity.statusdata.SensorData Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.entity.statusdata;
import static com.geotab.model.serialization.filter.SensorDataFilterProvider.SENSOR_DATA_FILTER;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.geotab.model.entity.controller.Controller;
import com.geotab.model.entity.device.Device;
import com.geotab.model.entity.diagnostic.Diagnostic;
import java.time.LocalDateTime;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* The class that represents {@link StatusData} received from a sensor like bluetooth dongle.
*/
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonFilter(SENSOR_DATA_FILTER)
public class SensorData extends StatusData {
/**
* The MAC address of the sensor.
*/
private Long address;
@Builder(builderMethodName = "sensorDataBuilder")
public SensorData(String id, Long version, Double data, LocalDateTime dateTime,
Device device,
Diagnostic diagnostic,
Controller controller, Long address) {
super(id, version, data, dateTime, device, diagnostic, controller);
this.address = address;
}
}