2 * Copyright (c) 2010-2022 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 top level WWN data that is sent by Nest to a streaming REST client using SSE.
18 * @author Wouter Born - Initial contribution
19 * @author Wouter Born - Replace polling with REST streaming
20 * @author Wouter Born - Add equals and hashCode methods
22 public class WWNTopLevelStreamingData {
25 private WWNTopLevelData data;
27 public String getPath() {
31 public WWNTopLevelData getData() {
36 public int hashCode() {
39 result = prime * result + ((data == null) ? 0 : data.hashCode());
40 result = prime * result + ((path == null) ? 0 : path.hashCode());
45 public boolean equals(Object obj) {
52 if (getClass() != obj.getClass()) {
55 WWNTopLevelStreamingData other = (WWNTopLevelStreamingData) obj;
57 if (other.data != null) {
60 } else if (!data.equals(other.data)) {
64 if (other.path != null) {
67 } else if (!path.equals(other.path)) {
74 public String toString() {
75 StringBuilder builder = new StringBuilder();
76 builder.append("TopLevelStreamingData [path=").append(path).append(", data=").append(data).append("]");
77 return builder.toString();