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
public static final class EpisodeSimplified.Builder extends AbstractModelObject.Builder
Builder class for buildingEpisodeSimplifiedinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EpisodeSimplifiedbuild()Build a model object with the information set in the builder object.EpisodeSimplified.BuildersetAudioPreviewUrl(String audioPreviewUrl)Set the URL to a audio preview for the episode to be built.EpisodeSimplified.BuildersetDescription(String description)Set the description for the episode to be built.EpisodeSimplified.BuildersetDurationMs(Integer durationMs)Set the duration for the episode to be built.EpisodeSimplified.BuildersetExplicit(Boolean explicit)Set whether the episode to be built is explicit or not.EpisodeSimplified.BuildersetExternallyHosted(Boolean externallyHosted)Set whether the episode to be built is hosted outside of Spotify's CDN.EpisodeSimplified.BuildersetExternalUrls(ExternalUrl externalUrls)Set the external URLs for the episode to be built.EpisodeSimplified.BuildersetHref(String href)Set the link to the Web API endpoint providing full details of the episode to be built.EpisodeSimplified.BuildersetId(String id)Set the Spotify ID for the episode to be built.EpisodeSimplified.BuildersetImages(Image... images)Set the cover art for the episode to be built.EpisodeSimplified.BuildersetLanguages(String... languages)Set a list of the languages used in the episode to be built.EpisodeSimplified.BuildersetName(String name)Set the name for the episode to be built.EpisodeSimplified.BuildersetPlayable(Boolean playable)Set whether the episode to be built is playable in the given market.EpisodeSimplified.BuildersetReleaseDate(String releaseDate)Set the release date for the episode to be built.EpisodeSimplified.BuildersetReleaseDatePrecision(ReleaseDatePrecision releaseDatePrecision)Set the release date precision for the episode to be built.EpisodeSimplified.BuildersetResumePoint(ResumePoint resumePoint)Set the user's most recent resume point for the episode to be built.EpisodeSimplified.BuildersetType(ModelObjectType type)Set the type of model object.EpisodeSimplified.BuildersetUri(String uri)Set the Spotify URI for the episode to be built.
-
-
-
Method Detail
-
setAudioPreviewUrl
public EpisodeSimplified.Builder setAudioPreviewUrl(String audioPreviewUrl)
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
public EpisodeSimplified.Builder setDescription(String description)
Set the description for the episode to be built.- Parameters:
description- The description of the episode.- Returns:
- A
EpisodeSimplified.Builder.
-
setDurationMs
public EpisodeSimplified.Builder setDurationMs(Integer durationMs)
Set the duration for the episode to be built.- Parameters:
durationMs- The duration of the episode in milliseconds.- Returns:
- A
EpisodeSimplified.Builder.
-
setExplicit
public EpisodeSimplified.Builder setExplicit(Boolean explicit)
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
public EpisodeSimplified.Builder setExternalUrls(ExternalUrl externalUrls)
Set the external URLs for the episode to be built.- Parameters:
externalUrls- TheExternalUrlfor the episode object.- Returns:
- A
EpisodeSimplified.Builder.
-
setHref
public EpisodeSimplified.Builder setHref(String href)
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
public EpisodeSimplified.Builder setId(String id)
Set the Spotify ID for the episode to be built.- Parameters:
id- Spotify episode ID.- Returns:
- A
EpisodeSimplified.Builder.
-
setImages
public EpisodeSimplified.Builder setImages(Image... images)
Set the cover art for the episode to be built.- Parameters:
images-Imageobjects.- Returns:
- A
EpisodeSimplified.Builder.
-
setExternallyHosted
public EpisodeSimplified.Builder setExternallyHosted(Boolean externallyHosted)
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
public EpisodeSimplified.Builder setPlayable(Boolean playable)
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
public EpisodeSimplified.Builder setLanguages(String... languages)
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
public EpisodeSimplified.Builder setName(String name)
Set the name for the episode to be built.- Parameters:
name- The name of the episode.- Returns:
- A
EpisodeSimplified.Builder.
-
setReleaseDate
public EpisodeSimplified.Builder setReleaseDate(String releaseDate)
Set the release date for the episode to be built.- Parameters:
releaseDate- The release date of the episode.- Returns:
- A
EpisodeSimplified.Builder.
-
setReleaseDatePrecision
public EpisodeSimplified.Builder setReleaseDatePrecision(ReleaseDatePrecision releaseDatePrecision)
Set the release date precision for the episode to be built.- Parameters:
releaseDatePrecision- TheReleaseDatePrecisionof the episode.- Returns:
- A
EpisodeSimplified.Builder.
-
setResumePoint
public EpisodeSimplified.Builder setResumePoint(ResumePoint resumePoint)
Set the user's most recent resume point for the episode to be built.- Parameters:
resumePoint- TheResumePointof the episode.- Returns:
- A
EpisodeSimplified.Builder.
-
setType
public EpisodeSimplified.Builder setType(ModelObjectType type)
Set the type of model object. In this case "episode".- Parameters:
type- TheModelObjectType.- Returns:
- A
EpisodeSimplified.Builder.
-
setUri
public EpisodeSimplified.Builder setUri(String uri)
Set the Spotify URI for the episode to be built.- Parameters:
uri- The Spotify URI for the episode.- Returns:
- A
EpisodeSimplified.Builder.
-
build
public EpisodeSimplified 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.
-
-