]> git.basschouten.com Git - openhab-addons.git/blob
377715473a4c8274a2b8f3cc314b04803bca42a4
[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.livisismarthome.internal.client.api.entity.device;
14
15 import java.time.ZonedDateTime;
16
17 import org.openhab.binding.livisismarthome.internal.client.Util;
18
19 import com.google.gson.annotations.SerializedName;
20
21 /**
22  * Holds the configuration of the Device.
23  *
24  * @author Oliver Kuhl - Initial contribution
25  *
26  */
27 public class DeviceConfigDTO {
28
29     private String name;
30     private String protocolId;
31     private String timeOfAcceptance;
32     private String timeOfDiscovery;
33     private String hardwareVersion;
34     private String softwareVersion;
35     private String firmwareVersion;
36     private String hostName;
37     private boolean activityLogEnabled;
38     private String configurationState;
39     @SerializedName("IPAddress")
40     private String ipAddress;
41     @SerializedName("MACAddress")
42     private String macAddress;
43     private String registrationTime;
44     private String timeZone;
45     private String shcType;
46     private String geoLocation;
47     private Double currentUTCOffset;
48     private Boolean backendConnectionMonitored;
49     @SerializedName("RFCommFailureNotification")
50     private Boolean rfCommFailureNotification;
51     private String displayCurrentTemperature;
52     private String underlyingDeviceIds;
53     private String meterId;
54     private String meterFirmwareVersion;
55
56     /**
57      * @return the name
58      */
59     public String getName() {
60         return name;
61     }
62
63     /**
64      * @param name the name to set
65      */
66     public void setName(String name) {
67         this.name = name;
68     }
69
70     /**
71      * @return the protocolId
72      */
73     public String getProtocolId() {
74         return protocolId;
75     }
76
77     /**
78      * @param protocolId the protocolId to set
79      */
80     public void setProtocolId(String protocolId) {
81         this.protocolId = protocolId;
82     }
83
84     /**
85      * Returns the time, when the {@link DeviceDTO} was added to the SHC configuration.
86      *
87      * @return time of acceptance
88      */
89     public ZonedDateTime getTimeOfAcceptance() {
90         if (timeOfAcceptance == null) {
91             return null;
92         }
93         return Util.timeStringToDate(timeOfAcceptance);
94     }
95
96     /**
97      * @param timeOfAcceptance the timeOfAcceptance to set
98      */
99     public void setTimeOfAcceptance(String timeOfAcceptance) {
100         this.timeOfAcceptance = timeOfAcceptance;
101     }
102
103     /**
104      * Returns the time, when the {@link DeviceDTO} was discovered by the SHC.
105      *
106      * @return time of discovery
107      */
108     public ZonedDateTime getTimeOfDiscovery() {
109         if (timeOfDiscovery == null) {
110             return null;
111         }
112         return Util.timeStringToDate(timeOfDiscovery);
113     }
114
115     /**
116      * @param timeOfDiscovery the timeOfDiscovery to set
117      */
118     public void setTimeOfDiscovery(String timeOfDiscovery) {
119         this.timeOfDiscovery = timeOfDiscovery;
120     }
121
122     /**
123      * @return the hardwareVersion
124      */
125     public String getHardwareVersion() {
126         return hardwareVersion;
127     }
128
129     /**
130      * @param hardwareVersion the hardwareVersion to set
131      */
132     public void setHardwareVersion(String hardwareVersion) {
133         this.hardwareVersion = hardwareVersion;
134     }
135
136     /**
137      * @return the softwareVersion
138      */
139     public String getSoftwareVersion() {
140         return softwareVersion;
141     }
142
143     /**
144      * @param softwareVersion the softwareVersion to set
145      */
146     public void setSoftwareVersion(String softwareVersion) {
147         this.softwareVersion = softwareVersion;
148     }
149
150     /**
151      * @return the firmwareVersion
152      */
153     public String getFirmwareVersion() {
154         return firmwareVersion;
155     }
156
157     /**
158      * @param firmwareVersion the firmwareVersion to set
159      */
160     public void setFirmwareVersion(String firmwareVersion) {
161         this.firmwareVersion = firmwareVersion;
162     }
163
164     /**
165      * @return the hostName
166      */
167     public String getHostName() {
168         return hostName;
169     }
170
171     /**
172      * @param hostName the hostName to set
173      */
174     public void setHostName(String hostName) {
175         this.hostName = hostName;
176     }
177
178     /**
179      * @return the activityLogEnabled
180      */
181     public boolean isActivityLogEnabled() {
182         return activityLogEnabled;
183     }
184
185     /**
186      * @param activityLogEnabled the activityLogEnabled to set
187      */
188     public void setActivityLogEnabled(boolean activityLogEnabled) {
189         this.activityLogEnabled = activityLogEnabled;
190     }
191
192     /**
193      * @return the configurationState
194      */
195     public String getConfigurationState() {
196         return configurationState;
197     }
198
199     /**
200      * @param configurationState the configurationState to set
201      */
202     public void setConfigurationState(String configurationState) {
203         this.configurationState = configurationState;
204     }
205
206     /**
207      * @return the iPAddress
208      */
209     public String getIPAddress() {
210         return ipAddress;
211     }
212
213     /**
214      * @param ipAddress the ipAddress to set
215      */
216     public void setIPAddress(String ipAddress) {
217         this.ipAddress = ipAddress;
218     }
219
220     /**
221      * @return the mACAddress
222      */
223     public String getMACAddress() {
224         return macAddress;
225     }
226
227     /**
228      * @param mACAddress the mACAddress to set
229      */
230     public void setMACAddress(String mACAddress) {
231         this.macAddress = mACAddress;
232     }
233
234     /**
235      * @return the registrationTime
236      */
237     public ZonedDateTime getRegistrationTime() {
238         if (registrationTime == null) {
239             return null;
240         }
241         return Util.timeStringToDate(registrationTime);
242     }
243
244     /**
245      * @param registrationTime the registrationTime to set
246      */
247     public void setRegistrationTime(String registrationTime) {
248         this.registrationTime = registrationTime;
249     }
250
251     /**
252      * @return the timeZone
253      */
254     public String getTimeZone() {
255         return timeZone;
256     }
257
258     /**
259      * @param timeZone the timeZone to set
260      */
261     public void setTimeZone(String timeZone) {
262         this.timeZone = timeZone;
263     }
264
265     /**
266      * @return the shcType
267      */
268     public String getShcType() {
269         return shcType;
270     }
271
272     /**
273      * @param shcType the shcType to set
274      */
275     public void setShcType(String shcType) {
276         this.shcType = shcType;
277     }
278
279     /**
280      * @return the geoLocation
281      */
282     public String getGeoLocation() {
283         return geoLocation;
284     }
285
286     /**
287      * @param geoLocation the geoLocation to set
288      */
289     public void setGeoLocation(String geoLocation) {
290         this.geoLocation = geoLocation;
291     }
292
293     /**
294      * @return the currentUTCOffset
295      */
296     public Double getCurrentUTCOffset() {
297         return currentUTCOffset;
298     }
299
300     /**
301      * @param currentUTCOffset the currentUTCOffset to set
302      */
303     public void setCurrentUTCOffset(Double currentUTCOffset) {
304         this.currentUTCOffset = currentUTCOffset;
305     }
306
307     /**
308      * @return the backendConnectionMonitored
309      */
310     public Boolean getBackendConnectionMonitored() {
311         return backendConnectionMonitored;
312     }
313
314     /**
315      * @param backendConnectionMonitored the backendConnectionMonitored to set
316      */
317     public void setBackendConnectionMonitored(Boolean backendConnectionMonitored) {
318         this.backendConnectionMonitored = backendConnectionMonitored;
319     }
320
321     /**
322      * @return the rFCommFailureNotification
323      */
324     public Boolean getRFCommFailureNotification() {
325         return rfCommFailureNotification;
326     }
327
328     /**
329      * @param rFCommFailureNotification the rFCommFailureNotification to set
330      */
331     public void setRFCommFailureNotification(Boolean rFCommFailureNotification) {
332         rfCommFailureNotification = rFCommFailureNotification;
333     }
334
335     /**
336      * @return the displayCurrentTemperature
337      */
338     public String getDisplayCurrentTemperature() {
339         return displayCurrentTemperature;
340     }
341
342     /**
343      * @param displayCurrentTemperature the displayCurrentTemperature to set
344      */
345     public void setDisplayCurrentTemperature(String displayCurrentTemperature) {
346         this.displayCurrentTemperature = displayCurrentTemperature;
347     }
348
349     /**
350      * @return the underlyingDeviceIds
351      */
352     public String getUnderlyingDeviceIds() {
353         return underlyingDeviceIds;
354     }
355
356     /**
357      * @param underlyingDeviceIds the underlyingDeviceIds to set
358      */
359     public void setUnderlyingDeviceIds(String underlyingDeviceIds) {
360         this.underlyingDeviceIds = underlyingDeviceIds;
361     }
362
363     /**
364      * @return the meterId
365      */
366     public String getMeterId() {
367         return meterId;
368     }
369
370     /**
371      * @param meterId the meterId to set
372      */
373     public void setMeterId(String meterId) {
374         this.meterId = meterId;
375     }
376
377     /**
378      * @return the meterFirmwareVersion
379      */
380     public String getMeterFirmwareVersion() {
381         return meterFirmwareVersion;
382     }
383
384     /**
385      * @param meterFirmwareVersion the meterFirmwareVersion to set
386      */
387     public void setMeterFirmwareVersion(String meterFirmwareVersion) {
388         this.meterFirmwareVersion = meterFirmwareVersion;
389     }
390 }