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.ecobee.internal.enums;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.SerializedName;
21 * The {@link AckType} represents the types of alert acknowledgements.
23 * @author Mark Hilbush - Initial contribution
28 @SerializedName("accept")
31 @SerializedName("decline")
34 @SerializedName("defer")
37 @SerializedName("unacknowledged")
38 UNACKNOWLEDGED("unacknowledged");
40 private final String type;
42 private AckType(String type) {
46 public static AckType forValue(@Nullable String v) {
48 for (AckType at : AckType.values()) {
49 if (at.type.equals(v)) {
54 throw new IllegalArgumentException("Invalid or null ack type: " + v);
58 public String toString() {