]> git.basschouten.com Git - openhab-addons.git/blob
3a79153432b0a3aa70e451e13eda58043651372d
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.orbitbhyve.internal.model;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19
20 import com.google.gson.JsonObject;
21 import com.google.gson.annotations.SerializedName;
22
23 /**
24  * The {@link OrbitBhyveDevice} holds information about a B-Hyve
25  * device.
26  *
27  * @author Ondrej Pecta - Initial contribution
28  */
29 @NonNullByDefault
30 public class OrbitBhyveDevice {
31     String name = "";
32     String type = "";
33     String id = "";
34     List<OrbitBhyveZone> zones = new ArrayList<>();
35     OrbitBhyveDeviceStatus status = new OrbitBhyveDeviceStatus();
36
37     @SerializedName("is_connected")
38     boolean isConnected = false;
39
40     @SerializedName("hardware_version")
41     String hwVersion = "";
42
43     @SerializedName("firmware_version")
44     String fwVersion = "";
45
46     @SerializedName("mac_address")
47     String macAddress = "";
48
49     @SerializedName("num_stations")
50     int numStations = 0;
51
52     @SerializedName("last_connected_at")
53     String lastConnectedAt = "";
54
55     JsonObject location = new JsonObject();
56
57     @SerializedName("restricted_frequency")
58     JsonObject restrictedFrequency = new JsonObject();
59
60     @SerializedName("suggested_start_time")
61     String suggestedStartTime = "";
62
63     JsonObject timezone = new JsonObject();
64
65     @SerializedName("water_sense_mode")
66     String waterSenseMode = "";
67
68     @SerializedName("wifi_version")
69     int wifiVersion = 0;
70
71     public String getName() {
72         return name;
73     }
74
75     public String getType() {
76         return type;
77     }
78
79     public boolean isConnected() {
80         return isConnected;
81     }
82
83     public String getHwVersion() {
84         return hwVersion;
85     }
86
87     public String getFwVersion() {
88         return fwVersion;
89     }
90
91     public String getMacAddress() {
92         return macAddress;
93     }
94
95     public int getNumStations() {
96         return numStations;
97     }
98
99     public List<OrbitBhyveZone> getZones() {
100         return zones;
101     }
102
103     public String getId() {
104         return id;
105     }
106
107     public OrbitBhyveDeviceStatus getStatus() {
108         return status;
109     }
110
111     public String getWaterSenseMode() {
112         return waterSenseMode;
113     }
114
115     public void setWaterSenseMode(String waterSenseMode) {
116         this.waterSenseMode = waterSenseMode;
117     }
118 }