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 java.util.List;
17 import com.fasterxml.jackson.annotation.JsonProperty;
20 * Reconfiguration of a specific Group
22 public class GroupUpdateWithId {
30 * id of the connected source
32 private Integer sourceId;
35 * Set of zone ids belonging to a group
37 private List<Integer> zones = null;
40 * Set to true if output is all zones muted
45 * Average input volume in dB
47 private Integer volDelta;
57 public String getName() {
61 public void setName(String name) {
65 public GroupUpdateWithId name(String name) {
71 * id of the connected source
77 @JsonProperty("source_id")
78 public Integer getSourceId() {
82 public void setSourceId(Integer sourceId) {
83 this.sourceId = sourceId;
86 public GroupUpdateWithId sourceId(Integer sourceId) {
87 this.sourceId = sourceId;
92 * Set of zone ids belonging to a group
96 @JsonProperty("zones")
97 public List<Integer> getZones() {
101 public void setZones(List<Integer> zones) {
105 public GroupUpdateWithId zones(List<Integer> zones) {
110 public GroupUpdateWithId addZonesItem(Integer zonesItem) {
111 this.zones.add(zonesItem);
116 * Set to true if output is all zones muted
120 @JsonProperty("mute")
121 public Boolean getMute() {
125 public void setMute(Boolean mute) {
129 public GroupUpdateWithId mute(Boolean mute) {
135 * Average input volume in dB
141 @JsonProperty("vol_delta")
142 public Integer getVolDelta() {
146 public void setVolDelta(Integer volDelta) {
147 this.volDelta = volDelta;
150 public GroupUpdateWithId volDelta(Integer volDelta) {
151 this.volDelta = volDelta;
161 public Integer getId() {
165 public void setId(Integer id) {
169 public GroupUpdateWithId id(Integer id) {
175 public String toString() {
176 StringBuilder sb = new StringBuilder();
177 sb.append("class GroupUpdateWithId {\n");
179 sb.append(" name: ").append(toIndentedString(name)).append("\n");
180 sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
181 sb.append(" zones: ").append(toIndentedString(zones)).append("\n");
182 sb.append(" mute: ").append(toIndentedString(mute)).append("\n");
183 sb.append(" volDelta: ").append(toIndentedString(volDelta)).append("\n");
184 sb.append(" id: ").append(toIndentedString(id)).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 ");