]> git.basschouten.com Git - openhab-addons.git/blob
9930a727b489cbf46f260ce7e26c1172c319cb81
[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.ecobee.internal.enums;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * The {@link LimitNotificationType} represents the types of limit notifications.
22  *
23  * @author Mark Hilbush - Initial contribution
24  */
25 @NonNullByDefault
26 public enum LimitNotificationType {
27
28     @SerializedName("lowTemp")
29     LOW_TEMP("lowTemp"),
30
31     @SerializedName("highTemp")
32     HIGH_TEMP("highTemp"),
33
34     @SerializedName("lowHumidity")
35     LOW_HUMIDITY("lowHumidity"),
36
37     @SerializedName("highHumidity")
38     HIGH_HUMIDITY("highHumidity"),
39
40     @SerializedName("auxHeat")
41     AUX_HEAT("auxHeat"),
42
43     @SerializedName("auxOutdoor")
44     AUX_OUTDOOR("auxOutdoor");
45
46     private final String mode;
47
48     private LimitNotificationType(String mode) {
49         this.mode = mode;
50     }
51
52     public String value() {
53         return mode;
54     }
55
56     public static LimitNotificationType forValue(@Nullable String v) {
57         if (v != null) {
58             for (LimitNotificationType vm : LimitNotificationType.values()) {
59                 if (vm.mode.equals(v)) {
60                     return vm;
61                 }
62             }
63         }
64         throw new IllegalArgumentException("Invalid vent: " + v);
65     }
66
67     @Override
68     public String toString() {
69         return this.mode;
70     }
71 }