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;
18 * The class {@link SwitchResponseDTO} describes the response when you switch a plug
20 * @author Andi Bräu - Initial contribution
22 public class SwitchResponseDTO {
23 private final int response;
24 private final int code;
26 public SwitchResponseDTO(int response, int code) {
27 this.response = response;
31 public int getResponse() {
35 public int getCode() {
40 public boolean equals(Object o) {
44 if (o == null || getClass() != o.getClass()) {
47 SwitchResponseDTO that = (SwitchResponseDTO) o;
48 return response == that.response && code == that.code;
52 public int hashCode() {
53 return Objects.hash(response, code);