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, 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 type google.apps.card.v1.Icon
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    An icon displayed in a widget on a card.
    static enum 
     

    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

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Optional.
    com.google.protobuf.ByteString
    Optional.
    static Icon
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
     
    Display a custom icon hosted at an HTTPS URL.
    com.google.protobuf.ByteString
    Display a custom icon hosted at an HTTPS URL.
    The crop style applied to the image.
    int
    The crop style applied to the image.
    Display one of the built-in icons provided by Google Workspace.
    com.google.protobuf.ByteString
    Display one of the built-in icons provided by Google Workspace.
    Display one of the [Google Material Icons](https://fonts.google.com/icons).
    Display one of the [Google Material Icons](https://fonts.google.com/icons).
    com.google.protobuf.Parser<Icon>
     
    int
     
    int
     
    boolean
    Display a custom icon hosted at an HTTPS URL.
    boolean
    Display one of the built-in icons provided by Google Workspace.
    boolean
    Display one of the [Google Material Icons](https://fonts.google.com/icons).
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(Icon prototype)
     
     
    protected Icon.Builder
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
    static Icon
     
    static Icon
    parseDelimitedFrom(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
     
    static Icon
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Icon
     
    static Icon
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Icon>
     
     
    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

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • KNOWN_ICON_FIELD_NUMBER

      public static final int KNOWN_ICON_FIELD_NUMBER
      See Also:
    • ICON_URL_FIELD_NUMBER

      public static final int ICON_URL_FIELD_NUMBER
      See Also:
    • MATERIAL_ICON_FIELD_NUMBER

      public static final int MATERIAL_ICON_FIELD_NUMBER
      See Also:
    • ALT_TEXT_FIELD_NUMBER

      public static final int ALT_TEXT_FIELD_NUMBER
      See Also:
    • IMAGE_TYPE_FIELD_NUMBER

      public static final int IMAGE_TYPE_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Overrides:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getIconsCase

      public Icon.IconsCase getIconsCase()
      Specified by:
      getIconsCase in interface IconOrBuilder
    • 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 interface IconOrBuilder
      Returns:
      Whether the knownIcon field is set.
    • 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](https://developers.google.com/workspace/chat/format-messages#builtinicons).
       
      string known_icon = 1;
      Specified by:
      getKnownIcon in interface IconOrBuilder
      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 interface IconOrBuilder
      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 interface IconOrBuilder
      Returns:
      Whether the iconUrl field is set.
    • 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;
      Specified by:
      getIconUrl in interface IconOrBuilder
      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 interface IconOrBuilder
      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 interface IconOrBuilder
      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 interface IconOrBuilder
      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 interface IconOrBuilder
    • 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`][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 interface IconOrBuilder
      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 interface IconOrBuilder
      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 interface IconOrBuilder
      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 interface IconOrBuilder
      Returns:
      The imageType.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Icon parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Icon parseFrom(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(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Icon parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Icon parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Icon parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Icon parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Icon parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Icon.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.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 interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Icon.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.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 interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Icon getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder