Class TextAnnotation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TextAnnotation.Builder>
com.google.cloud.videointelligence.v1.TextAnnotation.Builder
All Implemented Interfaces:
TextAnnotationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TextAnnotation

public static final class TextAnnotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextAnnotation.Builder> implements TextAnnotationOrBuilder
 Annotations related to one detected OCR text snippet. This will contain the
 corresponding text, confidence value, and frame level information for each
 detection.
 
Protobuf type google.cloud.videointelligence.v1.TextAnnotation
  • 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<TextAnnotation.Builder>
    • clear

      public TextAnnotation.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<TextAnnotation.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<TextAnnotation.Builder>
    • getDefaultInstanceForType

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

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

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

      public TextAnnotation.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<TextAnnotation.Builder>
    • mergeFrom

      public TextAnnotation.Builder mergeFrom(TextAnnotation other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<TextAnnotation.Builder>
    • mergeFrom

      public TextAnnotation.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<TextAnnotation.Builder>
      Throws:
      IOException
    • getText

      public String getText()
       The detected text.
       
      string text = 1;
      Specified by:
      getText in interface TextAnnotationOrBuilder
      Returns:
      The text.
    • getTextBytes

      public com.google.protobuf.ByteString getTextBytes()
       The detected text.
       
      string text = 1;
      Specified by:
      getTextBytes in interface TextAnnotationOrBuilder
      Returns:
      The bytes for text.
    • setText

      public TextAnnotation.Builder setText(String value)
       The detected text.
       
      string text = 1;
      Parameters:
      value - The text to set.
      Returns:
      This builder for chaining.
    • clearText

      public TextAnnotation.Builder clearText()
       The detected text.
       
      string text = 1;
      Returns:
      This builder for chaining.
    • setTextBytes

      public TextAnnotation.Builder setTextBytes(com.google.protobuf.ByteString value)
       The detected text.
       
      string text = 1;
      Parameters:
      value - The bytes for text to set.
      Returns:
      This builder for chaining.
    • getSegmentsList

      public List<TextSegment> getSegmentsList()
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
      Specified by:
      getSegmentsList in interface TextAnnotationOrBuilder
    • getSegmentsCount

      public int getSegmentsCount()
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
      Specified by:
      getSegmentsCount in interface TextAnnotationOrBuilder
    • getSegments

      public TextSegment getSegments(int index)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
      Specified by:
      getSegments in interface TextAnnotationOrBuilder
    • setSegments

      public TextAnnotation.Builder setSegments(int index, TextSegment value)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • setSegments

      public TextAnnotation.Builder setSegments(int index, TextSegment.Builder builderForValue)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • addSegments

      public TextAnnotation.Builder addSegments(TextSegment value)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • addSegments

      public TextAnnotation.Builder addSegments(int index, TextSegment value)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • addSegments

      public TextAnnotation.Builder addSegments(TextSegment.Builder builderForValue)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • addSegments

      public TextAnnotation.Builder addSegments(int index, TextSegment.Builder builderForValue)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • addAllSegments

      public TextAnnotation.Builder addAllSegments(Iterable<? extends TextSegment> values)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • clearSegments

      public TextAnnotation.Builder clearSegments()
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • removeSegments

      public TextAnnotation.Builder removeSegments(int index)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • getSegmentsBuilder

      public TextSegment.Builder getSegmentsBuilder(int index)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • getSegmentsOrBuilder

      public TextSegmentOrBuilder getSegmentsOrBuilder(int index)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
      Specified by:
      getSegmentsOrBuilder in interface TextAnnotationOrBuilder
    • getSegmentsOrBuilderList

      public List<? extends TextSegmentOrBuilder> getSegmentsOrBuilderList()
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
      Specified by:
      getSegmentsOrBuilderList in interface TextAnnotationOrBuilder
    • addSegmentsBuilder

      public TextSegment.Builder addSegmentsBuilder()
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • addSegmentsBuilder

      public TextSegment.Builder addSegmentsBuilder(int index)
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • getSegmentsBuilderList

      public List<TextSegment.Builder> getSegmentsBuilderList()
       All video segments where OCR detected text appears.
       
      repeated .google.cloud.videointelligence.v1.TextSegment segments = 2;
    • getVersion

      public String getVersion()
       Feature version.
       
      string version = 3;
      Specified by:
      getVersion in interface TextAnnotationOrBuilder
      Returns:
      The version.
    • getVersionBytes

      public com.google.protobuf.ByteString getVersionBytes()
       Feature version.
       
      string version = 3;
      Specified by:
      getVersionBytes in interface TextAnnotationOrBuilder
      Returns:
      The bytes for version.
    • setVersion

      public TextAnnotation.Builder setVersion(String value)
       Feature version.
       
      string version = 3;
      Parameters:
      value - The version to set.
      Returns:
      This builder for chaining.
    • clearVersion

      public TextAnnotation.Builder clearVersion()
       Feature version.
       
      string version = 3;
      Returns:
      This builder for chaining.
    • setVersionBytes

      public TextAnnotation.Builder setVersionBytes(com.google.protobuf.ByteString value)
       Feature version.
       
      string version = 3;
      Parameters:
      value - The bytes for version to set.
      Returns:
      This builder for chaining.