63 lines
1.4 KiB
Go
63 lines
1.4 KiB
Go
package types
|
|
|
|
import "time"
|
|
|
|
// Humidity ...
|
|
type Humidity struct {
|
|
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"`
|
|
}
|
|
|
|
func (h *Humidity) GetID() string {
|
|
return h.HumidityID
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func (h *Humidity) GetSensorID() string {
|
|
return h.SensorID
|
|
}
|
|
|
|
func (h *Humidity) GetCreationDate() *time.Time {
|
|
return h.CreationDate
|
|
}
|
|
|
|
func (h *Humidity) GetUpdateDate() *time.Time {
|
|
return h.UpdateDate
|
|
}
|
|
|
|
func (h *Humidity) GetMeasuredValueType() MeasuredValueType {
|
|
return MeasuredValueTypeHumidity
|
|
}
|
|
|
|
func (h *Humidity) SetValue(value float64) {
|
|
h.HumidityValue = value
|
|
}
|
|
|
|
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
|
|
}
|