2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.sensorcommunity.internal.dto;
15 import java.util.List;
17 import com.google.gson.annotations.SerializedName;
20 * The {@link SensorData} Data Transfer Object
22 * @author Bernd Weymann - Initial contribution
24 public class SensorData {
26 private String timestamp;
27 @SerializedName("sampling_rate")
28 private int samplingRate;
29 @SerializedName("sensordatavalues")
30 private List<SensorDataValue> sensorDataValues;
31 private Location location;
32 private Sensor sensor;
35 public String toString() {
36 return id + timestamp;
43 public void setId(long id) {
47 public String getTimeStamp() {
51 public void setTimeStamp(String timeStamp) {
52 this.timestamp = timeStamp;
55 public int getSamplingRate() {
59 public void setSamplingRate(int samplingRate) {
60 this.samplingRate = samplingRate;
63 public List<SensorDataValue> getSensorDataValues() {
64 return sensorDataValues;
67 public void setSensorDataValues(List<SensorDataValue> sensorDataValues) {
68 this.sensorDataValues = sensorDataValues;
71 public Location getLocation() {
75 public void setLocation(Location location) {
76 this.location = location;
79 public Sensor getSensor() {
83 public void setSensor(Sensor sensor) {