Class MaterialIcon.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
    • clone

      public MaterialIcon.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>
    • setField

      public MaterialIcon.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>
    • clearField

      public MaterialIcon.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>
    • clearOneof

      public MaterialIcon.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>
    • setRepeatedField

      public MaterialIcon.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>
    • addRepeatedField

      public MaterialIcon.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.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.GeneratedMessageV3.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.
    • setUnknownFields

      public final MaterialIcon.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>
    • mergeUnknownFields

      public final MaterialIcon.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MaterialIcon.Builder>