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 * Audio output to a stereo pair of speakers, typically belonging to a room
22 @Schema(description = "Audio output to a stereo pair of speakers, typically belonging to a room ")
31 @Schema(required = true)
38 @SerializedName("source_id")
40 * id of the connected source
42 private Integer sourceId = 0;
46 * Set to true if output is muted
48 private Boolean mute = true;
54 private Integer vol = -79;
58 * Set to true if not connected to a speaker
60 private Boolean disabled = false;
67 public Integer getId() {
71 public void setId(Integer id) {
75 public Zone id(Integer id) {
85 public String getName() {
89 public void setName(String name) {
93 public Zone name(String name) {
99 * id of the connected source
105 public Integer getSourceId() {
109 public void setSourceId(Integer sourceId) {
110 this.sourceId = sourceId;
113 public Zone sourceId(Integer sourceId) {
114 this.sourceId = sourceId;
119 * Set to true if output is muted
123 public Boolean getMute() {
127 public void setMute(Boolean mute) {
131 public Zone mute(Boolean mute) {
137 * Output volume in dB
143 public Integer getVol() {
147 public void setVol(Integer vol) {
151 public Zone vol(Integer vol) {
157 * Set to true if not connected to a speaker
161 public Boolean getDisabled() {
165 public void setDisabled(Boolean disabled) {
166 this.disabled = disabled;
169 public Zone disabled(Boolean disabled) {
170 this.disabled = disabled;
175 public String toString() {
176 StringBuilder sb = new StringBuilder();
177 sb.append("class Zone {\n");
179 sb.append(" id: ").append(toIndentedString(id)).append("\n");
180 sb.append(" name: ").append(toIndentedString(name)).append("\n");
181 sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
182 sb.append(" mute: ").append(toIndentedString(mute)).append("\n");
183 sb.append(" vol: ").append(toIndentedString(vol)).append("\n");
184 sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n");
186 return sb.toString();
190 * Convert the given object to string with each line indented by 4 spaces
191 * (except the first line).
193 private static String toIndentedString(Object o) {
197 return o.toString().replace("\n", "\n ");