Class ColorInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ColorInfo.Builder>
com.google.cloud.retail.v2alpha.ColorInfo.Builder
All Implemented Interfaces:
ColorInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ColorInfo

public static final class ColorInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<ColorInfo.Builder> implements ColorInfoOrBuilder
 The color information of a [Product][google.cloud.retail.v2alpha.Product].
 
Protobuf type google.cloud.retail.v2alpha.ColorInfo
  • Method Summary

    Modifier and Type
    Method
    Description
    The standard color families.
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
    The standard color families.
    addColorFamiliesBytes(com.google.protobuf.ByteString value)
    The standard color families.
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
    addColorsBytes(com.google.protobuf.ByteString value)
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
     
     
     
    The standard color families.
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
    getColorFamilies(int index)
    The standard color families.
    com.google.protobuf.ByteString
    The standard color families.
    int
    The standard color families.
    com.google.protobuf.ProtocolStringList
    The standard color families.
    getColors(int index)
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
    com.google.protobuf.ByteString
    getColorsBytes(int index)
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
    int
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
    com.google.protobuf.ProtocolStringList
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    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)
     
    setColorFamilies(int index, String value)
    The standard color families.
    setColors(int index, String value)
    The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend.

    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<ColorInfo.Builder>
    • clear

      public ColorInfo.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<ColorInfo.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<ColorInfo.Builder>
    • getDefaultInstanceForType

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

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

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

      public ColorInfo.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<ColorInfo.Builder>
    • mergeFrom

      public ColorInfo.Builder mergeFrom(ColorInfo other)
    • isInitialized

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

      public ColorInfo.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<ColorInfo.Builder>
      Throws:
      IOException
    • getColorFamiliesList

      public com.google.protobuf.ProtocolStringList getColorFamiliesList()
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Specified by:
      getColorFamiliesList in interface ColorInfoOrBuilder
      Returns:
      A list containing the colorFamilies.
    • getColorFamiliesCount

      public int getColorFamiliesCount()
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Specified by:
      getColorFamiliesCount in interface ColorInfoOrBuilder
      Returns:
      The count of colorFamilies.
    • getColorFamilies

      public String getColorFamilies(int index)
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Specified by:
      getColorFamilies in interface ColorInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The colorFamilies at the given index.
    • getColorFamiliesBytes

      public com.google.protobuf.ByteString getColorFamiliesBytes(int index)
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Specified by:
      getColorFamiliesBytes in interface ColorInfoOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the colorFamilies at the given index.
    • setColorFamilies

      public ColorInfo.Builder setColorFamilies(int index, String value)
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Parameters:
      index - The index to set the value at.
      value - The colorFamilies to set.
      Returns:
      This builder for chaining.
    • addColorFamilies

      public ColorInfo.Builder addColorFamilies(String value)
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Parameters:
      value - The colorFamilies to add.
      Returns:
      This builder for chaining.
    • addAllColorFamilies

      public ColorInfo.Builder addAllColorFamilies(Iterable<String> values)
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Parameters:
      values - The colorFamilies to add.
      Returns:
      This builder for chaining.
    • clearColorFamilies

      public ColorInfo.Builder clearColorFamilies()
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Returns:
      This builder for chaining.
    • addColorFamiliesBytes

      public ColorInfo.Builder addColorFamiliesBytes(com.google.protobuf.ByteString value)
       The standard color families. Strongly recommended to use the following
       standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
       "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
       Normally it is expected to have only 1 color family. May consider using
       single "Mixed" instead of multiple values.
      
       A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
      
       The colorFamilies field as a system attribute is not a required field but
       strongly recommended to be specified. Google Search models treat this field
       as more important than a custom product attribute when specified.
       
      repeated string color_families = 1;
      Parameters:
      value - The bytes of the colorFamilies to add.
      Returns:
      This builder for chaining.
    • getColorsList

      public com.google.protobuf.ProtocolStringList getColorsList()
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Specified by:
      getColorsList in interface ColorInfoOrBuilder
      Returns:
      A list containing the colors.
    • getColorsCount

      public int getColorsCount()
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Specified by:
      getColorsCount in interface ColorInfoOrBuilder
      Returns:
      The count of colors.
    • getColors

      public String getColors(int index)
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Specified by:
      getColors in interface ColorInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The colors at the given index.
    • getColorsBytes

      public com.google.protobuf.ByteString getColorsBytes(int index)
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Specified by:
      getColorsBytes in interface ColorInfoOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the colors at the given index.
    • setColors

      public ColorInfo.Builder setColors(int index, String value)
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Parameters:
      index - The index to set the value at.
      value - The colors to set.
      Returns:
      This builder for chaining.
    • addColors

      public ColorInfo.Builder addColors(String value)
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Parameters:
      value - The colors to add.
      Returns:
      This builder for chaining.
    • addAllColors

      public ColorInfo.Builder addAllColors(Iterable<String> values)
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Parameters:
      values - The colors to add.
      Returns:
      This builder for chaining.
    • clearColors

      public ColorInfo.Builder clearColors()
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Returns:
      This builder for chaining.
    • addColorsBytes

      public ColorInfo.Builder addColorsBytes(com.google.protobuf.ByteString value)
       The color display names, which may be different from standard color family
       names, such as the color aliases used in the website frontend. Normally
       it is expected to have only 1 color. May consider using single "Mixed"
       instead of multiple values.
      
       A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
       string with a length limit of 128 characters. Otherwise, an
       INVALID_ARGUMENT error is returned.
      
       Google Merchant Center property
       [color](https://support.google.com/merchants/answer/6324487). Schema.org
       property [Product.color](https://schema.org/color).
       
      repeated string colors = 2;
      Parameters:
      value - The bytes of the colors to add.
      Returns:
      This builder for chaining.