]> git.basschouten.com Git - openhab-addons.git/blob
dc001ec9a419c93703924e496e02edb82cd935f8
[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.amplipi.internal.model;
14
15 import java.util.List;
16
17 import com.fasterxml.jackson.annotation.JsonProperty;
18
19 /**
20  * Reconfiguration of a specific Group
21  **/
22 public class GroupUpdateWithId {
23
24     /**
25      * Friendly name
26      **/
27     private String name;
28
29     /**
30      * id of the connected source
31      **/
32     private Integer sourceId;
33
34     /**
35      * Set of zone ids belonging to a group
36      **/
37     private List<Integer> zones = null;
38
39     /**
40      * Set to true if output is all zones muted
41      **/
42     private Boolean mute;
43
44     /**
45      * Average input volume in dB
46      **/
47     private Integer volDelta;
48
49     private Integer id;
50
51     /**
52      * Friendly name
53      *
54      * @return name
55      **/
56     @JsonProperty("name")
57     public String getName() {
58         return name;
59     }
60
61     public void setName(String name) {
62         this.name = name;
63     }
64
65     public GroupUpdateWithId name(String name) {
66         this.name = name;
67         return this;
68     }
69
70     /**
71      * id of the connected source
72      * minimum: 0
73      * maximum: 3
74      *
75      * @return sourceId
76      **/
77     @JsonProperty("source_id")
78     public Integer getSourceId() {
79         return sourceId;
80     }
81
82     public void setSourceId(Integer sourceId) {
83         this.sourceId = sourceId;
84     }
85
86     public GroupUpdateWithId sourceId(Integer sourceId) {
87         this.sourceId = sourceId;
88         return this;
89     }
90
91     /**
92      * Set of zone ids belonging to a group
93      *
94      * @return zones
95      **/
96     @JsonProperty("zones")
97     public List<Integer> getZones() {
98         return zones;
99     }
100
101     public void setZones(List<Integer> zones) {
102         this.zones = zones;
103     }
104
105     public GroupUpdateWithId zones(List<Integer> zones) {
106         this.zones = zones;
107         return this;
108     }
109
110     public GroupUpdateWithId addZonesItem(Integer zonesItem) {
111         this.zones.add(zonesItem);
112         return this;
113     }
114
115     /**
116      * Set to true if output is all zones muted
117      *
118      * @return mute
119      **/
120     @JsonProperty("mute")
121     public Boolean getMute() {
122         return mute;
123     }
124
125     public void setMute(Boolean mute) {
126         this.mute = mute;
127     }
128
129     public GroupUpdateWithId mute(Boolean mute) {
130         this.mute = mute;
131         return this;
132     }
133
134     /**
135      * Average input volume in dB
136      * minimum: -79
137      * maximum: 0
138      *
139      * @return volDelta
140      **/
141     @JsonProperty("vol_delta")
142     public Integer getVolDelta() {
143         return volDelta;
144     }
145
146     public void setVolDelta(Integer volDelta) {
147         this.volDelta = volDelta;
148     }
149
150     public GroupUpdateWithId volDelta(Integer volDelta) {
151         this.volDelta = volDelta;
152         return this;
153     }
154
155     /**
156      * Get id
157      *
158      * @return id
159      **/
160     @JsonProperty("id")
161     public Integer getId() {
162         return id;
163     }
164
165     public void setId(Integer id) {
166         this.id = id;
167     }
168
169     public GroupUpdateWithId id(Integer id) {
170         this.id = id;
171         return this;
172     }
173
174     @Override
175     public String toString() {
176         StringBuilder sb = new StringBuilder();
177         sb.append("class GroupUpdateWithId {\n");
178
179         sb.append("    name: ").append(toIndentedString(name)).append("\n");
180         sb.append("    sourceId: ").append(toIndentedString(sourceId)).append("\n");
181         sb.append("    zones: ").append(toIndentedString(zones)).append("\n");
182         sb.append("    mute: ").append(toIndentedString(mute)).append("\n");
183         sb.append("    volDelta: ").append(toIndentedString(volDelta)).append("\n");
184         sb.append("    id: ").append(toIndentedString(id)).append("\n");
185         sb.append("}");
186         return sb.toString();
187     }
188
189     /**
190      * Convert the given object to string with each line indented by 4 spaces
191      * (except the first line).
192      */
193     private static String toIndentedString(Object o) {
194         if (o == null) {
195             return "null";
196         }
197         return o.toString().replace("\n", "\n    ");
198     }
199 }