]> git.basschouten.com Git - openhab-addons.git/blob
aa751896feeefeb73af1ab172211a46bb83ec7a0
[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.openweathermap.internal.dto;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.Nullable;
18 import org.openhab.binding.openweathermap.internal.dto.onecall.Alert;
19 import org.openhab.binding.openweathermap.internal.dto.onecall.Current;
20 import org.openhab.binding.openweathermap.internal.dto.onecall.Daily;
21 import org.openhab.binding.openweathermap.internal.dto.onecall.Hourly;
22 import org.openhab.binding.openweathermap.internal.dto.onecall.Minutely;
23
24 import com.google.gson.annotations.SerializedName;
25
26 /**
27  * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
28  * Settings:
29  * Annotation Style: GSON
30  * Use primitive types
31  * Use double numbers
32  * allow additional properties
33  *
34  * @author Wolfgang Klimt - Initial contribution
35  * @author Christoph Weitkamp - Added weather alerts
36  */
37 public class OpenWeatherMapOneCallAPIData {
38     private double lat;
39     private double lon;
40     private String timezone;
41     @SerializedName("timezone_offset")
42     private int timezoneOffset;
43     private Current current;
44     private List<Minutely> minutely;
45     private List<Hourly> hourly;
46     private List<Daily> daily;
47
48     public @Nullable List<Alert> alerts;
49
50     public double getLat() {
51         return lat;
52     }
53
54     public void setLat(double lat) {
55         this.lat = lat;
56     }
57
58     public double getLon() {
59         return lon;
60     }
61
62     public void setLon(double lon) {
63         this.lon = lon;
64     }
65
66     public String getTimezone() {
67         return timezone;
68     }
69
70     public void setTimezone(String timezone) {
71         this.timezone = timezone;
72     }
73
74     public int getTimezoneOffset() {
75         return timezoneOffset;
76     }
77
78     public void setTimezoneOffset(int timezoneOffset) {
79         this.timezoneOffset = timezoneOffset;
80     }
81
82     public Current getCurrent() {
83         return current;
84     }
85
86     public void setCurrent(Current current) {
87         this.current = current;
88     }
89
90     public List<Minutely> getMinutely() {
91         return minutely;
92     }
93
94     public void setMinutely(List<Minutely> minutely) {
95         this.minutely = minutely;
96     }
97
98     public List<Hourly> getHourly() {
99         return hourly;
100     }
101
102     public void setHourly(List<Hourly> hourly) {
103         this.hourly = hourly;
104     }
105
106     public List<Daily> getDaily() {
107         return daily;
108     }
109
110     public void setDaily(List<Daily> daily) {
111         this.daily = daily;
112     }
113 }