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.unifi.internal;
15 import org.openhab.binding.unifi.internal.handler.UniFiControllerThingHandler;
18 * The {@link UniFiControllerThingConfig} encapsulates all the configuration options for an instance of the
19 * {@link UniFiControllerThingHandler}.
21 * @author Matthew Bowman - Initial contribution
23 public class UniFiControllerThingConfig {
25 private String host = "unifi";
27 private int port = 8443;
29 private String username = "";
31 private String password = "";
33 private int refresh = 10;
35 private boolean unifios = false;
37 public String getHost() {
41 public int getPort() {
45 public String getUsername() {
49 public String getPassword() {
53 public int getRefresh() {
57 public boolean isUniFiOS() {
61 public boolean isValid() {
62 return !host.isBlank() && !username.isBlank() && !password.isBlank();
66 public String toString() {
67 return "UniFiControllerConfig{host = " + host + ", port = " + port + ", username = " + username
68 + ", password = *****, refresh = " + refresh + ", unifios = " + unifios + "}";