]> git.basschouten.com Git - openhab-addons.git/blob
15872f6602811dae04efd569dc18c713ee0731d4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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 com.fasterxml.jackson.annotation.JsonProperty;
16
17 public class SourceInfo {
18
19     private String name;
20
21     private String state;
22
23     private String artist;
24
25     private String track;
26
27     private String album;
28
29     private String station;
30
31     private String imgUrl;
32
33     /**
34      * Get name
35      *
36      * @return name
37      **/
38     @JsonProperty("name")
39     public String getName() {
40         return name;
41     }
42
43     public void setName(String name) {
44         this.name = name;
45     }
46
47     public SourceInfo name(String name) {
48         this.name = name;
49         return this;
50     }
51
52     /**
53      * Get state
54      *
55      * @return state
56      **/
57     @JsonProperty("state")
58     public String getState() {
59         return state;
60     }
61
62     public void setState(String state) {
63         this.state = state;
64     }
65
66     public SourceInfo state(String state) {
67         this.state = state;
68         return this;
69     }
70
71     /**
72      * Get artist
73      *
74      * @return artist
75      **/
76     @JsonProperty("artist")
77     public String getArtist() {
78         return artist;
79     }
80
81     public void setArtist(String artist) {
82         this.artist = artist;
83     }
84
85     public SourceInfo artist(String artist) {
86         this.artist = artist;
87         return this;
88     }
89
90     /**
91      * Get track
92      *
93      * @return track
94      **/
95     @JsonProperty("track")
96     public String getTrack() {
97         return track;
98     }
99
100     public void setTrack(String track) {
101         this.track = track;
102     }
103
104     public SourceInfo track(String track) {
105         this.track = track;
106         return this;
107     }
108
109     /**
110      * Get album
111      *
112      * @return album
113      **/
114     @JsonProperty("album")
115     public String getAlbum() {
116         return album;
117     }
118
119     public void setAlbum(String album) {
120         this.album = album;
121     }
122
123     public SourceInfo album(String album) {
124         this.album = album;
125         return this;
126     }
127
128     /**
129      * Get station
130      *
131      * @return station
132      **/
133     @JsonProperty("station")
134     public String getStation() {
135         return station;
136     }
137
138     public void setStation(String station) {
139         this.station = station;
140     }
141
142     public SourceInfo station(String station) {
143         this.station = station;
144         return this;
145     }
146
147     /**
148      * Get imgUrl
149      *
150      * @return imgUrl
151      **/
152     @JsonProperty("img_url")
153     public String getImgUrl() {
154         return imgUrl;
155     }
156
157     public void setImgUrl(String imgUrl) {
158         this.imgUrl = imgUrl;
159     }
160
161     public SourceInfo imgUrl(String imgUrl) {
162         this.imgUrl = imgUrl;
163         return this;
164     }
165
166     @Override
167     public String toString() {
168         StringBuilder sb = new StringBuilder();
169         sb.append("class SourceInfo {\n");
170
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");
178         sb.append("}");
179         return sb.toString();
180     }
181
182     /**
183      * Convert the given object to string with each line indented by 4 spaces
184      * (except the first line).
185      */
186     private static String toIndentedString(Object o) {
187         if (o == null) {
188             return "null";
189         }
190         return o.toString().replace("\n", "\n    ");
191     }
192 }