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.model;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.SerializedName;
21 * this abstract class is used as base for the specific aggregate response classes
23 * @author Alexander Friese - initial contribution
26 public class AggregateDataResponsePrivateApi {
28 public static class Value {
29 public @Nullable Double value;
30 public @Nullable String unit;
33 public static class ValueAndPercent extends Value {
34 public @Nullable Double percentage;
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;
47 private @Nullable UtilizationMeasures utilizationMeasures;
49 public final @Nullable UtilizationMeasures getUtilizationMeasures() {
50 return utilizationMeasures;
53 public final void setUtilizationMeasures(UtilizationMeasures utilizationMeasures) {
54 this.utilizationMeasures = utilizationMeasures;