Class EpisodeSimplified.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.EpisodeSimplified.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
EpisodeSimplified
Builder class for building
EpisodeSimplified
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setAudioPreviewUrl
(String audioPreviewUrl) Set the URL to a audio preview for the episode to be built.setDescription
(String description) Set the description for the episode to be built.setDurationMs
(Integer durationMs) Set the duration for the episode to be built.setExplicit
(Boolean explicit) Set whether the episode to be built is explicit or not.setExternallyHosted
(Boolean externallyHosted) Set whether the episode to be built is hosted outside of Spotify's CDN.setExternalUrls
(ExternalUrl externalUrls) Set the external URLs for the episode to be built.Set the link to the Web API endpoint providing full details of the episode to be built.Set the Spotify ID for the episode to be built.Set the cover art for the episode to be built.setLanguages
(String... languages) Set a list of the languages used in the episode to be built.Set the name for the episode to be built.setPlayable
(Boolean playable) Set whether the episode to be built is playable in the given market.setReleaseDate
(String releaseDate) Set the release date for the episode to be built.setReleaseDatePrecision
(ReleaseDatePrecision releaseDatePrecision) Set the release date precision for the episode to be built.setResumePoint
(ResumePoint resumePoint) Set the user's most recent resume point for the episode to be built.setType
(ModelObjectType type) Set the type of model object.Set the Spotify URI for the episode to be built.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAudioPreviewUrl
Set the URL to a audio preview for the episode to be built.- Parameters:
audioPreviewUrl
- The URL to an audio preview.- Returns:
- A
EpisodeSimplified.Builder
.
-
setDescription
Set the description for the episode to be built.- Parameters:
description
- The description of the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
setDurationMs
Set the duration for the episode to be built.- Parameters:
durationMs
- The duration of the episode in milliseconds.- Returns:
- A
EpisodeSimplified.Builder
.
-
setExplicit
Set whether the episode to be built is explicit or not.- Parameters:
explicit
- Whether or not the episode has explicit content (true = yes it does; false = no it does not OR unknown).- Returns:
- A
EpisodeSimplified.Builder
.
-
setExternalUrls
Set the external URLs for the episode to be built.- Parameters:
externalUrls
- TheExternalUrl
for the episode object.- Returns:
- A
EpisodeSimplified.Builder
.
-
setHref
Set the link to the Web API endpoint providing full details of the episode to be built.- Parameters:
href
- The link to the Web API endpoint providing full details of the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
setId
Set the Spotify ID for the episode to be built.- Parameters:
id
- Spotify episode ID.- Returns:
- A
EpisodeSimplified.Builder
.
-
setImages
Set the cover art for the episode to be built.- Parameters:
images
-Image
objects.- Returns:
- A
EpisodeSimplified.Builder
.
-
setExternallyHosted
Set whether the episode to be built is hosted outside of Spotify's CDN.- Parameters:
externallyHosted
- True if the episode is hosted outside of Spotify’s CDN.- Returns:
- A
EpisodeSimplified.Builder
.
-
setPlayable
Set whether the episode to be built is playable in the given market.- Parameters:
playable
- True if the episode is playable in the given market. Otherwise false.- Returns:
- A
EpisodeSimplified.Builder
.
-
setLanguages
Set a list of the languages used in the episode to be built.- Parameters:
languages
- An array of ISO 3166-1 alpha-2 country codes.- Returns:
- A
EpisodeSimplified.Builder
.
-
setName
Set the name for the episode to be built.- Parameters:
name
- The name of the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
setReleaseDate
Set the release date for the episode to be built.- Parameters:
releaseDate
- The release date of the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
setReleaseDatePrecision
Set the release date precision for the episode to be built.- Parameters:
releaseDatePrecision
- TheReleaseDatePrecision
of the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
setResumePoint
Set the user's most recent resume point for the episode to be built.- Parameters:
resumePoint
- TheResumePoint
of the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
setType
Set the type of model object. In this case "episode".- Parameters:
type
- TheModelObjectType
.- Returns:
- A
EpisodeSimplified.Builder
.
-
setUri
Set the Spotify URI for the episode to be built.- Parameters:
uri
- The Spotify URI for the episode.- Returns:
- A
EpisodeSimplified.Builder
.
-
build
Description copied from interface:IModelObject.Builder
Build 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.
-