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