]> git.basschouten.com Git - openhab-addons.git/blob
cb6b183cdfa02cd69a25acfee357a5887cb6f561
[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 EquipmentNotificationType} represents the types of equipment notifications.
22  *
23  * @author Mark Hilbush - Initial contribution
24  */
25 @NonNullByDefault
26 public enum EquipmentNotificationType {
27
28     @SerializedName("hvac")
29     HVAC("hvac"),
30
31     @SerializedName("furnaceFilter")
32     FURNACE_FILTER("furnaceFilter"),
33
34     @SerializedName("humidifierFilter")
35     HUMIDIFIER_FILTER("humidifierFilter"),
36
37     @SerializedName("dehumidifierFilter")
38     DEHUNIDIFIER_FILTER("dehumidifierFilter"),
39
40     @SerializedName("ventilator")
41     VENTILATOR("ventilator"),
42
43     @SerializedName("ac")
44     AC("ac"),
45
46     @SerializedName("airFilter")
47     AIR_FILTER("airFilter"),
48
49     @SerializedName("airCleaner")
50     AIR_CLEANER("airCleaner"),
51
52     @SerializedName("uvLamp")
53     UV_LAMP("uvLamp");
54
55     private final String mode;
56
57     private EquipmentNotificationType(String mode) {
58         this.mode = mode;
59     }
60
61     public String value() {
62         return mode;
63     }
64
65     public static EquipmentNotificationType forValue(@Nullable String v) {
66         if (v != null) {
67             for (EquipmentNotificationType vm : EquipmentNotificationType.values()) {
68                 if (vm.mode.equals(v)) {
69                     return vm;
70                 }
71             }
72         }
73         throw new IllegalArgumentException("Invalid vent: " + v);
74     }
75
76     @Override
77     public String toString() {
78         return this.mode;
79     }
80 }