Class: Google::Apis::HomegraphV1::EventData

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

Contains the details for a single event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EventData

Returns a new instance of EventData.



302
303
304
# File 'lib/google/apis/homegraph_v1/classes.rb', line 302

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

Instance Attribute Details

#eventHash<String,Object>

Required. The actual event payload. Corresponds to the JSON property event

Returns:

  • (Hash<String,Object>)


290
291
292
# File 'lib/google/apis/homegraph_v1/classes.rb', line 290

def event
  @event
end

#event_idString

Required. The unique event ID from the device provider. Corresponds to the JSON property eventId

Returns:

  • (String)


295
296
297
# File 'lib/google/apis/homegraph_v1/classes.rb', line 295

def event_id
  @event_id
end

#event_timeString

Required. The timestamp of the event. Corresponds to the JSON property eventTime

Returns:

  • (String)


300
301
302
# File 'lib/google/apis/homegraph_v1/classes.rb', line 300

def event_time
  @event_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



307
308
309
310
311
# File 'lib/google/apis/homegraph_v1/classes.rb', line 307

def update!(**args)
  @event = args[:event] if args.key?(:event)
  @event_id = args[:event_id] if args.key?(:event_id)
  @event_time = args[:event_time] if args.key?(:event_time)
end