Class: Google::Apis::HomegraphV1::ComponentTraitUpdates

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 component.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ComponentTraitUpdates

Returns a new instance of ComponentTraitUpdates.



83
84
85
# File 'lib/google/apis/homegraph_v1/classes.rb', line 83

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

Instance Attribute Details

#component_idString

Required. ID of the component from the device provider. Corresponds to the JSON property componentId

Returns:

  • (String)


76
77
78
# File 'lib/google/apis/homegraph_v1/classes.rb', line 76

def component_id
  @component_id
end

#trait_dataArray<Google::Apis::HomegraphV1::TraitData>

Required. The updated trait data for the component. Corresponds to the JSON property traitData



81
82
83
# File 'lib/google/apis/homegraph_v1/classes.rb', line 81

def trait_data
  @trait_data
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



88
89
90
91
# File 'lib/google/apis/homegraph_v1/classes.rb', line 88

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