]> git.basschouten.com Git - openhab-addons.git/blob
67d34c50fa7b6f2b58a4cca0095c10b90089479d
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.weatherunderground.internal.json;
14
15 /**
16  * The {@link WeatherUndergroundJsonResponse} is the Java class used
17  * to map the entry "response" from the JSON response to a Weather Underground
18  * request.
19  *
20  * @author Laurent Garnier - Initial contribution
21  */
22 public class WeatherUndergroundJsonResponse {
23
24     // Commented members indicate properties returned by the API not used by the binding
25
26     // private String version;
27     // private String termsofService;
28     // private Object features;
29     private WeatherUndergroundJsonError error;
30
31     public WeatherUndergroundJsonResponse() {
32     }
33
34     /**
35      * Get the error type returned by the Weather Underground service
36      *
37      * @return the error type or null if no error
38      */
39     public String getErrorType() {
40         return (error == null) ? null : error.getType();
41     }
42
43     /**
44      * Get the error description returned by the Weather Underground service
45      *
46      * @return the error description or null if no error
47      */
48     public String getErrorDescription() {
49         return (error == null) ? null : error.getDescription();
50     }
51 }