]> git.basschouten.com Git - openhab-addons.git/blob
4dafc9ee74583993590b6bbeeabd44520da3e585
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.util.Optional;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 import com.google.gson.annotations.SerializedName;
21
22 /**
23  * The {@link Record} is the Java class used to map the JSON
24  * response to the webservice request.
25  *
26  * @author GaĆ«l L'hopital - Initial contribution
27  */
28 @NonNullByDefault
29 public class Record {
30     @SerializedName("datasetid")
31     private String datasetId = "";
32     @SerializedName("recordid")
33     private String recordId = "";
34     @SerializedName("record_timestamp")
35     private String recordTimestamp = "";
36     @SerializedName("fields")
37     private @Nullable ResponseFieldDTO responseFieldDTO;
38
39     public String getDatasetId() {
40         return datasetId;
41     }
42
43     public String getRecordId() {
44         return recordId;
45     }
46
47     public String getRecordTimestamp() {
48         return recordTimestamp;
49     }
50
51     public Optional<ResponseFieldDTO> getResponseFieldDTO() {
52         return Optional.ofNullable(responseFieldDTO);
53     }
54 }