]> git.basschouten.com Git - openhab-addons.git/blob
6bfa86db0ecaa81763f4713f5c0a9618493949ca
[openhab-addons.git] /
1 /*
2  * Copyright 2017 Gregory Moyer
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openhab.binding.sleepiq.api.model;
17
18 import java.time.ZonedDateTime;
19
20 import com.google.gson.annotations.SerializedName;
21
22 public class Bed
23 {
24     private ZonedDateTime registrationDate;
25     private String sleeperRightId;
26     private String base;
27     private Long returnRequestStatus;
28     private String size;
29     private String name;
30     private String serial;
31     @SerializedName("isKidsBed")
32     private Boolean kidsBed;
33     private Boolean dualSleep;
34     private String bedId;
35     private Long status;
36     private String sleeperLeftId;
37     private String version;
38     private String accountId;
39     private String timezone;
40     private String model;
41     private ZonedDateTime purchaseDate;
42     private String macAddress;
43     private String sku;
44     @SerializedName("zipcode")
45     private String zipCode;
46     private String reference;
47
48     public ZonedDateTime getRegistrationDate()
49     {
50         return registrationDate;
51     }
52
53     public void setRegistrationDate(ZonedDateTime registrationDate)
54     {
55         this.registrationDate = registrationDate;
56     }
57
58     public Bed withRegistrationDate(ZonedDateTime registrationDate)
59     {
60         setRegistrationDate(registrationDate);
61         return this;
62     }
63
64     public String getSleeperRightId()
65     {
66         return sleeperRightId;
67     }
68
69     public void setSleeperRightId(String sleeperRightId)
70     {
71         this.sleeperRightId = sleeperRightId;
72     }
73
74     public Bed withSleeperRightId(String sleeperRightId)
75     {
76         setSleeperRightId(sleeperRightId);
77         return this;
78     }
79
80     public String getBase()
81     {
82         return base;
83     }
84
85     public void setBase(String base)
86     {
87         this.base = base;
88     }
89
90     public Bed withBase(String base)
91     {
92         setBase(base);
93         return this;
94     }
95
96     public Long getReturnRequestStatus()
97     {
98         return returnRequestStatus;
99     }
100
101     public void setReturnRequestStatus(Long returnRequestStatus)
102     {
103         this.returnRequestStatus = returnRequestStatus;
104     }
105
106     public Bed withReturnRequestStatus(Long returnRequestStatus)
107     {
108         setReturnRequestStatus(returnRequestStatus);
109         return this;
110     }
111
112     public String getSize()
113     {
114         return size;
115     }
116
117     public void setSize(String size)
118     {
119         this.size = size;
120     }
121
122     public Bed withSize(String size)
123     {
124         setSize(size);
125         return this;
126     }
127
128     public String getName()
129     {
130         return name;
131     }
132
133     public void setName(String name)
134     {
135         this.name = name;
136     }
137
138     public Bed withName(String name)
139     {
140         setName(name);
141         return this;
142     }
143
144     public String getSerial()
145     {
146         return serial;
147     }
148
149     public void setSerial(String serial)
150     {
151         this.serial = serial;
152     }
153
154     public Bed withSerial(String serial)
155     {
156         setSerial(serial);
157         return this;
158     }
159
160     public Boolean isKidsBed()
161     {
162         return kidsBed;
163     }
164
165     public void setKidsBed(Boolean kidsBed)
166     {
167         this.kidsBed = kidsBed;
168     }
169
170     public Bed withKidsBed(Boolean kidsBed)
171     {
172         setKidsBed(kidsBed);
173         return this;
174     }
175
176     public Boolean isDualSleep()
177     {
178         return dualSleep;
179     }
180
181     public void setDualSleep(Boolean dualSleep)
182     {
183         this.dualSleep = dualSleep;
184     }
185
186     public Bed withDualSleep(Boolean dualSleep)
187     {
188         setDualSleep(dualSleep);
189         return this;
190     }
191
192     public String getBedId()
193     {
194         return bedId;
195     }
196
197     public void setBedId(String bedId)
198     {
199         this.bedId = bedId;
200     }
201
202     public Bed withBedId(String bedId)
203     {
204         setBedId(bedId);
205         return this;
206     }
207
208     public Long getStatus()
209     {
210         return status;
211     }
212
213     public void setStatus(Long status)
214     {
215         this.status = status;
216     }
217
218     public Bed withStatus(Long status)
219     {
220         setStatus(status);
221         return this;
222     }
223
224     public String getSleeperLeftId()
225     {
226         return sleeperLeftId;
227     }
228
229     public void setSleeperLeftId(String sleeperLeftId)
230     {
231         this.sleeperLeftId = sleeperLeftId;
232     }
233
234     public Bed withSleeperLeftId(String sleeperLeftId)
235     {
236         setSleeperLeftId(sleeperLeftId);
237         return this;
238     }
239
240     public String getVersion()
241     {
242         return version;
243     }
244
245     public void setVersion(String version)
246     {
247         this.version = version;
248     }
249
250     public Bed withVersion(String version)
251     {
252         setVersion(version);
253         return this;
254     }
255
256     public String getAccountId()
257     {
258         return accountId;
259     }
260
261     public void setAccountId(String accountId)
262     {
263         this.accountId = accountId;
264     }
265
266     public Bed withAccountId(String accountId)
267     {
268         setAccountId(accountId);
269         return this;
270     }
271
272     public String getTimezone()
273     {
274         return timezone;
275     }
276
277     public void setTimezone(String timezone)
278     {
279         this.timezone = timezone;
280     }
281
282     public Bed withTimezone(String timezone)
283     {
284         setTimezone(timezone);
285         return this;
286     }
287
288     public String getModel()
289     {
290         return model;
291     }
292
293     public void setModel(String model)
294     {
295         this.model = model;
296     }
297
298     public Bed withModel(String model)
299     {
300         setModel(model);
301         return this;
302     }
303
304     public ZonedDateTime getPurchaseDate()
305     {
306         return purchaseDate;
307     }
308
309     public void setPurchaseDate(ZonedDateTime purchaseDate)
310     {
311         this.purchaseDate = purchaseDate;
312     }
313
314     public Bed withPurchaseDate(ZonedDateTime purchaseDate)
315     {
316         setPurchaseDate(purchaseDate);
317         return this;
318     }
319
320     public String getMacAddress()
321     {
322         return macAddress;
323     }
324
325     public void setMacAddress(String macAddress)
326     {
327         this.macAddress = macAddress;
328     }
329
330     public Bed withMacAddress(String macAddress)
331     {
332         setMacAddress(macAddress);
333         return this;
334     }
335
336     public String getSku()
337     {
338         return sku;
339     }
340
341     public void setSku(String sku)
342     {
343         this.sku = sku;
344     }
345
346     public Bed withSku(String sku)
347     {
348         setSku(sku);
349         return this;
350     }
351
352     public String getZipCode()
353     {
354         return zipCode;
355     }
356
357     public void setZipCode(String zipCode)
358     {
359         this.zipCode = zipCode;
360     }
361
362     public Bed withZipCode(String zipCode)
363     {
364         setZipCode(zipCode);
365         return this;
366     }
367
368     public String getReference()
369     {
370         return reference;
371     }
372
373     public void setReference(String reference)
374     {
375         this.reference = reference;
376     }
377
378     public Bed withReference(String reference)
379     {
380         setReference(reference);
381         return this;
382     }
383
384     @Override
385     public int hashCode()
386     {
387         final int prime = 31;
388         int result = 1;
389         result = prime * result + ((bedId == null) ? 0 : bedId.hashCode());
390         return result;
391     }
392
393     @Override
394     public boolean equals(Object obj)
395     {
396         if (this == obj)
397         {
398             return true;
399         }
400         if (obj == null)
401         {
402             return false;
403         }
404         if (!(obj instanceof Bed))
405         {
406             return false;
407         }
408         Bed other = (Bed)obj;
409         if (bedId == null)
410         {
411             if (other.bedId != null)
412             {
413                 return false;
414             }
415         }
416         else if (!bedId.equals(other.bedId))
417         {
418             return false;
419         }
420         return true;
421     }
422
423     @Override
424     public String toString()
425     {
426         StringBuilder builder = new StringBuilder();
427         builder.append("Bed [registrationDate=");
428         builder.append(registrationDate);
429         builder.append(", sleeperRightId=");
430         builder.append(sleeperRightId);
431         builder.append(", base=");
432         builder.append(base);
433         builder.append(", returnRequestStatus=");
434         builder.append(returnRequestStatus);
435         builder.append(", size=");
436         builder.append(size);
437         builder.append(", name=");
438         builder.append(name);
439         builder.append(", serial=");
440         builder.append(serial);
441         builder.append(", kidsBed=");
442         builder.append(kidsBed);
443         builder.append(", dualSleep=");
444         builder.append(dualSleep);
445         builder.append(", bedId=");
446         builder.append(bedId);
447         builder.append(", status=");
448         builder.append(status);
449         builder.append(", sleeperLeftId=");
450         builder.append(sleeperLeftId);
451         builder.append(", version=");
452         builder.append(version);
453         builder.append(", accountId=");
454         builder.append(accountId);
455         builder.append(", timezone=");
456         builder.append(timezone);
457         builder.append(", model=");
458         builder.append(model);
459         builder.append(", purchaseDate=");
460         builder.append(purchaseDate);
461         builder.append(", macAddress=");
462         builder.append(macAddress);
463         builder.append(", sku=");
464         builder.append(sku);
465         builder.append(", zipCode=");
466         builder.append(zipCode);
467         builder.append(", reference=");
468         builder.append(reference);
469         builder.append("]");
470         return builder.toString();
471     }
472 }