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.hdpowerview.internal.api.responses;
15 import java.util.List;
16 import java.util.StringJoiner;
18 import com.google.gson.annotations.SerializedName;
21 * Survey data of a single Shade, as returned by an HD PowerView hub
23 * @author Jacob Laursen - Initial contribution
26 @SerializedName("shade_id")
28 @SerializedName("survey")
29 public List<SurveyData> surveyData;
31 public static class SurveyData {
32 @SerializedName("neighbor_id")
33 public int neighborId;
37 public String toString() {
38 return String.format("{neighbor id:%d, rssi:%d}", neighborId, rssi);
43 public String toString() {
44 if (surveyData == null) {
47 StringJoiner joiner = new StringJoiner(", ");
48 surveyData.forEach(data -> joiner.add(data.toString()));
49 return joiner.toString();