2 * Copyright (c) 2010-2023 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.amplipi.internal.model;
15 import com.google.gson.annotations.SerializedName;
17 import io.swagger.v3.oas.annotations.media.Schema;
20 * Reconfiguration of a specific Zone
22 @Schema(description = "Reconfiguration of a specific Zone ")
23 public class ZoneUpdate2 {
32 @SerializedName("source_id")
34 * id of the connected source
36 private Integer sourceId = 0;
40 * Set to true if output is muted
42 private Boolean mute = true;
48 private Integer vol = -79;
52 * Set to true if not connected to a speaker
54 private Boolean disabled = false;
56 @Schema(required = true)
64 public String getName() {
68 public void setName(String name) {
72 public ZoneUpdate2 name(String name) {
78 * id of the connected source
84 public Integer getSourceId() {
88 public void setSourceId(Integer sourceId) {
89 this.sourceId = sourceId;
92 public ZoneUpdate2 sourceId(Integer sourceId) {
93 this.sourceId = sourceId;
98 * Set to true if output is muted
102 public Boolean getMute() {
106 public void setMute(Boolean mute) {
110 public ZoneUpdate2 mute(Boolean mute) {
116 * Output volume in dB
122 public Integer getVol() {
126 public void setVol(Integer vol) {
130 public ZoneUpdate2 vol(Integer vol) {
136 * Set to true if not connected to a speaker
140 public Boolean getDisabled() {
144 public void setDisabled(Boolean disabled) {
145 this.disabled = disabled;
148 public ZoneUpdate2 disabled(Boolean disabled) {
149 this.disabled = disabled;
160 public Integer getId() {
164 public void setId(Integer id) {
168 public ZoneUpdate2 id(Integer id) {
174 public String toString() {
175 StringBuilder sb = new StringBuilder();
176 sb.append("class ZoneUpdate2 {\n");
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");
185 return sb.toString();
189 * Convert the given object to string with each line indented by 4 spaces
190 * (except the first line).
192 private static String toIndentedString(Object o) {
196 return o.toString().replace("\n", "\n ");