Package com.google.apps.card.v1
Class Icon
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessage
-
- com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.apps.card.v1.Icon
-
- All Implemented Interfaces:
IconOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.io.Serializable
public final class Icon extends com.google.protobuf.GeneratedMessageV3 implements IconOrBuilder
An icon displayed in a widget on a card. For an example in Google Chat apps, see [Add an icon](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon). Supports [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) and [custom](https://developers.google.com/workspace/chat/format-messages#customicons) icons. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
Protobuf typegoogle.apps.card.v1.Icon
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Icon.Builder
An icon displayed in a widget on a card.static class
Icon.IconsCase
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALT_TEXT_FIELD_NUMBER
static int
ICON_URL_FIELD_NUMBER
static int
IMAGE_TYPE_FIELD_NUMBER
static int
KNOWN_ICON_FIELD_NUMBER
static int
MATERIAL_ICON_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getAltText()
Optional.com.google.protobuf.ByteString
getAltTextBytes()
Optional.static Icon
getDefaultInstance()
Icon
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
Icon.IconsCase
getIconsCase()
java.lang.String
getIconUrl()
Display a custom icon hosted at an HTTPS URL.com.google.protobuf.ByteString
getIconUrlBytes()
Display a custom icon hosted at an HTTPS URL.Widget.ImageType
getImageType()
The crop style applied to the image.int
getImageTypeValue()
The crop style applied to the image.java.lang.String
getKnownIcon()
Display one of the built-in icons provided by Google Workspace.com.google.protobuf.ByteString
getKnownIconBytes()
Display one of the built-in icons provided by Google Workspace.MaterialIcon
getMaterialIcon()
Display one of the [Google Material Icons](https://fonts.google.com/icons).MaterialIconOrBuilder
getMaterialIconOrBuilder()
Display one of the [Google Material Icons](https://fonts.google.com/icons).com.google.protobuf.Parser<Icon>
getParserForType()
int
getSerializedSize()
int
hashCode()
boolean
hasIconUrl()
Display a custom icon hosted at an HTTPS URL.boolean
hasKnownIcon()
Display one of the built-in icons provided by Google Workspace.boolean
hasMaterialIcon()
Display one of the [Google Material Icons](https://fonts.google.com/icons).protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Icon.Builder
newBuilder()
static Icon.Builder
newBuilder(Icon prototype)
Icon.Builder
newBuilderForType()
protected Icon.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected java.lang.Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Icon
parseDelimitedFrom(java.io.InputStream input)
static Icon
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Icon
parseFrom(byte[] data)
static Icon
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Icon
parseFrom(com.google.protobuf.ByteString data)
static Icon
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Icon
parseFrom(com.google.protobuf.CodedInputStream input)
static Icon
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Icon
parseFrom(java.io.InputStream input)
static Icon
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Icon
parseFrom(java.nio.ByteBuffer data)
static Icon
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Icon>
parser()
Icon.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType
-
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, newExtensionSerializer, newExtensionWriter, newMessageSetExtensionSerializer, newMessageSetExtensionWriter
-
Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getDescriptorForType, getOneofFieldDescriptor, getUnknownFields, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
KNOWN_ICON_FIELD_NUMBER
public static final int KNOWN_ICON_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ICON_URL_FIELD_NUMBER
public static final int ICON_URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MATERIAL_ICON_FIELD_NUMBER
public static final int MATERIAL_ICON_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALT_TEXT_FIELD_NUMBER
public static final int ALT_TEXT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IMAGE_TYPE_FIELD_NUMBER
public static final int IMAGE_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getIconsCase
public Icon.IconsCase getIconsCase()
- Specified by:
getIconsCase
in interfaceIconOrBuilder
-
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](https://developers.google.com/workspace/chat/format-messages#builtinicons).
string known_icon = 1;
- Specified by:
hasKnownIcon
in interfaceIconOrBuilder
- Returns:
- Whether the knownIcon field is set.
-
getKnownIcon
public java.lang.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](https://developers.google.com/workspace/chat/format-messages#builtinicons).
string known_icon = 1;
- Specified by:
getKnownIcon
in interfaceIconOrBuilder
- Returns:
- The knownIcon.
-
getKnownIconBytes
public com.google.protobuf.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](https://developers.google.com/workspace/chat/format-messages#builtinicons).
string known_icon = 1;
- Specified by:
getKnownIconBytes
in interfaceIconOrBuilder
- Returns:
- The bytes for knownIcon.
-
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;
- Specified by:
hasIconUrl
in interfaceIconOrBuilder
- Returns:
- Whether the iconUrl field is set.
-
getIconUrl
public java.lang.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;
- Specified by:
getIconUrl
in interfaceIconOrBuilder
- Returns:
- The iconUrl.
-
getIconUrlBytes
public com.google.protobuf.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;
- Specified by:
getIconUrlBytes
in interfaceIconOrBuilder
- Returns:
- The bytes for iconUrl.
-
hasMaterialIcon
public boolean hasMaterialIcon()
Display one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), use ``` "material_icon": { "name": "check_box" } ``` [Google Chat apps](https://developers.google.com/workspace/chat):
.google.apps.card.v1.MaterialIcon material_icon = 5;
- Specified by:
hasMaterialIcon
in interfaceIconOrBuilder
- Returns:
- Whether the materialIcon field is set.
-
getMaterialIcon
public MaterialIcon getMaterialIcon()
Display one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), use ``` "material_icon": { "name": "check_box" } ``` [Google Chat apps](https://developers.google.com/workspace/chat):
.google.apps.card.v1.MaterialIcon material_icon = 5;
- Specified by:
getMaterialIcon
in interfaceIconOrBuilder
- Returns:
- The materialIcon.
-
getMaterialIconOrBuilder
public MaterialIconOrBuilder getMaterialIconOrBuilder()
Display one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), use ``` "material_icon": { "name": "check_box" } ``` [Google Chat apps](https://developers.google.com/workspace/chat):
.google.apps.card.v1.MaterialIcon material_icon = 5;
- Specified by:
getMaterialIconOrBuilder
in interfaceIconOrBuilder
-
getAltText
public java.lang.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`][google.apps.card.v1.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;
- Specified by:
getAltText
in interfaceIconOrBuilder
- Returns:
- The altText.
-
getAltTextBytes
public com.google.protobuf.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`][google.apps.card.v1.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;
- Specified by:
getAltTextBytes
in interfaceIconOrBuilder
- Returns:
- The bytes for altText.
-
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;
- Specified by:
getImageTypeValue
in interfaceIconOrBuilder
- Returns:
- The enum numeric value on the wire for imageType.
-
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;
- Specified by:
getImageType
in interfaceIconOrBuilder
- Returns:
- The imageType.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Icon parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Icon parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Icon parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Icon parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Icon parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Icon parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Icon parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Icon parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Icon parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Icon parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Icon parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Icon parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public Icon.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Icon.Builder newBuilder()
-
newBuilder
public static Icon.Builder newBuilder(Icon prototype)
-
toBuilder
public Icon.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Icon.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Icon getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Icon> parser()
-
getParserForType
public com.google.protobuf.Parser<Icon> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public Icon getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-