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.fasterxml.jackson.annotation.JsonProperty;
18 * Reconfiguration of a specific Zone
20 public class ZoneUpdateWithId {
28 * id of the connected source
30 private Integer sourceId;
33 * Set to true if output is muted
43 * Set to true if not connected to a speaker
45 private Boolean disabled;
55 public String getName() {
59 public void setName(String name) {
63 public ZoneUpdateWithId name(String name) {
69 * id of the connected source
75 @JsonProperty("source_id")
76 public Integer getSourceId() {
80 public void setSourceId(Integer sourceId) {
81 this.sourceId = sourceId;
84 public ZoneUpdateWithId sourceId(Integer sourceId) {
85 this.sourceId = sourceId;
90 * Set to true if output is muted
95 public Boolean getMute() {
99 public void setMute(Boolean mute) {
103 public ZoneUpdateWithId mute(Boolean mute) {
109 * Output volume in dB
116 public Integer getVol() {
120 public void setVol(Integer vol) {
124 public ZoneUpdateWithId vol(Integer vol) {
130 * Set to true if not connected to a speaker
134 @JsonProperty("disabled")
135 public Boolean getDisabled() {
139 public void setDisabled(Boolean disabled) {
140 this.disabled = disabled;
143 public ZoneUpdateWithId disabled(Boolean disabled) {
144 this.disabled = disabled;
156 public Integer getId() {
160 public void setId(Integer id) {
164 public ZoneUpdateWithId id(Integer id) {
170 public String toString() {
171 StringBuilder sb = new StringBuilder();
172 sb.append("class ZoneUpdateWithId {\n");
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");
181 return sb.toString();
185 * Convert the given object to string with each line indented by 4 spaces
186 * (except the first line).
188 private static String toIndentedString(Object o) {
192 return o.toString().replace("\n", "\n ");