Class: Google::Apis::ChatV1::DeprecatedEvent
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::DeprecatedEvent
- 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 Google Chat app interaction event that represents and contains data about a user's interaction with a Chat app. To configure your Chat app to receive interaction events, see Receive and respond to user interactions. In addition to receiving events from user interactions, Chat apps can receive events about changes to spaces, such as when a new member is added to a space. To learn about space events, see Work with events from Google Chat. Note: This event is only used for Chat interaction events. If your Chat app is built as a Google Workspace add-on, see Chat event objects in the add-ons documentation.
Instance Attribute Summary collapse
-
#action ⇒ Google::Apis::ChatV1::FormAction
A form action describes the behavior when the form is submitted.
-
#app_command_metadata ⇒ Google::Apis::ChatV1::AppCommandMetadata
Metadata about a Chat app command.
-
#common ⇒ Google::Apis::ChatV1::CommonEventObject
The common event object is the portion of the overall event object that carries general, host-independent information to the add-on from the user's client.
-
#config_complete_redirect_url ⇒ String
This URL is populated for
MESSAGE,ADDED_TO_SPACE, andAPP_COMMANDinteraction events. -
#dialog_event_type ⇒ String
The type of dialog interaction event received.
-
#event_time ⇒ String
The timestamp indicating when the interaction event occurred.
-
#is_dialog_event ⇒ Boolean
(also: #is_dialog_event?)
For
CARD_CLICKEDandMESSAGEinteraction events, whether the user is interacting with or about to interact with a dialog. -
#message ⇒ Google::Apis::ChatV1::Message
A message in a Google Chat space.
-
#space ⇒ Google::Apis::ChatV1::Space
A space in Google Chat.
-
#thread ⇒ Google::Apis::ChatV1::Thread
A thread in a Google Chat space.
-
#thread_key ⇒ String
The Chat app-defined key for the thread related to the interaction event.
-
#token ⇒ String
A secret value that legacy Chat apps can use to verify if a request is from Google.
-
#type ⇒ String
The type of user interaction with the Chat app, such as
MESSAGEorADDED_TO_SPACE. -
#user ⇒ Google::Apis::ChatV1::User
A user in Google Chat.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DeprecatedEvent
constructor
A new instance of DeprecatedEvent.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DeprecatedEvent
Returns a new instance of DeprecatedEvent.
1417 1418 1419 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1417 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ Google::Apis::ChatV1::FormAction
A form action describes the behavior when the form is submitted. For example,
you can invoke Apps Script to handle the form.
Corresponds to the JSON property action
1310 1311 1312 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1310 def action @action end |
#app_command_metadata ⇒ Google::Apis::ChatV1::AppCommandMetadata
Metadata about a Chat app command.
Corresponds to the JSON property appCommandMetadata
1316 1317 1318 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1316 def @app_command_metadata end |
#common ⇒ Google::Apis::ChatV1::CommonEventObject
The common event object is the portion of the overall event object that
carries general, host-independent information to the add-on from the user's
client. This information includes details such as the user's locale, host app,
and platform. In addition to homepage and contextual triggers, add-ons
construct and pass event objects to action callback functions
when the user interacts with widgets. Your add-on's callback function can
query the common event object to determine the contents of open widgets in the
user's client. For example, your add-on can locate the text a user has entered
into a TextInput widget in the eventObject.commentEventObject.formInputs
object. For Chat apps, the name of the function that the user invoked when
interacting with a widget.
Corresponds to the JSON property common
1333 1334 1335 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1333 def common @common end |
#config_complete_redirect_url ⇒ String
This URL is populated for MESSAGE, ADDED_TO_SPACE, and APP_COMMAND
interaction events. After completing an authorization or configuration flow
outside of Google Chat, users must be redirected to this URL to signal to
Google Chat that the authorization or configuration flow was successful. For
more information, see Connect a Chat app with other services and tools.
Corresponds to the JSON property configCompleteRedirectUrl
1343 1344 1345 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1343 def config_complete_redirect_url @config_complete_redirect_url end |
#dialog_event_type ⇒ String
The type of dialog
interaction event received.
Corresponds to the JSON property dialogEventType
1349 1350 1351 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1349 def dialog_event_type @dialog_event_type end |
#event_time ⇒ String
The timestamp indicating when the interaction event occurred.
Corresponds to the JSON property eventTime
1354 1355 1356 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1354 def event_time @event_time end |
#is_dialog_event ⇒ Boolean Also known as: is_dialog_event?
For CARD_CLICKED and MESSAGE interaction events, whether the user is
interacting with or about to interact with a dialog.
Corresponds to the JSON property isDialogEvent
1361 1362 1363 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1361 def is_dialog_event @is_dialog_event end |
#message ⇒ Google::Apis::ChatV1::Message
A message in a Google Chat space.
Corresponds to the JSON property message
1367 1368 1369 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1367 def @message end |
#space ⇒ Google::Apis::ChatV1::Space
A space in Google Chat. Spaces are conversations between two or more users or
1:1 messages between a user and a Chat app.
Corresponds to the JSON property space
1373 1374 1375 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1373 def space @space end |
#thread ⇒ Google::Apis::ChatV1::Thread
A thread in a Google Chat space. For example usage, see Start or reply to a
message thread. If you specify a thread when creating a message, you
can set the messageReplyOption field to
determine what happens if no matching thread is found.
Corresponds to the JSON property thread
1383 1384 1385 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1383 def thread @thread end |
#thread_key ⇒ String
The Chat app-defined key for the thread related to the interaction event. See
spaces.messages.thread.threadKey for more information.
Corresponds to the JSON property threadKey
1390 1391 1392 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1390 def thread_key @thread_key end |
#token ⇒ String
A secret value that legacy Chat apps can use to verify if a request is from
Google. Google randomly generates the token, and its value remains static. You
can obtain, revoke, or regenerate the token from the Chat API configuration
page in the Google Cloud Console. Modern Chat apps don't use this field. It
is absent from API responses and the Chat API configuration page.
Corresponds to the JSON property token
1401 1402 1403 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1401 def token @token end |
#type ⇒ String
The type of user
interaction with the Chat app, such as MESSAGE or ADDED_TO_SPACE.
Corresponds to the JSON property type
1407 1408 1409 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1407 def type @type end |
#user ⇒ Google::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
1415 1416 1417 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1415 def user @user end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1422 def update!(**args) @action = args[:action] if args.key?(:action) @app_command_metadata = args[:app_command_metadata] if args.key?(:app_command_metadata) @common = args[:common] if args.key?(:common) @config_complete_redirect_url = args[:config_complete_redirect_url] if args.key?(:config_complete_redirect_url) @dialog_event_type = args[:dialog_event_type] if args.key?(:dialog_event_type) @event_time = args[:event_time] if args.key?(:event_time) @is_dialog_event = args[:is_dialog_event] if args.key?(:is_dialog_event) @message = args[:message] if args.key?(:message) @space = args[:space] if args.key?(:space) @thread = args[:thread] if args.key?(:thread) @thread_key = args[:thread_key] if args.key?(:thread_key) @token = args[:token] if args.key?(:token) @type = args[:type] if args.key?(:type) @user = args[:user] if args.key?(:user) end |