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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TextDetectionParams.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TextDetectionParams.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<TextDetectionParams.Builder>
    • getDefaultInstanceForType

      public TextDetectionParams getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public TextDetectionParams build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TextDetectionParams buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TextDetectionParams.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextDetectionParams.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      getEnableTextDetectionConfidenceScore in interface TextDetectionParamsOrBuilder
      Returns:
      The enableTextDetectionConfidenceScore.
    • setEnableTextDetectionConfidenceScore

      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;
      Parameters:
      value - The enableTextDetectionConfidenceScore to set.
      Returns:
      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:
      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:
      getAdvancedOcrOptionsList in interface TextDetectionParamsOrBuilder
      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:
      getAdvancedOcrOptionsCount in interface TextDetectionParamsOrBuilder
      Returns:
      The count of advancedOcrOptions.
    • getAdvancedOcrOptions

      public String getAdvancedOcrOptions(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:
      getAdvancedOcrOptions in interface TextDetectionParamsOrBuilder
      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:
      getAdvancedOcrOptionsBytes in interface TextDetectionParamsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the advancedOcrOptions at the given index.
    • setAdvancedOcrOptions

      public TextDetectionParams.Builder setAdvancedOcrOptions(int index, String value)
       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

      public TextDetectionParams.Builder addAdvancedOcrOptions(String value)
       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

      public TextDetectionParams.Builder addAllAdvancedOcrOptions(Iterable<String> values)
       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

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

      public TextDetectionParams.Builder addAdvancedOcrOptionsBytes(com.google.protobuf.ByteString value)
       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.