]> git.basschouten.com Git - openhab-addons.git/blob
966093bde93f6510a50577258e9ce72762b7f772
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.sleepiq.internal.api.dto;
14
15 /**
16  * The {@link PauseModeResponse} holds the response to the request to pause the bed data collection.
17  *
18  * @author Mark Hilbush - Initial contribution
19  */
20 public class PauseModeResponse {
21     private String accountId;
22     private String bedId;
23     private String pauseMode;
24
25     public String getAccountId() {
26         return accountId;
27     }
28
29     public void setAccountId(String accountId) {
30         this.accountId = accountId;
31     }
32
33     public PauseModeResponse withAccountId(String accountId) {
34         setAccountId(accountId);
35         return this;
36     }
37
38     public String getBedId() {
39         return bedId;
40     }
41
42     public void setBedId(String bedId) {
43         this.bedId = bedId;
44     }
45
46     public PauseModeResponse withBedId(String bedId) {
47         setBedId(bedId);
48         return this;
49     }
50
51     public String getPauseMode() {
52         return pauseMode;
53     }
54
55     public void setPauseMode(String pauseMode) {
56         this.pauseMode = pauseMode;
57     }
58
59     public PauseModeResponse withPauseMode(String pauseMode) {
60         setPauseMode(pauseMode);
61         return this;
62     }
63
64     @Override
65     public int hashCode() {
66         final int prime = 31;
67         int result = 1;
68         result = prime * result + ((accountId == null) ? 0 : accountId.hashCode());
69         result = prime * result + ((bedId == null) ? 0 : bedId.hashCode());
70         return result;
71     }
72
73     @Override
74     public boolean equals(Object obj) {
75         if (this == obj) {
76             return true;
77         }
78         if (obj == null) {
79             return false;
80         }
81         if (!(obj instanceof PauseModeResponse)) {
82             return false;
83         }
84         PauseModeResponse other = (PauseModeResponse) obj;
85         if (accountId == null) {
86             if (other.accountId != null) {
87                 return false;
88             }
89         } else if (!accountId.equals(other.accountId)) {
90             return false;
91         }
92         if (bedId == null) {
93             if (other.bedId != null) {
94                 return false;
95             }
96         } else if (!bedId.equals(other.bedId)) {
97             return false;
98         }
99         return true;
100     }
101
102     @Override
103     public String toString() {
104         StringBuilder builder = new StringBuilder();
105         builder.append("PauseMode [accountId=");
106         builder.append(accountId);
107         builder.append(", bedId=");
108         builder.append(bedId);
109         builder.append(", pauseMode=");
110         builder.append(pauseMode);
111         builder.append("]");
112         return builder.toString();
113     }
114 }