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