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.



362
363
364
# File 'lib/google/apis/homegraph_v1/classes.rb', line 362

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


350
351
352
# File 'lib/google/apis/homegraph_v1/classes.rb', line 350

def event
  @event
end

#event_idString

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

Returns:

  • (String)


355
356
357
# File 'lib/google/apis/homegraph_v1/classes.rb', line 355

def event_id
  @event_id
end

#event_timeString

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

Returns:

  • (String)


360
361
362
# File 'lib/google/apis/homegraph_v1/classes.rb', line 360

def event_time
  @event_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



367
368
369
370
371
# File 'lib/google/apis/homegraph_v1/classes.rb', line 367

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