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.neato.internal.classes;
15 import com.google.gson.annotations.SerializedName;
18 * The {@link Cleaning} is the internal class for different Cleaning states and related information.
20 * @author Patrik Wimnell - Initial contribution
22 public class Cleaning {
24 @SerializedName("category")
25 private Integer categoryValue;
26 @SerializedName("mode")
27 private Integer modeValue;
28 @SerializedName("modifier")
29 private Integer modifierValue;
30 @SerializedName("navigationMode")
31 private Integer navigationModeValue;
32 private Integer spotWidth;
33 private Integer spotHeight;
35 public enum Category {
44 private Category(int value) {
48 public static Category fromValue(int value) {
49 for (Category c : values()) {
50 if (c.value == value) {
64 private Mode(int value) {
68 public static Mode fromValue(int value) {
69 for (Mode m : values()) {
70 if (m.value == value) {
78 public enum Modifier {
84 private Modifier(int value) {
88 public static Modifier fromValue(int value) {
89 for (Modifier m : values()) {
90 if (m.value == value) {
98 public enum NavigationMode {
105 private NavigationMode(int value) {
109 public static NavigationMode fromValue(int value) {
110 for (NavigationMode m : values()) {
111 if (m.value == value) {
119 public Integer getCategoryValue() {
120 return categoryValue;
123 public void setCategoryValue(Integer categoryValue) {
124 this.categoryValue = categoryValue;
127 public Category getCategory() {
128 return Category.fromValue(categoryValue);
131 public Integer getModeValue() {
135 public void setModeValue(Integer modeValue) {
136 this.modeValue = modeValue;
139 public Mode getMode() {
140 return Mode.fromValue(modeValue);
143 public Integer getModifierValue() {
144 return modifierValue;
147 public void setModifierValue(Integer modifierValue) {
148 this.modifierValue = modifierValue;
151 public Modifier getModifier() {
152 return Modifier.fromValue(modifierValue);
155 public Integer getNavigationModeValue() {
156 return navigationModeValue;
159 public void setNavigationModeValue(Integer navigationMode) {
160 this.navigationModeValue = navigationMode;
163 public NavigationMode getNavigationMode() {
164 return NavigationMode.fromValue(navigationModeValue);
167 public Integer getSpotWidth() {
171 public void setSpotWidth(Integer spotWidth) {
172 this.spotWidth = spotWidth;
175 public Integer getSpotHeight() {
179 public void setSpotHeight(Integer spotHeight) {
180 this.spotHeight = spotHeight;