IModelObject.Builderpublic static final class Track.Builder extends AbstractModelObject.Builder
Track instances.| Constructor | Description |
|---|---|
Builder() |
| Modifier and Type | Method | Description |
|---|---|---|
Track |
build() |
Build a model object with the information set in the builder object.
|
Track.Builder |
setAlbum(AlbumSimplified album) |
Set the album of the track to be built.
|
Track.Builder |
setArtists(ArtistSimplified... artists) |
Set the artists of the track to be built.
|
Track.Builder |
setAvailableMarkets(com.neovisionaries.i18n.CountryCode... availableMarkets) |
Set the available markets of the track to be built.
|
Track.Builder |
setDiscNumber(Integer discNumber) |
Set the disc numer of the track to be built.
|
Track.Builder |
setDurationMs(Integer durationMs) |
Set the duration in milliseconds of the track to be built.
|
Track.Builder |
setExplicit(Boolean explicit) |
Set whether the track to be built is explicit or not.
|
Track.Builder |
setExternalIds(ExternalId externalIds) |
Set the external IDs of the track to be built.
|
Track.Builder |
setExternalUrls(ExternalUrl externalUrls) |
Set external URLs of the track to be built.
|
Track.Builder |
setHref(String href) |
Set href of Spotify Web API endpoint of the track to be built.
|
Track.Builder |
setId(String id) |
Set track ID of the track to be built.
|
Track.Builder |
setIsPlayable(Boolean isPlayable) |
Set whether the track to be built is playable in your market region or not.
|
Track.Builder |
setLinkedFrom(TrackLink linkedFrom) |
Set the track link object of the track to be built.
|
Track.Builder |
setName(String name) |
Set the name of the track to be built.
|
Track.Builder |
setPopularity(Integer popularity) |
Set the popularity of the track to be built.
|
Track.Builder |
setPreviewUrl(String previewUrl) |
Set the preview URL of the track to be built.
|
Track.Builder |
setRestrictions(Restrictions restrictions) |
Set the restrictions object of the track to be built.
|
Track.Builder |
setTrackNumber(Integer trackNumber) |
Set the track number of the track to be built.
|
Track.Builder |
setType(ModelObjectType type) |
Set the type of the model object.
|
Track.Builder |
setUri(String uri) |
Set Spotify URI of the track to be built.
|
public Track.Builder setAlbum(AlbumSimplified album)
album - The album on which the track appears.Track.Builder.public Track.Builder setArtists(ArtistSimplified... artists)
artists - The artists who performed the track.Track.Builder.public Track.Builder setAvailableMarkets(com.neovisionaries.i18n.CountryCode... availableMarkets)
availableMarkets - A list of the countries in which the track can be played, identified by their
ISO 3166-1 alpha-2 code.Track.Builder.public Track.Builder setDiscNumber(Integer discNumber)
discNumber - The disc number (usually 1 unless the album consists of more than one disc).Track.Builder.public Track.Builder setDurationMs(Integer durationMs)
durationMs - The track length in milliseconds.Track.Builder.public Track.Builder setExplicit(Boolean explicit)
explicit - Whether or not the track has explicit lyrics (true = yes it does; false = no it
does not OR unknown).Track.Builder.public Track.Builder setExternalIds(ExternalId externalIds)
externalIds - Known external IDs for the track.Track.Builder.public Track.Builder setExternalUrls(ExternalUrl externalUrls)
externalUrls - Known external URLs for the track.Track.Builder.public Track.Builder setHref(String href)
href - A link to the Web API endpoint providing full details of the track.Track.Builder.public Track.Builder setId(String id)
id - The Spotify ID for the track.Track.Builder.public Track.Builder setIsPlayable(Boolean isPlayable)
isPlayable - If true, the track is playable in the given market. Otherwise false.Track.Builder.public Track.Builder setLinkedFrom(TrackLink linkedFrom)
linkedFrom - The track in the linked_from object contains information about the originally requested
track.Track.Builder.public Track.Builder setRestrictions(Restrictions restrictions)
restrictions - The track response will still contain metadata for the original track, and a restrictions
object containing the reason why the track is not available.Track.Builder.public Track.Builder setName(String name)
name - Track name.Track.Builder.public Track.Builder setPopularity(Integer popularity)
popularity - The popularity of the track. The value will be between 0 and 100, with 100 being the most
popular.Track.Builder.public Track.Builder setPreviewUrl(String previewUrl)
previewUrl - A link to a 30 second preview (MP3 format) of the track. null if not available.Track.Builder.public Track.Builder setTrackNumber(Integer trackNumber)
trackNumber - The track number.Track.Builder.public Track.Builder setType(ModelObjectType type)
type - The object type: "track".Track.Builder.public Track.Builder setUri(String uri)
uri - The Spotify URI
for the track.Track.Builder.public Track build()
IModelObject.BuilderCopyright © 2019. All rights reserved.