]> git.basschouten.com Git - openhab-addons.git/blob
75ce458c5ede69ae943f99625b475079b286ed9b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.meteoalerte.internal.json;
14
15 import java.time.ZonedDateTime;
16 import java.util.Optional;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20
21 import com.google.gson.annotations.SerializedName;
22
23 /**
24  * The {@link ResponseFieldDTO} is the Java class used to map the JSON
25  * response to the webservice request.
26  *
27  * @author GaĆ«l L'hopital - Initial contribution
28  */
29 @NonNullByDefault
30 public class ResponseFieldDTO {
31     @SerializedName("nom_reg")
32     private String nomReg = "";
33     @SerializedName("typeprev")
34     private String typePrev = "";
35     @SerializedName("etat_canicule")
36     private String canicule = "";
37     @SerializedName("nom_dept")
38     private String nomDept = "";
39     @SerializedName("etat_grand_froid")
40     private String grandFroid = "";
41     @SerializedName("noversion")
42     private String noVersion = "";
43     @SerializedName("etat_pluie_inondation")
44     private String pluieInondation = "";
45     @SerializedName("etat_neige")
46     private String neige = "";
47     @SerializedName("etat_vent")
48     private String vent = "";
49     @SerializedName("etat_inondation")
50     private String inondation = "";
51     @SerializedName("etat_avalanches")
52     private String avalanches = "";
53     @SerializedName("etat_orage")
54     private String orage = "";
55     private int echeance;
56     @SerializedName("etat_vague_submersion")
57     private String vagueSubmersion = "";
58     private String dep = "";
59     @SerializedName("vigilancecommentaire_texte")
60     private String vigilanceComment = "";
61     @SerializedName("dateprevue")
62     private @Nullable ZonedDateTime datePrevue;
63     @SerializedName("dateinsert")
64     private @Nullable ZonedDateTime dateInsert;
65     @SerializedName("daterun")
66     private @Nullable ZonedDateTime dateRun;
67
68     public String getVigilanceComment() {
69         return vigilanceComment;
70     }
71
72     public String getNomReg() {
73         return nomReg;
74     }
75
76     public Optional<ZonedDateTime> getDatePrevue() {
77         ZonedDateTime datePrevue = this.datePrevue;
78         if (datePrevue != null) {
79             return Optional.of(datePrevue);
80         }
81         return Optional.empty();
82     }
83
84     public String getTypePrev() {
85         return typePrev;
86     }
87
88     public String getCanicule() {
89         return canicule;
90     }
91
92     public String getNomDept() {
93         return nomDept;
94     }
95
96     public String getGrandFroid() {
97         return grandFroid;
98     }
99
100     public String getNoVersion() {
101         return noVersion;
102     }
103
104     public String getPluieInondation() {
105         return pluieInondation;
106     }
107
108     public String getNeige() {
109         return neige;
110     }
111
112     public String getVent() {
113         return vent;
114     }
115
116     public Optional<ZonedDateTime> getDateInsert() {
117         ZonedDateTime dateInsert = this.dateInsert;
118         if (dateInsert != null) {
119             return Optional.of(dateInsert);
120         }
121         return Optional.empty();
122     }
123
124     public String getInondation() {
125         return inondation;
126     }
127
128     public String getAvalanches() {
129         return avalanches;
130     }
131
132     public String getOrage() {
133         return orage;
134     }
135
136     public int getEcheance() {
137         return echeance;
138     }
139
140     public String getVagueSubmersion() {
141         return vagueSubmersion;
142     }
143
144     public String getDep() {
145         return dep;
146     }
147
148     public Optional<ZonedDateTime> getDateRun() {
149         ZonedDateTime dateRun = this.dateRun;
150         if (dateRun != null) {
151             return Optional.of(dateRun);
152         }
153         return Optional.empty();
154     }
155 }