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.



539
540
541
# File 'lib/google/apis/homegraph_v1/classes.rb', line 539

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

Instance Attribute Details

#home_eventsArray<Google::Apis::HomegraphV1::HomeEvents>

Optional. UDDM/WHDM trait events Corresponds to the JSON property homeEvents



518
519
520
# File 'lib/google/apis/homegraph_v1/classes.rb', line 518

def home_events
  @home_events
end

#home_traitsArray<Google::Apis::HomegraphV1::HomeTraitUpdates>

Optional. UDDM/WHDM trait updates. Corresponds to the JSON property homeTraits



523
524
525
# File 'lib/google/apis/homegraph_v1/classes.rb', line 523

def home_traits
  @home_traits
end

#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>)


530
531
532
# File 'lib/google/apis/homegraph_v1/classes.rb', line 530

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>)


537
538
539
# File 'lib/google/apis/homegraph_v1/classes.rb', line 537

def states
  @states
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



544
545
546
547
548
549
# File 'lib/google/apis/homegraph_v1/classes.rb', line 544

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