]> git.basschouten.com Git - openhab-addons.git/blob
4a99bc6f7c1199c015bddde6cff3360a912d4507
[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.hue.internal.api.dto.clip1;
14
15 import java.lang.reflect.Type;
16 import java.util.List;
17
18 import com.google.gson.reflect.TypeToken;
19
20 /**
21  * @author Q42 - Initial contribution
22  * @author Denis Dudnik - moved Jue library source code inside the smarthome Hue binding
23  */
24 public class ErrorResponse {
25     public static final Type GSON_TYPE = new TypeToken<List<ErrorResponse>>() {
26     }.getType();
27
28     public class Error {
29         private Integer type;
30         private String address;
31         private String description;
32     }
33
34     private Error error;
35
36     public Integer getType() {
37         if (error == null) {
38             return null;
39         }
40         return error.type;
41     }
42
43     public String getAddress() {
44         if (error == null) {
45             return null;
46         }
47         return error.address;
48     }
49
50     public String getDescription() {
51         if (error == null) {
52             return null;
53         }
54         return error.description;
55     }
56 }