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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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

#bottom_label_text::Google::Apps::Card::V1::TextParagraph

Returns TextParagraph equivalent of bottom_label. Always wraps. Allows for more complex formatting than bottom_label.

Google Chat apps:.

Returns:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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

#content_text::Google::Apps::Card::V1::TextParagraph

Returns TextParagraph equivalent of text. Allows for more complex formatting than text.

Google Chat apps:.

Returns:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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_vertical_alignment::Google::Apps::Card::V1::Widget::VerticalAlignment

Returns Optional. Vertical alignment of the start icon. If not set, the icon will be vertically centered.

Google Chat apps:.

Returns:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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_text::Google::Apps::Card::V1::TextParagraph

Returns TextParagraph equivalent of top_label. Always truncates. Allows for more complex formatting than top_label.

Google Chat apps:.

Returns:



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'proto_docs/google/apps/card/v1/card.rb', line 995

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