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 com.fasterxml.jackson.annotation.JsonProperty;
17 public class SourceInfo {
23 private String artist;
29 private String station;
31 private String imgUrl;
39 public String getName() {
43 public void setName(String name) {
47 public SourceInfo name(String name) {
57 @JsonProperty("state")
58 public String getState() {
62 public void setState(String state) {
66 public SourceInfo state(String state) {
76 @JsonProperty("artist")
77 public String getArtist() {
81 public void setArtist(String artist) {
85 public SourceInfo artist(String artist) {
95 @JsonProperty("track")
96 public String getTrack() {
100 public void setTrack(String track) {
104 public SourceInfo track(String track) {
114 @JsonProperty("album")
115 public String getAlbum() {
119 public void setAlbum(String album) {
123 public SourceInfo album(String album) {
133 @JsonProperty("station")
134 public String getStation() {
138 public void setStation(String station) {
139 this.station = station;
142 public SourceInfo station(String station) {
143 this.station = station;
152 @JsonProperty("img_url")
153 public String getImgUrl() {
157 public void setImgUrl(String imgUrl) {
158 this.imgUrl = imgUrl;
161 public SourceInfo imgUrl(String imgUrl) {
162 this.imgUrl = imgUrl;
167 public String toString() {
168 StringBuilder sb = new StringBuilder();
169 sb.append("class SourceInfo {\n");
171 sb.append(" name: ").append(toIndentedString(name)).append("\n");
172 sb.append(" state: ").append(toIndentedString(state)).append("\n");
173 sb.append(" artist: ").append(toIndentedString(artist)).append("\n");
174 sb.append(" track: ").append(toIndentedString(track)).append("\n");
175 sb.append(" album: ").append(toIndentedString(album)).append("\n");
176 sb.append(" station: ").append(toIndentedString(station)).append("\n");
177 sb.append(" imgUrl: ").append(toIndentedString(imgUrl)).append("\n");
179 return sb.toString();
183 * Convert the given object to string with each line indented by 4 spaces
184 * (except the first line).
186 private static String toIndentedString(Object o) {
190 return o.toString().replace("\n", "\n ");