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 Workspace add-ons and Chat apps:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1Chip

Returns a new instance of GoogleAppsCardV1Chip.



2235
2236
2237
# File 'lib/google/apis/chat_v1/classes.rb', line 2235

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)


2196
2197
2198
# File 'lib/google/apis/chat_v1/classes.rb', line 2196

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)


2202
2203
2204
# File 'lib/google/apis/chat_v1/classes.rb', line 2202

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)


2209
2210
2211
# File 'lib/google/apis/chat_v1/classes.rb', line 2209

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



2221
2222
2223
# File 'lib/google/apis/chat_v1/classes.rb', line 2221

def icon
  @icon
end

#labelString

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

Returns:

  • (String)


2226
2227
2228
# File 'lib/google/apis/chat_v1/classes.rb', line 2226

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



2233
2234
2235
# File 'lib/google/apis/chat_v1/classes.rb', line 2233

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2240
2241
2242
2243
2244
2245
2246
2247
# File 'lib/google/apis/chat_v1/classes.rb', line 2240

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