Class: Google::Apis::ChatV1::Reaction

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

A reaction to a message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Reaction

Returns a new instance of Reaction.



6093
6094
6095
# File 'lib/google/apis/chat_v1/classes.rb', line 6093

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

Instance Attribute Details

#emojiGoogle::Apis::ChatV1::Emoji

An emoji that is used as a reaction to a message. Corresponds to the JSON property emoji



6077
6078
6079
# File 'lib/google/apis/chat_v1/classes.rb', line 6077

def emoji
  @emoji
end

#nameString

Identifier. The resource name of the reaction. Format: spaces/space/ messages/message/reactions/reaction` Corresponds to the JSON propertyname`

Returns:

  • (String)


6083
6084
6085
# File 'lib/google/apis/chat_v1/classes.rb', line 6083

def name
  @name
end

#userGoogle::Apis::ChatV1::User

A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user, the output for a User resource only populates the user's name and type. Corresponds to the JSON property user



6091
6092
6093
# File 'lib/google/apis/chat_v1/classes.rb', line 6091

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6098
6099
6100
6101
6102
# File 'lib/google/apis/chat_v1/classes.rb', line 6098

def update!(**args)
  @emoji = args[:emoji] if args.key?(:emoji)
  @name = args[:name] if args.key?(:name)
  @user = args[:user] if args.key?(:user)
end