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