]> git.basschouten.com Git - openhab-addons.git/blob
6fdb08b8be5c484fd8f75fa530044c96fac3786b
[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.solaredge.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Bean holding configuration data according to bridge.xml
19  *
20  * @author Alexander Friese - initial contribution
21  */
22 @NonNullByDefault
23 public class SolarEdgeConfiguration {
24
25     private String tokenOrApiKey = "";
26     private String solarId = "";
27
28     private boolean meterInstalled = false;
29     private boolean usePrivateApi = false;
30
31     private Integer asyncTimeout = 120;
32     private Integer syncTimeout = 120;
33     private Integer liveDataPollingInterval = 10;
34     private Integer aggregateDataPollingInterval = 60;
35
36     public String getTokenOrApiKey() {
37         return tokenOrApiKey;
38     }
39
40     public void setTokenOrApiKey(String tokenOrApiKey) {
41         this.tokenOrApiKey = tokenOrApiKey;
42     }
43
44     public String getSolarId() {
45         return solarId;
46     }
47
48     public void setSolarId(String solarId) {
49         this.solarId = solarId;
50     }
51
52     public Integer getAsyncTimeout() {
53         return asyncTimeout;
54     }
55
56     public void setAsyncTimeout(Integer asyncTimeout) {
57         this.asyncTimeout = asyncTimeout;
58     }
59
60     public Integer getSyncTimeout() {
61         return syncTimeout;
62     }
63
64     public void setSyncTimeout(Integer syncTimeout) {
65         this.syncTimeout = syncTimeout;
66     }
67
68     public Integer getLiveDataPollingInterval() {
69         return liveDataPollingInterval;
70     }
71
72     public void setLiveDataPollingInterval(Integer liveDataPollingInterval) {
73         this.liveDataPollingInterval = liveDataPollingInterval;
74     }
75
76     public Integer getAggregateDataPollingInterval() {
77         return aggregateDataPollingInterval;
78     }
79
80     public void setAggregateDataPollingInterval(Integer aggregateDataPollingInterval) {
81         this.aggregateDataPollingInterval = aggregateDataPollingInterval;
82     }
83
84     public boolean isMeterInstalled() {
85         return meterInstalled;
86     }
87
88     public void setMeterInstalled(boolean meterInstalled) {
89         this.meterInstalled = meterInstalled;
90     }
91
92     public boolean isUsePrivateApi() {
93         return usePrivateApi;
94     }
95
96     public void setUsePrivateApi(boolean usePrivateApi) {
97         this.usePrivateApi = usePrivateApi;
98     }
99
100     @Override
101     public String toString() {
102         return getClass().getSimpleName() + "{ tokenOrApiKey=" + getTokenOrApiKey() + ", solarId=" + getSolarId()
103                 + ", meterInstalled=" + isMeterInstalled() + ", usePrivateApi=" + isUsePrivateApi()
104                 + ", live data pollingInterval=" + getLiveDataPollingInterval() + ", aggregate data pollingInterval="
105                 + getAggregateDataPollingInterval() + ", asyncTimeout=" + getAsyncTimeout() + ", syncTimeout="
106                 + getSyncTimeout() + "}";
107     }
108 }