]> git.basschouten.com Git - openhab-addons.git/blob
07157d229c351e436e6e6bee281cb8f8fdcc895d
[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.bigassfan.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link BigAssFanConfig} is responsible for storing the BigAssFan thing configuration.
19  *
20  * @author Mark Hilbush - Initial contribution
21  */
22 @NonNullByDefault
23 public class BigAssFanConfig {
24     /**
25      * Name of the device
26      */
27     private String label = "";
28
29     /**
30      * IP address of the device
31      */
32     private String ipAddress = "";
33
34     /**
35      * MAC address of the device
36      */
37     private String macAddress = "";
38
39     public String getLabel() {
40         return label;
41     }
42
43     public void setLabel(String label) {
44         this.label = label;
45     }
46
47     public String getIpAddress() {
48         return ipAddress;
49     }
50
51     public void setIpAddress(String ipAddress) {
52         this.ipAddress = ipAddress;
53     }
54
55     public String getMacAddress() {
56         return macAddress;
57     }
58
59     public void setMacAddress(String macAddress) {
60         this.macAddress = macAddress;
61     }
62
63     public boolean isValid() {
64         return !label.isBlank() && !ipAddress.isBlank() && !macAddress.isBlank();
65     }
66
67     @Override
68     public String toString() {
69         return "BigAssFanConfig{label=" + label + ", ipAddress=" + ipAddress + ", macAddress=" + macAddress + "}";
70     }
71 }