Class TrackLink.Builder

java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.TrackLink.Builder
All Implemented Interfaces:
IModelObject.Builder
Enclosing class:
TrackLink

public static final class TrackLink.Builder extends AbstractModelObject.Builder
Builder class for building TrackLink instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setExternalUrls

      public TrackLink.Builder setExternalUrls(ExternalUrl externalUrls)
      Set external URLs of the track to be built.
      Parameters:
      externalUrls - Known external URLs for this track.
      Returns:
      A TrackLink.Builder.
    • setHref

      public TrackLink.Builder setHref(String href)
      Set href of Spotify Web API endpoint of the track to be built.
      Parameters:
      href - A link to the Web API endpoint providing full details of the track.
      Returns:
      A TrackLink.Builder.
    • setId

      public TrackLink.Builder setId(String id)
      Set the Spotify ID of the track to be built.
      Parameters:
      id - A Spotify track ID.
      Returns:
      A TrackLink.Builder.
    • setType

      public TrackLink.Builder setType(ModelObjectType type)
      Set the type of the model object. In this case "track".
      Parameters:
      type - The object type: "track".
      Returns:
      A TrackLink.Builder.
    • setUri

      public TrackLink.Builder setUri(String uri)
      Set the Spotify URI of the track to be built.
      Parameters:
      uri - The Spotify URI for the track.
      Returns:
      A TrackLink.Builder.
    • build

      public TrackLink 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.