]> git.basschouten.com Git - openhab-addons.git/blob
92bd8d492446f3a203d7c9c50dab97138cc1b87c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.amplipi.internal.model;
14
15 import java.util.List;
16
17 import io.swagger.v3.oas.annotations.media.Schema;
18
19 /**
20  * Full Controller Configuration and Status
21  **/
22 @Schema(description = "Full Controller Configuration and Status ")
23 public class Status {
24
25     @Schema
26     private List<Source> sources = null;
27
28     @Schema
29     private List<Zone> zones = null;
30
31     @Schema
32     private List<Group> groups = null;
33
34     @Schema
35     private List<Stream> streams = null;
36
37     @Schema
38     private List<Preset> presets = null;
39
40     @Schema
41     private Info info;
42
43     /**
44      * Get sources
45      *
46      * @return sources
47      **/
48     public List<Source> getSources() {
49         return sources;
50     }
51
52     public void setSources(List<Source> sources) {
53         this.sources = sources;
54     }
55
56     public Status sources(List<Source> sources) {
57         this.sources = sources;
58         return this;
59     }
60
61     public Status addSourcesItem(Source sourcesItem) {
62         this.sources.add(sourcesItem);
63         return this;
64     }
65
66     /**
67      * Get zones
68      *
69      * @return zones
70      **/
71     public List<Zone> getZones() {
72         return zones;
73     }
74
75     public void setZones(List<Zone> zones) {
76         this.zones = zones;
77     }
78
79     public Status zones(List<Zone> zones) {
80         this.zones = zones;
81         return this;
82     }
83
84     public Status addZonesItem(Zone zonesItem) {
85         this.zones.add(zonesItem);
86         return this;
87     }
88
89     /**
90      * Get groups
91      *
92      * @return groups
93      **/
94     public List<Group> getGroups() {
95         return groups;
96     }
97
98     public void setGroups(List<Group> groups) {
99         this.groups = groups;
100     }
101
102     public Status groups(List<Group> groups) {
103         this.groups = groups;
104         return this;
105     }
106
107     public Status addGroupsItem(Group groupsItem) {
108         this.groups.add(groupsItem);
109         return this;
110     }
111
112     /**
113      * Get streams
114      *
115      * @return streams
116      **/
117     public List<Stream> getStreams() {
118         return streams;
119     }
120
121     public void setStreams(List<Stream> streams) {
122         this.streams = streams;
123     }
124
125     public Status streams(List<Stream> streams) {
126         this.streams = streams;
127         return this;
128     }
129
130     public Status addStreamsItem(Stream streamsItem) {
131         this.streams.add(streamsItem);
132         return this;
133     }
134
135     /**
136      * Get presets
137      *
138      * @return presets
139      **/
140     public List<Preset> getPresets() {
141         return presets;
142     }
143
144     public void setPresets(List<Preset> presets) {
145         this.presets = presets;
146     }
147
148     public Status presets(List<Preset> presets) {
149         this.presets = presets;
150         return this;
151     }
152
153     public Status addPresetsItem(Preset presetsItem) {
154         this.presets.add(presetsItem);
155         return this;
156     }
157
158     /**
159      * Get info
160      *
161      * @return info
162      **/
163     public Info getInfo() {
164         return info;
165     }
166
167     public void setInfo(Info info) {
168         this.info = info;
169     }
170
171     public Status info(Info info) {
172         this.info = info;
173         return this;
174     }
175
176     @Override
177     public String toString() {
178         StringBuilder sb = new StringBuilder();
179         sb.append("class Status {\n");
180
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");
187         sb.append("}");
188         return sb.toString();
189     }
190
191     /**
192      * Convert the given object to string with each line indented by 4 spaces
193      * (except the first line).
194      */
195     private static String toIndentedString(Object o) {
196         if (o == null) {
197             return "null";
198         }
199         return o.toString().replace("\n", "\n    ");
200     }
201 }