]> git.basschouten.com Git - openhab-addons.git/blob
fb62ae4b5c59dc948baaa2b1f0f9f0808f7116c0
[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.lametrictime.internal.api.cloud;
14
15 import java.net.URI;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * Cloud configuration class for LaMetric Time.
21  *
22  * @author Gregory Moyer - Initial contribution
23  */
24 @NonNullByDefault
25 public class CloudConfiguration {
26     private URI baseUri = URI.create("https://developer.lametric.com/api/v2");
27
28     private boolean logging = false;
29     private String logLevel = "INFO";
30     private int logMax = 104857600; // 100kb
31
32     public URI getBaseUri() {
33         return baseUri;
34     }
35
36     public void setBaseUri(URI baseUri) {
37         this.baseUri = baseUri;
38     }
39
40     public CloudConfiguration withBaseUri(URI baseUri) {
41         this.baseUri = baseUri;
42         return this;
43     }
44
45     public boolean isLogging() {
46         return logging;
47     }
48
49     public void setLogging(boolean logging) {
50         this.logging = logging;
51     }
52
53     public CloudConfiguration withLogging(boolean logging) {
54         this.logging = logging;
55         return this;
56     }
57
58     public String getLogLevel() {
59         return logLevel;
60     }
61
62     public void setLogLevel(String logLevel) {
63         this.logLevel = logLevel;
64     }
65
66     public CloudConfiguration withLogLevel(String logLevel) {
67         this.logLevel = logLevel;
68         return this;
69     }
70
71     public int getLogMax() {
72         return logMax;
73     }
74
75     public void setLogMax(int logMax) {
76         this.logMax = logMax;
77     }
78
79     public CloudConfiguration withLogMax(int logMax) {
80         this.logMax = logMax;
81         return this;
82     }
83 }