2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.sleepiq.internal.api.dto;
16 * The {@link BedStatus} holds the BedStatus response from the sleepiq API.
18 * @author Gregory Moyer - Initial contribution
20 public class BedStatus {
23 private BedSideStatus leftSide;
24 private BedSideStatus rightSide;
26 public Long getStatus() {
30 public void setStatus(Long status) {
34 public BedStatus withStatus(Long status) {
39 public String getBedId() {
43 public void setBedId(String bedId) {
47 public BedStatus withBedId(String bedId) {
52 public BedSideStatus getLeftSide() {
56 public void setLeftSide(BedSideStatus leftSide) {
57 this.leftSide = leftSide;
60 public BedStatus withLeftSide(BedSideStatus leftSide) {
61 setLeftSide(leftSide);
65 public BedSideStatus getRightSide() {
69 public void setRightSide(BedSideStatus rightSide) {
70 this.rightSide = rightSide;
73 public BedStatus withRightSide(BedSideStatus rightSide) {
74 setRightSide(rightSide);
79 public int hashCode() {
82 result = prime * result + ((bedId == null) ? 0 : bedId.hashCode());
87 public boolean equals(Object obj) {
94 if (!(obj instanceof BedStatus)) {
97 BedStatus other = (BedStatus) obj;
99 if (other.bedId != null) {
102 } else if (!bedId.equals(other.bedId)) {
109 public String toString() {
110 StringBuilder builder = new StringBuilder();
111 builder.append("BedStatus [status=");
112 builder.append(status);
113 builder.append(", bedId=");
114 builder.append(bedId);
115 builder.append(", leftSide=");
116 builder.append(leftSide);
117 builder.append(", rightSide=");
118 builder.append(rightSide);
120 return builder.toString();