Class: Google::Apis::ChatV1::GoogleAppsCardV1Chip

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_textString

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

Returns:

  • (String)


1812
1813
1814
# File 'lib/google/apis/chat_v1/classes.rb', line 1812

def alt_text
  @alt_text
end

#disabledBoolean 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

Returns:

  • (Boolean)


1818
1819
1820
# File 'lib/google/apis/chat_v1/classes.rb', line 1818

def disabled
  @disabled
end

#enabledBoolean 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

Returns:

  • (Boolean)


1825
1826
1827
# File 'lib/google/apis/chat_v1/classes.rb', line 1825

def enabled
  @enabled
end

#iconGoogle::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

#labelString

The text displayed inside the chip. Corresponds to the JSON property label

Returns:

  • (String)


1842
1843
1844
# File 'lib/google/apis/chat_v1/classes.rb', line 1842

def label
  @label
end

#on_clickGoogle::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