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.



2169
2170
2171
# File 'lib/google/apis/chat_v1/classes.rb', line 2169

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)


2130
2131
2132
# File 'lib/google/apis/chat_v1/classes.rb', line 2130

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)


2136
2137
2138
# File 'lib/google/apis/chat_v1/classes.rb', line 2136

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)


2143
2144
2145
# File 'lib/google/apis/chat_v1/classes.rb', line 2143

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



2155
2156
2157
# File 'lib/google/apis/chat_v1/classes.rb', line 2155

def icon
  @icon
end

#labelString

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

Returns:

  • (String)


2160
2161
2162
# File 'lib/google/apis/chat_v1/classes.rb', line 2160

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



2167
2168
2169
# File 'lib/google/apis/chat_v1/classes.rb', line 2167

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2174
2175
2176
2177
2178
2179
2180
2181
# File 'lib/google/apis/chat_v1/classes.rb', line 2174

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