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;
18 * Bean holding configuration data according to bridge.xml
20 * @author Alexander Friese - initial contribution
23 public class SolarEdgeConfiguration {
25 private String tokenOrApiKey = "";
26 private String solarId = "";
28 private boolean meterInstalled = false;
29 private boolean usePrivateApi = false;
31 private Integer asyncTimeout = 120;
32 private Integer syncTimeout = 120;
33 private Integer liveDataPollingInterval = 10;
34 private Integer aggregateDataPollingInterval = 60;
36 public String getTokenOrApiKey() {
40 public void setTokenOrApiKey(String tokenOrApiKey) {
41 this.tokenOrApiKey = tokenOrApiKey;
44 public String getSolarId() {
48 public void setSolarId(String solarId) {
49 this.solarId = solarId;
52 public Integer getAsyncTimeout() {
56 public void setAsyncTimeout(Integer asyncTimeout) {
57 this.asyncTimeout = asyncTimeout;
60 public Integer getSyncTimeout() {
64 public void setSyncTimeout(Integer syncTimeout) {
65 this.syncTimeout = syncTimeout;
68 public Integer getLiveDataPollingInterval() {
69 return liveDataPollingInterval;
72 public void setLiveDataPollingInterval(Integer liveDataPollingInterval) {
73 this.liveDataPollingInterval = liveDataPollingInterval;
76 public Integer getAggregateDataPollingInterval() {
77 return aggregateDataPollingInterval;
80 public void setAggregateDataPollingInterval(Integer aggregateDataPollingInterval) {
81 this.aggregateDataPollingInterval = aggregateDataPollingInterval;
84 public boolean isMeterInstalled() {
85 return meterInstalled;
88 public void setMeterInstalled(boolean meterInstalled) {
89 this.meterInstalled = meterInstalled;
92 public boolean isUsePrivateApi() {
96 public void setUsePrivateApi(boolean usePrivateApi) {
97 this.usePrivateApi = usePrivateApi;
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() + "}";