]> git.basschouten.com Git - openhab-addons.git/blob
3b3deeea0c7f5c57ca0e2d24ba6086057fcb7973
[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 import java.util.List;
19
20 public class BedsResponse
21 {
22     private List<Bed> beds;
23
24     public List<Bed> getBeds()
25     {
26         return beds;
27     }
28
29     public void setBeds(List<Bed> beds)
30     {
31         this.beds = beds;
32     }
33
34     public BedsResponse withBeds(List<Bed> beds)
35     {
36         setBeds(beds);
37         return this;
38     }
39
40     @Override
41     public int hashCode()
42     {
43         final int prime = 31;
44         int result = 1;
45         result = prime * result + ((beds == null) ? 0 : beds.hashCode());
46         return result;
47     }
48
49     @Override
50     public boolean equals(Object obj)
51     {
52         if (this == obj)
53         {
54             return true;
55         }
56         if (obj == null)
57         {
58             return false;
59         }
60         if (!(obj instanceof BedsResponse))
61         {
62             return false;
63         }
64         BedsResponse other = (BedsResponse)obj;
65         if (beds == null)
66         {
67             if (other.beds != null)
68             {
69                 return false;
70             }
71         }
72         else if (!beds.equals(other.beds))
73         {
74             return false;
75         }
76         return true;
77     }
78
79     @Override
80     public String toString()
81     {
82         StringBuilder builder = new StringBuilder();
83         builder.append("BedsResponse [beds=");
84         builder.append(beds);
85         builder.append("]");
86         return builder.toString();
87     }
88 }