]> git.basschouten.com Git - openhab-addons.git/blob
894d0749a238b9d5cebdbaf08b65a5c9ae4380c5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.darksky.internal.model;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.Nullable;
18
19 /**
20  * The {@link DarkSkyJsonWeatherData} is the Java class used to map the JSON response to an Dark Sky request.
21  *
22  * @author Christoph Weitkamp - Initial contribution
23  */
24 public class DarkSkyJsonWeatherData {
25     private double latitude;
26     private double longitude;
27     private String timezone;
28     private DarkSkyCurrentlyData currently;
29     private DarkSkyHourlyData hourly;
30     private DarkSkyDailyData daily;
31     private @Nullable List<AlertsData> alerts;
32     private int offset;
33
34     public double getLatitude() {
35         return latitude;
36     }
37
38     public void setLatitude(double latitude) {
39         this.latitude = latitude;
40     }
41
42     public double getLongitude() {
43         return longitude;
44     }
45
46     public void setLongitude(double longitude) {
47         this.longitude = longitude;
48     }
49
50     public String getTimezone() {
51         return timezone;
52     }
53
54     public void setTimezone(String timezone) {
55         this.timezone = timezone;
56     }
57
58     public DarkSkyCurrentlyData getCurrently() {
59         return currently;
60     }
61
62     public void setCurrently(DarkSkyCurrentlyData currently) {
63         this.currently = currently;
64     }
65
66     public DarkSkyHourlyData getHourly() {
67         return hourly;
68     }
69
70     public void setHourly(DarkSkyHourlyData hourly) {
71         this.hourly = hourly;
72     }
73
74     public DarkSkyDailyData getDaily() {
75         return daily;
76     }
77
78     public void setDaily(DarkSkyDailyData daily) {
79         this.daily = daily;
80     }
81
82     public @Nullable List<AlertsData> getAlerts() {
83         return alerts;
84     }
85
86     public void setAlerts(List<AlertsData> alerts) {
87         this.alerts = alerts;
88     }
89
90     public int getOffset() {
91         return offset;
92     }
93
94     public void setOffset(int offset) {
95         this.offset = offset;
96     }
97
98     public class AlertsData {
99         public String title;
100         public int time;
101         public int expires;
102         public String description;
103         public String severity;
104         public String uri;
105         public List<String> regions;
106     }
107 }