2 * Copyright (c) 2010-2021 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.heos.internal.json.payload;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.SerializedName;
21 * Data class for response payloads from now_playing commands
23 * @author Martin van Wingerden - Initial contribution
27 public @Nullable String type;
28 public @Nullable String song;
29 public @Nullable String station;
30 public @Nullable String album;
31 public @Nullable String artist;
32 public @Nullable String imageUrl;
33 public @Nullable String albumId;
34 @SerializedName("mid")
35 public @Nullable String mediaId;
36 @SerializedName("qid")
38 @SerializedName("sid")
41 public String combinedSongArtist() {
42 return String.format("%s - %s", artist, song);
46 public String toString() {
47 return "Media{" + "type='" + type + '\'' + ", song='" + song + '\'' + ", station='" + station + '\''
48 + ", album='" + album + '\'' + ", artist='" + artist + '\'' + ", imageUrl='" + imageUrl + '\''
49 + ", albumId='" + albumId + '\'' + ", mediaId='" + mediaId + '\'' + ", queueId=" + queueId
50 + ", sourceId=" + sourceId + '}';