Package com.google.cloud.vision.v1
Class ImageContext.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
com.google.cloud.vision.v1.ImageContext.Builder
- All Implemented Interfaces:
ImageContextOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ImageContext
public static final class ImageContext.Builder
extends com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
implements ImageContextOrBuilder
Image context and/or feature-specific parameters.Protobuf type
google.cloud.vision.v1.ImageContext-
Method Summary
Modifier and TypeMethodDescriptionaddAllLanguageHints(Iterable<String> values) List of languages to use for TEXT_DETECTION.addLanguageHints(String value) List of languages to use for TEXT_DETECTION.addLanguageHintsBytes(com.google.protobuf.ByteString value) List of languages to use for TEXT_DETECTION.build()clear()Parameters for crop hints annotation request.List of languages to use for TEXT_DETECTION.Not used.Parameters for product search.Parameters for text detection and document text detection.Parameters for web detection.Parameters for crop hints annotation request.Parameters for crop hints annotation request.Parameters for crop hints annotation request.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetLanguageHints(int index) List of languages to use for TEXT_DETECTION.com.google.protobuf.ByteStringgetLanguageHintsBytes(int index) List of languages to use for TEXT_DETECTION.intList of languages to use for TEXT_DETECTION.com.google.protobuf.ProtocolStringListList of languages to use for TEXT_DETECTION.Not used.Not used.Not used.Parameters for product search.Parameters for product search.Parameters for product search.Parameters for text detection and document text detection.Parameters for text detection and document text detection.Parameters for text detection and document text detection.Parameters for web detection.Parameters for web detection.Parameters for web detection.booleanParameters for crop hints annotation request.booleanNot used.booleanParameters for product search.booleanParameters for text detection and document text detection.booleanParameters for web detection.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanParameters for crop hints annotation request.mergeFrom(ImageContext other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeLatLongRect(LatLongRect value) Not used.Parameters for product search.Parameters for text detection and document text detection.Parameters for web detection.Parameters for crop hints annotation request.setCropHintsParams(CropHintsParams.Builder builderForValue) Parameters for crop hints annotation request.setLanguageHints(int index, String value) List of languages to use for TEXT_DETECTION.setLatLongRect(LatLongRect value) Not used.setLatLongRect(LatLongRect.Builder builderForValue) Not used.Parameters for product search.setProductSearchParams(ProductSearchParams.Builder builderForValue) Parameters for product search.Parameters for text detection and document text detection.setTextDetectionParams(TextDetectionParams.Builder builderForValue) Parameters for text detection and document text detection.Parameters for web detection.setWebDetectionParams(WebDetectionParams.Builder builderForValue) Parameters for web detection.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<ImageContext.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<ImageContext.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<ImageContext.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<ImageContext.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
-
mergeFrom
public ImageContext.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<ImageContext.Builder>- Throws:
IOException
-
hasLatLongRect
public boolean hasLatLongRect()Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1;- Specified by:
hasLatLongRectin interfaceImageContextOrBuilder- Returns:
- Whether the latLongRect field is set.
-
getLatLongRect
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1;- Specified by:
getLatLongRectin interfaceImageContextOrBuilder- Returns:
- The latLongRect.
-
setLatLongRect
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1; -
setLatLongRect
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1; -
mergeLatLongRect
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1; -
clearLatLongRect
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1; -
getLatLongRectBuilder
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1; -
getLatLongRectOrBuilder
Not used.
.google.cloud.vision.v1.LatLongRect lat_long_rect = 1;- Specified by:
getLatLongRectOrBuilderin interfaceImageContextOrBuilder
-
getLanguageHintsList
public com.google.protobuf.ProtocolStringList getLanguageHintsList()List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Specified by:
getLanguageHintsListin interfaceImageContextOrBuilder- Returns:
- A list containing the languageHints.
-
getLanguageHintsCount
public int getLanguageHintsCount()List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Specified by:
getLanguageHintsCountin interfaceImageContextOrBuilder- Returns:
- The count of languageHints.
-
getLanguageHints
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Specified by:
getLanguageHintsin interfaceImageContextOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The languageHints at the given index.
-
getLanguageHintsBytes
public com.google.protobuf.ByteString getLanguageHintsBytes(int index) List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Specified by:
getLanguageHintsBytesin interfaceImageContextOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the languageHints at the given index.
-
setLanguageHints
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Parameters:
index- The index to set the value at.value- The languageHints to set.- Returns:
- This builder for chaining.
-
addLanguageHints
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Parameters:
value- The languageHints to add.- Returns:
- This builder for chaining.
-
addAllLanguageHints
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Parameters:
values- The languageHints to add.- Returns:
- This builder for chaining.
-
clearLanguageHints
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Returns:
- This builder for chaining.
-
addLanguageHintsBytes
List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).
repeated string language_hints = 2;- Parameters:
value- The bytes of the languageHints to add.- Returns:
- This builder for chaining.
-
hasCropHintsParams
public boolean hasCropHintsParams()Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;- Specified by:
hasCropHintsParamsin interfaceImageContextOrBuilder- Returns:
- Whether the cropHintsParams field is set.
-
getCropHintsParams
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;- Specified by:
getCropHintsParamsin interfaceImageContextOrBuilder- Returns:
- The cropHintsParams.
-
setCropHintsParams
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; -
setCropHintsParams
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; -
mergeCropHintsParams
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; -
clearCropHintsParams
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; -
getCropHintsParamsBuilder
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; -
getCropHintsParamsOrBuilder
Parameters for crop hints annotation request.
.google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;- Specified by:
getCropHintsParamsOrBuilderin interfaceImageContextOrBuilder
-
hasProductSearchParams
public boolean hasProductSearchParams()Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5;- Specified by:
hasProductSearchParamsin interfaceImageContextOrBuilder- Returns:
- Whether the productSearchParams field is set.
-
getProductSearchParams
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5;- Specified by:
getProductSearchParamsin interfaceImageContextOrBuilder- Returns:
- The productSearchParams.
-
setProductSearchParams
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5; -
setProductSearchParams
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5; -
mergeProductSearchParams
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5; -
clearProductSearchParams
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5; -
getProductSearchParamsBuilder
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5; -
getProductSearchParamsOrBuilder
Parameters for product search.
.google.cloud.vision.v1.ProductSearchParams product_search_params = 5;- Specified by:
getProductSearchParamsOrBuilderin interfaceImageContextOrBuilder
-
hasWebDetectionParams
public boolean hasWebDetectionParams()Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;- Specified by:
hasWebDetectionParamsin interfaceImageContextOrBuilder- Returns:
- Whether the webDetectionParams field is set.
-
getWebDetectionParams
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;- Specified by:
getWebDetectionParamsin interfaceImageContextOrBuilder- Returns:
- The webDetectionParams.
-
setWebDetectionParams
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; -
setWebDetectionParams
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; -
mergeWebDetectionParams
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; -
clearWebDetectionParams
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; -
getWebDetectionParamsBuilder
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; -
getWebDetectionParamsOrBuilder
Parameters for web detection.
.google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;- Specified by:
getWebDetectionParamsOrBuilderin interfaceImageContextOrBuilder
-
hasTextDetectionParams
public boolean hasTextDetectionParams()Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;- Specified by:
hasTextDetectionParamsin interfaceImageContextOrBuilder- Returns:
- Whether the textDetectionParams field is set.
-
getTextDetectionParams
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;- Specified by:
getTextDetectionParamsin interfaceImageContextOrBuilder- Returns:
- The textDetectionParams.
-
setTextDetectionParams
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; -
setTextDetectionParams
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; -
mergeTextDetectionParams
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; -
clearTextDetectionParams
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; -
getTextDetectionParamsBuilder
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; -
getTextDetectionParamsOrBuilder
Parameters for text detection and document text detection.
.google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;- Specified by:
getTextDetectionParamsOrBuilderin interfaceImageContextOrBuilder
-