Google Chat V1 API - Class Google::Apps::Card::V1::Icon (v0.1.0)

Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::Icon.

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:

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#alt_text

def alt_text() -> ::String
Returns
  • (::String) — Optional. A description of the icon used for accessibility. If unspecified, the default value Button is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, A user's account portrait, or Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat.

    If the icon is set in a Button, the altText appears as helper text when the user hovers over the button. However, if the button also sets text, the icon's altText is ignored.

#alt_text=

def alt_text=(value) -> ::String
Parameter
  • value (::String) — Optional. A description of the icon used for accessibility. If unspecified, the default value Button is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, A user's account portrait, or Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat.

    If the icon is set in a Button, the altText appears as helper text when the user hovers over the button. However, if the button also sets text, the icon's altText is ignored.

Returns
  • (::String) — Optional. A description of the icon used for accessibility. If unspecified, the default value Button is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, A user's account portrait, or Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat.

    If the icon is set in a Button, the altText appears as helper text when the user hovers over the button. However, if the button also sets text, the icon's altText is ignored.

#icon_url

def icon_url() -> ::String
Returns
  • (::String) — Display a custom icon hosted at an HTTPS URL.

    For example:

    "iconUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"

    Supported file types include .png and .jpg.

#icon_url=

def icon_url=(value) -> ::String
Parameter
  • value (::String) — Display a custom icon hosted at an HTTPS URL.

    For example:

    "iconUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"

    Supported file types include .png and .jpg.

Returns
  • (::String) — Display a custom icon hosted at an HTTPS URL.

    For example:

    "iconUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"

    Supported file types include .png and .jpg.

#image_type

def image_type() -> ::Google::Apps::Card::V1::Widget::ImageType
Returns

#image_type=

def image_type=(value) -> ::Google::Apps::Card::V1::Widget::ImageType
Parameter
Returns

#known_icon

def known_icon() -> ::String
Returns
  • (::String) — Display one of the built-in icons provided by Google Workspace.

    For example, to display an airplane icon, specify AIRPLANE. For a bus, specify BUS.

    For a full list of supported icons, see built-in icons.

#known_icon=

def known_icon=(value) -> ::String
Parameter
  • value (::String) — Display one of the built-in icons provided by Google Workspace.

    For example, to display an airplane icon, specify AIRPLANE. For a bus, specify BUS.

    For a full list of supported icons, see built-in icons.

Returns
  • (::String) — Display one of the built-in icons provided by Google Workspace.

    For example, to display an airplane icon, specify AIRPLANE. For a bus, specify BUS.

    For a full list of supported icons, see built-in icons.

#material_icon

def material_icon() -> ::Google::Apps::Card::V1::MaterialIcon
Returns

#material_icon=

def material_icon=(value) -> ::Google::Apps::Card::V1::MaterialIcon
Parameter
Returns