public final class AnnotateTextResponse extends GeneratedMessageV3 implements AnnotateTextResponseOrBuilder
The text annotations response message.Protobuf type
google.cloud.language.v1beta2.AnnotateTextResponse| Modifier and Type | Class and Description | 
|---|---|
| static class  | AnnotateTextResponse.Builder
 The text annotations 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 | CATEGORIES_FIELD_NUMBER | 
| static int | DOCUMENT_SENTIMENT_FIELD_NUMBER | 
| static int | ENTITIES_FIELD_NUMBER | 
| static int | LANGUAGE_FIELD_NUMBER | 
| static int | SENTENCES_FIELD_NUMBER | 
| static int | TOKENS_FIELD_NUMBER | 
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(java.lang.Object obj) | 
| ClassificationCategory | getCategories(int index)
 Categories identified in the input document. | 
| int | getCategoriesCount()
 Categories identified in the input document. | 
| java.util.List<ClassificationCategory> | getCategoriesList()
 Categories identified in the input document. | 
| ClassificationCategoryOrBuilder | getCategoriesOrBuilder(int index)
 Categories identified in the input document. | 
| java.util.List<? extends ClassificationCategoryOrBuilder> | getCategoriesOrBuilderList()
 Categories identified in the input document. | 
| static AnnotateTextResponse | getDefaultInstance() | 
| AnnotateTextResponse | getDefaultInstanceForType() | 
| static Descriptors.Descriptor | getDescriptor() | 
| Sentiment | getDocumentSentiment()
 The overall sentiment for the document. | 
| SentimentOrBuilder | getDocumentSentimentOrBuilder()
 The overall sentiment for the document. | 
| Entity | getEntities(int index)
 Entities, along with their semantic information, in the input document. | 
| int | getEntitiesCount()
 Entities, along with their semantic information, in the input document. | 
| java.util.List<Entity> | getEntitiesList()
 Entities, along with their semantic information, in the input document. | 
| EntityOrBuilder | getEntitiesOrBuilder(int index)
 Entities, along with their semantic information, in the input document. | 
| java.util.List<? extends EntityOrBuilder> | getEntitiesOrBuilderList()
 Entities, along with their semantic information, in the input document. | 
| 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. | 
| 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. | 
| Parser<AnnotateTextResponse> | getParserForType() | 
| Sentence | getSentences(int index)
 Sentences in the input document. | 
| int | getSentencesCount()
 Sentences in the input document. | 
| java.util.List<Sentence> | getSentencesList()
 Sentences in the input document. | 
| SentenceOrBuilder | getSentencesOrBuilder(int index)
 Sentences in the input document. | 
| java.util.List<? extends SentenceOrBuilder> | getSentencesOrBuilderList()
 Sentences in the input document. | 
| int | getSerializedSize() | 
| Token | getTokens(int index)
 Tokens, along with their syntactic information, in the input document. | 
| int | getTokensCount()
 Tokens, along with their syntactic information, in the input document. | 
| java.util.List<Token> | getTokensList()
 Tokens, along with their syntactic information, in the input document. | 
| TokenOrBuilder | getTokensOrBuilder(int index)
 Tokens, along with their syntactic information, in the input document. | 
| java.util.List<? extends TokenOrBuilder> | getTokensOrBuilderList()
 Tokens, along with their syntactic information, in the input document. | 
| UnknownFieldSet | getUnknownFields() | 
| boolean | hasDocumentSentiment()
 The overall sentiment for the document. | 
| int | hashCode() | 
| protected GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable() | 
| boolean | isInitialized() | 
| static AnnotateTextResponse.Builder | newBuilder() | 
| static AnnotateTextResponse.Builder | newBuilder(AnnotateTextResponse prototype) | 
| AnnotateTextResponse.Builder | newBuilderForType() | 
| protected AnnotateTextResponse.Builder | newBuilderForType(GeneratedMessageV3.BuilderParent parent) | 
| static AnnotateTextResponse | parseDelimitedFrom(java.io.InputStream input) | 
| static AnnotateTextResponse | parseDelimitedFrom(java.io.InputStream input,
                  ExtensionRegistryLite extensionRegistry) | 
| static AnnotateTextResponse | parseFrom(byte[] data) | 
| static AnnotateTextResponse | parseFrom(byte[] data,
         ExtensionRegistryLite extensionRegistry) | 
| static AnnotateTextResponse | parseFrom(java.nio.ByteBuffer data) | 
| static AnnotateTextResponse | parseFrom(java.nio.ByteBuffer data,
         ExtensionRegistryLite extensionRegistry) | 
| static AnnotateTextResponse | parseFrom(ByteString data) | 
| static AnnotateTextResponse | parseFrom(ByteString data,
         ExtensionRegistryLite extensionRegistry) | 
| static AnnotateTextResponse | parseFrom(CodedInputStream input) | 
| static AnnotateTextResponse | parseFrom(CodedInputStream input,
         ExtensionRegistryLite extensionRegistry) | 
| static AnnotateTextResponse | parseFrom(java.io.InputStream input) | 
| static AnnotateTextResponse | parseFrom(java.io.InputStream input,
         ExtensionRegistryLite extensionRegistry) | 
| static Parser<AnnotateTextResponse> | parser() | 
| AnnotateTextResponse.Builder | toBuilder() | 
| void | writeTo(CodedOutputStream output) | 
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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int SENTENCES_FIELD_NUMBER
public static final int TOKENS_FIELD_NUMBER
public static final int ENTITIES_FIELD_NUMBER
public static final int DOCUMENT_SENTIMENT_FIELD_NUMBER
public static final int LANGUAGE_FIELD_NUMBER
public static final int CATEGORIES_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.util.List<Sentence> getSentencesList()
Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Sentence sentences = 1;getSentencesList in interface AnnotateTextResponseOrBuilderpublic java.util.List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Sentence sentences = 1;getSentencesOrBuilderList in interface AnnotateTextResponseOrBuilderpublic int getSentencesCount()
Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Sentence sentences = 1;getSentencesCount in interface AnnotateTextResponseOrBuilderpublic Sentence getSentences(int index)
Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Sentence sentences = 1;getSentences in interface AnnotateTextResponseOrBuilderpublic SentenceOrBuilder getSentencesOrBuilder(int index)
Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Sentence sentences = 1;getSentencesOrBuilder in interface AnnotateTextResponseOrBuilderpublic java.util.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.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Token tokens = 2;getTokensList in interface AnnotateTextResponseOrBuilderpublic java.util.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.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Token tokens = 2;getTokensOrBuilderList in interface AnnotateTextResponseOrBuilderpublic int getTokensCount()
Tokens, along with their syntactic information, in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Token tokens = 2;getTokensCount in interface AnnotateTextResponseOrBuilderpublic 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.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Token tokens = 2;getTokens in interface AnnotateTextResponseOrBuilderpublic 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.v1beta2.AnnotateTextRequest.Features.extract_syntax].
repeated .google.cloud.language.v1beta2.Token tokens = 2;getTokensOrBuilder in interface AnnotateTextResponseOrBuilderpublic java.util.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.v1beta2.AnnotateTextRequest.Features.extract_entities].
repeated .google.cloud.language.v1beta2.Entity entities = 3;getEntitiesList in interface AnnotateTextResponseOrBuilderpublic java.util.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.v1beta2.AnnotateTextRequest.Features.extract_entities].
repeated .google.cloud.language.v1beta2.Entity entities = 3;getEntitiesOrBuilderList in interface AnnotateTextResponseOrBuilderpublic int getEntitiesCount()
Entities, along with their semantic information, in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities].
repeated .google.cloud.language.v1beta2.Entity entities = 3;getEntitiesCount in interface AnnotateTextResponseOrBuilderpublic 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.v1beta2.AnnotateTextRequest.Features.extract_entities].
repeated .google.cloud.language.v1beta2.Entity entities = 3;getEntities in interface AnnotateTextResponseOrBuilderpublic 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.v1beta2.AnnotateTextRequest.Features.extract_entities].
repeated .google.cloud.language.v1beta2.Entity entities = 3;getEntitiesOrBuilder in interface AnnotateTextResponseOrBuilderpublic boolean hasDocumentSentiment()
The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].
.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;hasDocumentSentiment in interface AnnotateTextResponseOrBuilderpublic Sentiment getDocumentSentiment()
The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].
.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;getDocumentSentiment in interface AnnotateTextResponseOrBuilderpublic SentimentOrBuilder getDocumentSentimentOrBuilder()
The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].
.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;getDocumentSentimentOrBuilder in interface AnnotateTextResponseOrBuilderpublic 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 = 5;getLanguage in interface AnnotateTextResponseOrBuilderpublic 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 = 5;getLanguageBytes in interface AnnotateTextResponseOrBuilderpublic java.util.List<ClassificationCategory> getCategoriesList()
Categories identified in the input document.
repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;getCategoriesList in interface AnnotateTextResponseOrBuilderpublic java.util.List<? extends ClassificationCategoryOrBuilder> getCategoriesOrBuilderList()
Categories identified in the input document.
repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;getCategoriesOrBuilderList in interface AnnotateTextResponseOrBuilderpublic int getCategoriesCount()
Categories identified in the input document.
repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;getCategoriesCount in interface AnnotateTextResponseOrBuilderpublic ClassificationCategory getCategories(int index)
Categories identified in the input document.
repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;getCategories in interface AnnotateTextResponseOrBuilderpublic ClassificationCategoryOrBuilder getCategoriesOrBuilder(int index)
Categories identified in the input document.
repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;getCategoriesOrBuilder in interface AnnotateTextResponseOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static AnnotateTextResponse parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static AnnotateTextResponse parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static AnnotateTextResponse parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static AnnotateTextResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static AnnotateTextResponse parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static AnnotateTextResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static AnnotateTextResponse parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static AnnotateTextResponse parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static AnnotateTextResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static AnnotateTextResponse parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static AnnotateTextResponse parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static AnnotateTextResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic AnnotateTextResponse.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static AnnotateTextResponse.Builder newBuilder()
public static AnnotateTextResponse.Builder newBuilder(AnnotateTextResponse prototype)
public AnnotateTextResponse.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected AnnotateTextResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static AnnotateTextResponse getDefaultInstance()
public static Parser<AnnotateTextResponse> parser()
public Parser<AnnotateTextResponse> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public AnnotateTextResponse getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder