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

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

Overview

Either a toggle-style switch or a checkbox inside a decoratedText widget.

Google Workspace Add-ons and Chat apps:

Only supported in the decoratedText widget.

Defined Under Namespace

Modules: ControlType

Instance Attribute Summary collapse

Instance Attribute Details

#control_type::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType

Returns How the switch appears in the user interface.

Google Workspace Add-ons and Chat apps:.



850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'proto_docs/google/apps/card/v1/card.rb', line 850

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

#name::String

Returns 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.

Returns:

  • (::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.



850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'proto_docs/google/apps/card/v1/card.rb', line 850

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

#on_change_action::Google::Apps::Card::V1::Action

Returns The action to perform when the switch state is changed, such as what function to run.

Returns:



850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'proto_docs/google/apps/card/v1/card.rb', line 850

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

#selected::Boolean

Returns When true, the switch is selected.

Returns:

  • (::Boolean)

    When true, the switch is selected.



850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'proto_docs/google/apps/card/v1/card.rb', line 850

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

#value::String

Returns 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.

Returns:

  • (::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.



850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'proto_docs/google/apps/card/v1/card.rb', line 850

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