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



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'proto_docs/google/apps/card/v1/card.rb', line 876

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.



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'proto_docs/google/apps/card/v1/card.rb', line 876

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:



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'proto_docs/google/apps/card/v1/card.rb', line 876

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.



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'proto_docs/google/apps/card/v1/card.rb', line 876

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.



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'proto_docs/google/apps/card/v1/card.rb', line 876

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