Class: Google::Apis::MirrorV1::UserAction

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/mirror_v1/classes.rb,
generated/google/apis/mirror_v1/representations.rb,
generated/google/apis/mirror_v1/representations.rb

Overview

Represents an action taken by the user that triggered a notification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ UserAction

Returns a new instance of UserAction



1035
1036
1037
# File 'generated/google/apis/mirror_v1/classes.rb', line 1035

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

Instance Attribute Details

#payloadString

An optional payload for the action. For actions of type CUSTOM, this is the ID of the custom menu item that was selected. Corresponds to the JSON property payload

Returns:

  • (String)


1019
1020
1021
# File 'generated/google/apis/mirror_v1/classes.rb', line 1019

def payload
  @payload
end

#typeString

The type of action. The value of this can be:

  • SHARE - the user shared an item.
  • REPLY - the user replied to an item.
  • REPLY_ALL - the user replied to all recipients of an item.
  • CUSTOM - the user selected a custom menu item on the timeline item.
  • DELETE - the user deleted the item.
  • PIN - the user pinned the item.
  • UNPIN - the user unpinned the item.
  • LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored. Corresponds to the JSON property type

Returns:

  • (String)


1033
1034
1035
# File 'generated/google/apis/mirror_v1/classes.rb', line 1033

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1040
1041
1042
1043
# File 'generated/google/apis/mirror_v1/classes.rb', line 1040

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