]> git.basschouten.com Git - openhab-addons.git/blob
80ba0d225ea1abdce248bd21322788964b0ac882
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.revogi.internal.api;
14
15 import java.util.Objects;
16
17 /**
18  * @author Andi Bräu - Initial contribution
19  */
20 public class DiscoveryRawResponseDTO {
21
22     private final int response;
23     private final DiscoveryResponseDTO data;
24     private String ipAddress;
25
26     public DiscoveryRawResponseDTO(int response, DiscoveryResponseDTO data) {
27         this.response = response;
28         this.data = data;
29     }
30
31     public int getResponse() {
32         return response;
33     }
34
35     public DiscoveryResponseDTO getData() {
36         return data;
37     }
38
39     public String getIpAddress() {
40         return ipAddress;
41     }
42
43     public void setIpAddress(String ipAddress) {
44         this.ipAddress = ipAddress;
45     }
46
47     @Override
48     public boolean equals(Object o) {
49         if (this == o)
50             return true;
51         if (o == null || getClass() != o.getClass())
52             return false;
53         DiscoveryRawResponseDTO that = (DiscoveryRawResponseDTO) o;
54         return response == that.response && data.equals(that.data) && Objects.equals(ipAddress, that.ipAddress);
55     }
56
57     @Override
58     public int hashCode() {
59         return Objects.hash(response, data, ipAddress);
60     }
61 }