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.



123
124
125
# File 'lib/google/apis/homegraph_v1/classes.rb', line 123

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)


116
117
118
# File 'lib/google/apis/homegraph_v1/classes.rb', line 116

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



121
122
123
# File 'lib/google/apis/homegraph_v1/classes.rb', line 121

def trait_data
  @trait_data
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



128
129
130
131
# File 'lib/google/apis/homegraph_v1/classes.rb', line 128

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