Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::Action.
An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#all_widgets_are_required
def all_widgets_are_required() -> ::Boolean-
(::Boolean) — Optional. If this is true, then all widgets are considered required by
this action.
#all_widgets_are_required=
def all_widgets_are_required=(value) -> ::Boolean-
value (::Boolean) — Optional. If this is true, then all widgets are considered required by
this action.
-
(::Boolean) — Optional. If this is true, then all widgets are considered required by
this action.
#function
def function() -> ::String-
(::String) — A custom function to invoke when the containing element is
clicked or otherwise activated.
For example usage, see Read form data.
#function=
def function=(value) -> ::String-
value (::String) — A custom function to invoke when the containing element is
clicked or otherwise activated.
For example usage, see Read form data.
-
(::String) — A custom function to invoke when the containing element is
clicked or otherwise activated.
For example usage, see Read form data.
#interaction
def interaction() -> ::Google::Apps::Card::V1::Action::Interaction-
(::Google::Apps::Card::V1::Action::Interaction) — Optional. Required when opening a
dialog.
What to do in response to an interaction with a user, such as a user clicking a button in a card message.
If unspecified, the app responds by executing an
action—like opening a link or running a function—as normal.By specifying an
interaction, the app can respond in special interactive ways. For example, by settinginteractiontoOPEN_DIALOG, the app can open a dialog. When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
#interaction=
def interaction=(value) -> ::Google::Apps::Card::V1::Action::Interaction-
value (::Google::Apps::Card::V1::Action::Interaction) — Optional. Required when opening a
dialog.
What to do in response to an interaction with a user, such as a user clicking a button in a card message.
If unspecified, the app responds by executing an
action—like opening a link or running a function—as normal.By specifying an
interaction, the app can respond in special interactive ways. For example, by settinginteractiontoOPEN_DIALOG, the app can open a dialog. When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
-
(::Google::Apps::Card::V1::Action::Interaction) — Optional. Required when opening a
dialog.
What to do in response to an interaction with a user, such as a user clicking a button in a card message.
If unspecified, the app responds by executing an
action—like opening a link or running a function—as normal.By specifying an
interaction, the app can respond in special interactive ways. For example, by settinginteractiontoOPEN_DIALOG, the app can open a dialog. When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
#load_indicator
def load_indicator() -> ::Google::Apps::Card::V1::Action::LoadIndicator- (::Google::Apps::Card::V1::Action::LoadIndicator) — Specifies the loading indicator that the action displays while making the call to the action.
#load_indicator=
def load_indicator=(value) -> ::Google::Apps::Card::V1::Action::LoadIndicator- value (::Google::Apps::Card::V1::Action::LoadIndicator) — Specifies the loading indicator that the action displays while making the call to the action.
- (::Google::Apps::Card::V1::Action::LoadIndicator) — Specifies the loading indicator that the action displays while making the call to the action.
#parameters
def parameters() -> ::Array<::Google::Apps::Card::V1::Action::ActionParameter>- (::Array<::Google::Apps::Card::V1::Action::ActionParameter>) — List of action parameters.
#parameters=
def parameters=(value) -> ::Array<::Google::Apps::Card::V1::Action::ActionParameter>- value (::Array<::Google::Apps::Card::V1::Action::ActionParameter>) — List of action parameters.
- (::Array<::Google::Apps::Card::V1::Action::ActionParameter>) — List of action parameters.
#persist_values
def persist_values() -> ::Boolean-
(::Boolean) — Indicates whether form values persist after the action. The default value
is
false.If
true, form values remain after the action is triggered. To let the user make changes while the action is being processed, setLoadIndicatortoNONE. For card messages in Chat apps, you must also set the action'sResponseTypetoUPDATE_MESSAGEand use the samecard_idfrom the card that contained the action.If
false, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, setLoadIndicatortoSPINNER.
#persist_values=
def persist_values=(value) -> ::Boolean-
value (::Boolean) — Indicates whether form values persist after the action. The default value
is
false.If
true, form values remain after the action is triggered. To let the user make changes while the action is being processed, setLoadIndicatortoNONE. For card messages in Chat apps, you must also set the action'sResponseTypetoUPDATE_MESSAGEand use the samecard_idfrom the card that contained the action.If
false, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, setLoadIndicatortoSPINNER.
-
(::Boolean) — Indicates whether form values persist after the action. The default value
is
false.If
true, form values remain after the action is triggered. To let the user make changes while the action is being processed, setLoadIndicatortoNONE. For card messages in Chat apps, you must also set the action'sResponseTypetoUPDATE_MESSAGEand use the samecard_idfrom the card that contained the action.If
false, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, setLoadIndicatortoSPINNER.
#required_widgets
def required_widgets() -> ::Array<::String>-
(::Array<::String>) — Optional. Fill this list with the names of widgets that this Action
needs for a valid submission.
If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted.
#required_widgets=
def required_widgets=(value) -> ::Array<::String>-
value (::Array<::String>) — Optional. Fill this list with the names of widgets that this Action
needs for a valid submission.
If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted.
-
(::Array<::String>) — Optional. Fill this list with the names of widgets that this Action
needs for a valid submission.
If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted.