]> git.basschouten.com Git - openhab-addons.git/blob
65cd12a6812c730310b52f7e3efdaf046b4d3242
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.ecovacs.internal.api.model;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 import com.google.gson.annotations.SerializedName;
18
19 /**
20  * @author Johannes Ptaszyk - Initial contribution
21  */
22 @NonNullByDefault
23 public enum CleanMode {
24     @SerializedName("auto")
25     AUTO,
26     @SerializedName("border")
27     EDGE,
28     @SerializedName("spot")
29     SPOT,
30     @SerializedName(value = "SpotArea", alternate = { "spotArea" })
31     SPOT_AREA,
32     @SerializedName(value = "CustomArea", alternate = { "customArea" })
33     CUSTOM_AREA,
34     @SerializedName("singleRoom")
35     SINGLE_ROOM,
36     @SerializedName("pause")
37     PAUSE,
38     @SerializedName("stop")
39     STOP,
40     @SerializedName(value = "going", alternate = { "goCharging" })
41     RETURNING,
42     @SerializedName("washing")
43     WASHING,
44     @SerializedName("drying")
45     DRYING,
46     @SerializedName("idle")
47     IDLE;
48
49     public boolean isActive() {
50         return this == AUTO || this == EDGE || this == SPOT || this == SPOT_AREA || this == CUSTOM_AREA
51                 || this == SINGLE_ROOM;
52     }
53
54     public boolean isIdle() {
55         return this == IDLE || this == DRYING || this == WASHING;
56     }
57 }