]> git.basschouten.com Git - openhab-addons.git/blob
97f6bc8f86dea7737b945f80a9ab6663cfd61612
[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.electroluxair.internal.dto;
14
15 import java.util.HashMap;
16 import java.util.Map;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19
20 import com.google.gson.annotations.SerializedName;
21
22 /**
23  * The {@link ElectroluxPureA9DTO} class defines the DTO for the Electrolux Pure A9.
24  *
25  * @author Jan Gustafsson - Initial contribution
26  */
27 @NonNullByDefault
28 public class ElectroluxPureA9DTO {
29     private String applianceId = "";
30     private ApplianceInfo applianceInfo = new ApplianceInfo();
31     private ApplianceData applianceData = new ApplianceData();
32     private Properties properties = new Properties();
33     private String status = "";
34     private String connectionState = "";
35
36     public String getApplianceId() {
37         return applianceId;
38     }
39
40     public ApplianceInfo getApplianceInfo() {
41         return applianceInfo;
42     }
43
44     public void setApplianceInfo(ApplianceInfo applianceInfo) {
45         this.applianceInfo = applianceInfo;
46     }
47
48     public ApplianceData getApplianceData() {
49         return applianceData;
50     }
51
52     public Properties getProperties() {
53         return properties;
54     }
55
56     public String getStatus() {
57         return status;
58     }
59
60     public String getConnectionState() {
61         return connectionState;
62     }
63
64     public class ApplianceInfo {
65         private String manufacturingDateCode = "";
66         private String serialNumber = "";
67         private String pnc = "";
68         private String brand = "";
69         private String market = "";
70         private String productArea = "";
71         private String deviceType = "";
72         private String project = "";
73         private String model = "";
74         private String variant = "";
75         private String colour = "";
76
77         public String getManufacturingDateCode() {
78             return manufacturingDateCode;
79         }
80
81         public String getSerialNumber() {
82             return serialNumber;
83         }
84
85         public String getPnc() {
86             return pnc;
87         }
88
89         public String getBrand() {
90             return brand;
91         }
92
93         public String getMarket() {
94             return market;
95         }
96
97         public String getProductArea() {
98             return productArea;
99         }
100
101         public String getDeviceType() {
102             return deviceType;
103         }
104
105         public String getProject() {
106             return project;
107         }
108
109         public String getModel() {
110             return model;
111         }
112
113         public String getVariant() {
114             return variant;
115         }
116
117         public String getColour() {
118             return colour;
119         }
120     }
121
122     class ApplianceData {
123         private String applianceName = "";
124         private String created = "";
125         private String modelName = "";
126
127         public String getApplianceName() {
128             return applianceName;
129         }
130
131         public String getCreated() {
132             return created;
133         }
134
135         public String getModelName() {
136             return modelName;
137         }
138     }
139
140     public class Properties {
141         private Desired desired = new Desired();
142         private Reported reported = new Reported();
143         private Object metadata = new Object();
144
145         public Desired getDesired() {
146             return desired;
147         }
148
149         public Reported getReported() {
150             return reported;
151         }
152
153         public Object getMetadata() {
154             return metadata;
155         }
156     }
157
158     class Desired {
159         @SerializedName("TimeZoneStandardName")
160         private String timeZoneStandardName = "";
161         @SerializedName("FrmVer_NIU")
162         private String frmVerNIU = "";
163         @SerializedName("LocationReq")
164         private boolean locationReq;
165         private Map<String, Object> metadata = new HashMap<>();
166         private int version;
167
168         public String getTimeZoneStandardName() {
169             return timeZoneStandardName;
170         }
171
172         public String getFrmVerNIU() {
173             return frmVerNIU;
174         }
175
176         public boolean isLocationReq() {
177             return locationReq;
178         }
179
180         public Map<String, Object> getMetadata() {
181             return metadata;
182         }
183
184         public int getVersion() {
185             return version;
186         }
187     }
188
189     public class Reported {
190         @SerializedName("FrmVer_NIU")
191         private String frmVerNIU = "";
192         @SerializedName("Workmode")
193         private String workmode = "";
194         @SerializedName("FilterRFID")
195         private String filterRFID = "";
196         @SerializedName("FilterLife")
197         private int filterLife = 0;
198         @SerializedName("Fanspeed")
199         private int fanSpeed = 0;
200         @SerializedName("UILight")
201         private boolean uiLight = false;
202         @SerializedName("SafetyLock")
203         private boolean safetyLock = false;
204         @SerializedName("Ionizer")
205         private boolean ionizer = false;
206         @SerializedName("Sleep")
207         private boolean sleep = false;
208         @SerializedName("Scheduler")
209         private boolean scheduler = false;
210         @SerializedName("FilterType")
211         private int filterType = 0;
212         @SerializedName("DspIcoPM2_5")
213         private boolean dspIcoPM25 = false;
214         @SerializedName("DspIcoPM1")
215         private boolean dspIcoPM1 = false;
216         @SerializedName("DspIcoPM10")
217         private boolean dspIcoPM10 = false;
218         @SerializedName("DspIcoTVOC")
219         private boolean dspIcoTVOC = false;
220         @SerializedName("ErrPM2_5")
221         private boolean errPM25 = false;
222         @SerializedName("ErrTVOC")
223         private boolean errTVOC = false;
224         @SerializedName("ErrTempHumidity")
225         private boolean errTempHumidity = false;
226         @SerializedName("ErrFanMtr")
227         private boolean errFanMtr = false;
228         @SerializedName("ErrCommSensorDisplayBrd")
229         private boolean errCommSensorDisplayBrd = false;
230         @SerializedName("DoorOpen")
231         private boolean doorOpen = false;
232         @SerializedName("ErrRFID")
233         private boolean errRFID = false;
234         @SerializedName("SignalStrength")
235         private String signalStrength = "";
236         private Map<String, Object> metadata = new HashMap<>();
237         private int version = 0;
238         private String deviceId = "";
239         @SerializedName("CO2")
240         private int co2 = 0;
241         @SerializedName("TVOC")
242         private int tvoc = 0;
243         @SerializedName("Temp")
244         private int temp = 0;
245         @SerializedName("Humidity")
246         private int humidity = 0;
247         @SerializedName("RSSI")
248         private int rssi = 0;
249         @SerializedName("PM1")
250         private int pm1 = 0;
251         @SerializedName("PM2_5")
252         private int pm25 = 0;
253         @SerializedName("PM10")
254         private int pm10 = 0;
255
256         public String getFrmVerNIU() {
257             return frmVerNIU;
258         }
259
260         public String getWorkmode() {
261             return workmode;
262         }
263
264         public String getFilterRFID() {
265             return filterRFID;
266         }
267
268         public int getFilterLife() {
269             return filterLife;
270         }
271
272         public int getFanspeed() {
273             return fanSpeed;
274         }
275
276         public boolean isUILight() {
277             return uiLight;
278         }
279
280         public boolean isSafetyLock() {
281             return safetyLock;
282         }
283
284         public boolean isIonizer() {
285             return ionizer;
286         }
287
288         public boolean isSleep() {
289             return sleep;
290         }
291
292         public boolean isScheduler() {
293             return scheduler;
294         }
295
296         public int getFilterType() {
297             return filterType;
298         }
299
300         public boolean isDspIcoPM25() {
301             return dspIcoPM25;
302         }
303
304         public boolean isDspIcoPM1() {
305             return dspIcoPM1;
306         }
307
308         public boolean isDspIcoPM10() {
309             return dspIcoPM10;
310         }
311
312         public boolean isDspIcoTVOC() {
313             return dspIcoTVOC;
314         }
315
316         public boolean isErrPM25() {
317             return errPM25;
318         }
319
320         public boolean isErrTVOC() {
321             return errTVOC;
322         }
323
324         public boolean isErrTempHumidity() {
325             return errTempHumidity;
326         }
327
328         public boolean isErrFanMtr() {
329             return errFanMtr;
330         }
331
332         public boolean isErrCommSensorDisplayBrd() {
333             return errCommSensorDisplayBrd;
334         }
335
336         public boolean isDoorOpen() {
337             return doorOpen;
338         }
339
340         public boolean isErrRFID() {
341             return errRFID;
342         }
343
344         public String getSignalStrength() {
345             return signalStrength;
346         }
347
348         public Map<String, Object> getMetadata() {
349             return metadata;
350         }
351
352         public int getVersion() {
353             return version;
354         }
355
356         public String getDeviceId() {
357             return deviceId;
358         }
359
360         public int getCO2() {
361             return co2;
362         }
363
364         public int getTVOC() {
365             return tvoc;
366         }
367
368         public int getTemp() {
369             return temp;
370         }
371
372         public int getHumidity() {
373             return humidity;
374         }
375
376         public int getRSSI() {
377             return rssi;
378         }
379
380         public int getPM1() {
381             return pm1;
382         }
383
384         public int getPM25() {
385             return pm25;
386         }
387
388         public int getPM10() {
389             return pm10;
390         }
391     }
392 }