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