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.GeneratedMessage.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.GeneratedMessage.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 type
google.cloud.vision.v1.ColorInfo-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()RGB components of the color.The fraction of pixels the color occupies in the image.Image-specific score for this color.getColor()RGB components of the color.RGB components of the color.RGB components of the color.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorfloatThe 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.GeneratedMessage.FieldAccessorTablefinal booleanmergeColor(Color value) RGB components of the color.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) RGB components of the color.setColor(Color.Builder builderForValue) RGB components of the color.setPixelFraction(float value) The fraction of pixels the color occupies in the image.setScore(float value) Image-specific score for this color.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ColorInfo.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<ColorInfo.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ColorInfo.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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
RGB components of the color.
.google.type.Color color = 1;- Specified by:
getColorin interfaceColorInfoOrBuilder- Returns:
- The color.
-
setColor
RGB components of the color.
.google.type.Color color = 1; -
setColor
RGB components of the color.
.google.type.Color color = 1; -
mergeColor
RGB components of the color.
.google.type.Color color = 1; -
clearColor
RGB components of the color.
.google.type.Color color = 1; -
getColorBuilder
RGB components of the color.
.google.type.Color color = 1; -
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
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
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
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
The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;- Returns:
- This builder for chaining.
-