]> git.basschouten.com Git - openhab-addons.git/blob
c8e12ebd2028e0aa8a7c61956a5a415a5fbf7b48
[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.neeo.internal.models;
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 model representing a forward actions result (serialize/deserialize json use only).
22  *
23  * @author Tim Roberts - Initial contribution
24  *
25  */
26 @NonNullByDefault
27 public class NeeoAction {
28     /** The action - can be null */
29     @Nullable
30     private String action;
31
32     /** The action parameter - generally null */
33     @Nullable
34     @SerializedName("actionparameter")
35     private String actionParameter;
36
37     /** The recipe name - only valid on launch of recipe */
38     @Nullable
39     private String recipe;
40
41     /** The device name - usually filled */
42     @Nullable
43     private String device;
44
45     /** The room name - usually filled */
46     @Nullable
47     private String room;
48
49     /**
50      * Returns the action
51      *
52      * @return a possibly null, possibly empty action
53      */
54     @Nullable
55     public String getAction() {
56         return action;
57     }
58
59     /**
60      * Returns the action parameter
61      *
62      * @return a possibly null, possibly empty action parameter
63      */
64     @Nullable
65     public String getActionParameter() {
66         return actionParameter;
67     }
68
69     /**
70      * Returns the recipe name
71      *
72      * @return a possibly null, possibly empty recipe name
73      */
74     @Nullable
75     public String getRecipe() {
76         return recipe;
77     }
78
79     /**
80      * Returns the device name
81      *
82      * @return a possibly null, possibly empty device name
83      */
84     @Nullable
85     public String getDevice() {
86         return device;
87     }
88
89     /**
90      * Returns the room name
91      *
92      * @return a possibly null, possibly room name
93      */
94     @Nullable
95     public String getRoom() {
96         return room;
97     }
98
99     @Override
100     public String toString() {
101         return "NeeoAction [action=" + action + ", actionParameter=" + actionParameter + ", recipe=" + recipe
102                 + ", device=" + device + ", room=" + room + "]";
103     }
104 }