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 building Episode instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • 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 - The ExternalUrl for 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 - Image objects.
      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 - The ReleaseDatePrecision of 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 - The ResumePoint of 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 - The ShowSimplified the 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 - The ModelObjectType.
      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.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.