2019-02-28 18:48:25 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
// Humidity ...
|
|
|
|
type Humidity struct {
|
2019-06-19 17:18:01 +00:00
|
|
|
HumidityID string `json:"humidity_id" xml:"humidity_id"`
|
|
|
|
HumidityValue float64 `json:"humidity_value,string" xml:"humidity_value"`
|
|
|
|
HumidityFromDate time.Time `json:"humidity_from_date" xml:"humidity_from_date"`
|
|
|
|
HumidityTillDate time.Time `json:"humidity_till_date" xml:"humidity_till_date"`
|
|
|
|
SensorID string `json:"sensor_id" xml:"sensor_id"`
|
|
|
|
CreationDate *time.Time `json:"creation_date" xml:"creation_date"`
|
|
|
|
UpdateDate *time.Time `json:"update_date" xml:"update_date"`
|
2019-02-28 18:48:25 +00:00
|
|
|
}
|
2019-06-25 20:22:34 +00:00
|
|
|
|
|
|
|
func (h *Humidity) GetID() string {
|
|
|
|
return h.HumidityID
|
|
|
|
}
|
|
|
|
|
2019-06-27 16:44:26 +00:00
|
|
|
func (h *Humidity) GetValue() float64 {
|
|
|
|
return h.HumidityValue
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Humidity) GetFromDate() time.Time {
|
|
|
|
return h.HumidityFromDate
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Humidity) GetTillDate() time.Time {
|
|
|
|
return h.HumidityTillDate
|
|
|
|
}
|
|
|
|
|
2019-06-25 20:22:34 +00:00
|
|
|
func (h *Humidity) GetSensorID() string {
|
|
|
|
return h.SensorID
|
|
|
|
}
|
|
|
|
|
2019-06-27 16:44:26 +00:00
|
|
|
func (h *Humidity) GetCreationDate() *time.Time {
|
|
|
|
return h.CreationDate
|
|
|
|
}
|
|
|
|
|
2019-06-28 11:04:04 +00:00
|
|
|
func (h *Humidity) GetUpdateDate() *time.Time {
|
|
|
|
return h.UpdateDate
|
|
|
|
}
|
|
|
|
|
2019-06-27 16:44:26 +00:00
|
|
|
func (h *Humidity) GetMeasuredValueType() MeasuredValueType {
|
|
|
|
return MeasuredValueTypeHumidity
|
2019-06-25 20:22:34 +00:00
|
|
|
}
|
2019-06-26 21:36:01 +00:00
|
|
|
|
|
|
|
func (h *Humidity) SetTillDate(date time.Time) {
|
|
|
|
h.HumidityTillDate = date
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Humidity) SetCreationDate(date *time.Time) {
|
|
|
|
h.CreationDate = date
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Humidity) SetUpdateDate(date *time.Time) {
|
|
|
|
h.UpdateDate = date
|
|
|
|
}
|