Class AnalyzeSentimentResponse

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

@Generated public final class AnalyzeSentimentResponse extends com.google.protobuf.GeneratedMessage implements AnalyzeSentimentResponseOrBuilder
 The sentiment analysis response message.
 
Protobuf type google.cloud.language.v1.AnalyzeSentimentResponse
See Also:
  • Field Details

    • 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:
    • SENTENCES_FIELD_NUMBER

      public static final int SENTENCES_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
    • hasDocumentSentiment

      public boolean hasDocumentSentiment()
       The overall sentiment of the input document.
       
      .google.cloud.language.v1.Sentiment document_sentiment = 1;
      Specified by:
      hasDocumentSentiment in interface AnalyzeSentimentResponseOrBuilder
      Returns:
      Whether the documentSentiment field is set.
    • getDocumentSentiment

      public Sentiment getDocumentSentiment()
       The overall sentiment of the input document.
       
      .google.cloud.language.v1.Sentiment document_sentiment = 1;
      Specified by:
      getDocumentSentiment in interface AnalyzeSentimentResponseOrBuilder
      Returns:
      The documentSentiment.
    • getDocumentSentimentOrBuilder

      public SentimentOrBuilder getDocumentSentimentOrBuilder()
       The overall sentiment of the input document.
       
      .google.cloud.language.v1.Sentiment document_sentiment = 1;
      Specified by:
      getDocumentSentimentOrBuilder in interface AnalyzeSentimentResponseOrBuilder
    • 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 = 2;
      Specified by:
      getLanguage in interface AnalyzeSentimentResponseOrBuilder
      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 = 2;
      Specified by:
      getLanguageBytes in interface AnalyzeSentimentResponseOrBuilder
      Returns:
      The bytes for language.
    • getSentencesList

      public List<Sentence> getSentencesList()
       The sentiment for all the sentences in the document.
       
      repeated .google.cloud.language.v1.Sentence sentences = 3;
      Specified by:
      getSentencesList in interface AnalyzeSentimentResponseOrBuilder
    • getSentencesOrBuilderList

      public List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
       The sentiment for all the sentences in the document.
       
      repeated .google.cloud.language.v1.Sentence sentences = 3;
      Specified by:
      getSentencesOrBuilderList in interface AnalyzeSentimentResponseOrBuilder
    • getSentencesCount

      public int getSentencesCount()
       The sentiment for all the sentences in the document.
       
      repeated .google.cloud.language.v1.Sentence sentences = 3;
      Specified by:
      getSentencesCount in interface AnalyzeSentimentResponseOrBuilder
    • getSentences

      public Sentence getSentences(int index)
       The sentiment for all the sentences in the document.
       
      repeated .google.cloud.language.v1.Sentence sentences = 3;
      Specified by:
      getSentences in interface AnalyzeSentimentResponseOrBuilder
    • getSentencesOrBuilder

      public SentenceOrBuilder getSentencesOrBuilder(int index)
       The sentiment for all the sentences in the document.
       
      repeated .google.cloud.language.v1.Sentence sentences = 3;
      Specified by:
      getSentencesOrBuilder in interface AnalyzeSentimentResponseOrBuilder
    • 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 AnalyzeSentimentResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static AnalyzeSentimentResponse.Builder newBuilder()
    • newBuilder

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

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

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

      public static AnalyzeSentimentResponse getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<AnalyzeSentimentResponse> 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 AnalyzeSentimentResponse getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder