Class ColorInfo.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
- com.google.cloud.vision.v1p3beta1.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
Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Protobuf typegoogle.cloud.vision.v1p3beta1.ColorInfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorInfo.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ColorInfo
build()
ColorInfo
buildPartial()
ColorInfo.Builder
clear()
ColorInfo.Builder
clearColor()
RGB components of the color.ColorInfo.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
ColorInfo.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
ColorInfo.Builder
clearPixelFraction()
The fraction of pixels the color occupies in the image.ColorInfo.Builder
clearScore()
Image-specific score for this color.ColorInfo.Builder
clone()
com.google.type.Color
getColor()
RGB components of the color.com.google.type.Color.Builder
getColorBuilder()
RGB components of the color.com.google.type.ColorOrBuilder
getColorOrBuilder()
RGB components of the color.ColorInfo
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
float
getPixelFraction()
The fraction of pixels the color occupies in the image.float
getScore()
Image-specific score for this color.boolean
hasColor()
RGB components of the color.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
ColorInfo.Builder
mergeColor(com.google.type.Color value)
RGB components of the color.ColorInfo.Builder
mergeFrom(ColorInfo other)
ColorInfo.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
ColorInfo.Builder
mergeFrom(com.google.protobuf.Message other)
ColorInfo.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
ColorInfo.Builder
setColor(com.google.type.Color value)
RGB components of the color.ColorInfo.Builder
setColor(com.google.type.Color.Builder builderForValue)
RGB components of the color.ColorInfo.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ColorInfo.Builder
setPixelFraction(float value)
The fraction of pixels the color occupies in the image.ColorInfo.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
ColorInfo.Builder
setScore(float value)
Image-specific score for this color.ColorInfo.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
clear
public ColorInfo.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
getDefaultInstanceForType
public ColorInfo getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ColorInfo build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ColorInfo buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ColorInfo.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
setField
public ColorInfo.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
clearField
public ColorInfo.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
clearOneof
public ColorInfo.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.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 interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
addRepeatedField
public ColorInfo.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
mergeFrom
public ColorInfo.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ColorInfo.Builder>
-
mergeFrom
public ColorInfo.Builder mergeFrom(ColorInfo other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.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 interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ColorInfo.Builder>
- Throws:
IOException
-
hasColor
public boolean hasColor()
RGB components of the color.
.google.type.Color color = 1;
- Specified by:
hasColor
in interfaceColorInfoOrBuilder
- Returns:
- Whether the color field is set.
-
getColor
public com.google.type.Color getColor()
RGB components of the color.
.google.type.Color color = 1;
- Specified by:
getColor
in interfaceColorInfoOrBuilder
- Returns:
- The color.
-
setColor
public ColorInfo.Builder setColor(com.google.type.Color value)
RGB components of the color.
.google.type.Color color = 1;
-
setColor
public ColorInfo.Builder setColor(com.google.type.Color.Builder builderForValue)
RGB components of the color.
.google.type.Color color = 1;
-
mergeColor
public ColorInfo.Builder mergeColor(com.google.type.Color value)
RGB components of the color.
.google.type.Color color = 1;
-
clearColor
public ColorInfo.Builder clearColor()
RGB components of the color.
.google.type.Color color = 1;
-
getColorBuilder
public com.google.type.Color.Builder getColorBuilder()
RGB components of the color.
.google.type.Color color = 1;
-
getColorOrBuilder
public com.google.type.ColorOrBuilder getColorOrBuilder()
RGB components of the color.
.google.type.Color color = 1;
- Specified by:
getColorOrBuilder
in interfaceColorInfoOrBuilder
-
getScore
public float getScore()
Image-specific score for this color. Value in range [0, 1].
float score = 2;
- Specified by:
getScore
in interfaceColorInfoOrBuilder
- Returns:
- The score.
-
setScore
public ColorInfo.Builder setScore(float value)
Image-specific score for this color. Value in range [0, 1].
float score = 2;
- Parameters:
value
- The score to set.- Returns:
- This builder for chaining.
-
clearScore
public ColorInfo.Builder clearScore()
Image-specific score for this color. Value in range [0, 1].
float score = 2;
- Returns:
- This builder for chaining.
-
getPixelFraction
public float getPixelFraction()
The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;
- Specified by:
getPixelFraction
in interfaceColorInfoOrBuilder
- Returns:
- The pixelFraction.
-
setPixelFraction
public ColorInfo.Builder setPixelFraction(float value)
The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;
- Parameters:
value
- The pixelFraction to set.- Returns:
- This builder for chaining.
-
clearPixelFraction
public ColorInfo.Builder clearPixelFraction()
The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final ColorInfo.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
mergeUnknownFields
public final ColorInfo.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
-