Class AnnotateTextResponse

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.language.v1.AnnotateTextResponse
All Implemented Interfaces:
AnnotateTextResponseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class AnnotateTextResponse extends com.google.protobuf.GeneratedMessage implements AnnotateTextResponseOrBuilder
 The text annotations response message.
 
Protobuf type google.cloud.language.v1.AnnotateTextResponse
See Also:
  • Field Details

    • SENTENCES_FIELD_NUMBER

      public static final int SENTENCES_FIELD_NUMBER
      See Also:
    • TOKENS_FIELD_NUMBER

      public static final int TOKENS_FIELD_NUMBER
      See Also:
    • ENTITIES_FIELD_NUMBER

      public static final int ENTITIES_FIELD_NUMBER
      See Also:
    • DOCUMENT_SENTIMENT_FIELD_NUMBER

      public static final int DOCUMENT_SENTIMENT_FIELD_NUMBER
      See Also:
    • LANGUAGE_FIELD_NUMBER

      public static final int LANGUAGE_FIELD_NUMBER
      See Also:
    • CATEGORIES_FIELD_NUMBER

      public static final int CATEGORIES_FIELD_NUMBER
      See Also:
    • MODERATION_CATEGORIES_FIELD_NUMBER

      public static final int MODERATION_CATEGORIES_FIELD_NUMBER
      See Also:
  • 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
    • getSentencesList

      public List<Sentence> getSentencesList()
       Sentences in the input document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Sentence sentences = 1;
      Specified by:
      getSentencesList in interface AnnotateTextResponseOrBuilder
    • getSentencesOrBuilderList

      public List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
       Sentences in the input document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Sentence sentences = 1;
      Specified by:
      getSentencesOrBuilderList in interface AnnotateTextResponseOrBuilder
    • getSentencesCount

      public int getSentencesCount()
       Sentences in the input document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Sentence sentences = 1;
      Specified by:
      getSentencesCount in interface AnnotateTextResponseOrBuilder
    • getSentences

      public Sentence getSentences(int index)
       Sentences in the input document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Sentence sentences = 1;
      Specified by:
      getSentences in interface AnnotateTextResponseOrBuilder
    • getSentencesOrBuilder

      public SentenceOrBuilder getSentencesOrBuilder(int index)
       Sentences in the input document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Sentence sentences = 1;
      Specified by:
      getSentencesOrBuilder in interface AnnotateTextResponseOrBuilder
    • getTokensList

      public List<Token> getTokensList()
       Tokens, along with their syntactic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Token tokens = 2;
      Specified by:
      getTokensList in interface AnnotateTextResponseOrBuilder
    • getTokensOrBuilderList

      public List<? extends TokenOrBuilder> getTokensOrBuilderList()
       Tokens, along with their syntactic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Token tokens = 2;
      Specified by:
      getTokensOrBuilderList in interface AnnotateTextResponseOrBuilder
    • getTokensCount

      public int getTokensCount()
       Tokens, along with their syntactic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Token tokens = 2;
      Specified by:
      getTokensCount in interface AnnotateTextResponseOrBuilder
    • getTokens

      public Token getTokens(int index)
       Tokens, along with their syntactic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Token tokens = 2;
      Specified by:
      getTokens in interface AnnotateTextResponseOrBuilder
    • getTokensOrBuilder

      public TokenOrBuilder getTokensOrBuilder(int index)
       Tokens, along with their syntactic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax].
       
      repeated .google.cloud.language.v1.Token tokens = 2;
      Specified by:
      getTokensOrBuilder in interface AnnotateTextResponseOrBuilder
    • getEntitiesList

      public List<Entity> getEntitiesList()
       Entities, along with their semantic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities].
       
      repeated .google.cloud.language.v1.Entity entities = 3;
      Specified by:
      getEntitiesList in interface AnnotateTextResponseOrBuilder
    • getEntitiesOrBuilderList

      public List<? extends EntityOrBuilder> getEntitiesOrBuilderList()
       Entities, along with their semantic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities].
       
      repeated .google.cloud.language.v1.Entity entities = 3;
      Specified by:
      getEntitiesOrBuilderList in interface AnnotateTextResponseOrBuilder
    • getEntitiesCount

      public int getEntitiesCount()
       Entities, along with their semantic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities].
       
      repeated .google.cloud.language.v1.Entity entities = 3;
      Specified by:
      getEntitiesCount in interface AnnotateTextResponseOrBuilder
    • getEntities

      public Entity getEntities(int index)
       Entities, along with their semantic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities].
       
      repeated .google.cloud.language.v1.Entity entities = 3;
      Specified by:
      getEntities in interface AnnotateTextResponseOrBuilder
    • getEntitiesOrBuilder

      public EntityOrBuilder getEntitiesOrBuilder(int index)
       Entities, along with their semantic information, in the input document.
       Populated if the user enables
       [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities].
       
      repeated .google.cloud.language.v1.Entity entities = 3;
      Specified by:
      getEntitiesOrBuilder in interface AnnotateTextResponseOrBuilder
    • hasDocumentSentiment

      public boolean hasDocumentSentiment()
       The overall sentiment for the document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment].
       
      .google.cloud.language.v1.Sentiment document_sentiment = 4;
      Specified by:
      hasDocumentSentiment in interface AnnotateTextResponseOrBuilder
      Returns:
      Whether the documentSentiment field is set.
    • getDocumentSentiment

      public Sentiment getDocumentSentiment()
       The overall sentiment for the document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment].
       
      .google.cloud.language.v1.Sentiment document_sentiment = 4;
      Specified by:
      getDocumentSentiment in interface AnnotateTextResponseOrBuilder
      Returns:
      The documentSentiment.
    • getDocumentSentimentOrBuilder

      public SentimentOrBuilder getDocumentSentimentOrBuilder()
       The overall sentiment for the document. Populated if the user enables
       [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment].
       
      .google.cloud.language.v1.Sentiment document_sentiment = 4;
      Specified by:
      getDocumentSentimentOrBuilder in interface AnnotateTextResponseOrBuilder
    • getLanguage

      public String getLanguage()
       The language of the text, which will be the same as the language specified
       in the request or, if not specified, the automatically-detected language.
       See [Document.language][google.cloud.language.v1.Document.language] field
       for more details.
       
      string language = 5;
      Specified by:
      getLanguage in interface AnnotateTextResponseOrBuilder
      Returns:
      The language.
    • getLanguageBytes

      public com.google.protobuf.ByteString getLanguageBytes()
       The language of the text, which will be the same as the language specified
       in the request or, if not specified, the automatically-detected language.
       See [Document.language][google.cloud.language.v1.Document.language] field
       for more details.
       
      string language = 5;
      Specified by:
      getLanguageBytes in interface AnnotateTextResponseOrBuilder
      Returns:
      The bytes for language.
    • getCategoriesList

      public List<ClassificationCategory> getCategoriesList()
       Categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory categories = 6;
      Specified by:
      getCategoriesList in interface AnnotateTextResponseOrBuilder
    • getCategoriesOrBuilderList

      public List<? extends ClassificationCategoryOrBuilder> getCategoriesOrBuilderList()
       Categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory categories = 6;
      Specified by:
      getCategoriesOrBuilderList in interface AnnotateTextResponseOrBuilder
    • getCategoriesCount

      public int getCategoriesCount()
       Categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory categories = 6;
      Specified by:
      getCategoriesCount in interface AnnotateTextResponseOrBuilder
    • getCategories

      public ClassificationCategory getCategories(int index)
       Categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory categories = 6;
      Specified by:
      getCategories in interface AnnotateTextResponseOrBuilder
    • getCategoriesOrBuilder

      public ClassificationCategoryOrBuilder getCategoriesOrBuilder(int index)
       Categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory categories = 6;
      Specified by:
      getCategoriesOrBuilder in interface AnnotateTextResponseOrBuilder
    • getModerationCategoriesList

      public List<ClassificationCategory> getModerationCategoriesList()
       Harmful and sensitive categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;
      Specified by:
      getModerationCategoriesList in interface AnnotateTextResponseOrBuilder
    • getModerationCategoriesOrBuilderList

      public List<? extends ClassificationCategoryOrBuilder> getModerationCategoriesOrBuilderList()
       Harmful and sensitive categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;
      Specified by:
      getModerationCategoriesOrBuilderList in interface AnnotateTextResponseOrBuilder
    • getModerationCategoriesCount

      public int getModerationCategoriesCount()
       Harmful and sensitive categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;
      Specified by:
      getModerationCategoriesCount in interface AnnotateTextResponseOrBuilder
    • getModerationCategories

      public ClassificationCategory getModerationCategories(int index)
       Harmful and sensitive categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;
      Specified by:
      getModerationCategories in interface AnnotateTextResponseOrBuilder
    • getModerationCategoriesOrBuilder

      public ClassificationCategoryOrBuilder getModerationCategoriesOrBuilder(int index)
       Harmful and sensitive categories identified in the input document.
       
      repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;
      Specified by:
      getModerationCategoriesOrBuilder in interface AnnotateTextResponseOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AnnotateTextResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnnotateTextResponse parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnnotateTextResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnnotateTextResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnnotateTextResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnnotateTextResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnnotateTextResponse parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AnnotateTextResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AnnotateTextResponse parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AnnotateTextResponse parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AnnotateTextResponse parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AnnotateTextResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public AnnotateTextResponse.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static AnnotateTextResponse.Builder newBuilder()
    • newBuilder

      public static AnnotateTextResponse.Builder newBuilder(AnnotateTextResponse prototype)
    • toBuilder

      public AnnotateTextResponse.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AnnotateTextResponse.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AnnotateTextResponse getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AnnotateTextResponse> parser()
    • getParserForType

      public com.google.protobuf.Parser<AnnotateTextResponse> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AnnotateTextResponse getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder