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.
1337 1338 1339 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1337 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
1230 1231 1232 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1230 def action @action end |
#app_command_metadata ⇒ Google::Apis::ChatV1::AppCommandMetadata
Metadata about a Chat app command.
Corresponds to the JSON property appCommandMetadata
1236 1237 1238 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1236 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
1253 1254 1255 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1253 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
1263 1264 1265 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1263 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
1269 1270 1271 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1269 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
1274 1275 1276 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1274 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
1281 1282 1283 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1281 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
1287 1288 1289 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1287 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
1293 1294 1295 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1293 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
1303 1304 1305 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1303 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
1310 1311 1312 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1310 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
1321 1322 1323 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1321 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
1327 1328 1329 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1327 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
1335 1336 1337 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1335 def user @user end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1342 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 |