]> git.basschouten.com Git - openhab-addons.git/blob
d01beb64237a6b1699a4562024fbdf0a34500e5c
[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:
45      *         <a href="http://www.robonect.de/viewtopic.php?f=11&t=110">
46      *         http://www.robonect.de/viewtopic.php?f=11&amp;t=110</a>
47      */
48     public Integer getErrorCode() {
49         return errorCode;
50     }
51
52     /**
53      * @return - The localized error message from the mower.
54      */
55     public String getErrorMessage() {
56         return errorMessage;
57     }
58
59     /**
60      * @return - The time the error happened in the format "HH:mm:ss"
61      */
62     public String getTime() {
63         return time;
64     }
65
66     /**
67      * @return - The unix time when the error happened.
68      */
69     public String getUnix() {
70         return unix;
71     }
72
73     public void setDate(String date) {
74         this.date = date;
75     }
76
77     public void setErrorCode(Integer errorCode) {
78         this.errorCode = errorCode;
79     }
80
81     public void setErrorMessage(String errorMessage) {
82         this.errorMessage = errorMessage;
83     }
84
85     public void setTime(String time) {
86         this.time = time;
87     }
88
89     public void setUnix(String unix) {
90         this.unix = unix;
91     }
92 }