Class: Google::Apps::Card::V1::DecoratedText

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

Overview

A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see Display text with decorative text.

Google Workspace Add-ons and Chat apps:

Defined Under Namespace

Classes: SwitchControl

Instance Attribute Summary collapse

Instance Attribute Details

#bottom_label::String

Returns The text that appears below text. Always wraps.

Returns:

  • (::String)

    The text that appears below text. Always wraps.



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#button::Google::Apps::Card::V1::Button

Returns A button that a user can click to trigger an action.

Note: The following fields are mutually exclusive: button, switch_control, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Apps::Card::V1::Button)

    A button that a user can click to trigger an action.

    Note: The following fields are mutually exclusive: button, switch_control, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#end_icon::Google::Apps::Card::V1::Icon

Returns An icon displayed after the text.

Supports built-in and custom icons.

Note: The following fields are mutually exclusive: end_icon, button, switch_control. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Apps::Card::V1::Icon)

    An icon displayed after the text.

    Supports built-in and custom icons.

    Note: The following fields are mutually exclusive: end_icon, button, switch_control. If a field in that set is populated, all other fields in the set will automatically be cleared.



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#icon::Google::Apps::Card::V1::Icon

Deprecated.

This field is deprecated and may be removed in the next major version update.

Returns Deprecated in favor of startIcon.

Returns:



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#on_click::Google::Apps::Card::V1::OnClick

Returns This action is triggered when users click topLabel or bottomLabel.

Returns:



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#start_icon::Google::Apps::Card::V1::Icon

Returns The icon displayed in front of the text.

Returns:



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#switch_control::Google::Apps::Card::V1::DecoratedText::SwitchControl

Returns A switch widget that a user can click to change its state and trigger an action.

Note: The following fields are mutually exclusive: switch_control, button, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Apps::Card::V1::DecoratedText::SwitchControl)

    A switch widget that a user can click to change its state and trigger an action.

    Note: The following fields are mutually exclusive: switch_control, button, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#text::String

Returns Required. The primary text.

Supports simple formatting. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

Returns:



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#top_label::String

Returns The text that appears above text. Always truncates.

Returns:

  • (::String)

    The text that appears above text. Always truncates.



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end

#wrap_text::Boolean

Returns The wrap text setting. If true, the text wraps and displays on multiple lines. Otherwise, the text is truncated.

Only applies to text, not topLabel and bottomLabel.

Returns:

  • (::Boolean)

    The wrap text setting. If true, the text wraps and displays on multiple lines. Otherwise, the text is truncated.

    Only applies to text, not topLabel and bottomLabel.



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'proto_docs/google/apps/card/v1/card.rb', line 841

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

  # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  #
  # Only supported in the `decoratedText` widget.
  # @!attribute [rw] name
  #   @return [::String]
  #     The name by which the switch widget is identified in a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] value
  #   @return [::String]
  #     The value entered by a user, returned as part of a form input event.
  #
  #     For details about working with form inputs, see [Receive form
  #     data](https://developers.google.com/workspace/chat/read-form-data).
  # @!attribute [rw] selected
  #   @return [::Boolean]
  #     When `true`, the switch is selected.
  # @!attribute [rw] on_change_action
  #   @return [::Google::Apps::Card::V1::Action]
  #     The action to perform when the switch state is changed, such as what
  #      function to run.
  # @!attribute [rw] control_type
  #   @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
  #     How the switch appears in the user interface.
  #
  #     [Google Workspace Add-ons
  #     and Chat apps](https://developers.google.com/workspace/extend):
  class SwitchControl
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # How the switch appears in the user interface.
    #
    # [Google Workspace Add-ons
    # and Chat apps](https://developers.google.com/workspace/extend):
    module ControlType
      # A toggle-style switch.
      SWITCH = 0

      # Deprecated in favor of `CHECK_BOX`.
      CHECKBOX = 1

      # A checkbox.
      CHECK_BOX = 2
    end
  end
end