2 * Copyright (c) 2010-2023 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.dto;
15 import java.util.Base64;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
20 import com.google.gson.annotations.SerializedName;
23 * User data for an HD PowerView hub
25 * @author Jacob Laursen - Initial contribution
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;
50 public @Nullable Times times;
51 public @Nullable String brand;
53 public boolean remoteConnectEnabled;
55 public String getHubName() {
56 return hubName != null ? new String(Base64.getDecoder().decode(hubName)) : "";