- 2.61.3 (latest)
- 2.61.2
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
public static final class Icon.Builder extends GeneratedMessageV3.Builder<Icon.Builder> implements IconOrBuilderAn 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:
Protobuf type google.apps.card.v1.Icon
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Icon.BuilderImplements
IconOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Icon.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
build()
public Icon build()| Returns | |
|---|---|
| Type | Description |
Icon |
|
buildPartial()
public Icon buildPartial()| Returns | |
|---|---|
| Type | Description |
Icon |
|
clear()
public Icon.Builder clear()| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
clearAltText()
public Icon.Builder clearAltText() 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 |
Icon.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Icon.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
clearIconUrl()
public Icon.Builder clearIconUrl()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 |
Icon.Builder |
This builder for chaining. |
clearIcons()
public Icon.Builder clearIcons()| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
clearImageType()
public Icon.Builder clearImageType() 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 |
Icon.Builder |
This builder for chaining. |
clearKnownIcon()
public Icon.Builder clearKnownIcon()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 |
Icon.Builder |
This builder for chaining. |
clearMaterialIcon()
public Icon.Builder clearMaterialIcon()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.apps.card.v1.MaterialIcon material_icon = 5;
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
clearOneof(Descriptors.OneofDescriptor oneof)
public Icon.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
clone()
public Icon.Builder clone()| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
getAltText()
public 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 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. |
getDefaultInstanceForType()
public Icon getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Icon |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getIconUrl()
public 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 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 Icon.IconsCase getIconsCase()| Returns | |
|---|---|
| Type | Description |
Icon.IconsCase |
|
getImageType()
public 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 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 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 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 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.apps.card.v1.MaterialIcon material_icon = 5;
| Returns | |
|---|---|
| Type | Description |
MaterialIcon |
The materialIcon. |
getMaterialIconBuilder()
public MaterialIcon.Builder getMaterialIconBuilder()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.apps.card.v1.MaterialIcon material_icon = 5;
| Returns | |
|---|---|
| Type | Description |
MaterialIcon.Builder |
|
getMaterialIconOrBuilder()
public 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.apps.card.v1.MaterialIcon material_icon = 5;
| Returns | |
|---|---|
| Type | Description |
MaterialIconOrBuilder |
|
hasIconUrl()
public 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 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 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.apps.card.v1.MaterialIcon material_icon = 5;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the materialIcon field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Icon other)
public Icon.Builder mergeFrom(Icon other)| Parameter | |
|---|---|
| Name | Description |
other |
Icon |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Icon.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Icon.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
mergeMaterialIcon(MaterialIcon value)
public Icon.Builder mergeMaterialIcon(MaterialIcon value)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.apps.card.v1.MaterialIcon material_icon = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
MaterialIcon |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Icon.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
setAltText(String value)
public Icon.Builder setAltText(String value) 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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe altText to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setAltTextBytes(ByteString value)
public Icon.Builder setAltTextBytes(ByteString value) 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;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for altText to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Icon.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
setIconUrl(String value)
public Icon.Builder setIconUrl(String value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe iconUrl to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setIconUrlBytes(ByteString value)
public Icon.Builder setIconUrlBytes(ByteString value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for iconUrl to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setImageType(Widget.ImageType value)
public Icon.Builder setImageType(Widget.ImageType value) 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;
| Parameter | |
|---|---|
| Name | Description |
value |
Widget.ImageTypeThe imageType to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setImageTypeValue(int value)
public Icon.Builder setImageTypeValue(int value) 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;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for imageType to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setKnownIcon(String value)
public Icon.Builder setKnownIcon(String value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe knownIcon to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setKnownIconBytes(ByteString value)
public Icon.Builder setKnownIconBytes(ByteString value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for knownIcon to set. |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
This builder for chaining. |
setMaterialIcon(MaterialIcon value)
public Icon.Builder setMaterialIcon(MaterialIcon value)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.apps.card.v1.MaterialIcon material_icon = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
MaterialIcon |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
setMaterialIcon(MaterialIcon.Builder builderForValue)
public Icon.Builder setMaterialIcon(MaterialIcon.Builder builderForValue)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.apps.card.v1.MaterialIcon material_icon = 5;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
MaterialIcon.Builder |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Icon.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final Icon.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Icon.Builder |
|