Package com.google.cloud.vision.v1
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.v1.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.v1.ColorInfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorInfo.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ColorInfobuild()ColorInfobuildPartial()ColorInfo.Builderclear()ColorInfo.BuilderclearColor()RGB components of the color.ColorInfo.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)ColorInfo.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)ColorInfo.BuilderclearPixelFraction()The fraction of pixels the color occupies in the image.ColorInfo.BuilderclearScore()Image-specific score for this color.ColorInfo.Builderclone()com.google.type.ColorgetColor()RGB components of the color.com.google.type.Color.BuildergetColorBuilder()RGB components of the color.com.google.type.ColorOrBuildergetColorOrBuilder()RGB components of the color.ColorInfogetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()floatgetPixelFraction()The fraction of pixels the color occupies in the image.floatgetScore()Image-specific score for this color.booleanhasColor()RGB components of the color.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()ColorInfo.BuildermergeColor(com.google.type.Color value)RGB components of the color.ColorInfo.BuildermergeFrom(ColorInfo other)ColorInfo.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)ColorInfo.BuildermergeFrom(com.google.protobuf.Message other)ColorInfo.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)ColorInfo.BuildersetColor(com.google.type.Color value)RGB components of the color.ColorInfo.BuildersetColor(com.google.type.Color.Builder builderForValue)RGB components of the color.ColorInfo.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ColorInfo.BuildersetPixelFraction(float value)The fraction of pixels the color occupies in the image.ColorInfo.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)ColorInfo.BuildersetScore(float value)Image-specific score for this color.ColorInfo.BuildersetUnknownFields(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
clear
public ColorInfo.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
getDefaultInstanceForType
public ColorInfo getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public ColorInfo build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ColorInfo buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ColorInfo.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
setField
public ColorInfo.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
clearField
public ColorInfo.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
clearOneof
public ColorInfo.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
setRepeatedField
public ColorInfo.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
addRepeatedField
public ColorInfo.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
mergeFrom
public ColorInfo.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ColorInfo.Builder>
-
mergeFrom
public ColorInfo.Builder mergeFrom(ColorInfo other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
hasColorin 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:
getColorin 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:
getColorOrBuilderin interfaceColorInfoOrBuilder
-
getScore
public float getScore()
Image-specific score for this color. Value in range [0, 1].
float score = 2;- Specified by:
getScorein 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:
getPixelFractionin 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
mergeUnknownFields
public final ColorInfo.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ColorInfo.Builder>
-
-