]> git.basschouten.com Git - openhab-addons.git/blob
fd59a96b3df2f9c9d03cdf0e12f7ebc99a98ce87
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.linky.internal.dto;
14
15 import java.time.ZonedDateTime;
16 import java.util.List;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * The {@link ConsumptionReport} is responsible for holding values
22  * returned by API calls
23  *
24  * @author GaĆ«l L'hopital - Initial contribution
25  */
26 public class ConsumptionReport {
27     public class Period {
28         public String grandeurPhysiqueEnum;
29         public ZonedDateTime dateDebut;
30         public ZonedDateTime dateFin;
31     }
32
33     public class Aggregate {
34         public List<String> labels;
35         public List<Period> periodes;
36         public List<Double> datas;
37     }
38
39     public class ChronoData {
40         @SerializedName("JOUR")
41         public Aggregate days;
42         @SerializedName("SEMAINE")
43         public Aggregate weeks;
44         @SerializedName("MOIS")
45         public Aggregate months;
46         @SerializedName("ANNEE")
47         public Aggregate years;
48     }
49
50     public class Consumption {
51         public ChronoData aggregats;
52         public String grandeurMetier;
53         public String grandeurPhysique;
54         public String unite;
55     }
56
57     public class FirstLevel {
58         @SerializedName("CONS")
59         public Consumption consumptions;
60     }
61
62     @SerializedName("1")
63     public FirstLevel firstLevel;
64 }