Class TextExtractionAnnotation.Builder

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

public static final class TextExtractionAnnotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextExtractionAnnotation.Builder> implements TextExtractionAnnotationOrBuilder
 Annotation for identifying spans of text.
 
Protobuf type google.cloud.automl.v1.TextExtractionAnnotation
  • 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<TextExtractionAnnotation.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<TextExtractionAnnotation.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<TextExtractionAnnotation.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public TextExtractionAnnotation.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<TextExtractionAnnotation.Builder>
      Throws:
      IOException
    • getAnnotationCase

      public TextExtractionAnnotation.AnnotationCase getAnnotationCase()
      Specified by:
      getAnnotationCase in interface TextExtractionAnnotationOrBuilder
    • clearAnnotation

      public TextExtractionAnnotation.Builder clearAnnotation()
    • hasTextSegment

      public boolean hasTextSegment()
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
      Specified by:
      hasTextSegment in interface TextExtractionAnnotationOrBuilder
      Returns:
      Whether the textSegment field is set.
    • getTextSegment

      public TextSegment getTextSegment()
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
      Specified by:
      getTextSegment in interface TextExtractionAnnotationOrBuilder
      Returns:
      The textSegment.
    • setTextSegment

      public TextExtractionAnnotation.Builder setTextSegment(TextSegment value)
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
    • setTextSegment

      public TextExtractionAnnotation.Builder setTextSegment(TextSegment.Builder builderForValue)
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
    • mergeTextSegment

      public TextExtractionAnnotation.Builder mergeTextSegment(TextSegment value)
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
    • clearTextSegment

      public TextExtractionAnnotation.Builder clearTextSegment()
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
    • getTextSegmentBuilder

      public TextSegment.Builder getTextSegmentBuilder()
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
    • getTextSegmentOrBuilder

      public TextSegmentOrBuilder getTextSegmentOrBuilder()
       An entity annotation will set this, which is the part of the original
       text to which the annotation pertains.
       
      .google.cloud.automl.v1.TextSegment text_segment = 3;
      Specified by:
      getTextSegmentOrBuilder in interface TextExtractionAnnotationOrBuilder
    • getScore

      public float getScore()
       Output only. A confidence estimate between 0.0 and 1.0. A higher value
       means greater confidence in correctness of the annotation.
       
      float score = 1;
      Specified by:
      getScore in interface TextExtractionAnnotationOrBuilder
      Returns:
      The score.
    • setScore

      public TextExtractionAnnotation.Builder setScore(float value)
       Output only. A confidence estimate between 0.0 and 1.0. A higher value
       means greater confidence in correctness of the annotation.
       
      float score = 1;
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

      public TextExtractionAnnotation.Builder clearScore()
       Output only. A confidence estimate between 0.0 and 1.0. A higher value
       means greater confidence in correctness of the annotation.
       
      float score = 1;
      Returns:
      This builder for chaining.