Device

data class Device(id: String?, isActive: Boolean, isPrivateSession: Boolean, isRestricted: Boolean, name: String, typeString: String, volumePercent: Int) : IdentifiableNullable

A device which is connected to the Spotify user

Parameters

id

The device ID. This may be null.

isActive

If this device is the currently active device.

isPrivateSession

If this device is currently in a private session.

isRestricted

Whether controlling this device is restricted. At present if this is “true” then no Web API commands will be accepted by this device.

name

The name of the device.

Constructors

Device
Link copied to clipboard
common
fun Device(id: String? = null, isActive: Boolean, isPrivateSession: Boolean, isRestricted: Boolean, name: String, typeString: String, volumePercent: Int)
The device ID.

Functions

component1
Link copied to clipboard
common
operator fun component1(): String?
component2
Link copied to clipboard
common
operator fun component2(): Boolean
component3
Link copied to clipboard
common
operator fun component3(): Boolean
component4
Link copied to clipboard
common
operator fun component4(): Boolean
component5
Link copied to clipboard
common
operator fun component5(): String
component6
Link copied to clipboard
common
operator fun component6(): String
component7
Link copied to clipboard
common
operator fun component7(): Int
copy
Link copied to clipboard
common
fun copy(id: String? = null, isActive: Boolean, isPrivateSession: Boolean, isRestricted: Boolean, name: String, typeString: String, volumePercent: Int): Device
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

api
Link copied to clipboard
common
lateinit var api: GenericSpotifyApi
The API client associated with the request
href
Link copied to clipboard
common
open override val href: String? = null
A link to the Spotify web api endpoint associated with this request
id
Link copied to clipboard
common
open override val id: String? = null
The device ID.
isActive
Link copied to clipboard
common
val isActive: Boolean
If this device is the currently active device.
isPrivateSession
Link copied to clipboard
common
val isPrivateSession: Boolean
If this device is currently in a private session.
isRestricted
Link copied to clipboard
common
val isRestricted: Boolean
Whether controlling this device is restricted.
name
Link copied to clipboard
common
val name: String
The name of the device.
type
Link copied to clipboard
common
val type: DeviceType
Device type, such as “Computer”, “Smartphone” or “Speaker”.
typeString
Link copied to clipboard
common
val typeString: String
volumePercent
Link copied to clipboard
common
val volumePercent: Int

Sources

(source)
Link copied to clipboard