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