de.sonallux.spotify.api.models.BaseObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spotify-web-api-java Show documentation
Show all versions of spotify-web-api-java Show documentation
A Java wrapper for Spotify's Web API
The newest version!
package de.sonallux.spotify.api.models;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.*;
@Getter
@Setter
@NoArgsConstructor
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Album.class, name = "album"),
@JsonSubTypes.Type(value = Artist.class, name = "artist"),
@JsonSubTypes.Type(value = Episode.class, name = "episode"),
@JsonSubTypes.Type(value = Playlist.class, name = "playlist"),
@JsonSubTypes.Type(value = Show.class, name = "show"),
@JsonSubTypes.Type(value = Track.class, name = "track"),
@JsonSubTypes.Type(value = PrivateUser.class, name = "user"),
})
public abstract class BaseObject {
/**
* A link to the Web API endpoint providing full details of the object.
*/
public String href;
/**
* The Spotify ID for the object.
*/
public String id;
/**
* The object type.
*/
public String type;
/**
* The Spotify URI for the object.
*/
public String uri;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy