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 public class BedStatus
22 private BedSideStatus leftSide;
23 private BedSideStatus rightSide;
25 public Long getStatus()
30 public void setStatus(Long status)
35 public BedStatus withStatus(Long status)
41 public String getBedId()
46 public void setBedId(String bedId)
51 public BedStatus withBedId(String bedId)
57 public BedSideStatus getLeftSide()
62 public void setLeftSide(BedSideStatus leftSide)
64 this.leftSide = leftSide;
67 public BedStatus withLeftSide(BedSideStatus leftSide)
69 setLeftSide(leftSide);
73 public BedSideStatus getRightSide()
78 public void setRightSide(BedSideStatus rightSide)
80 this.rightSide = rightSide;
83 public BedStatus withRightSide(BedSideStatus rightSide)
85 setRightSide(rightSide);
94 result = prime * result + ((bedId == null) ? 0 : bedId.hashCode());
99 public boolean equals(Object obj)
109 if (!(obj instanceof BedStatus))
113 BedStatus other = (BedStatus)obj;
116 if (other.bedId != null)
121 else if (!bedId.equals(other.bedId))
129 public String toString()
131 StringBuilder builder = new StringBuilder();
132 builder.append("BedStatus [status=");
133 builder.append(status);
134 builder.append(", bedId=");
135 builder.append(bedId);
136 builder.append(", leftSide=");
137 builder.append(leftSide);
138 builder.append(", rightSide=");
139 builder.append(rightSide);
141 return builder.toString();