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 Group
24 @Schema(description = "Reconfiguration of a Group ")
25 public class GroupUpdate {
34 @SerializedName("source_id")
36 * id of the connected source
38 private Integer sourceId;
42 * Set of zones belonging to a group
44 private List<Integer> zones;
48 * Set to true if output is all zones muted
53 @SerializedName("vol_delta")
55 * Average utput volume in dB
57 private Integer volDelta;
64 public String getName() {
68 public void setName(String name) {
72 public GroupUpdate name(String name) {
78 * id of the connected source
84 public Integer getSourceId() {
88 public void setSourceId(Integer sourceId) {
89 this.sourceId = sourceId;
92 public GroupUpdate sourceId(Integer sourceId) {
93 this.sourceId = sourceId;
98 * Set of zones belonging to a group
102 public List<Integer> getZones() {
106 public void setZones(List<Integer> zones) {
110 public GroupUpdate zones(List<Integer> zones) {
115 public GroupUpdate addZonesItem(Integer zonesItem) {
116 this.zones.add(zonesItem);
121 * Set to true if output is all zones muted
125 public Boolean getMute() {
129 public void setMute(Boolean mute) {
133 public GroupUpdate mute(Boolean mute) {
139 * Average utput volume in dB
145 public Integer getVolDelta() {
149 public void setVolDelta(Integer volDelta) {
150 this.volDelta = volDelta;
153 public GroupUpdate volDelta(Integer volDelta) {
154 this.volDelta = volDelta;
159 public String toString() {
160 StringBuilder sb = new StringBuilder();
161 sb.append("class GroupUpdate {\n");
163 sb.append(" name: ").append(toIndentedString(name)).append("\n");
164 sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
165 sb.append(" zones: ").append(toIndentedString(zones)).append("\n");
166 sb.append(" mute: ").append(toIndentedString(mute)).append("\n");
167 sb.append(" volDelta: ").append(toIndentedString(volDelta)).append("\n");
169 return sb.toString();
173 * Convert the given object to string with each line indented by 4 spaces
174 * (except the first line).
176 private static String toIndentedString(Object o) {
180 return o.toString().replace("\n", "\n ");