2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.solaredge.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * Bean holding configuration data according to bridge.xml
21 * @author Alexander Friese - initial contribution
24 public class SolarEdgeConfiguration {
26 private @Nullable String tokenOrApiKey;
27 private @Nullable String solarId;
29 private boolean meterInstalled = false;
30 private boolean usePrivateApi = false;
32 private Integer asyncTimeout = 120;
33 private Integer syncTimeout = 120;
34 private Integer liveDataPollingInterval = 10;
35 private Integer aggregateDataPollingInterval = 60;
37 public @Nullable String getTokenOrApiKey() {
41 public void setTokenOrApiKey(String tokenOrApiKey) {
42 this.tokenOrApiKey = tokenOrApiKey;
45 public @Nullable String getSolarId() {
49 public void setSolarId(String solarId) {
50 this.solarId = solarId;
53 public Integer getAsyncTimeout() {
57 public void setAsyncTimeout(Integer asyncTimeout) {
58 this.asyncTimeout = asyncTimeout;
61 public Integer getSyncTimeout() {
65 public void setSyncTimeout(Integer syncTimeout) {
66 this.syncTimeout = syncTimeout;
69 public Integer getLiveDataPollingInterval() {
70 return liveDataPollingInterval;
73 public void setLiveDataPollingInterval(Integer liveDataPollingInterval) {
74 this.liveDataPollingInterval = liveDataPollingInterval;
77 public Integer getAggregateDataPollingInterval() {
78 return aggregateDataPollingInterval;
81 public void setAggregateDataPollingInterval(Integer aggregateDataPollingInterval) {
82 this.aggregateDataPollingInterval = aggregateDataPollingInterval;
85 public boolean isMeterInstalled() {
86 return meterInstalled;
89 public void setMeterInstalled(boolean meterInstalled) {
90 this.meterInstalled = meterInstalled;
93 public boolean isUsePrivateApi() {
97 public void setUsePrivateApi(boolean usePrivateApi) {
98 this.usePrivateApi = usePrivateApi;
102 public String toString() {
103 return getClass().getSimpleName() + "{ tokenOrApiKey=" + getTokenOrApiKey() + ", solarId=" + getSolarId()
104 + ", meterInstalled=" + isMeterInstalled() + ", usePrivateApi=" + isUsePrivateApi()
105 + ", live data pollingInterval=" + getLiveDataPollingInterval() + ", aggregate data pollingInterval="
106 + getAggregateDataPollingInterval() + ", asyncTimeout=" + getAsyncTimeout() + ", syncTimeout="
107 + getSyncTimeout() + "}";