]> git.basschouten.com Git - openhab-addons.git/blob
5433efa0a1f963a2b30a11b0f86ea66994832645
[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.neeo.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * Configuration used by {@link org.openhab.binding.neeo.internal.handler.NeeoBrainHandler}
20  *
21  * @author Tim Roberts - initial contribution
22  */
23 @NonNullByDefault
24 public class NeeoBrainConfig {
25
26     /** The ip address */
27     @Nullable
28     private String ipAddress;
29
30     /** Whether to enable forward actions */
31     private boolean enableForwardActions;
32
33     /** The forward actions chain (comma delimited) */
34     @Nullable
35     private String forwardChain;
36
37     /** Whether to discover empty rooms or not */
38     private boolean discoverEmptyRooms;
39
40     /** The check status interval (in seconds) */
41     private int checkStatusInterval;
42
43     /**
44      * Gets the ip address.
45      *
46      * @return the ip address
47      */
48     @Nullable
49     public String getIpAddress() {
50         return ipAddress;
51     }
52
53     /**
54      * Sets the ip address.
55      *
56      * @param ipAddress the new ip address
57      */
58     public void setIpAddress(String ipAddress) {
59         this.ipAddress = ipAddress;
60     }
61
62     /**
63      * Determines if forward actions is enabled
64      *
65      * @return true for enabled, false otherwise
66      */
67     public boolean isEnableForwardActions() {
68         return enableForwardActions;
69     }
70
71     /**
72      * Sets whether to enable forward actions
73      *
74      * @param enableForwardActions true to enable, false otherwise
75      */
76     public void setEnableForwardActions(boolean enableForwardActions) {
77         this.enableForwardActions = enableForwardActions;
78     }
79
80     /**
81      * Get's the forward chain
82      *
83      * @return the forward chain
84      */
85     @Nullable
86     public String getForwardChain() {
87         return forwardChain;
88     }
89
90     /**
91      * Sets the forward change
92      *
93      * @param forwardChain the forward chain
94      */
95     public void setForwardChain(String forwardChain) {
96         this.forwardChain = forwardChain;
97     }
98
99     /**
100      * Whether empty rooms should be discovered or not
101      *
102      * @return true to discover empty rooms, false otherwise
103      */
104     public boolean isDiscoverEmptyRooms() {
105         return discoverEmptyRooms;
106     }
107
108     /**
109      * Set's whether to discover empty rooms
110      *
111      * @param discoverEmptyRooms true to discover, false otherwise
112      */
113     public void setDiscoverEmptyRooms(boolean discoverEmptyRooms) {
114         this.discoverEmptyRooms = discoverEmptyRooms;
115     }
116
117     /**
118      * Gets the interval (in seconds) to check the brain status
119      *
120      * @return the check status interval (negative to disable)
121      */
122     public int getCheckStatusInterval() {
123         return checkStatusInterval;
124     }
125
126     /**
127      * Sets the interval (in seconds) to check the brain status
128      *
129      * @param checkStatusInterval return the check status interval (negative to disable)
130      */
131     public void setCheckStatusInterval(int checkStatusInterval) {
132         this.checkStatusInterval = checkStatusInterval;
133     }
134
135     @Override
136     public String toString() {
137         return "NeeoBrainConfig{" + "ipAddress='" + ipAddress + '\'' + ", enableForwardActions=" + enableForwardActions
138                 + ", forwardChain='" + forwardChain + '\'' + ", discoverEmptyRooms=" + discoverEmptyRooms
139                 + ", checkStatusInterval=" + checkStatusInterval + '}';
140     }
141 }