]> git.basschouten.com Git - openhab-addons.git/blob
3cb3f4b41bf12a841b57d3540ff04c10e0479f53
[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.hyperion.internal.protocol;
14
15 import org.openhab.binding.hyperion.internal.protocol.v1.Effect;
16
17 import com.google.gson.annotations.SerializedName;
18
19 /**
20  * The {@link EffectCommand} is a POJO for sending an effect command
21  * to the Hyperion server.
22  *
23  * @author Daniel Walters - Initial contribution
24  */
25 public class EffectCommand extends HyperionCommand {
26
27     private static final String NAME = "effect";
28
29     @SerializedName("origin")
30     private String origin;
31
32     @SerializedName("effect")
33     private Effect effect;
34
35     @SerializedName("priority")
36     private int priority;
37
38     public EffectCommand(Effect effect, int priority) {
39         super(NAME);
40         setEffect(effect);
41         setPriority(priority);
42     }
43
44     public Effect getEffect() {
45         return effect;
46     }
47
48     public void setEffect(Effect effect) {
49         this.effect = effect;
50     }
51
52     public int getPriority() {
53         return priority;
54     }
55
56     public void setPriority(int priority) {
57         this.priority = priority;
58     }
59
60     public void setOrigin(String origin) {
61         this.origin = origin;
62     }
63
64     public String getOrigin() {
65         return origin;
66     }
67 }