Class: Google::Apis::HomegraphV1::Component
- Inherits:
-
Object
- Object
- Google::Apis::HomegraphV1::Component
- 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
Component of a provider device.
Instance Attribute Summary collapse
-
#child_components ⇒ Array<Google::Apis::HomegraphV1::Component>
Optional.
-
#device_types ⇒ Array<String>
Required.
-
#id ⇒ String
Required.
-
#trait_data ⇒ Array<Google::Apis::HomegraphV1::TraitData>
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Component
constructor
A new instance of Component.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Component
Returns a new instance of Component.
141 142 143 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 141 def initialize(**args) update!(**args) end |
Instance Attribute Details
#child_components ⇒ Array<Google::Apis::HomegraphV1::Component>
Optional. Child components.
Corresponds to the JSON property childComponents
121 122 123 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 121 def child_components @child_components end |
#device_types ⇒ Array<String>
Required. List of Device types associated with this component. Supported
device types are defined in cs//depot/google3/home/homeservicelayer/uddm/types/
uddm_device_types.proto and the type string is the enum name, for example:
ON_OFF_LIGHT => "ON_OFF_LIGHT".
Corresponds to the JSON property deviceTypes
129 130 131 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 129 def device_types @device_types end |
#id ⇒ String
Required. ID of the component from the device provider.
Corresponds to the JSON property id
134 135 136 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 134 def id @id end |
#trait_data ⇒ Array<Google::Apis::HomegraphV1::TraitData>
Required. List of trait data associated with the component.
Corresponds to the JSON property traitData
139 140 141 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 139 def trait_data @trait_data end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
146 147 148 149 150 151 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 146 def update!(**args) @child_components = args[:child_components] if args.key?(:child_components) @device_types = args[:device_types] if args.key?(:device_types) @id = args[:id] if args.key?(:id) @trait_data = args[:trait_data] if args.key?(:trait_data) end |