2 * Copyright 2017 Gregory Moyer
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.openhab.binding.sleepiq.api.model;
18 import java.time.ZonedDateTime;
20 import com.google.gson.annotations.SerializedName;
24 private ZonedDateTime registrationDate;
25 private String sleeperRightId;
27 private Long returnRequestStatus;
30 private String serial;
31 @SerializedName("isKidsBed")
32 private Boolean kidsBed;
33 private Boolean dualSleep;
36 private String sleeperLeftId;
37 private String version;
38 private String accountId;
39 private String timezone;
41 private ZonedDateTime purchaseDate;
42 private String macAddress;
44 @SerializedName("zipcode")
45 private String zipCode;
46 private String reference;
48 public ZonedDateTime getRegistrationDate()
50 return registrationDate;
53 public void setRegistrationDate(ZonedDateTime registrationDate)
55 this.registrationDate = registrationDate;
58 public Bed withRegistrationDate(ZonedDateTime registrationDate)
60 setRegistrationDate(registrationDate);
64 public String getSleeperRightId()
66 return sleeperRightId;
69 public void setSleeperRightId(String sleeperRightId)
71 this.sleeperRightId = sleeperRightId;
74 public Bed withSleeperRightId(String sleeperRightId)
76 setSleeperRightId(sleeperRightId);
80 public String getBase()
85 public void setBase(String base)
90 public Bed withBase(String base)
96 public Long getReturnRequestStatus()
98 return returnRequestStatus;
101 public void setReturnRequestStatus(Long returnRequestStatus)
103 this.returnRequestStatus = returnRequestStatus;
106 public Bed withReturnRequestStatus(Long returnRequestStatus)
108 setReturnRequestStatus(returnRequestStatus);
112 public String getSize()
117 public void setSize(String size)
122 public Bed withSize(String size)
128 public String getName()
133 public void setName(String name)
138 public Bed withName(String name)
144 public String getSerial()
149 public void setSerial(String serial)
151 this.serial = serial;
154 public Bed withSerial(String serial)
160 public Boolean isKidsBed()
165 public void setKidsBed(Boolean kidsBed)
167 this.kidsBed = kidsBed;
170 public Bed withKidsBed(Boolean kidsBed)
176 public Boolean isDualSleep()
181 public void setDualSleep(Boolean dualSleep)
183 this.dualSleep = dualSleep;
186 public Bed withDualSleep(Boolean dualSleep)
188 setDualSleep(dualSleep);
192 public String getBedId()
197 public void setBedId(String bedId)
202 public Bed withBedId(String bedId)
208 public Long getStatus()
213 public void setStatus(Long status)
215 this.status = status;
218 public Bed withStatus(Long status)
224 public String getSleeperLeftId()
226 return sleeperLeftId;
229 public void setSleeperLeftId(String sleeperLeftId)
231 this.sleeperLeftId = sleeperLeftId;
234 public Bed withSleeperLeftId(String sleeperLeftId)
236 setSleeperLeftId(sleeperLeftId);
240 public String getVersion()
245 public void setVersion(String version)
247 this.version = version;
250 public Bed withVersion(String version)
256 public String getAccountId()
261 public void setAccountId(String accountId)
263 this.accountId = accountId;
266 public Bed withAccountId(String accountId)
268 setAccountId(accountId);
272 public String getTimezone()
277 public void setTimezone(String timezone)
279 this.timezone = timezone;
282 public Bed withTimezone(String timezone)
284 setTimezone(timezone);
288 public String getModel()
293 public void setModel(String model)
298 public Bed withModel(String model)
304 public ZonedDateTime getPurchaseDate()
309 public void setPurchaseDate(ZonedDateTime purchaseDate)
311 this.purchaseDate = purchaseDate;
314 public Bed withPurchaseDate(ZonedDateTime purchaseDate)
316 setPurchaseDate(purchaseDate);
320 public String getMacAddress()
325 public void setMacAddress(String macAddress)
327 this.macAddress = macAddress;
330 public Bed withMacAddress(String macAddress)
332 setMacAddress(macAddress);
336 public String getSku()
341 public void setSku(String sku)
346 public Bed withSku(String sku)
352 public String getZipCode()
357 public void setZipCode(String zipCode)
359 this.zipCode = zipCode;
362 public Bed withZipCode(String zipCode)
368 public String getReference()
373 public void setReference(String reference)
375 this.reference = reference;
378 public Bed withReference(String reference)
380 setReference(reference);
385 public int hashCode()
387 final int prime = 31;
389 result = prime * result + ((bedId == null) ? 0 : bedId.hashCode());
394 public boolean equals(Object obj)
404 if (!(obj instanceof Bed))
408 Bed other = (Bed)obj;
411 if (other.bedId != null)
416 else if (!bedId.equals(other.bedId))
424 public String toString()
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=");
465 builder.append(", zipCode=");
466 builder.append(zipCode);
467 builder.append(", reference=");
468 builder.append(reference);
470 return builder.toString();