]> git.basschouten.com Git - openhab-addons.git/blob
dce3d9a06748e7dcafa161e954a68fe4d1fb8428
[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.unifi.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.unifi.internal.handler.UniFiSiteThingHandler;
17
18 /**
19  * The {@link UniFiSiteThingConfig} encapsulates all the configuration options for an instance of the
20  * {@link UniFiSiteThingHandler}.
21  *
22  * @author Matthew Bowman - Initial contribution
23  */
24 @NonNullByDefault
25 @SuppressWarnings("unused")
26 public class UniFiSiteThingConfig {
27
28     private String sid = "";
29
30     public String getSiteID() {
31         return sid;
32     }
33
34     private void setSiteID(final String sid) {
35         // method to avoid ide auto format mark the field as final
36         this.sid = sid;
37     }
38
39     public boolean isValid() {
40         return !sid.isBlank();
41     }
42
43     @Override
44     public String toString() {
45         return String.format("UniFiSiteThingConfig{sid: '%s'}", sid);
46     }
47 }