2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.openweathermap.internal.dto;
15 import java.util.List;
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;
24 import com.google.gson.annotations.SerializedName;
27 * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
29 * Annotation Style: GSON
32 * allow additional properties
34 * @author Wolfgang Klimt - Initial contribution
35 * @author Christoph Weitkamp - Added weather alerts
37 public class OpenWeatherMapOneCallAPIData {
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;
48 public @Nullable List<Alert> alerts;
50 public double getLat() {
54 public void setLat(double lat) {
58 public double getLon() {
62 public void setLon(double lon) {
66 public String getTimezone() {
70 public void setTimezone(String timezone) {
71 this.timezone = timezone;
74 public int getTimezoneOffset() {
75 return timezoneOffset;
78 public void setTimezoneOffset(int timezoneOffset) {
79 this.timezoneOffset = timezoneOffset;
82 public Current getCurrent() {
86 public void setCurrent(Current current) {
87 this.current = current;
90 public List<Minutely> getMinutely() {
94 public void setMinutely(List<Minutely> minutely) {
95 this.minutely = minutely;
98 public List<Hourly> getHourly() {
102 public void setHourly(List<Hourly> hourly) {
103 this.hourly = hourly;
106 public List<Daily> getDaily() {
110 public void setDaily(List<Daily> daily) {