Class Device.Builder
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
Builder class for building
Device
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.The device ID setter.setIs_active
(Boolean is_active) The active device state setter.setIs_private_session
(Boolean is_private_session) The private session state setter.setIs_restricted
(Boolean is_restricted) The device restriction state setter.The device name setter.setSupports_volume
(Boolean supports_volume) The supports volume state setter.The device type setter.setVolume_percent
(Integer volume_percent) The device volume setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setId
The device ID setter.- Parameters:
id
- The device ID. This may benull
.- Returns:
- A
Device.Builder
.
-
setIs_active
The active device state setter.- Parameters:
is_active
- If this device is the currently active device.- Returns:
- A
Device.Builder
.
-
setIs_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
The device restriction state setter.- Parameters:
is_restricted
- Whether controlling this device is restricted.- Returns:
- A
Device.Builder
.
-
setName
The device name setter.- Parameters:
name
- The name of the device.- Returns:
- A
Device.Builder
.
-
setSupports_volume
The supports volume state setter.- Parameters:
supports_volume
- If this device can be used to set the volume.- Returns:
- A
Device.Builder
.
-
setType
The device type setter.- Parameters:
type
- Device type, such as "Computer", "Smartphone" or "Speaker".- Returns:
- A
Device.Builder
.
-
setVolume_percent
The device volume setter.- Parameters:
volume_percent
- The current volume in percent. This may benull
.- Returns:
- A
Device.Builder
.
-
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.
-