Class: Spotted::Models::Me::DeviceObject

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/spotted/models/me/device_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • id (String, nil) (defaults to: nil)

    The device ID. This ID is unique and persistent to some extent. However, this is

  • is_active (Boolean) (defaults to: nil)

    If this device is the currently active device.

  • is_private_session (Boolean) (defaults to: nil)

    If this device is currently in a private session.

  • is_restricted (Boolean) (defaults to: nil)

    Whether controlling this device is restricted. At present if this is “true” then

  • name (String) (defaults to: nil)

    A human-readable name for the device. Some devices have a name that the user can

  • supports_volume (Boolean) (defaults to: nil)

    If this device can be used to set the volume.

  • type (String) (defaults to: nil)

    Device type, such as “computer”, “smartphone” or “speaker”.

  • volume_percent (Integer, nil) (defaults to: nil)

    The current volume in percent.



# File 'lib/spotted/models/me/device_object.rb', line 60

Instance Attribute Details

#idString?

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.

Returns:

  • (String, nil)


13
# File 'lib/spotted/models/me/device_object.rb', line 13

optional :id, String, nil?: true

#is_activeBoolean?

If this device is the currently active device.

Returns:

  • (Boolean, nil)


19
# File 'lib/spotted/models/me/device_object.rb', line 19

optional :is_active, Spotted::Internal::Type::Boolean

#is_private_sessionBoolean?

If this device is currently in a private session.

Returns:

  • (Boolean, nil)


25
# File 'lib/spotted/models/me/device_object.rb', line 25

optional :is_private_session, Spotted::Internal::Type::Boolean

#is_restrictedBoolean?

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

Returns:

  • (Boolean, nil)


32
# File 'lib/spotted/models/me/device_object.rb', line 32

optional :is_restricted, Spotted::Internal::Type::Boolean

#nameString?

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.

Returns:

  • (String, nil)


40
# File 'lib/spotted/models/me/device_object.rb', line 40

optional :name, String

#supports_volumeBoolean?

If this device can be used to set the volume.

Returns:

  • (Boolean, nil)


46
# File 'lib/spotted/models/me/device_object.rb', line 46

optional :supports_volume, Spotted::Internal::Type::Boolean

#typeString?

Device type, such as “computer”, “smartphone” or “speaker”.

Returns:

  • (String, nil)


52
# File 'lib/spotted/models/me/device_object.rb', line 52

optional :type, String

#volume_percentInteger?

The current volume in percent.

Returns:

  • (Integer, nil)


58
# File 'lib/spotted/models/me/device_object.rb', line 58

optional :volume_percent, Integer, nil?: true