Class: Google::Apis::HomegraphV1::ReportStateAndNotificationDevice

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

The states and notifications specific to a device.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReportStateAndNotificationDevice

Returns a new instance of ReportStateAndNotificationDevice.



395
396
397
# File 'lib/google/apis/homegraph_v1/classes.rb', line 395

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

Instance Attribute Details

#notificationsHash<String,Object>

Notifications metadata for devices. See the Device NOTIFICATIONS section of the individual trait reference guides. Corresponds to the JSON property notifications

Returns:

  • (Hash<String,Object>)


386
387
388
# File 'lib/google/apis/homegraph_v1/classes.rb', line 386

def notifications
  @notifications
end

#statesHash<String,Object>

States of devices to update. See the Device STATES section of the individual trait reference guides. Corresponds to the JSON property states

Returns:

  • (Hash<String,Object>)


393
394
395
# File 'lib/google/apis/homegraph_v1/classes.rb', line 393

def states
  @states
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



400
401
402
403
# File 'lib/google/apis/homegraph_v1/classes.rb', line 400

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