Class: Google::Apis::ChatV1::GoogleAppsCardV1Chip
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1Chip
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb
Overview
A text, icon, or text and icon chip that users can click. Google Chat apps:
Instance Attribute Summary collapse
-
#alt_text ⇒ String
The alternative text that's used for accessibility.
-
#disabled ⇒ Boolean
(also: #disabled?)
Whether the chip is in an inactive state and ignores user actions.
-
#enabled ⇒ Boolean
(also: #enabled?)
Whether the chip is in an active state and responds to user actions.
-
#icon ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Icon
An icon displayed in a widget on a card.
-
#label ⇒ String
The text displayed inside the chip.
-
#on_click ⇒ Google::Apis::ChatV1::GoogleAppsCardV1OnClick
Represents how to respond when users click an interactive element on a card, such as a button.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1Chip
constructor
A new instance of GoogleAppsCardV1Chip.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1Chip
Returns a new instance of GoogleAppsCardV1Chip.
1851 1852 1853 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1851 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alt_text ⇒ String
The alternative text that's used for accessibility. Set descriptive text that
lets users know what the chip does. For example, if a chip opens a hyperlink,
write: "Opens a new browser tab and navigates to the Google Chat developer
documentation at https://developers.google.com/workspace/chat".
Corresponds to the JSON property altText
1812 1813 1814 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1812 def alt_text @alt_text end |
#disabled ⇒ Boolean Also known as: disabled?
Whether the chip is in an inactive state and ignores user actions. Defaults to
false
.
Corresponds to the JSON property disabled
1818 1819 1820 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1818 def disabled @disabled end |
#enabled ⇒ Boolean Also known as: enabled?
Whether the chip is in an active state and responds to user actions. Defaults
to true
. Deprecated. Use disabled
instead.
Corresponds to the JSON property enabled
1825 1826 1827 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1825 def enabled @enabled end |
#icon ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Icon
An icon displayed in a widget on a card. For an example in Google Chat apps,
see Add an icon. Supports built-in and custom icons. Google
Workspace Add-ons and Chat apps:
Corresponds to the JSON property icon
1837 1838 1839 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1837 def icon @icon end |
#label ⇒ String
The text displayed inside the chip.
Corresponds to the JSON property label
1842 1843 1844 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1842 def label @label end |
#on_click ⇒ Google::Apis::ChatV1::GoogleAppsCardV1OnClick
Represents how to respond when users click an interactive element on a card,
such as a button. Google Workspace Add-ons and Chat apps:
Corresponds to the JSON property onClick
1849 1850 1851 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1849 def on_click @on_click end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1856 1857 1858 1859 1860 1861 1862 1863 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1856 def update!(**args) @alt_text = args[:alt_text] if args.key?(:alt_text) @disabled = args[:disabled] if args.key?(:disabled) @enabled = args[:enabled] if args.key?(:enabled) @icon = args[:icon] if args.key?(:icon) @label = args[:label] if args.key?(:label) @on_click = args[:on_click] if args.key?(:on_click) end |