Class ColorInfo (2.55.0)

public final class ColorInfo extends GeneratedMessageV3 implements ColorInfoOrBuilder

The color information of a Product.

Protobuf type google.cloud.retail.v2.ColorInfo

Implements

ColorInfoOrBuilder

Static Fields

COLORS_FIELD_NUMBER

public static final int COLORS_FIELD_NUMBER
Field Value
Type Description
int

COLOR_FAMILIES_FIELD_NUMBER

public static final int COLOR_FAMILIES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ColorInfo getDefaultInstance()
Returns
Type Description
ColorInfo

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ColorInfo.Builder newBuilder()
Returns
Type Description
ColorInfo.Builder

newBuilder(ColorInfo prototype)

public static ColorInfo.Builder newBuilder(ColorInfo prototype)
Parameter
Name Description
prototype ColorInfo
Returns
Type Description
ColorInfo.Builder

parseDelimitedFrom(InputStream input)

public static ColorInfo parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ColorInfo
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ColorInfo
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ColorInfo parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ColorInfo
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ColorInfo
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ColorInfo parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ColorInfo
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ColorInfo
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ColorInfo parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ColorInfo
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ColorInfo
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ColorInfo parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ColorInfo
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ColorInfo
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ColorInfo parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ColorInfo
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ColorInfo parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ColorInfo
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ColorInfo> parser()
Returns
Type Description
Parser<ColorInfo>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

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

repeated string colors = 2;

Parameter
Name Description
index int

The index of the element to return.

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

repeated string colors = 2;

Parameter
Name Description
index int

The index of the value to return.

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

repeated string colors = 2;

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

repeated string colors = 2;

Returns
Type Description
ProtocolStringList

A list containing the colors.

getDefaultInstanceForType()

public ColorInfo getDefaultInstanceForType()
Returns
Type Description
ColorInfo

getParserForType()

public Parser<ColorInfo> getParserForType()
Returns
Type Description
Parser<ColorInfo>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ColorInfo.Builder newBuilderForType()
Returns
Type Description
ColorInfo.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ColorInfo.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ColorInfo.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ColorInfo.Builder toBuilder()
Returns
Type Description
ColorInfo.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException