2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.miio.internal.robot;
15 import java.math.BigDecimal;
17 import com.google.gson.annotations.Expose;
18 import com.google.gson.annotations.SerializedName;
21 * This DTO class wraps the history record message json structure
23 * @author Marcel Verpaalen - Initial contribution
25 public class HistoryRecordDTO {
27 @SerializedName("start")
30 @SerializedName("begin")
33 @SerializedName("end")
36 @SerializedName("duration")
38 private Integer duration;
39 @SerializedName("area")
41 private BigDecimal area;
42 @SerializedName("clean_time")
44 private Integer cleanTime;
45 @SerializedName("error")
47 private Integer error;
48 @SerializedName("finished")
50 private Integer finished;
51 @SerializedName("complete")
53 private Integer complete;
54 @SerializedName("start_type")
56 private Integer startType;
57 @SerializedName("clean_type")
59 private Integer cleanType;
60 @SerializedName("finish_reason")
62 private Integer finishReason;
63 @SerializedName("dust_collection_status")
65 private Integer dustCollectionStatus;
66 @SerializedName("map_flag")
68 private Integer mapFlag;
70 public final String getStart() {
71 return start != null ? start : begin;
74 public final void setStart(String start) {
78 public final String getEnd() {
82 public final void setEnd(String end) {
86 public final Integer getDuration() {
90 public final void setDuration(Integer duration) {
91 this.duration = duration;
94 public final BigDecimal getArea() {
98 public final void setArea(BigDecimal area) {
102 public final Integer getCleanTime() {
106 public final void setCleanTime(Integer cleanTime) {
107 this.cleanTime = cleanTime;
110 public final Integer getError() {
114 public final void setError(Integer error) {
118 public final Integer getFinished() {
119 return finished != null ? finished : complete;
122 public final void setFinished(Integer finished) {
123 this.finished = finished;
126 public final Integer getStartType() {
130 public final void setStartType(Integer startType) {
131 this.startType = startType;
134 public final Integer getCleanType() {
138 public final void setCleanType(Integer cleanType) {
139 this.cleanType = cleanType;
142 public final Integer getFinishReason() {
146 public final void setFinishReason(Integer finishReason) {
147 this.finishReason = finishReason;
150 public final Integer getDustCollectionStatus() {
151 return dustCollectionStatus;
154 public final void setDustCollectionStatus(Integer dustCollectionStatus) {
155 this.dustCollectionStatus = dustCollectionStatus;
158 public final Integer getMapFlag() {
162 public final void setMapFlag(Integer mapFlag) {
163 this.mapFlag = mapFlag;