2 * Copyright (c) 2010-2024 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.denonmarantz.internal.xml.dto.commands;
15 import java.util.ArrayList;
16 import java.util.List;
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;
24 import org.eclipse.jdt.annotation.NonNull;
25 import org.eclipse.jdt.annotation.Nullable;
28 * Response to a {@link CommandTx}
30 * @author Jeroen Idserda - Initial contribution
32 @XmlRootElement(name = "cmd")
33 @XmlAccessorType(XmlAccessType.FIELD)
34 public class CommandRx {
44 private String volume;
46 private String disptype;
48 private String dispvalue;
54 @XmlElement(name = "text")
55 private List<Text> texts = new ArrayList<>();
57 @XmlElementWrapper(name = "functionrename")
58 @XmlElement(name = "list")
59 private List<RenameSourceList> renameSourceLists;
61 @XmlElementWrapper(name = "functiondelete")
62 @XmlElement(name = "list")
63 private List<DeletedSourceList> deletedSourceLists;
65 private String playstatus;
67 private String playcontents;
69 private String repeat;
71 private String shuffle;
73 private String source;
78 public String getZone1() {
82 public void setZone1(String zone1) {
86 public String getZone2() {
90 public void setZone2(String zone2) {
94 public String getZone3() {
98 public void setZone3(String zone3) {
102 public String getZone4() {
106 public void setZone4(String zone4) {
110 public String getVolume() {
114 public void setVolume(String volume) {
115 this.volume = volume;
118 public String getDisptype() {
122 public void setDisptype(String disptype) {
123 this.disptype = disptype;
126 public String getDispvalue() {
130 public void setDispvalue(String dispvalue) {
131 this.dispvalue = dispvalue;
134 public String getMute() {
138 public void setMute(String mute) {
142 public String getType() {
146 public void setType(String type) {
150 public String getPlaystatus() {
154 public void setPlaystatus(String playstatus) {
155 this.playstatus = playstatus;
158 public String getPlaycontents() {
162 public void setPlaycontents(String playcontents) {
163 this.playcontents = playcontents;
166 public String getRepeat() {
170 public void setRepeat(String repeat) {
171 this.repeat = repeat;
174 public String getShuffle() {
178 public void setShuffle(String shuffle) {
179 this.shuffle = shuffle;
182 public String getSource() {
186 public void setSource(String source) {
187 this.source = source;
190 public @Nullable String getText(@NonNull String key) {
191 for (Text text : texts) {
192 if (key.equals(text.getId())) {
193 return text.getValue();
199 public List<RenameSourceList> getRenameSourceLists() {
200 return renameSourceLists;
203 public List<DeletedSourceList> getDeletedSourceLists() {
204 return deletedSourceLists;