Class AnalyzeSentimentResponse

  • All Implemented Interfaces:
    AnalyzeSentimentResponseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class AnalyzeSentimentResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements AnalyzeSentimentResponseOrBuilder
     The sentiment analysis response message.
     
    Protobuf type google.cloud.language.v1beta2.AnalyzeSentimentResponse
    See Also:
    Serialized Form
    • Field Detail

      • DOCUMENT_SENTIMENT_FIELD_NUMBER

        public static final int DOCUMENT_SENTIMENT_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasDocumentSentiment

        public boolean hasDocumentSentiment()
         The overall sentiment of the input document.
         
        .google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
        Specified by:
        hasDocumentSentiment in interface AnalyzeSentimentResponseOrBuilder
        Returns:
        Whether the documentSentiment field is set.
      • 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.v1beta2.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.v1beta2.Document.language]
         field for more details.
         
        string language = 2;
        Specified by:
        getLanguageBytes in interface AnalyzeSentimentResponseOrBuilder
        Returns:
        The bytes for language.
      • getSentencesCount

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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
      • newBuilderForType

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

        public AnalyzeSentimentResponse.Builder 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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