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.google.gson.annotations.SerializedName;
19 import io.swagger.v3.oas.annotations.media.Schema;
22 * Reconfiguration of a specific Group
24 @Schema(description = "Reconfiguration of a specific Group ")
25 public class GroupUpdate2 {
35 * id of the connected source
37 @SerializedName("source_id")
38 private Integer sourceId = 0;
42 * Set of zones belonging to a group
44 private List<Integer> zones = null;
48 * Set to true if output is all zones muted
50 private Boolean mute = true;
53 @SerializedName("vol_delta")
55 * Average output volume in dB
57 private Integer volDelta = -79;
59 @Schema(required = true)
67 public String getName() {
71 public void setName(String name) {
75 public GroupUpdate2 name(String name) {
81 * id of the connected source
87 public Integer getSourceId() {
91 public void setSourceId(Integer sourceId) {
92 this.sourceId = sourceId;
95 public GroupUpdate2 sourceId(Integer sourceId) {
96 this.sourceId = sourceId;
101 * Set of zones belonging to a group
105 public List<Integer> getZones() {
109 public void setZones(List<Integer> zones) {
113 public GroupUpdate2 zones(List<Integer> zones) {
118 public GroupUpdate2 addZonesItem(Integer zonesItem) {
119 this.zones.add(zonesItem);
124 * Set to true if output is all zones muted
128 public Boolean getMute() {
132 public void setMute(Boolean mute) {
136 public GroupUpdate2 mute(Boolean mute) {
142 * Average output volume in dB
148 public Integer getVolDelta() {
152 public void setVolDelta(Integer volDelta) {
153 this.volDelta = volDelta;
156 public GroupUpdate2 volDelta(Integer volDelta) {
157 this.volDelta = volDelta;
166 public Integer getId() {
170 public void setId(Integer id) {
174 public GroupUpdate2 id(Integer id) {
180 public String toString() {
181 StringBuilder sb = new StringBuilder();
182 sb.append("class GroupUpdate2 {\n");
184 sb.append(" name: ").append(toIndentedString(name)).append("\n");
185 sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
186 sb.append(" zones: ").append(toIndentedString(zones)).append("\n");
187 sb.append(" mute: ").append(toIndentedString(mute)).append("\n");
188 sb.append(" volDelta: ").append(toIndentedString(volDelta)).append("\n");
189 sb.append(" id: ").append(toIndentedString(id)).append("\n");
191 return sb.toString();
195 * Convert the given object to string with each line indented by 4 spaces
196 * (except the first line).
198 private static String toIndentedString(Object o) {
202 return o.toString().replace("\n", "\n ");