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