Class: Spotted::Models::Me::DeviceObject
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Spotted::Models::Me::DeviceObject
- Defined in:
- lib/spotted/models/me/device_object.rb
Instance Attribute Summary collapse
-
#id ⇒ String?
The device ID.
-
#is_active ⇒ Boolean?
If this device is the currently active device.
-
#is_private_session ⇒ Boolean?
If this device is currently in a private session.
-
#is_restricted ⇒ Boolean?
Whether controlling this device is restricted.
-
#name ⇒ String?
A human-readable name for the device.
-
#supports_volume ⇒ Boolean?
If this device can be used to set the volume.
-
#type ⇒ String?
Device type, such as “computer”, “smartphone” or “speaker”.
-
#volume_percent ⇒ Integer?
The current volume in percent.
Instance Method Summary collapse
-
#initialize(id: nil, is_active: nil, is_private_session: nil, is_restricted: nil, name: nil, supports_volume: nil, type: nil, volume_percent: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see DeviceObject for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id: nil, is_active: nil, is_private_session: nil, is_restricted: nil, name: nil, supports_volume: nil, type: nil, volume_percent: nil) ⇒ Object
Some parameter documentations has been truncated, see Spotted::Models::Me::DeviceObject for more details.
|
|
# File 'lib/spotted/models/me/device_object.rb', line 60
|
Instance Attribute Details
#id ⇒ String?
The device ID. This ID is unique and persistent to some extent. However, this is not guaranteed and any cached ‘device_id` should periodically be cleared out and refetched as necessary.
13 |
# File 'lib/spotted/models/me/device_object.rb', line 13 optional :id, String, nil?: true |
#is_active ⇒ Boolean?
If this device is the currently active device.
19 |
# File 'lib/spotted/models/me/device_object.rb', line 19 optional :is_active, Spotted::Internal::Type::Boolean |
#is_private_session ⇒ Boolean?
If this device is currently in a private session.
25 |
# File 'lib/spotted/models/me/device_object.rb', line 25 optional :is_private_session, Spotted::Internal::Type::Boolean |
#is_restricted ⇒ Boolean?
Whether controlling this device is restricted. At present if this is “true” then no Web API commands will be accepted by this device.
32 |
# File 'lib/spotted/models/me/device_object.rb', line 32 optional :is_restricted, Spotted::Internal::Type::Boolean |
#name ⇒ String?
A human-readable name for the device. Some devices have a name that the user can configure (e.g. "Loudest speaker") and some devices have a generic name associated with the manufacturer or device model.
40 |
# File 'lib/spotted/models/me/device_object.rb', line 40 optional :name, String |
#supports_volume ⇒ Boolean?
If this device can be used to set the volume.
46 |
# File 'lib/spotted/models/me/device_object.rb', line 46 optional :supports_volume, Spotted::Internal::Type::Boolean |
#type ⇒ String?
Device type, such as “computer”, “smartphone” or “speaker”.
52 |
# File 'lib/spotted/models/me/device_object.rb', line 52 optional :type, String |
#volume_percent ⇒ Integer?
The current volume in percent.
58 |
# File 'lib/spotted/models/me/device_object.rb', line 58 optional :volume_percent, Integer, nil?: true |