2 * Copyright (c) 2010-2021 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.amazonechocontrol.internal.jsons;
15 import java.util.Arrays;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeCapabilities.SmartHomeCapability;
21 import org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDeviceNetworkState.SmartHomeDeviceNetworkState;
22 import org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeTags.JsonSmartHomeTag;
25 * @author Lukas Knoeller - Initial contribution
28 public class JsonSmartHomeDevices {
29 public static class SmartHomeDevice implements SmartHomeBaseDevice {
30 public @Nullable Integer updateIntervalInSeconds;
33 public @Nullable String findId() {
38 public boolean isGroup() {
42 public @Nullable String applianceId;
43 public @Nullable String manufacturerName;
44 public @Nullable String friendlyDescription;
45 public @Nullable String modelName;
46 public @Nullable String friendlyName;
47 public @Nullable String reachability;
48 public @Nullable String entityId;
49 public @Nullable SmartHomeDeviceNetworkState applianceNetworkState;
50 public @Nullable SmartHomeCapability @Nullable [] capabilities;
51 public @Nullable JsonSmartHomeTag tags;
52 public @Nullable String @Nullable [] applianceTypes;
53 public @Nullable JsonSmartHomeDeviceAlias @Nullable [] aliases;
54 public @Nullable SmartHomeDevice @Nullable [] groupDevices;
55 public @Nullable String connectedVia;
56 public @Nullable DriverIdentity driverIdentity;
57 public List<String> mergedApplianceIds = List.of();
60 public String toString() {
61 return "SmartHomeDevice{" + "updateIntervalInSeconds=" + updateIntervalInSeconds + ", applianceId='"
62 + applianceId + '\'' + ", manufacturerName='" + manufacturerName + '\'' + ", friendlyDescription='"
63 + friendlyDescription + '\'' + ", modelName='" + modelName + '\'' + ", friendlyName='"
64 + friendlyName + '\'' + ", reachability='" + reachability + '\'' + ", entityId='" + entityId + '\''
65 + ", applianceNetworkState=" + applianceNetworkState + ", capabilities="
66 + Arrays.toString(capabilities) + ", tags=" + tags + ", applianceTypes="
67 + Arrays.toString(applianceTypes) + ", aliases=" + Arrays.toString(aliases) + ", groupDevices="
68 + Arrays.toString(groupDevices) + ", connectedVia='" + connectedVia + '\'' + ", driverIdentity="
69 + driverIdentity + ", mergedApplianceIds=" + mergedApplianceIds + '}';
73 public static class DriverIdentity {
74 public @Nullable String namespace;
75 public @Nullable String identifier;
78 public String toString() {
79 return "DriverIdentity{" + "namespace='" + namespace + '\'' + ", identifier='" + identifier + '\'' + '}';
83 public @Nullable SmartHomeDevice @Nullable [] smarthomeDevices;