Class DominantColorsAnnotation.Builder (3.2.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.v1p4beta1.DominantColorsAnnotation

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

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.v1p4beta1.ColorInfo colors = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1p4beta1.ColorInfo>
Returns

addColors(ColorInfo value)

public DominantColorsAnnotation.Builder addColors(ColorInfo value)

RGB color values with their score and pixel fraction.

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

Parameter
NameDescription
valueColorInfo
Returns

addColors(ColorInfo.Builder builderForValue)

public DominantColorsAnnotation.Builder addColors(ColorInfo.Builder builderForValue)

RGB color values with their score and pixel fraction.

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

Parameter
NameDescription
builderForValueColorInfo.Builder
Returns

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.v1p4beta1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
valueColorInfo
Returns

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.v1p4beta1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
builderForValueColorInfo.Builder
Returns

addColorsBuilder()

public ColorInfo.Builder addColorsBuilder()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1p4beta1.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.v1p4beta1.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 Overrides

build()

public DominantColorsAnnotation build()
Returns

buildPartial()

public DominantColorsAnnotation buildPartial()
Returns

clear()

public DominantColorsAnnotation.Builder clear()
Returns Overrides

clearColors()

public DominantColorsAnnotation.Builder clearColors()

RGB color values with their score and pixel fraction.

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

Returns

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public DominantColorsAnnotation.Builder clone()
Returns Overrides

getColors(int index)

public ColorInfo getColors(int index)

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1p4beta1.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.v1p4beta1.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.v1p4beta1.ColorInfo colors = 1;

Returns
TypeDescription
List<Builder>

getColorsCount()

public int getColorsCount()

RGB color values with their score and pixel fraction.

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

Returns
TypeDescription
int

getColorsList()

public List<ColorInfo> getColorsList()

RGB color values with their score and pixel fraction.

repeated .google.cloud.vision.v1p4beta1.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.v1p4beta1.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.v1p4beta1.ColorInfo colors = 1;

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

getDefaultInstanceForType()

public DominantColorsAnnotation getDefaultInstanceForType()
Returns

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeColors(int index)

public DominantColorsAnnotation.Builder removeColors(int index)

RGB color values with their score and pixel fraction.

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

Parameter
NameDescription
indexint
Returns

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.v1p4beta1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
valueColorInfo
Returns

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.v1p4beta1.ColorInfo colors = 1;

Parameters
NameDescription
indexint
builderForValueColorInfo.Builder
Returns

setField(Descriptors.FieldDescriptor field, Object value)

public DominantColorsAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns 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 Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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