Class: Google::Apis::ChatV1::DeprecatedEvent

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DeprecatedEvent

Returns a new instance of DeprecatedEvent.



1245
1246
1247
# File 'lib/google/apis/chat_v1/classes.rb', line 1245

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

Instance Attribute Details

#actionGoogle::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



1138
1139
1140
# File 'lib/google/apis/chat_v1/classes.rb', line 1138

def action
  @action
end

#app_command_metadataGoogle::Apis::ChatV1::AppCommandMetadata

Metadata about a Chat app command. Corresponds to the JSON property appCommandMetadata



1144
1145
1146
# File 'lib/google/apis/chat_v1/classes.rb', line 1144

def 
  @app_command_metadata
end

#commonGoogle::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



1161
1162
1163
# File 'lib/google/apis/chat_v1/classes.rb', line 1161

def common
  @common
end

#config_complete_redirect_urlString

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

Returns:

  • (String)


1171
1172
1173
# File 'lib/google/apis/chat_v1/classes.rb', line 1171

def config_complete_redirect_url
  @config_complete_redirect_url
end

#dialog_event_typeString

The type of dialog interaction event received. Corresponds to the JSON property dialogEventType

Returns:

  • (String)


1177
1178
1179
# File 'lib/google/apis/chat_v1/classes.rb', line 1177

def dialog_event_type
  @dialog_event_type
end

#event_timeString

The timestamp indicating when the interaction event occurred. Corresponds to the JSON property eventTime

Returns:

  • (String)


1182
1183
1184
# File 'lib/google/apis/chat_v1/classes.rb', line 1182

def event_time
  @event_time
end

#is_dialog_eventBoolean 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

Returns:

  • (Boolean)


1189
1190
1191
# File 'lib/google/apis/chat_v1/classes.rb', line 1189

def is_dialog_event
  @is_dialog_event
end

#messageGoogle::Apis::ChatV1::Message

A message in a Google Chat space. Corresponds to the JSON property message



1195
1196
1197
# File 'lib/google/apis/chat_v1/classes.rb', line 1195

def message
  @message
end

#spaceGoogle::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



1201
1202
1203
# File 'lib/google/apis/chat_v1/classes.rb', line 1201

def space
  @space
end

#threadGoogle::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



1211
1212
1213
# File 'lib/google/apis/chat_v1/classes.rb', line 1211

def thread
  @thread
end

#thread_keyString

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

Returns:

  • (String)


1218
1219
1220
# File 'lib/google/apis/chat_v1/classes.rb', line 1218

def thread_key
  @thread_key
end

#tokenString

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

Returns:

  • (String)


1229
1230
1231
# File 'lib/google/apis/chat_v1/classes.rb', line 1229

def token
  @token
end

#typeString

The type of user interaction with the Chat app, such as MESSAGE or ADDED_TO_SPACE. Corresponds to the JSON property type

Returns:

  • (String)


1235
1236
1237
# File 'lib/google/apis/chat_v1/classes.rb', line 1235

def type
  @type
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



1243
1244
1245
# File 'lib/google/apis/chat_v1/classes.rb', line 1243

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'lib/google/apis/chat_v1/classes.rb', line 1250

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