Class PlaylistSimplified.Builder
- java.lang.Object
-
- com.wrapper.spotify.model_objects.AbstractModelObject.Builder
-
- com.wrapper.spotify.model_objects.specification.PlaylistSimplified.Builder
-
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
- PlaylistSimplified
public static final class PlaylistSimplified.Builder extends AbstractModelObject.Builder
Builder class for buildingPlaylistSimplifiedinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description PlaylistSimplifiedbuild()Build a model object with the information set in the builder object.PlaylistSimplified.BuildersetCollaborative(java.lang.Boolean collaborative)Set whether the playlist to be built is collaborative or not.PlaylistSimplified.BuildersetExternalUrls(ExternalUrl externalUrls)Set the external URLs of the playlist to be built.PlaylistSimplified.BuildersetHref(java.lang.String href)Set the link to the Spotify Web API endpoint providing full details of the playlist.PlaylistSimplified.BuildersetId(java.lang.String id)Set the Spotify ID for the playlist to be built.PlaylistSimplified.BuildersetImages(Image... images)Set the cover image of the playlist to be built.PlaylistSimplified.BuildersetName(java.lang.String name)Set the name of the playlist to be built.PlaylistSimplified.BuildersetOwner(User owner)Set the owner of the playlist to be built.PlaylistSimplified.BuildersetPublicAccess(java.lang.Boolean publicAccess)Set whether the playlist to be built is available in public or not.PlaylistSimplified.BuildersetSnapshotId(java.lang.String snapshotId)Set the version identifier for the playlist to be built.PlaylistSimplified.BuildersetTracks(PlaylistTracksInformation tracks)Set some track infromation of the playlist to be built.PlaylistSimplified.BuildersetType(ModelObjectType type)Set the type of the model object.PlaylistSimplified.BuildersetUri(java.lang.String uri)Set the Spotify URI of the playlist to be built.
-
-
-
Method Detail
-
setCollaborative
public PlaylistSimplified.Builder setCollaborative(java.lang.Boolean collaborative)
Set whether the playlist to be built is collaborative or not.- Parameters:
collaborative-trueif the owner allows other users to modify the playlist,falseif not.- Returns:
- A
PlaylistSimplified.Builder.
-
setExternalUrls
public PlaylistSimplified.Builder setExternalUrls(ExternalUrl externalUrls)
Set the external URLs of the playlist to be built.- Parameters:
externalUrls- Known external URLs for this playlist.- Returns:
- A
PlaylistSimplified.Builder.
-
setHref
public PlaylistSimplified.Builder setHref(java.lang.String href)
Set the link to the Spotify Web API endpoint providing full details of the playlist.- Parameters:
href- A link to the Spotify Web API endpoint providing full details of the playlist.- Returns:
- A
PlaylistSimplified.Builder.
-
setId
public PlaylistSimplified.Builder setId(java.lang.String id)
Set the Spotify ID for the playlist to be built.- Parameters:
id- The Spotify ID for the playlist.- Returns:
- A
PlaylistSimplified.Builder.
-
setImages
public PlaylistSimplified.Builder setImages(Image... images)
Set the cover image of the playlist to be built.- Parameters:
images- An array of images in different sizes.- Returns:
- A
PlaylistSimplified.Builder.
-
setName
public PlaylistSimplified.Builder setName(java.lang.String name)
Set the name of the playlist to be built.- Parameters:
name- The playlist name.- Returns:
- A
PlaylistSimplified.Builder.
-
setOwner
public PlaylistSimplified.Builder setOwner(User owner)
Set the owner of the playlist to be built.- Parameters:
owner- A user object.- Returns:
- A
PlaylistSimplified.Builder.
-
setPublicAccess
public PlaylistSimplified.Builder setPublicAccess(java.lang.Boolean publicAccess)
Set whether the playlist to be built is available in public or not.- Parameters:
publicAccess-truethe playlist is public,falsethe playlist is private,nullthe playlist status is not relevant.- Returns:
- A
PlaylistSimplified.Builder.
-
setSnapshotId
public PlaylistSimplified.Builder setSnapshotId(java.lang.String snapshotId)
Set the version identifier for the playlist to be built.- Parameters:
snapshotId- The version identifier for the playlist.- Returns:
- A
PlaylistSimplified.Builder.
-
setTracks
public PlaylistSimplified.Builder setTracks(PlaylistTracksInformation tracks)
Set some track infromation of the playlist to be built.- Parameters:
tracks- A playlist tracks information object.- Returns:
- A
PlaylistSimplified.Builder.
-
setType
public PlaylistSimplified.Builder setType(ModelObjectType type)
Set the type of the model object. In this case "playlist".- Parameters:
type- The model object type.- Returns:
- A
PlaylistSimplified.Builder.
-
setUri
public PlaylistSimplified.Builder setUri(java.lang.String uri)
Set the Spotify URI of the playlist to be built.- Parameters:
uri- The Spotify playlist URI.- Returns:
- A
PlaylistSimplified.Builder.
-
build
public PlaylistSimplified build()
Description copied from interface:IModelObject.BuilderBuild a model object with the information set in the builder object.
The type of the model object and its methods depend on its corresponding implementation.- Returns:
- A model object.
-
-