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 io.swagger.v3.oas.annotations.media.Schema;
18 * Digital stream such as Pandora, Airplay or Spotify
20 @Schema(description = "Digital stream such as Pandora, Airplay or Spotify ")
29 @Schema(required = true)
35 @Schema(required = true)
37 * stream type * pandora * shairport * dlna * internetradio * spotify
51 private String password;
55 * Radio station identifier
57 private String station;
61 * Stream url, used for internetradio
67 * Icon/Logo url, used for internetradio
73 * Additional info about the current audio playing from the stream (generated during playback
81 private String status;
88 public Integer getId() {
92 public void setId(Integer id) {
96 public Stream id(Integer id) {
106 public String getName() {
110 public void setName(String name) {
114 public Stream name(String name) {
120 * stream type * pandora * shairport * dlna * internetradio * spotify
124 public String getType() {
128 public void setType(String type) {
132 public Stream type(String type) {
142 public String getUser() {
146 public void setUser(String user) {
150 public Stream user(String user) {
160 public String getPassword() {
164 public void setPassword(String password) {
165 this.password = password;
168 public Stream password(String password) {
169 this.password = password;
174 * Radio station identifier
178 public String getStation() {
182 public void setStation(String station) {
183 this.station = station;
186 public Stream station(String station) {
187 this.station = station;
192 * Stream url, used for internetradio
196 public String getUrl() {
200 public void setUrl(String url) {
204 public Stream url(String url) {
210 * Icon/Logo url, used for internetradio
214 public String getLogo() {
218 public void setLogo(String logo) {
222 public Stream logo(String logo) {
228 * Additional info about the current audio playing from the stream (generated during playback
232 public Object getInfo() {
236 public void setInfo(Object info) {
240 public Stream info(Object info) {
246 * State of the stream
250 public String getStatus() {
254 public void setStatus(String status) {
255 this.status = status;
258 public Stream status(String status) {
259 this.status = status;
264 public String toString() {
265 StringBuilder sb = new StringBuilder();
266 sb.append("class Stream {\n");
268 sb.append(" id: ").append(toIndentedString(id)).append("\n");
269 sb.append(" name: ").append(toIndentedString(name)).append("\n");
270 sb.append(" type: ").append(toIndentedString(type)).append("\n");
271 sb.append(" user: ").append(toIndentedString(user)).append("\n");
272 sb.append(" password: ").append(toIndentedString(password)).append("\n");
273 sb.append(" station: ").append(toIndentedString(station)).append("\n");
274 sb.append(" url: ").append(toIndentedString(url)).append("\n");
275 sb.append(" logo: ").append(toIndentedString(logo)).append("\n");
276 sb.append(" info: ").append(toIndentedString(info)).append("\n");
277 sb.append(" status: ").append(toIndentedString(status)).append("\n");
279 return sb.toString();
283 * Convert the given object to string with each line indented by 4 spaces
284 * (except the first line).
286 private static String toIndentedString(Object o) {
290 return o.toString().replace("\n", "\n ");