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.mielecloud.internal.webservice.api.json;
15 import java.util.Objects;
16 import java.util.Optional;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
22 * Immutable POJO representing the XKM (Miele communication module) identification. Queried from the Miele REST API.
24 * @author Björn Lange - Initial contribution
27 public class XkmIdentLabel {
29 private String techType;
31 private String releaseVersion;
33 public Optional<String> getTechType() {
34 return Optional.ofNullable(techType);
37 public Optional<String> getReleaseVersion() {
38 return Optional.ofNullable(releaseVersion);
42 public int hashCode() {
43 return Objects.hash(releaseVersion, techType);
47 public boolean equals(@Nullable Object obj) {
54 if (getClass() != obj.getClass()) {
57 XkmIdentLabel other = (XkmIdentLabel) obj;
58 return Objects.equals(releaseVersion, other.releaseVersion) && Objects.equals(techType, other.techType);
62 public String toString() {
63 return "XkmIdentLabel [techType=" + techType + ", releaseVersion=" + releaseVersion + "]";