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 Zone
22 @Schema(description = "Reconfiguration of a Zone ")
23 public class ZoneUpdate {
32 @SerializedName("source_id")
34 * id of the connected source
36 private Integer sourceId;
40 * Set to true if output is muted
52 * Set to true if not connected to a speaker
54 private Boolean disabled;
61 public String getName() {
65 public void setName(String name) {
69 public ZoneUpdate name(String name) {
75 * id of the connected source
81 public Integer getSourceId() {
85 public void setSourceId(Integer sourceId) {
86 this.sourceId = sourceId;
89 public ZoneUpdate sourceId(Integer sourceId) {
90 this.sourceId = sourceId;
95 * Set to true if output is muted
99 public Boolean getMute() {
103 public void setMute(Boolean mute) {
107 public ZoneUpdate mute(Boolean mute) {
113 * Output volume in dB
119 public Integer getVol() {
123 public void setVol(Integer vol) {
127 public ZoneUpdate vol(Integer vol) {
133 * Set to true if not connected to a speaker
137 public Boolean getDisabled() {
141 public void setDisabled(Boolean disabled) {
142 this.disabled = disabled;
145 public ZoneUpdate disabled(Boolean disabled) {
146 this.disabled = disabled;
151 public String toString() {
152 StringBuilder sb = new StringBuilder();
153 sb.append("class ZoneUpdate {\n");
155 sb.append(" name: ").append(toIndentedString(name)).append("\n");
156 sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
157 sb.append(" mute: ").append(toIndentedString(mute)).append("\n");
158 sb.append(" vol: ").append(toIndentedString(vol)).append("\n");
159 sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n");
161 return sb.toString();
165 * Convert the given object to string with each line indented by 4 spaces
166 * (except the first line).
168 private static String toIndentedString(Object o) {
172 return o.toString().replace("\n", "\n ");