Class: Google::Apps::Card::V1::Action

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/apps/card/v1/card.rb

Overview

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.

Google Workspace add-ons and Chat apps:

Defined Under Namespace

Modules: Interaction, LoadIndicator Classes: ActionParameter

Instance Attribute Summary collapse

Instance Attribute Details

#all_widgets_are_required ⇒ ::Boolean



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end

#function ⇒ ::String



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end

#interaction ⇒ ::Google::Apps::Card::V1::Action::Interaction



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end

#load_indicator ⇒ ::Google::Apps::Card::V1::Action::LoadIndicator



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end

#parameters ⇒ ::Array<::Google::Apps::Card::V1::Action::ActionParameter>



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end

#persist_values ⇒ ::Boolean



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end

#required_widgets ⇒ ::Array<::String>



2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'proto_docs/google/apps/card/v1/card.rb', line 2443

class Action
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # List of string parameters to supply when the action method is invoked.
  # For example, consider three snooze buttons: snooze now, snooze one day,
  # or snooze next week. You might use `action method = snooze()`, passing the
  # snooze type and snooze time in the list of string parameters.
  #
  # To learn more, see
  # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  # @!attribute [rw] key
  #   @return [::String]
  #     The name of the parameter for the action script.
  # @!attribute [rw] value
  #   @return [::String]
  #     The value of the parameter.
  class ActionParameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Specifies the loading indicator that the action displays while
  # making the call to the action.
  #
  # [Google Workspace add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module LoadIndicator
    # Displays a spinner to indicate that content is loading.
    SPINNER = 0

    # Nothing is displayed.
    NONE = 1
  end

  # Optional. Required when opening a
  # [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 setting `interaction` to `OPEN_DIALOG`, the app can
  # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
  #
  # 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 Chat apps](https://developers.google.com/workspace/chat):
  module Interaction
    # Default value. The `action` executes as normal.
    INTERACTION_UNSPECIFIED = 0

    # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
    # windowed, card-based interface that Chat apps use to interact with users.
    #
    # Only supported by Chat apps in response to button-clicks on card
    # messages. If specified for
    # an add-on, the entire card is stripped and nothing is shown in the
    # client.
    #
    # [Google Chat apps](https://developers.google.com/workspace/chat):
    OPEN_DIALOG = 1
  end
end