Class: Google::Apis::HomegraphV1::TraitData
- Inherits:
-
Object
- Object
- Google::Apis::HomegraphV1::TraitData
- 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 trait payload for a single trait.
Instance Attribute Summary collapse
-
#commit_time ⇒ String
Other metadata for the trait.
-
#provider_version_time ⇒ String
Optional in write requests (e.g. ReportStateAndNotification).
-
#trait ⇒ Hash<String,Object>
The Provider Home API trait payload.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TraitData
constructor
A new instance of TraitData.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TraitData
Returns a new instance of TraitData.
1364 1365 1366 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 1364 def initialize(**args) update!(**args) end |
Instance Attribute Details
#commit_time ⇒ String
Other metadata for the trait. The time the client update was committed in the
server.
Corresponds to the JSON property commitTime
1348 1349 1350 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 1348 def commit_time @commit_time end |
#provider_version_time ⇒ String
Optional in write requests (e.g. ReportStateAndNotification). If set,
represents the provider version timestamp of the existing trait in the
database. The server will perform optimistic locking validation if this field
is present and the experiment is enabled. It will not be persisted to the
database.
Corresponds to the JSON property providerVersionTime
1357 1358 1359 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 1357 def provider_version_time @provider_version_time end |
#trait ⇒ Hash<String,Object>
The Provider Home API trait payload.
Corresponds to the JSON property trait
1362 1363 1364 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 1362 def trait @trait end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1369 1370 1371 1372 1373 |
# File 'lib/google/apis/homegraph_v1/classes.rb', line 1369 def update!(**args) @commit_time = args[:commit_time] if args.key?(:commit_time) @provider_version_time = args[:provider_version_time] if args.key?(:provider_version_time) @trait = args[:trait] if args.key?(:trait) end |