Class TextDetectionParams.Builder (3.31.0)

public static final class TextDetectionParams.Builder extends GeneratedMessageV3.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.v1p1beta1.TextDetectionParams

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAdvancedOcrOptions(String value)

public TextDetectionParams.Builder addAdvancedOcrOptions(String value)

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Parameter
NameDescription
valueString

The advancedOcrOptions to add.

Returns
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

addAdvancedOcrOptionsBytes(ByteString value)

public TextDetectionParams.Builder addAdvancedOcrOptionsBytes(ByteString value)

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Parameter
NameDescription
valueByteString

The bytes of the advancedOcrOptions to add.

Returns
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

addAllAdvancedOcrOptions(Iterable<String> values)

public TextDetectionParams.Builder addAllAdvancedOcrOptions(Iterable<String> values)

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Parameter
NameDescription
valuesIterable<String>

The advancedOcrOptions to add.

Returns
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TextDetectionParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

build()

public TextDetectionParams build()
Returns
TypeDescription
TextDetectionParams

buildPartial()

public TextDetectionParams buildPartial()
Returns
TypeDescription
TextDetectionParams

clear()

public TextDetectionParams.Builder clear()
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

clearAdvancedOcrOptions()

public TextDetectionParams.Builder clearAdvancedOcrOptions()

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Returns
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

clearEnableTextDetectionConfidenceScore()

public TextDetectionParams.Builder 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
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TextDetectionParams.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TextDetectionParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

clone()

public TextDetectionParams.Builder clone()
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

getAdvancedOcrOptions(int index)

public String getAdvancedOcrOptions(int index)

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The advancedOcrOptions at the given index.

getAdvancedOcrOptionsBytes(int index)

public ByteString getAdvancedOcrOptionsBytes(int index)

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the advancedOcrOptions at the given index.

getAdvancedOcrOptionsCount()

public int getAdvancedOcrOptionsCount()

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Returns
TypeDescription
int

The count of advancedOcrOptions.

getAdvancedOcrOptionsList()

public ProtocolStringList getAdvancedOcrOptionsList()

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Returns
TypeDescription
ProtocolStringList

A list containing the advancedOcrOptions.

getDefaultInstanceForType()

public TextDetectionParams getDefaultInstanceForType()
Returns
TypeDescription
TextDetectionParams

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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;

Returns
TypeDescription
boolean

The enableTextDetectionConfidenceScore.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TextDetectionParams other)

public TextDetectionParams.Builder mergeFrom(TextDetectionParams other)
Parameter
NameDescription
otherTextDetectionParams
Returns
TypeDescription
TextDetectionParams.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TextDetectionParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextDetectionParams.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TextDetectionParams.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextDetectionParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

setAdvancedOcrOptions(int index, String value)

public TextDetectionParams.Builder setAdvancedOcrOptions(int index, String value)

A list of advanced OCR options to fine-tune OCR behavior.

repeated string advanced_ocr_options = 11;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The advancedOcrOptions to set.

Returns
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

setEnableTextDetectionConfidenceScore(boolean value)

public TextDetectionParams.Builder setEnableTextDetectionConfidenceScore(boolean value)

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;

Parameter
NameDescription
valueboolean

The enableTextDetectionConfidenceScore to set.

Returns
TypeDescription
TextDetectionParams.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TextDetectionParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TextDetectionParams.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TextDetectionParams.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final TextDetectionParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TextDetectionParams.Builder
Overrides