Class: Google::Apis::HomegraphV1::HomeTraitUpdates

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/homegraph_v1/classes.rb,
lib/google/apis/homegraph_v1/representations.rb,
lib/google/apis/homegraph_v1/representations.rb

Overview

Contains the set of updates for a device.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HomeTraitUpdates

Returns a new instance of HomeTraitUpdates.



458
459
460
# File 'lib/google/apis/homegraph_v1/classes.rb', line 458

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#componentsArray<Google::Apis::HomegraphV1::ComponentTraitUpdates>

Required. Trait updates for each component. Corresponds to the JSON property components



451
452
453
# File 'lib/google/apis/homegraph_v1/classes.rb', line 451

def components
  @components
end

#device_idString

Required. Unique identifier for the device. Corresponds to the JSON property deviceId

Returns:

  • (String)


456
457
458
# File 'lib/google/apis/homegraph_v1/classes.rb', line 456

def device_id
  @device_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



463
464
465
466
# File 'lib/google/apis/homegraph_v1/classes.rb', line 463

def update!(**args)
  @components = args[:components] if args.key?(:components)
  @device_id = args[:device_id] if args.key?(:device_id)
end