]> git.basschouten.com Git - openhab-addons.git/blob
51c3d29b6c46cdd781dc79dcf474e3185d564cca
[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.denonmarantz.internal.xml.entities.commands;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import javax.xml.bind.annotation.XmlAccessType;
19 import javax.xml.bind.annotation.XmlAccessorType;
20 import javax.xml.bind.annotation.XmlElement;
21 import javax.xml.bind.annotation.XmlElementWrapper;
22 import javax.xml.bind.annotation.XmlRootElement;
23
24 /**
25  * Response to a {@link CommandTx}
26  *
27  * @author Jeroen Idserda - Initial contribution
28  */
29 @XmlRootElement(name = "cmd")
30 @XmlAccessorType(XmlAccessType.FIELD)
31 public class CommandRx {
32
33     private String zone1;
34
35     private String zone2;
36
37     private String zone3;
38
39     private String zone4;
40
41     private String volume;
42
43     private String disptype;
44
45     private String dispvalue;
46
47     private String mute;
48
49     private String type;
50
51     @XmlElement(name = "text")
52     private List<Text> texts = new ArrayList<>();
53
54     @XmlElementWrapper(name = "functionrename")
55     @XmlElement(name = "list")
56     private List<RenameSourceList> renameSourceLists;
57
58     @XmlElementWrapper(name = "functiondelete")
59     @XmlElement(name = "list")
60     private List<DeletedSourceList> deletedSourceLists;
61
62     private String playstatus;
63
64     private String playcontents;
65
66     private String repeat;
67
68     private String shuffle;
69
70     private String source;
71
72     public CommandRx() {
73     }
74
75     public String getZone1() {
76         return zone1;
77     }
78
79     public void setZone1(String zone1) {
80         this.zone1 = zone1;
81     }
82
83     public String getZone2() {
84         return zone2;
85     }
86
87     public void setZone2(String zone2) {
88         this.zone2 = zone2;
89     }
90
91     public String getZone3() {
92         return zone3;
93     }
94
95     public void setZone3(String zone3) {
96         this.zone3 = zone3;
97     }
98
99     public String getZone4() {
100         return zone4;
101     }
102
103     public void setZone4(String zone4) {
104         this.zone4 = zone4;
105     }
106
107     public String getVolume() {
108         return volume;
109     }
110
111     public void setVolume(String volume) {
112         this.volume = volume;
113     }
114
115     public String getDisptype() {
116         return disptype;
117     }
118
119     public void setDisptype(String disptype) {
120         this.disptype = disptype;
121     }
122
123     public String getDispvalue() {
124         return dispvalue;
125     }
126
127     public void setDispvalue(String dispvalue) {
128         this.dispvalue = dispvalue;
129     }
130
131     public String getMute() {
132         return mute;
133     }
134
135     public void setMute(String mute) {
136         this.mute = mute;
137     }
138
139     public String getType() {
140         return type;
141     }
142
143     public void setType(String type) {
144         this.type = type;
145     }
146
147     public String getPlaystatus() {
148         return playstatus;
149     }
150
151     public void setPlaystatus(String playstatus) {
152         this.playstatus = playstatus;
153     }
154
155     public String getPlaycontents() {
156         return playcontents;
157     }
158
159     public void setPlaycontents(String playcontents) {
160         this.playcontents = playcontents;
161     }
162
163     public String getRepeat() {
164         return repeat;
165     }
166
167     public void setRepeat(String repeat) {
168         this.repeat = repeat;
169     }
170
171     public String getShuffle() {
172         return shuffle;
173     }
174
175     public void setShuffle(String shuffle) {
176         this.shuffle = shuffle;
177     }
178
179     public String getSource() {
180         return source;
181     }
182
183     public void setSource(String source) {
184         this.source = source;
185     }
186
187     public String getText(String key) {
188         for (Text text : texts) {
189             if (text.getId().equals(key)) {
190                 return text.getValue();
191             }
192         }
193         return null;
194     }
195
196     public List<RenameSourceList> getRenameSourceLists() {
197         return renameSourceLists;
198     }
199
200     public List<DeletedSourceList> getDeletedSourceLists() {
201         return deletedSourceLists;
202     }
203 }