Class 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.GeneratedMessageV3.Builder<ColorInfo.Builder>
    implements ColorInfoOrBuilder
     The color information of a [Product][google.cloud.retail.v2.Product].
     
    Protobuf type google.cloud.retail.v2.ColorInfo
    • Method Detail

      • 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<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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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).
         
        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).
         
        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).
         
        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).
         
        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).
         
        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).
         
        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).
         
        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).
         
        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).
         
        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.
      • setUnknownFields

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

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