]> git.basschouten.com Git - openhab-addons.git/blob
8a93eab35d959bee45fdb00f53fc1e7d6cef4af0
[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.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         }
52         if (o == null || getClass() != o.getClass()) {
53             return false;
54         }
55         DiscoveryRawResponseDTO that = (DiscoveryRawResponseDTO) o;
56         return response == that.response && data.equals(that.data) && Objects.equals(ipAddress, that.ipAddress);
57     }
58
59     @Override
60     public int hashCode() {
61         return Objects.hash(response, data, ipAddress);
62     }
63 }