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;
15 import java.util.List;
18 * The {@link SleeperResponse} holds the information about the sleepers assigned to the bed sides.
20 * @author Gregory Moyer - Initial contribution
22 public class SleepersResponse {
23 private List<Sleeper> sleepers;
25 public List<Sleeper> getSleepers() {
29 public void setSleepers(List<Sleeper> sleepers) {
30 this.sleepers = sleepers;
33 public SleepersResponse withSleepers(List<Sleeper> sleepers) {
34 setSleepers(sleepers);
39 public int hashCode() {
42 result = prime * result + ((sleepers == null) ? 0 : sleepers.hashCode());
47 public boolean equals(Object obj) {
54 if (!(obj instanceof SleepersResponse)) {
57 SleepersResponse other = (SleepersResponse) obj;
58 if (sleepers == null) {
59 if (other.sleepers != null) {
62 } else if (!sleepers.equals(other.sleepers)) {
69 public String toString() {
70 StringBuilder builder = new StringBuilder();
71 builder.append("SleepersResponse [sleepers=");
72 builder.append(sleepers);
74 return builder.toString();