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.lifx.internal.dto;
16 * @author Wouter Born - Initial contribution
18 public enum ApplicationRequest {
21 * Don't apply the requested changes until a message with APPLY or APPLY_ONLY is sent.
26 * Apply the changes immediately and apply any pending changes.
31 * Ignore the requested changes in this message and only apply pending changes.
35 private final int value;
37 private ApplicationRequest(int value) {
42 * Gets the integer value of this application request.
44 * @return the integer value
46 public int getValue() {
51 * Returns the {@link ApplicationRequest} for the given integer value.
53 * @param value the integer value
54 * @return the {@link ApplicationRequest} or <code>null</code>, if no {@link ApplicationRequest} exists for the
57 public static ApplicationRequest fromValue(int value) {
58 for (ApplicationRequest ar : values()) {
59 if (ar.getValue() == value) {