]> git.basschouten.com Git - openhab-addons.git/blob
56278864655a9f2982830f9e050ffeca82aa3d7c
[openhab-addons.git] /
1 /*
2  * Copyright 2017 Gregory Moyer
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 package org.openhab.binding.sleepiq.api.model;
17
18 public class PauseMode
19 {
20     private String accountId;
21     private String bedId;
22     private String pauseMode;
23
24     public String getAccountId()
25     {
26         return accountId;
27     }
28
29     public void setAccountId(String accountId)
30     {
31         this.accountId = accountId;
32     }
33
34     public PauseMode withAccountId(String accountId)
35     {
36         setAccountId(accountId);
37         return this;
38     }
39
40     public String getBedId()
41     {
42         return bedId;
43     }
44
45     public void setBedId(String bedId)
46     {
47         this.bedId = bedId;
48     }
49
50     public PauseMode withBedId(String bedId)
51     {
52         setBedId(bedId);
53         return this;
54     }
55
56     public String getPauseMode()
57     {
58         return pauseMode;
59     }
60
61     public void setPauseMode(String pauseMode)
62     {
63         this.pauseMode = pauseMode;
64     }
65
66     public PauseMode withPauseMode(String pauseMode)
67     {
68         setPauseMode(pauseMode);
69         return this;
70     }
71
72     @Override
73     public int hashCode()
74     {
75         final int prime = 31;
76         int result = 1;
77         result = prime * result + ((accountId == null) ? 0 : accountId.hashCode());
78         result = prime * result + ((bedId == null) ? 0 : bedId.hashCode());
79         return result;
80     }
81
82     @Override
83     public boolean equals(Object obj)
84     {
85         if (this == obj)
86         {
87             return true;
88         }
89         if (obj == null)
90         {
91             return false;
92         }
93         if (!(obj instanceof PauseMode))
94         {
95             return false;
96         }
97         PauseMode other = (PauseMode)obj;
98         if (accountId == null)
99         {
100             if (other.accountId != null)
101             {
102                 return false;
103             }
104         }
105         else if (!accountId.equals(other.accountId))
106         {
107             return false;
108         }
109         if (bedId == null)
110         {
111             if (other.bedId != null)
112             {
113                 return false;
114             }
115         }
116         else if (!bedId.equals(other.bedId))
117         {
118             return false;
119         }
120         return true;
121     }
122
123     @Override
124     public String toString()
125     {
126         StringBuilder builder = new StringBuilder();
127         builder.append("PauseMode [accountId=");
128         builder.append(accountId);
129         builder.append(", bedId=");
130         builder.append(bedId);
131         builder.append(", pauseMode=");
132         builder.append(pauseMode);
133         builder.append("]");
134         return builder.toString();
135     }
136 }