]> git.basschouten.com Git - openhab-addons.git/blob
ca21f465de5a00eb3c5f104c496ce12475c82abd
[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.miio.internal.robot;
14
15 import java.math.BigDecimal;
16
17 import com.google.gson.annotations.Expose;
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * This DTO class wraps the history record message json structure
22  *
23  * @author Marcel Verpaalen - Initial contribution
24  */
25 public class HistoryRecordDTO {
26
27     @SerializedName("start")
28     @Expose
29     private String start;
30     @SerializedName("begin")
31     @Expose
32     private String begin;
33     @SerializedName("end")
34     @Expose
35     private String end;
36     @SerializedName("duration")
37     @Expose
38     private Integer duration;
39     @SerializedName("area")
40     @Expose
41     private BigDecimal area;
42     @SerializedName("clean_time")
43     @Expose
44     private Integer cleanTime;
45     @SerializedName("error")
46     @Expose
47     private Integer error;
48     @SerializedName("finished")
49     @Expose
50     private Integer finished;
51     @SerializedName("complete")
52     @Expose
53     private Integer complete;
54     @SerializedName("start_type")
55     @Expose
56     private Integer startType;
57     @SerializedName("clean_type")
58     @Expose
59     private Integer cleanType;
60     @SerializedName("finish_reason")
61     @Expose
62     private Integer finishReason;
63     @SerializedName("dust_collection_status")
64     @Expose
65     private Integer dustCollectionStatus;
66     @SerializedName("map_flag")
67     @Expose
68     private Integer mapFlag;
69
70     public final String getStart() {
71         return start != null ? start : begin;
72     }
73
74     public final void setStart(String start) {
75         this.start = start;
76     }
77
78     public final String getEnd() {
79         return end;
80     }
81
82     public final void setEnd(String end) {
83         this.end = end;
84     }
85
86     public final Integer getDuration() {
87         return duration;
88     }
89
90     public final void setDuration(Integer duration) {
91         this.duration = duration;
92     }
93
94     public final BigDecimal getArea() {
95         return area;
96     }
97
98     public final void setArea(BigDecimal area) {
99         this.area = area;
100     }
101
102     public final Integer getCleanTime() {
103         return cleanTime;
104     }
105
106     public final void setCleanTime(Integer cleanTime) {
107         this.cleanTime = cleanTime;
108     }
109
110     public final Integer getError() {
111         return error;
112     }
113
114     public final void setError(Integer error) {
115         this.error = error;
116     }
117
118     public final Integer getFinished() {
119         return finished != null ? finished : complete;
120     }
121
122     public final void setFinished(Integer finished) {
123         this.finished = finished;
124     }
125
126     public final Integer getStartType() {
127         return startType;
128     }
129
130     public final void setStartType(Integer startType) {
131         this.startType = startType;
132     }
133
134     public final Integer getCleanType() {
135         return cleanType;
136     }
137
138     public final void setCleanType(Integer cleanType) {
139         this.cleanType = cleanType;
140     }
141
142     public final Integer getFinishReason() {
143         return finishReason;
144     }
145
146     public final void setFinishReason(Integer finishReason) {
147         this.finishReason = finishReason;
148     }
149
150     public final Integer getDustCollectionStatus() {
151         return dustCollectionStatus;
152     }
153
154     public final void setDustCollectionStatus(Integer dustCollectionStatus) {
155         this.dustCollectionStatus = dustCollectionStatus;
156     }
157
158     public final Integer getMapFlag() {
159         return mapFlag;
160     }
161
162     public final void setMapFlag(Integer mapFlag) {
163         this.mapFlag = mapFlag;
164     }
165 }