]> git.basschouten.com Git - openhab-addons.git/blob
4469a58e9eba9afb65b9ec3573936465b2ca2744
[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.solaredge.internal.model;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * this abstract class is used as base for the specific aggregate response classes
22  *
23  * @author Alexander Friese - initial contribution
24  */
25 @NonNullByDefault
26 public class AggregateDataResponsePrivateApi {
27
28     public static class Value {
29         public @Nullable Double value;
30         public @Nullable String unit;
31     }
32
33     public static class ValueAndPercent extends Value {
34         public @Nullable Double percentage;
35     }
36
37     public static class UtilizationMeasures {
38         public @Nullable Value production;
39         public @Nullable Value consumption;
40         public @Nullable ValueAndPercent selfConsumptionForConsumption;
41         public @Nullable ValueAndPercent batterySelfConsumption;
42         @SerializedName("import")
43         public @Nullable ValueAndPercent imported;
44         public @Nullable ValueAndPercent export;
45     }
46
47     private @Nullable UtilizationMeasures utilizationMeasures;
48
49     public final @Nullable UtilizationMeasures getUtilizationMeasures() {
50         return utilizationMeasures;
51     }
52
53     public final void setUtilizationMeasures(UtilizationMeasures utilizationMeasures) {
54         this.utilizationMeasures = utilizationMeasures;
55     }
56 }