action = $action; } /** * @return FormAction */ public function getAction() { return $this->action; } /** * Metadata about a Chat app command. * * @param AppCommandMetadata $appCommandMetadata */ public function setAppCommandMetadata(AppCommandMetadata $appCommandMetadata) { $this->appCommandMetadata = $appCommandMetadata; } /** * @return AppCommandMetadata */ public function getAppCommandMetadata() { return $this->appCommandMetadata; } /** * Represents information about the user's client, such as locale, host app, * and platform. For Chat apps, `CommonEventObject` includes information * submitted by users interacting with * [dialogs](https://developers.google.com/workspace/chat/dialogs), like data * entered on a card. * * @param CommonEventObject $common */ public function setCommon(CommonEventObject $common) { $this->common = $common; } /** * @return CommonEventObject */ public function getCommon() { return $this->common; } /** * 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](https://developers.google.com/workspace/chat/connect-web-services- * tools). * * @param string $configCompleteRedirectUrl */ public function setConfigCompleteRedirectUrl($configCompleteRedirectUrl) { $this->configCompleteRedirectUrl = $configCompleteRedirectUrl; } /** * @return string */ public function getConfigCompleteRedirectUrl() { return $this->configCompleteRedirectUrl; } /** * The type of [dialog](https://developers.google.com/workspace/chat/dialogs) * interaction event received. * * Accepted values: TYPE_UNSPECIFIED, REQUEST_DIALOG, SUBMIT_DIALOG, * CANCEL_DIALOG * * @param self::DIALOG_EVENT_TYPE_* $dialogEventType */ public function setDialogEventType($dialogEventType) { $this->dialogEventType = $dialogEventType; } /** * @return self::DIALOG_EVENT_TYPE_* */ public function getDialogEventType() { return $this->dialogEventType; } /** * The timestamp indicating when the interaction event occurred. * * @param string $eventTime */ public function setEventTime($eventTime) { $this->eventTime = $eventTime; } /** * @return string */ public function getEventTime() { return $this->eventTime; } /** * For `CARD_CLICKED` and `MESSAGE` interaction events, whether the user is * interacting with or about to interact with a * [dialog](https://developers.google.com/workspace/chat/dialogs). * * @param bool $isDialogEvent */ public function setIsDialogEvent($isDialogEvent) { $this->isDialogEvent = $isDialogEvent; } /** * @return bool */ public function getIsDialogEvent() { return $this->isDialogEvent; } /** * For `ADDED_TO_SPACE`, `CARD_CLICKED`, and `MESSAGE` interaction events, the * message that triggered the interaction event, if applicable. * * @param Message $message */ public function setMessage(Message $message) { $this->message = $message; } /** * @return Message */ public function getMessage() { return $this->message; } /** * The space in which the user interacted with the Chat app. * * @param Space $space */ public function setSpace(Space $space) { $this->space = $space; } /** * @return Space */ public function getSpace() { return $this->space; } /** * The thread in which the user interacted with the Chat app. This could be in * a new thread created by a newly sent message. This field is populated if * the interaction event is associated with a specific message or thread. * * @param Thread $thread */ public function setThread(Thread $thread) { $this->thread = $thread; } /** * @return Thread */ public function getThread() { return $this->thread; } /** * The Chat app-defined key for the thread related to the interaction event. * See [`spaces.messages.thread.threadKey`](/chat/api/reference/rest/v1/spaces * .messages#Thread.FIELDS.thread_key) for more information. * * @param string $threadKey */ public function setThreadKey($threadKey) { $this->threadKey = $threadKey; } /** * @return string */ public function getThreadKey() { return $this->threadKey; } /** * 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](https://console.cloud.google.com/apis/api/chat.googleap * is.com/hangouts-chat) 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](https://console.cloud.google.com/apis/api/chat.googleap * is.com/hangouts-chat). * * @param string $token */ public function setToken($token) { $this->token = $token; } /** * @return string */ public function getToken() { return $this->token; } /** * The [type](/workspace/chat/api/reference/rest/v1/EventType) of user * interaction with the Chat app, such as `MESSAGE` or `ADDED_TO_SPACE`. * * Accepted values: UNSPECIFIED, MESSAGE, ADDED_TO_SPACE, REMOVED_FROM_SPACE, * CARD_CLICKED, WIDGET_UPDATED, APP_COMMAND * * @param self::TYPE_* $type */ public function setType($type) { $this->type = $type; } /** * @return self::TYPE_* */ public function getType() { return $this->type; } /** * The user that interacted with the Chat app. * * @param User $user */ public function setUser(User $user) { $this->user = $user; } /** * @return User */ public function getUser() { return $this->user; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(DeprecatedEvent::class, 'Google_Service_HangoutsChat_DeprecatedEvent');