Package com.google.cloud.vision.v1
Class TextDetectionParams.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TextDetectionParams.Builder>
com.google.cloud.vision.v1.TextDetectionParams.Builder
- All Implemented Interfaces:
TextDetectionParamsOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- TextDetectionParams
public static final class TextDetectionParams.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TextDetectionParams.Builder>
implements TextDetectionParamsOrBuilder
Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.Protobuf type
google.cloud.vision.v1.TextDetectionParams-
Method Summary
Modifier and TypeMethodDescriptionaddAdvancedOcrOptions(String value) A list of advanced OCR options to further fine-tune OCR behavior.addAdvancedOcrOptionsBytes(com.google.protobuf.ByteString value) A list of advanced OCR options to further fine-tune OCR behavior.addAllAdvancedOcrOptions(Iterable<String> values) A list of advanced OCR options to further fine-tune OCR behavior.build()clear()A list of advanced OCR options to further fine-tune OCR behavior.By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result.getAdvancedOcrOptions(int index) A list of advanced OCR options to further fine-tune OCR behavior.com.google.protobuf.ByteStringgetAdvancedOcrOptionsBytes(int index) A list of advanced OCR options to further fine-tune OCR behavior.intA list of advanced OCR options to further fine-tune OCR behavior.com.google.protobuf.ProtocolStringListA list of advanced OCR options to further fine-tune OCR behavior.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanBy default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(TextDetectionParams other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAdvancedOcrOptions(int index, String value) A list of advanced OCR options to further fine-tune OCR behavior.setEnableTextDetectionConfidenceScore(boolean value) By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result.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<TextDetectionParams.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<TextDetectionParams.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<TextDetectionParams.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<TextDetectionParams.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TextDetectionParams.Builder>
-
mergeFrom
public TextDetectionParams.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<TextDetectionParams.Builder>- Throws:
IOException
-
getEnableTextDetectionConfidenceScore
public boolean getEnableTextDetectionConfidenceScore()By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.
bool enable_text_detection_confidence_score = 9;- Specified by:
getEnableTextDetectionConfidenceScorein interfaceTextDetectionParamsOrBuilder- Returns:
- The enableTextDetectionConfidenceScore.
-
setEnableTextDetectionConfidenceScore
By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.
bool enable_text_detection_confidence_score = 9;- Parameters:
value- The enableTextDetectionConfidenceScore to set.- Returns:
- This builder for chaining.
-
clearEnableTextDetectionConfidenceScore
By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.
bool enable_text_detection_confidence_score = 9;- Returns:
- This builder for chaining.
-
getAdvancedOcrOptionsList
public com.google.protobuf.ProtocolStringList getAdvancedOcrOptionsList()A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Specified by:
getAdvancedOcrOptionsListin interfaceTextDetectionParamsOrBuilder- Returns:
- A list containing the advancedOcrOptions.
-
getAdvancedOcrOptionsCount
public int getAdvancedOcrOptionsCount()A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Specified by:
getAdvancedOcrOptionsCountin interfaceTextDetectionParamsOrBuilder- Returns:
- The count of advancedOcrOptions.
-
getAdvancedOcrOptions
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Specified by:
getAdvancedOcrOptionsin interfaceTextDetectionParamsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The advancedOcrOptions at the given index.
-
getAdvancedOcrOptionsBytes
public com.google.protobuf.ByteString getAdvancedOcrOptionsBytes(int index) A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Specified by:
getAdvancedOcrOptionsBytesin interfaceTextDetectionParamsOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the advancedOcrOptions at the given index.
-
setAdvancedOcrOptions
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Parameters:
index- The index to set the value at.value- The advancedOcrOptions to set.- Returns:
- This builder for chaining.
-
addAdvancedOcrOptions
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Parameters:
value- The advancedOcrOptions to add.- Returns:
- This builder for chaining.
-
addAllAdvancedOcrOptions
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Parameters:
values- The advancedOcrOptions to add.- Returns:
- This builder for chaining.
-
clearAdvancedOcrOptions
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Returns:
- This builder for chaining.
-
addAdvancedOcrOptionsBytes
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 11;- Parameters:
value- The bytes of the advancedOcrOptions to add.- Returns:
- This builder for chaining.
-