public final class AnalyzeSentimentResponse extends GeneratedMessageV3 implements AnalyzeSentimentResponseOrBuilder
The sentiment analysis response message.Protobuf type
google.cloud.language.v1beta2.AnalyzeSentimentResponse
Modifier and Type | Class and Description |
---|---|
static class |
AnalyzeSentimentResponse.Builder
The sentiment analysis response message.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
DOCUMENT_SENTIMENT_FIELD_NUMBER |
static int |
LANGUAGE_FIELD_NUMBER |
static int |
SENTENCES_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int DOCUMENT_SENTIMENT_FIELD_NUMBER
public static final int LANGUAGE_FIELD_NUMBER
public static final int SENTENCES_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public boolean hasDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
hasDocumentSentiment
in interface AnalyzeSentimentResponseOrBuilder
public Sentiment getDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
getDocumentSentiment
in interface AnalyzeSentimentResponseOrBuilder
public SentimentOrBuilder getDocumentSentimentOrBuilder()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
getDocumentSentimentOrBuilder
in interface AnalyzeSentimentResponseOrBuilder
public java.lang.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;
getLanguage
in interface AnalyzeSentimentResponseOrBuilder
public 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;
getLanguageBytes
in interface AnalyzeSentimentResponseOrBuilder
public java.util.List<Sentence> getSentencesList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentencesList
in interface AnalyzeSentimentResponseOrBuilder
public java.util.List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentencesOrBuilderList
in interface AnalyzeSentimentResponseOrBuilder
public int getSentencesCount()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentencesCount
in interface AnalyzeSentimentResponseOrBuilder
public Sentence getSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentences
in interface AnalyzeSentimentResponseOrBuilder
public SentenceOrBuilder getSentencesOrBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentencesOrBuilder
in interface AnalyzeSentimentResponseOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static AnalyzeSentimentResponse parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static AnalyzeSentimentResponse parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static AnalyzeSentimentResponse parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static AnalyzeSentimentResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static AnalyzeSentimentResponse parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static AnalyzeSentimentResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static AnalyzeSentimentResponse parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static AnalyzeSentimentResponse parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static AnalyzeSentimentResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static AnalyzeSentimentResponse parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static AnalyzeSentimentResponse parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static AnalyzeSentimentResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public AnalyzeSentimentResponse.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static AnalyzeSentimentResponse.Builder newBuilder()
public static AnalyzeSentimentResponse.Builder newBuilder(AnalyzeSentimentResponse prototype)
public AnalyzeSentimentResponse.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected AnalyzeSentimentResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static AnalyzeSentimentResponse getDefaultInstance()
public static Parser<AnalyzeSentimentResponse> parser()
public Parser<AnalyzeSentimentResponse> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public AnalyzeSentimentResponse getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder