Class DominantColorsAnnotation.Builder (3.25.0)

public static final class DominantColorsAnnotation.Builder extends GeneratedMessageV3.Builder<DominantColorsAnnotation.Builder> implements DominantColorsAnnotationOrBuilder

Set of dominant colors and their corresponding scores.

Protobuf type google.cloud.vision.v1.DominantColorsAnnotation

Static Methods

getDescriptor()

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

Methods

addAllColors(Iterable<? extends ColorInfo> values)

public DominantColorsAnnotation.Builder addAllColors(Iterable<? extends ColorInfo> values)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1.ColorInfo>
Returns
TypeDescription
DominantColorsAnnotation.Builder

addColors(ColorInfo value)

public DominantColorsAnnotation.Builder addColors(ColorInfo value)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
valueColorInfo
Returns
TypeDescription
DominantColorsAnnotation.Builder

addColors(ColorInfo.Builder builderForValue)

public DominantColorsAnnotation.Builder addColors(ColorInfo.Builder builderForValue)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
builderForValueColorInfo.Builder
Returns
TypeDescription
DominantColorsAnnotation.Builder

addColors(int index, ColorInfo value)

public DominantColorsAnnotation.Builder addColors(int index, ColorInfo value)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
valueColorInfo
Returns
TypeDescription
DominantColorsAnnotation.Builder

addColors(int index, ColorInfo.Builder builderForValue)

public DominantColorsAnnotation.Builder addColors(int index, ColorInfo.Builder builderForValue)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
builderForValueColorInfo.Builder
Returns
TypeDescription
DominantColorsAnnotation.Builder

addColorsBuilder()

public ColorInfo.Builder addColorsBuilder()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Returns
TypeDescription
ColorInfo.Builder

addColorsBuilder(int index)

public ColorInfo.Builder addColorsBuilder(int index)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ColorInfo.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DominantColorsAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

build()

public DominantColorsAnnotation build()
Returns
TypeDescription
DominantColorsAnnotation

buildPartial()

public DominantColorsAnnotation buildPartial()
Returns
TypeDescription
DominantColorsAnnotation

clear()

public DominantColorsAnnotation.Builder clear()
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

clearColors()

public DominantColorsAnnotation.Builder clearColors()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Returns
TypeDescription
DominantColorsAnnotation.Builder

clearField(Descriptors.FieldDescriptor field)

public DominantColorsAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public DominantColorsAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

clone()

public DominantColorsAnnotation.Builder clone()
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

getColors(int index)

public ColorInfo getColors(int index)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ColorInfo

getColorsBuilder(int index)

public ColorInfo.Builder getColorsBuilder(int index)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ColorInfo.Builder

getColorsBuilderList()

public List<ColorInfo.Builder> getColorsBuilderList()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Returns
TypeDescription
List<Builder>

getColorsCount()

public int getColorsCount()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Returns
TypeDescription
int

getColorsList()

public List<ColorInfo> getColorsList()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Returns
TypeDescription
List<ColorInfo>

getColorsOrBuilder(int index)

public ColorInfoOrBuilder getColorsOrBuilder(int index)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ColorInfoOrBuilder

getColorsOrBuilderList()

public List<? extends ColorInfoOrBuilder> getColorsOrBuilderList()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Returns
TypeDescription
List<? extends com.google.cloud.vision.v1.ColorInfoOrBuilder>

getDefaultInstanceForType()

public DominantColorsAnnotation getDefaultInstanceForType()
Returns
TypeDescription
DominantColorsAnnotation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DominantColorsAnnotation other)

public DominantColorsAnnotation.Builder mergeFrom(DominantColorsAnnotation other)
Parameter
NameDescription
otherDominantColorsAnnotation
Returns
TypeDescription
DominantColorsAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DominantColorsAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DominantColorsAnnotation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DominantColorsAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

removeColors(int index)

public DominantColorsAnnotation.Builder removeColors(int index)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DominantColorsAnnotation.Builder

setColors(int index, ColorInfo value)

public DominantColorsAnnotation.Builder setColors(int index, ColorInfo value)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
valueColorInfo
Returns
TypeDescription
DominantColorsAnnotation.Builder

setColors(int index, ColorInfo.Builder builderForValue)

public DominantColorsAnnotation.Builder setColors(int index, ColorInfo.Builder builderForValue)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
builderForValueColorInfo.Builder
Returns
TypeDescription
DominantColorsAnnotation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DominantColorsAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DominantColorsAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DominantColorsAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DominantColorsAnnotation.Builder
Overrides