]> git.basschouten.com Git - openhab-addons.git/blob
2a016f3eeccc9a9506593d5b81fd6c10f2c990ce
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.amazonechocontrol.internal.jsons;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroupIdentifiers.SmartHomeGroupIdentifier;
18
19 /**
20  * @author Lukas Knoeller - Initial contribution
21  */
22 @NonNullByDefault
23 public class JsonSmartHomeGroups {
24
25     public static class SmartHomeGroup implements SmartHomeBaseDevice {
26
27         @Override
28         public @Nullable String findId() {
29             SmartHomeGroupIdentifier applianceGroupIdentifier = this.applianceGroupIdentifier;
30             if (applianceGroupIdentifier == null) {
31                 return null;
32             }
33             String value = applianceGroupIdentifier.value;
34             if (value == null) {
35                 return null;
36             }
37             return value;
38         }
39
40         @Override
41         public boolean isGroup() {
42             return true;
43         }
44
45         public @Nullable String applianceGroupName;
46         public @Nullable Boolean isSpace;
47         public @Nullable Boolean space;
48         public @Nullable SmartHomeGroupIdentifier applianceGroupIdentifier;
49
50         @Override
51         public String toString() {
52             return "SmartHomeGroup{" + "applianceGroupName='" + applianceGroupName + '\'' + ", isSpace=" + isSpace
53                     + ", space=" + space + ", applianceGroupIdentifier=" + applianceGroupIdentifier + '}';
54         }
55     }
56
57     public @Nullable SmartHomeGroup @Nullable [] groups;
58 }