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.neeo.internal.models;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * The model representing a Neeo Recipe (serialize/deserialize json use only).
21 * @author Tim Roberts - Initial contribution
24 public class NeeoRecipe {
26 /** Recipe type for launching the recipe */
27 public static final String LAUNCH = "launch";
29 /** Recipe type for powering off the recipe */
30 public static final String POWEROFF = "poweroff";
36 /** The type of recipe (generally launch/poweroff) */
40 /** The name of the recipe */
44 /** Whether the recipe is enabled */
45 private boolean enabled;
47 /** ?? whether the recipe is dirty ?? */
48 private boolean dirty;
50 // May be used in the future...
51 // private NeeoStep[] steps;
52 // private NeeoCondition[] conditions;
53 // private NeeoTrigger trigger;
55 /** The associated room key */
57 private String roomKey;
59 /** The associated room name. */
61 private String roomName;
63 /** The scenario key recipe is linked to */
65 private String scenarioKey;
67 /** Whether the recipe is hidden or not */
68 private boolean isHiddenRecipe;
70 /** ?? whether this is a custom recipe ?? */
71 private boolean isCustom;
79 public String getKey() {
84 * Gets the recipe type
89 public String getType() {
94 * Gets the recipe name
99 public String getName() {
104 * Checks if the recipe is enabled
106 * @return true, if is enabled
108 public boolean isEnabled() {
113 * Checks if the recipe is dirty
115 * @return true, if is dirty
117 public boolean isDirty() {
122 * Gets the associated room key.
124 * @return the room key
127 public String getRoomKey() {
132 * Gets the associated room name.
134 * @return the room name
137 public String getRoomName() {
142 * Gets the associated scenario key.
144 * @return the scenario key
147 public String getScenarioKey() {
152 * Checks if the recipe is hidden
154 * @return true, if is hidden recipe
156 public boolean isHiddenRecipe() {
157 return isHiddenRecipe;
161 * Checks if its a custom recipe
163 * @return true, if is custom
165 public boolean isCustom() {
170 public String toString() {
171 return "NeeoRecipe [key=" + key + ", type=" + type + ", name=" + name + ", enabled=" + enabled + ", dirty="
172 + dirty + ", roomKey=" + roomKey + ", roomName=" + roomName + ", scenarioKey=" + scenarioKey
173 + ", isHiddenRecipe=" + isHiddenRecipe + ", isCustom=" + isCustom + "]";