]> git.basschouten.com Git - openhab-addons.git/blob
50a13900e5ba7485cf068706505bda4fcd11fd95
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.zway.internal.config;
14
15 import static org.openhab.binding.zway.internal.ZWayBindingConstants.*;
16
17 import org.apache.commons.lang3.builder.ToStringBuilder;
18
19 /**
20  * The {@link ZWayBridgeConfiguration} class defines the model for a bridge configuration.
21  *
22  * @author Patrick Hecker - Initial contribution, remove openHAB configuration
23  */
24 public class ZWayBridgeConfiguration {
25     private String zwayServerIpAddress;
26     private Integer zwayServerPort;
27     private String zwayServerProtocol;
28
29     private String zwayServerUsername;
30     private String zwayServerPassword;
31
32     private Integer pollingInterval;
33
34     public String getZWayIpAddress() {
35         return zwayServerIpAddress;
36     }
37
38     public void setZWayIpAddress(String ipAddress) {
39         this.zwayServerIpAddress = ipAddress;
40     }
41
42     public Integer getZWayPort() {
43         return zwayServerPort;
44     }
45
46     public void setZWayPort(Integer port) {
47         this.zwayServerPort = port;
48     }
49
50     public String getZWayProtocol() {
51         return zwayServerProtocol;
52     }
53
54     public void setZWayProtocol(String protocol) {
55         this.zwayServerProtocol = protocol;
56     }
57
58     public String getZWayUsername() {
59         return zwayServerUsername;
60     }
61
62     public void setZWayUsername(String username) {
63         this.zwayServerUsername = username;
64     }
65
66     public String getZWayPassword() {
67         return zwayServerPassword;
68     }
69
70     public void setZWayPassword(String password) {
71         this.zwayServerPassword = password;
72     }
73
74     public Integer getPollingInterval() {
75         return pollingInterval;
76     }
77
78     public void setPollingInterval(Integer pollingInterval) {
79         this.pollingInterval = pollingInterval;
80     }
81
82     @Override
83     public String toString() {
84         return new ToStringBuilder(this).append(BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS, this.getZWayIpAddress())
85                 .append(BRIDGE_CONFIG_ZWAY_SERVER_PORT, this.getZWayPort())
86                 .append(BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL, this.getZWayProtocol())
87                 .append(BRIDGE_CONFIG_ZWAY_SERVER_USERNAME, this.getZWayUsername())
88                 .append(BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD, this.getZWayPassword())
89                 .append(BRIDGE_CONFIG_POLLING_INTERVAL, this.getPollingInterval()).toString();
90     }
91 }