]> git.basschouten.com Git - openhab-addons.git/blob
545dbf42ad9ddb27aa07abbd5f181ba805a866fe
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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("suggested_start_time")
58     String suggestedStartTime = "";
59
60     JsonObject timezone = new JsonObject();
61
62     @SerializedName("water_sense_mode")
63     String waterSenseMode = "";
64
65     @SerializedName("wifi_version")
66     int wifiVersion = 0;
67
68     public String getName() {
69         return name;
70     }
71
72     public String getType() {
73         return type;
74     }
75
76     public boolean isConnected() {
77         return isConnected;
78     }
79
80     public String getHwVersion() {
81         return hwVersion;
82     }
83
84     public String getFwVersion() {
85         return fwVersion;
86     }
87
88     public String getMacAddress() {
89         return macAddress;
90     }
91
92     public int getNumStations() {
93         return numStations;
94     }
95
96     public List<OrbitBhyveZone> getZones() {
97         return zones;
98     }
99
100     public String getId() {
101         return id;
102     }
103
104     public OrbitBhyveDeviceStatus getStatus() {
105         return status;
106     }
107
108     public String getWaterSenseMode() {
109         return waterSenseMode;
110     }
111
112     public void setWaterSenseMode(String waterSenseMode) {
113         this.waterSenseMode = waterSenseMode;
114     }
115 }