Class Device
java.lang.Object
com.wrapper.spotify.model_objects.AbstractModelObject
com.wrapper.spotify.model_objects.miscellaneous.Device
- All Implemented Interfaces:
IModelObject
public class Device extends AbstractModelObject
Retrieve information about Device
objects by creating instances from this class.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDevice.BuilderBuilder class for buildingDeviceinstances.static classDevice.JsonUtilJsonUtil class for buildingDeviceinstances.Nested classes/interfaces inherited from interface com.wrapper.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and Type Method Description Device.Builderbuilder()Create a builder for building an instance of a model object.StringgetId()Get the ID of the device.BooleangetIs_active()Check whether the device is the currently active device.BooleangetIs_restricted()Check whether the device is restricted or not.StringgetName()Get the name of the device.StringgetType()Get the type of the device.IntegergetVolume_percent()Get the current volume of the device in percent.
-
Method Details
-
getId
Get the ID of the device.- Returns:
- The device ID. This may be
null.
-
getIs_active
Check whether the device is the currently active device.- Returns:
- If this device is the currently active device.
-
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
Get the name of the device.- Returns:
- The name of the device.
-
getType
Get the type of the device.- Returns:
- Device type, such as "Computer", "Smartphone" or "Speaker".
-
getVolume_percent
Get the current volume of the device in percent.- Returns:
- The current volume in percent. This may be
null.
-
builder
Description copied from interface:IModelObjectCreate 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.
-