]> git.basschouten.com Git - openhab-addons.git/blob
43acf3f9558b98748172faef9c6a7d6c685ed584
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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     public String getName() {
66         return name;
67     }
68
69     public String getType() {
70         return type;
71     }
72
73     public boolean isConnected() {
74         return isConnected;
75     }
76
77     public String getHwVersion() {
78         return hwVersion;
79     }
80
81     public String getFwVersion() {
82         return fwVersion;
83     }
84
85     public String getMacAddress() {
86         return macAddress;
87     }
88
89     public int getNumStations() {
90         return numStations;
91     }
92
93     public List<OrbitBhyveZone> getZones() {
94         return zones;
95     }
96
97     public String getId() {
98         return id;
99     }
100
101     public OrbitBhyveDeviceStatus getStatus() {
102         return status;
103     }
104
105     public String getWaterSenseMode() {
106         return waterSenseMode;
107     }
108
109     public void setWaterSenseMode(String waterSenseMode) {
110         this.waterSenseMode = waterSenseMode;
111     }
112 }