2019-02-28 18:48:25 +00:00
|
|
|
package types
|
|
|
|
|
2019-06-25 20:22:34 +00:00
|
|
|
import "time"
|
2019-02-28 18:48:25 +00:00
|
|
|
|
|
|
|
// Temperature ...
|
|
|
|
type Temperature struct {
|
2019-06-25 20:22:34 +00:00
|
|
|
TemperatureID string `json:"temperature_id" xml:"temperature_id"`
|
|
|
|
TemperatureValue float64 `json:"temperature_value,string" xml:"temperature_value,string"`
|
|
|
|
TemperatureFromDate time.Time `json:"temperature_from_date" xml:"temperature_from_date"`
|
|
|
|
TemperatureTillDate time.Time `json:"temperature_till_date" xml:"temperature_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-23 11:33:09 +00:00
|
|
|
|
2019-06-25 20:22:34 +00:00
|
|
|
func (t *Temperature) GetID() string {
|
|
|
|
return t.TemperatureID
|
|
|
|
}
|
2019-06-23 11:33:09 +00:00
|
|
|
|
2019-06-27 16:44:26 +00:00
|
|
|
func (t *Temperature) GetValue() float64 {
|
|
|
|
return t.TemperatureValue
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Temperature) GetFromDate() time.Time {
|
|
|
|
return t.TemperatureFromDate
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Temperature) GetTillDate() time.Time {
|
|
|
|
return t.TemperatureTillDate
|
|
|
|
}
|
|
|
|
|
2019-06-25 20:22:34 +00:00
|
|
|
func (t *Temperature) GetSensorID() string {
|
|
|
|
return t.SensorID
|
|
|
|
}
|
2019-06-23 11:33:09 +00:00
|
|
|
|
2019-06-27 16:44:26 +00:00
|
|
|
func (t *Temperature) GetCreationDate() *time.Time {
|
|
|
|
return t.CreationDate
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Temperature) GetMeasuredValueType() MeasuredValueType {
|
|
|
|
return MeasuredValueTypeTemperature
|
2019-06-25 20:22:34 +00:00
|
|
|
}
|
2019-06-26 21:36:01 +00:00
|
|
|
|
|
|
|
func (t *Temperature) SetTillDate(date time.Time) {
|
|
|
|
t.TemperatureTillDate = date
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Temperature) SetCreationDate(date *time.Time) {
|
|
|
|
t.CreationDate = date
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Temperature) SetUpdateDate(date *time.Time) {
|
|
|
|
t.UpdateDate = date
|
|
|
|
}
|