]> git.basschouten.com Git - openhab-addons.git/blob
e87eb8f1716f9cc45079e97d222e6e1ad42f03a0
[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.fronius.internal.api;
14
15 import java.util.HashMap;
16 import java.util.Map;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * The {@link PowerFlowRealtimeBodyData} is responsible for storing
22  * the "data" node of the JSON response
23  *
24  * @author Thomas Rokohl - Initial contribution
25  */
26 public class PowerFlowRealtimeBodyData {
27
28     @SerializedName("Site")
29     private PowerFlowRealtimeSite site;
30
31     @SerializedName("Inverters")
32     private Map<String, PowerFlowRealtimeInverter> inverters;
33
34     public Map<String, PowerFlowRealtimeInverter> getInverters() {
35         if (inverters == null) {
36             inverters = new HashMap<>();
37         }
38         return inverters;
39     }
40
41     public void setInverters(Map<String, PowerFlowRealtimeInverter> inverters) {
42         this.inverters = inverters;
43     }
44
45     public PowerFlowRealtimeSite getSite() {
46         if (site == null) {
47             site = new PowerFlowRealtimeSite();
48         }
49         return site;
50     }
51
52     public void setSite(PowerFlowRealtimeSite site) {
53         this.site = site;
54     }
55 }