Class ChapterRestriction

java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.ChapterRestriction
All Implemented Interfaces:
Serializable, IModelObject

public class ChapterRestriction extends AbstractModelObject
Retrieve information about ChapterRestriction objects by building instances from this class.

The reason for the restriction. Supported values:

  • market - The content item is not available in the given market.
  • product - The content item is not available for the user's subscription type.
  • explicit - The content item is explicit and the user's account is set to not play explicit content.
  • payment_required - Payment is required to play the content item.
Additional reasons may be added in the future.
See Also:
  • Method Details

    • getReason

      public String getReason()
      Get the reason for the restriction.
      Returns:
      The restriction reason.
    • toString

      public String toString()
      Description copied from class: AbstractModelObject
      Returns a String representation of this model object in the style:

      ModelObject(attr1=value1, attr2=value2, ...)

      Specified by:
      toString in class AbstractModelObject
    • builder

      public ChapterRestriction.Builder builder()
      Description copied from interface: IModelObject
      Create a builder for building an instance of a model object.
      The type of the builder and its methods depend on its corresponding implementation.
      Returns:
      A builder object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object