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

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

    • Builder

      public Builder()
  • Method Details

    • setId

      public Device.Builder setId(String id)
      The device ID setter.
      Parameters:
      id - The device ID. This may be null.
      Returns:
      A Device.Builder.
    • setIs_active

      public Device.Builder setIs_active(Boolean is_active)
      The active device state setter.
      Parameters:
      is_active - If this device is the currently active device.
      Returns:
      A Device.Builder.
    • setIs_private_session

      public Device.Builder setIs_private_session(Boolean is_private_session)
      The private session state setter.
      Parameters:
      is_private_session - If this device is currently in a private session.
      Returns:
      A Device.Builder.
    • setIs_restricted

      public Device.Builder setIs_restricted(Boolean is_restricted)
      The device restriction state setter.
      Parameters:
      is_restricted - Whether controlling this device is restricted.
      Returns:
      A Device.Builder.
    • setName

      public Device.Builder setName(String name)
      The device name setter.
      Parameters:
      name - The name of the device.
      Returns:
      A Device.Builder.
    • setSupports_volume

      public Device.Builder setSupports_volume(Boolean supports_volume)
      The supports volume state setter.
      Parameters:
      supports_volume - If this device can be used to set the volume.
      Returns:
      A Device.Builder.
    • setType

      public Device.Builder setType(String type)
      The device type setter.
      Parameters:
      type - Device type, such as "Computer", "Smartphone" or "Speaker".
      Returns:
      A Device.Builder.
    • setVolume_percent

      public Device.Builder setVolume_percent(Integer volume_percent)
      The device volume setter.
      Parameters:
      volume_percent - The current volume in percent. This may be null.
      Returns:
      A Device.Builder.
    • build

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