Interface IconOrBuilder (2.41.0)

public interface IconOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAltText()

public abstract String getAltText()

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.

string alt_text = 3;

Returns
Type Description
String

The altText.

getAltTextBytes()

public abstract ByteString getAltTextBytes()

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.

string alt_text = 3;

Returns
Type Description
ByteString

The bytes for altText.

getIconUrl()

public abstract String getIconUrl()

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`.

string icon_url = 2;

Returns
Type Description
String

The iconUrl.

getIconUrlBytes()

public abstract ByteString getIconUrlBytes()

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`.

string icon_url = 2;

Returns
Type Description
ByteString

The bytes for iconUrl.

getIconsCase()

public abstract Icon.IconsCase getIconsCase()
Returns
Type Description
Icon.IconsCase

getImageType()

public abstract Widget.ImageType getImageType()

The crop style applied to the image. In some cases, applying a CIRCLE crop causes the image to be drawn larger than a built-in icon.

.google.apps.card.v1.Widget.ImageType image_type = 4;

Returns
Type Description
Widget.ImageType

The imageType.

getImageTypeValue()

public abstract int getImageTypeValue()

The crop style applied to the image. In some cases, applying a CIRCLE crop causes the image to be drawn larger than a built-in icon.

.google.apps.card.v1.Widget.ImageType image_type = 4;

Returns
Type Description
int

The enum numeric value on the wire for imageType.

getKnownIcon()

public abstract String getKnownIcon()

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.

string known_icon = 1;

Returns
Type Description
String

The knownIcon.

getKnownIconBytes()

public abstract ByteString getKnownIconBytes()

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.

string known_icon = 1;

Returns
Type Description
ByteString

The bytes for knownIcon.

getMaterialIcon()

public abstract MaterialIcon getMaterialIcon()

Display one of the Google Material Icons.

For example, to display a checkbox icon, use <code><code> "material_icon": { "name": "check_box" } </code></code>

Google Chat apps:

.google.apps.card.v1.MaterialIcon material_icon = 5;

Returns
Type Description
MaterialIcon

The materialIcon.

getMaterialIconOrBuilder()

public abstract MaterialIconOrBuilder getMaterialIconOrBuilder()

Display one of the Google Material Icons.

For example, to display a checkbox icon, use <code><code> "material_icon": { "name": "check_box" } </code></code>

Google Chat apps:

.google.apps.card.v1.MaterialIcon material_icon = 5;

Returns
Type Description
MaterialIconOrBuilder

hasIconUrl()

public abstract boolean hasIconUrl()

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`.

string icon_url = 2;

Returns
Type Description
boolean

Whether the iconUrl field is set.

hasKnownIcon()

public abstract boolean hasKnownIcon()

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.

string known_icon = 1;

Returns
Type Description
boolean

Whether the knownIcon field is set.

hasMaterialIcon()

public abstract boolean hasMaterialIcon()

Display one of the Google Material Icons.

For example, to display a checkbox icon, use <code><code> "material_icon": { "name": "check_box" } </code></code>

Google Chat apps:

.google.apps.card.v1.MaterialIcon material_icon = 5;

Returns
Type Description
boolean

Whether the materialIcon field is set.