]> git.basschouten.com Git - openhab-addons.git/blob
ec598387e93a969920a1059940e17936e3d9aff9
[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.robonect.internal.model;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * POJO for deserialize an error entry from a JSON response using GSON.
19  * 
20  * @author Marco Meyer - Initial contribution
21  */
22 public class ErrorEntry {
23
24     private String date;
25
26     @SerializedName("error_code")
27     private Integer errorCode;
28
29     @SerializedName("error_message")
30     private String errorMessage;
31
32     private String time;
33
34     private String unix;
35
36     /**
37      * @return - the date the error happend in the format "dd.MM.yy"
38      */
39     public String getDate() {
40         return date;
41     }
42
43     /**
44      * @return - the error code. Some codes are documented here: http://www.robonect.de/viewtopic.php?f=11&t=110
45      */
46     public Integer getErrorCode() {
47         return errorCode;
48     }
49
50     /**
51      * @return - The localized error message from the mower.
52      */
53     public String getErrorMessage() {
54         return errorMessage;
55     }
56
57     /**
58      * @return - The time the error happened in the format "HH:mm:ss"
59      */
60     public String getTime() {
61         return time;
62     }
63
64     /**
65      * @return - The unix time when the error happened.
66      */
67     public String getUnix() {
68         return unix;
69     }
70
71     public void setDate(String date) {
72         this.date = date;
73     }
74
75     public void setErrorCode(Integer errorCode) {
76         this.errorCode = errorCode;
77     }
78
79     public void setErrorMessage(String errorMessage) {
80         this.errorMessage = errorMessage;
81     }
82
83     public void setTime(String time) {
84         this.time = time;
85     }
86
87     public void setUnix(String unix) {
88         this.unix = unix;
89     }
90 }