Class MaterialIcon.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MaterialIcon.Builder>
com.google.apps.card.v1.MaterialIcon.Builder
All Implemented Interfaces:
MaterialIconOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
MaterialIcon

public static final class MaterialIcon.Builder extends com.google.protobuf.GeneratedMessage.Builder<MaterialIcon.Builder> implements MaterialIconOrBuilder
 A [Google Material Icon](https://fonts.google.com/icons), which includes over
 2500+ options.

 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)
 with customized weight and grade, write the following:

 ```
 {
 "name": "check_box",
 "fill": true,
 "weight": 300,
 "grade": -25
 }
 ```

 [Google Chat apps](https://developers.google.com/workspace/chat):
 
Protobuf type google.apps.card.v1.MaterialIcon
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Whether the icon renders as filled.
    Weight and grade affect a symbol’s thickness.
    The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`.
    The stroke weight of the icon.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    boolean
    Whether the icon renders as filled.
    int
    Weight and grade affect a symbol’s thickness.
    The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`.
    com.google.protobuf.ByteString
    The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`.
    int
    The stroke weight of the icon.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setFill(boolean value)
    Whether the icon renders as filled.
    setGrade(int value)
    Weight and grade affect a symbol’s thickness.
    setName(String value)
    The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`.
    setNameBytes(com.google.protobuf.ByteString value)
    The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`.
    setWeight(int value)
    The stroke weight of the icon.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

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

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MaterialIcon.Builder>
    • clear

      public MaterialIcon.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<MaterialIcon.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MaterialIcon.Builder>
    • getDefaultInstanceForType

      public MaterialIcon getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MaterialIcon build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MaterialIcon buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public MaterialIcon.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MaterialIcon.Builder>
    • mergeFrom

      public MaterialIcon.Builder mergeFrom(MaterialIcon other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<MaterialIcon.Builder>
    • mergeFrom

      public MaterialIcon.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MaterialIcon.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The icon name defined in the [Google Material
       Icon](https://fonts.google.com/icons), for example, `check_box`. Any
       invalid names are abandoned and replaced with empty string and
       results in the icon failing to render.
       
      string name = 1;
      Specified by:
      getName in interface MaterialIconOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The icon name defined in the [Google Material
       Icon](https://fonts.google.com/icons), for example, `check_box`. Any
       invalid names are abandoned and replaced with empty string and
       results in the icon failing to render.
       
      string name = 1;
      Specified by:
      getNameBytes in interface MaterialIconOrBuilder
      Returns:
      The bytes for name.
    • setName

      public MaterialIcon.Builder setName(String value)
       The icon name defined in the [Google Material
       Icon](https://fonts.google.com/icons), for example, `check_box`. Any
       invalid names are abandoned and replaced with empty string and
       results in the icon failing to render.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public MaterialIcon.Builder clearName()
       The icon name defined in the [Google Material
       Icon](https://fonts.google.com/icons), for example, `check_box`. Any
       invalid names are abandoned and replaced with empty string and
       results in the icon failing to render.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public MaterialIcon.Builder setNameBytes(com.google.protobuf.ByteString value)
       The icon name defined in the [Google Material
       Icon](https://fonts.google.com/icons), for example, `check_box`. Any
       invalid names are abandoned and replaced with empty string and
       results in the icon failing to render.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getFill

      public boolean getFill()
       Whether the icon renders as filled. Default value is false.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      bool fill = 2;
      Specified by:
      getFill in interface MaterialIconOrBuilder
      Returns:
      The fill.
    • setFill

      public MaterialIcon.Builder setFill(boolean value)
       Whether the icon renders as filled. Default value is false.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      bool fill = 2;
      Parameters:
      value - The fill to set.
      Returns:
      This builder for chaining.
    • clearFill

      public MaterialIcon.Builder clearFill()
       Whether the icon renders as filled. Default value is false.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      bool fill = 2;
      Returns:
      This builder for chaining.
    • getWeight

      public int getWeight()
       The stroke weight of the icon. Choose from {100, 200, 300, 400,
       500, 600, 700}. If absent, default value is 400. If any other value is
       specified, the default value is used.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      int32 weight = 3;
      Specified by:
      getWeight in interface MaterialIconOrBuilder
      Returns:
      The weight.
    • setWeight

      public MaterialIcon.Builder setWeight(int value)
       The stroke weight of the icon. Choose from {100, 200, 300, 400,
       500, 600, 700}. If absent, default value is 400. If any other value is
       specified, the default value is used.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      int32 weight = 3;
      Parameters:
      value - The weight to set.
      Returns:
      This builder for chaining.
    • clearWeight

      public MaterialIcon.Builder clearWeight()
       The stroke weight of the icon. Choose from {100, 200, 300, 400,
       500, 600, 700}. If absent, default value is 400. If any other value is
       specified, the default value is used.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      int32 weight = 3;
      Returns:
      This builder for chaining.
    • getGrade

      public int getGrade()
       Weight and grade affect a symbol’s thickness. Adjustments to grade are more
       granular than adjustments to weight and have a small impact on the size of
       the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If
       any other value is specified, the default value is used.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      int32 grade = 4;
      Specified by:
      getGrade in interface MaterialIconOrBuilder
      Returns:
      The grade.
    • setGrade

      public MaterialIcon.Builder setGrade(int value)
       Weight and grade affect a symbol’s thickness. Adjustments to grade are more
       granular than adjustments to weight and have a small impact on the size of
       the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If
       any other value is specified, the default value is used.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      int32 grade = 4;
      Parameters:
      value - The grade to set.
      Returns:
      This builder for chaining.
    • clearGrade

      public MaterialIcon.Builder clearGrade()
       Weight and grade affect a symbol’s thickness. Adjustments to grade are more
       granular than adjustments to weight and have a small impact on the size of
       the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If
       any other value is specified, the default value is used.
      
       To preview different icon settings, go to
       [Google Font Icons](https://fonts.google.com/icons) and adjust the
       settings under **Customize**.
       
      int32 grade = 4;
      Returns:
      This builder for chaining.