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.nest.internal.wwn.dto;
16 * The WWN meta data in the data downloads.
18 * @author David Bennett - Initial contribution
19 * @author Wouter Born - Add equals and hashCode methods
21 public class WWNMetadata {
23 private String accessToken;
24 private String clientVersion;
26 public String getAccessToken() {
30 public String getClientVersion() {
35 public boolean equals(Object obj) {
42 if (getClass() != obj.getClass()) {
45 WWNMetadata other = (WWNMetadata) obj;
46 if (accessToken == null) {
47 if (other.accessToken != null) {
50 } else if (!accessToken.equals(other.accessToken)) {
53 if (clientVersion == null) {
54 if (other.clientVersion != null) {
57 } else if (!clientVersion.equals(other.clientVersion)) {
64 public int hashCode() {
67 result = prime * result + ((accessToken == null) ? 0 : accessToken.hashCode());
68 result = prime * result + ((clientVersion == null) ? 0 : clientVersion.hashCode());
73 public String toString() {
74 StringBuilder builder = new StringBuilder();
75 builder.append("NestMetadata [accessToken=").append(accessToken).append(", clientVersion=")
76 .append(clientVersion).append("]");
77 return builder.toString();