Class Device

    • Method Summary

      Modifier and Type Method Description
      Device.Builder builder()
      Create a builder for building an instance of a model object.
      java.lang.String getId()
      Get the ID of the device.
      java.lang.Boolean getIs_active()
      Check whether the device is the currently active device.
      java.lang.Boolean getIs_restricted()
      Check whether the device is restricted or not.
      java.lang.String getName()
      Get the name of the device.
      java.lang.String getType()
      Get the type of the device.
      java.lang.Integer getVolume_percent()
      Get the current volume of the device in percent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the ID of the device.
        Returns:
        The device ID. This may be null.
      • getIs_active

        public java.lang.Boolean getIs_active()
        Check whether the device is the currently active device.
        Returns:
        If this device is the currently active device.
      • getIs_restricted

        public java.lang.Boolean getIs_restricted()
        Check whether the device is restricted or not. Restricted devices don't accept Spotify Web API calls.
        Returns:
        Whether controlling this device is restricted.
      • getName

        public java.lang.String getName()
        Get the name of the device.
        Returns:
        The name of the device.
      • getType

        public java.lang.String getType()
        Get the type of the device.
        Returns:
        Device type, such as "Computer", "Smartphone" or "Speaker".
      • getVolume_percent

        public java.lang.Integer getVolume_percent()
        Get the current volume of the device in percent.
        Returns:
        The current volume in percent. This may be null.
      • builder

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