]> git.basschouten.com Git - openhab-addons.git/blob
588d48d61145f8fbf694dc53902ccaac3d790f8f
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.hdpowerview.internal.dto;
14
15 import java.util.Base64;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 import com.google.gson.annotations.SerializedName;
21
22 /**
23  * User data for an HD PowerView hub
24  *
25  * @author Jacob Laursen - Initial contribution
26  */
27 @NonNullByDefault
28 public class UserData {
29     public @Nullable String hubName;
30     public boolean localTimeDataSet;
31     public boolean enableScheduledEvents;
32     public boolean editingEnabled;
33     public boolean setupCompleted;
34     public @Nullable String gateway;
35     public @Nullable String dns;
36     public boolean staticIp;
37     @SerializedName("_id")
38     public @Nullable String id;
39     public @Nullable Color color;
40     public boolean autoBackup;
41     public @Nullable String ip;
42     public @Nullable String macAddress;
43     public @Nullable String mask;
44     public boolean wireless;
45     public @Nullable HubFirmware firmware;
46     public @Nullable String serialNumber;
47     public @Nullable String rfIDInt;
48     public @Nullable String rfID;
49     public int rfStatus;
50     public @Nullable Times times;
51     public @Nullable String brand;
52     public boolean rcUp;
53     public boolean remoteConnectEnabled;
54
55     public String getHubName() {
56         return hubName != null ? new String(Base64.getDecoder().decode(hubName)) : "";
57     }
58 }