Class Sentence.Builder

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

public static final class Sentence.Builder extends com.google.protobuf.GeneratedMessage.Builder<Sentence.Builder> implements SentenceOrBuilder
 Represents a sentence in the input document.
 
Protobuf type google.cloud.language.v1.Sentence
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    The sentence text.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    The sentence text.
    The sentence text.
    The sentence text.
    boolean
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    boolean
    The sentence text.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    The sentence text.
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.
    The sentence text.
    setText(TextSpan.Builder builderForValue)
    The sentence text.

    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Sentence.Builder>
    • clear

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

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

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

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

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

      public Sentence.Builder mergeFrom(Sentence other)
    • isInitialized

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

      public Sentence.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<Sentence.Builder>
      Throws:
      IOException
    • hasText

      public boolean hasText()
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
      Specified by:
      hasText in interface SentenceOrBuilder
      Returns:
      Whether the text field is set.
    • getText

      public TextSpan getText()
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
      Specified by:
      getText in interface SentenceOrBuilder
      Returns:
      The text.
    • setText

      public Sentence.Builder setText(TextSpan value)
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
    • setText

      public Sentence.Builder setText(TextSpan.Builder builderForValue)
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
    • mergeText

      public Sentence.Builder mergeText(TextSpan value)
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
    • clearText

      public Sentence.Builder clearText()
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
    • getTextBuilder

      public TextSpan.Builder getTextBuilder()
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
    • getTextOrBuilder

      public TextSpanOrBuilder getTextOrBuilder()
       The sentence text.
       
      .google.cloud.language.v1.TextSpan text = 1;
      Specified by:
      getTextOrBuilder in interface SentenceOrBuilder
    • hasSentiment

      public boolean hasSentiment()
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
      Specified by:
      hasSentiment in interface SentenceOrBuilder
      Returns:
      Whether the sentiment field is set.
    • getSentiment

      public Sentiment getSentiment()
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
      Specified by:
      getSentiment in interface SentenceOrBuilder
      Returns:
      The sentiment.
    • setSentiment

      public Sentence.Builder setSentiment(Sentiment value)
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
    • setSentiment

      public Sentence.Builder setSentiment(Sentiment.Builder builderForValue)
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
    • mergeSentiment

      public Sentence.Builder mergeSentiment(Sentiment value)
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
    • clearSentiment

      public Sentence.Builder clearSentiment()
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
    • getSentimentBuilder

      public Sentiment.Builder getSentimentBuilder()
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
    • getSentimentOrBuilder

      public SentimentOrBuilder getSentimentOrBuilder()
       For calls to [AnalyzeSentiment][] or if
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
       is set to true, this field will contain the sentiment for the sentence.
       
      .google.cloud.language.v1.Sentiment sentiment = 2;
      Specified by:
      getSentimentOrBuilder in interface SentenceOrBuilder