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.
96 97 98 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 96 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
76 77 78 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 76 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
84 85 86 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 84 def device_types @device_types end |
#id ⇒ String
Required. ID of the component from the device provider.
Corresponds to the JSON property id
89 90 91 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 89 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
94 95 96 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 94 def trait_data @trait_data end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
101 102 103 104 105 106 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 101 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 |