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 multiple zones specified by zone_ids and group_ids
22 public class MultiZoneUpdate {
25 * Set of zone ids belonging to a group
27 private List<Integer> zones = null;
32 private List<Integer> groups = null;
34 private ZoneUpdate update;
37 * Set of zone ids belonging to a group
41 @JsonProperty("zones")
42 public List<Integer> getZones() {
46 public void setZones(List<Integer> zones) {
50 public MultiZoneUpdate zones(List<Integer> zones) {
55 public MultiZoneUpdate addZonesItem(Integer zonesItem) {
56 this.zones.add(zonesItem);
65 @JsonProperty("groups")
66 public List<Integer> getGroups() {
70 public void setGroups(List<Integer> groups) {
74 public MultiZoneUpdate groups(List<Integer> groups) {
79 public MultiZoneUpdate addGroupsItem(Integer groupsItem) {
80 this.groups.add(groupsItem);
89 @JsonProperty("update")
90 public ZoneUpdate getUpdate() {
94 public void setUpdate(ZoneUpdate update) {
98 public MultiZoneUpdate update(ZoneUpdate update) {
104 public String toString() {
105 StringBuilder sb = new StringBuilder();
106 sb.append("class MultiZoneUpdate {\n");
108 sb.append(" zones: ").append(toIndentedString(zones)).append("\n");
109 sb.append(" groups: ").append(toIndentedString(groups)).append("\n");
110 sb.append(" update: ").append(toIndentedString(update)).append("\n");
112 return sb.toString();
116 * Convert the given object to string with each line indented by 4 spaces
117 * (except the first line).
119 private static String toIndentedString(Object o) {
123 return o.toString().replace("\n", "\n ");