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.



2340
2341
2342
# File 'lib/google/apis/chat_v1/classes.rb', line 2340

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)


2301
2302
2303
# File 'lib/google/apis/chat_v1/classes.rb', line 2301

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)


2307
2308
2309
# File 'lib/google/apis/chat_v1/classes.rb', line 2307

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)


2314
2315
2316
# File 'lib/google/apis/chat_v1/classes.rb', line 2314

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



2326
2327
2328
# File 'lib/google/apis/chat_v1/classes.rb', line 2326

def icon
  @icon
end

#labelString

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

Returns:

  • (String)


2331
2332
2333
# File 'lib/google/apis/chat_v1/classes.rb', line 2331

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



2338
2339
2340
# File 'lib/google/apis/chat_v1/classes.rb', line 2338

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2345
2346
2347
2348
2349
2350
2351
2352
# File 'lib/google/apis/chat_v1/classes.rb', line 2345

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