Class ColorInfo (2.7.0)

public final class ColorInfo extends GeneratedMessageV3 implements ColorInfoOrBuilder

The color information of a Product.

Protobuf type google.cloud.retail.v2alpha.ColorInfo

Implements

ColorInfoOrBuilder

Static Fields

COLORS_FIELD_NUMBER

public static final int COLORS_FIELD_NUMBER
Field Value
TypeDescription
int

COLOR_FAMILIES_FIELD_NUMBER

public static final int COLOR_FAMILIES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ColorInfo getDefaultInstance()
Returns
TypeDescription
ColorInfo

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ColorInfo.Builder newBuilder()
Returns
TypeDescription
ColorInfo.Builder

newBuilder(ColorInfo prototype)

public static ColorInfo.Builder newBuilder(ColorInfo prototype)
Parameter
NameDescription
prototypeColorInfo
Returns
TypeDescription
ColorInfo.Builder

parseDelimitedFrom(InputStream input)

public static ColorInfo parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ColorInfo parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ColorInfo parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ColorInfo parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ColorInfo parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ColorInfo parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ColorInfo
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ColorInfo> parser()
Returns
TypeDescription
Parser<ColorInfo>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getColorFamilies(int index)

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. Schema.org property Product.color.

repeated string color_families = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The colorFamilies at the given index.

getColorFamiliesBytes(int index)

public 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. Schema.org property Product.color.

repeated string color_families = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the colorFamilies at the given index.

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. Schema.org property Product.color.

repeated string color_families = 1;

Returns
TypeDescription
int

The count of colorFamilies.

getColorFamiliesList()

public 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. Schema.org property Product.color.

repeated string color_families = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the colorFamilies.

getColors(int index)

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 25 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. Schema.org property Product.color.

repeated string colors = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The colors at the given index.

getColorsBytes(int index)

public 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 25 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. Schema.org property Product.color.

repeated string colors = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the colors at the given index.

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 25 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. Schema.org property Product.color.

repeated string colors = 2;

Returns
TypeDescription
int

The count of colors.

getColorsList()

public 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 25 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. Schema.org property Product.color.

repeated string colors = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the colors.

getDefaultInstanceForType()

public ColorInfo getDefaultInstanceForType()
Returns
TypeDescription
ColorInfo

getParserForType()

public Parser<ColorInfo> getParserForType()
Returns
TypeDescription
Parser<ColorInfo>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ColorInfo.Builder newBuilderForType()
Returns
TypeDescription
ColorInfo.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ColorInfo.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ColorInfo.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ColorInfo.Builder toBuilder()
Returns
TypeDescription
ColorInfo.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException