2 * Copyright (c) 2010-2022 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 io.swagger.v3.oas.annotations.media.Schema;
20 * Full Controller Configuration and Status
22 @Schema(description = "Full Controller Configuration and Status ")
26 private List<Source> sources = null;
29 private List<Zone> zones = null;
32 private List<Group> groups = null;
35 private List<Stream> streams = null;
38 private List<Preset> presets = null;
48 public List<Source> getSources() {
52 public void setSources(List<Source> sources) {
53 this.sources = sources;
56 public Status sources(List<Source> sources) {
57 this.sources = sources;
61 public Status addSourcesItem(Source sourcesItem) {
62 this.sources.add(sourcesItem);
71 public List<Zone> getZones() {
75 public void setZones(List<Zone> zones) {
79 public Status zones(List<Zone> zones) {
84 public Status addZonesItem(Zone zonesItem) {
85 this.zones.add(zonesItem);
94 public List<Group> getGroups() {
98 public void setGroups(List<Group> groups) {
102 public Status groups(List<Group> groups) {
103 this.groups = groups;
107 public Status addGroupsItem(Group groupsItem) {
108 this.groups.add(groupsItem);
117 public List<Stream> getStreams() {
121 public void setStreams(List<Stream> streams) {
122 this.streams = streams;
125 public Status streams(List<Stream> streams) {
126 this.streams = streams;
130 public Status addStreamsItem(Stream streamsItem) {
131 this.streams.add(streamsItem);
140 public List<Preset> getPresets() {
144 public void setPresets(List<Preset> presets) {
145 this.presets = presets;
148 public Status presets(List<Preset> presets) {
149 this.presets = presets;
153 public Status addPresetsItem(Preset presetsItem) {
154 this.presets.add(presetsItem);
163 public Info getInfo() {
167 public void setInfo(Info info) {
171 public Status info(Info info) {
177 public String toString() {
178 StringBuilder sb = new StringBuilder();
179 sb.append("class Status {\n");
181 sb.append(" sources: ").append(toIndentedString(sources)).append("\n");
182 sb.append(" zones: ").append(toIndentedString(zones)).append("\n");
183 sb.append(" groups: ").append(toIndentedString(groups)).append("\n");
184 sb.append(" streams: ").append(toIndentedString(streams)).append("\n");
185 sb.append(" presets: ").append(toIndentedString(presets)).append("\n");
186 sb.append(" info: ").append(toIndentedString(info)).append("\n");
188 return sb.toString();
192 * Convert the given object to string with each line indented by 4 spaces
193 * (except the first line).
195 private static String toIndentedString(Object o) {
199 return o.toString().replace("\n", "\n ");