]> git.basschouten.com Git - openhab-addons.git/blob
8f217a0e6cba074ca97f7ffa9f643a4e10e77dc4
[openhab-addons.git] /
1 /**
2  * Copyright 2017-2018 Gregory Moyer and contributors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openhab.binding.lametrictime.api.cloud;
17
18 import java.net.URI;
19
20 public class CloudConfiguration
21 {
22     private URI baseUri = URI.create("https://developer.lametric.com/api/v2");
23
24     private boolean logging = false;
25     private String logLevel = "INFO";
26     private int logMax = 104857600; // 100kb
27
28     public URI getBaseUri()
29     {
30         return baseUri;
31     }
32
33     public void setBaseUri(URI baseUri)
34     {
35         this.baseUri = baseUri;
36     }
37
38     public CloudConfiguration withBaseUri(URI baseUri)
39     {
40         this.baseUri = baseUri;
41         return this;
42     }
43
44     public boolean isLogging()
45     {
46         return logging;
47     }
48
49     public void setLogging(boolean logging)
50     {
51         this.logging = logging;
52     }
53
54     public CloudConfiguration withLogging(boolean logging)
55     {
56         this.logging = logging;
57         return this;
58     }
59
60     public String getLogLevel()
61     {
62         return logLevel;
63     }
64
65     public void setLogLevel(String logLevel)
66     {
67         this.logLevel = logLevel;
68     }
69
70     public CloudConfiguration withLogLevel(String logLevel)
71     {
72         this.logLevel = logLevel;
73         return this;
74     }
75
76     public int getLogMax()
77     {
78         return logMax;
79     }
80
81     public void setLogMax(int logMax)
82     {
83         this.logMax = logMax;
84     }
85
86     public CloudConfiguration withLogMax(int logMax)
87     {
88         this.logMax = logMax;
89         return this;
90     }
91 }