2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.revogi.internal.api;
15 import java.util.Objects;
17 import com.google.gson.annotations.SerializedName;
20 * @author Andi Bräu - Initial contribution
22 public class DiscoveryResponseDTO {
24 private final String serialNumber;
25 @SerializedName("regid")
26 private final String regId;
27 private final String sak;
28 private final String name;
29 @SerializedName("mac")
30 private final String macAddress;
31 @SerializedName("ver")
32 private final String version;
34 public DiscoveryResponseDTO(String serialNumber, String regId, String sak, String name, String macAddress,
36 this.serialNumber = serialNumber;
40 this.macAddress = macAddress;
41 this.version = version;
44 public DiscoveryResponseDTO() {
53 public String getSerialNumber() {
57 public String getRegId() {
61 public String getSak() {
65 public String getName() {
69 public String getMacAddress() {
73 public String getVersion() {
78 public boolean equals(Object o) {
82 if (o == null || getClass() != o.getClass()) {
85 DiscoveryResponseDTO that = (DiscoveryResponseDTO) o;
86 return serialNumber.equals(that.serialNumber) && regId.equals(that.regId) && sak.equals(that.sak)
87 && name.equals(that.name) && macAddress.equals(that.macAddress) && version.equals(that.version);
91 public int hashCode() {
92 return Objects.hash(serialNumber, regId, sak, name, macAddress, version);