Package com.google.cloud.language.v1
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe text annotations response message.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCategories(int index) Categories identified in the input document.intCategories identified in the input document.Categories identified in the input document.getCategoriesOrBuilder(int index) Categories identified in the input document.List<? extends ClassificationCategoryOrBuilder>Categories identified in the input document.static AnnotateTextResponsestatic final com.google.protobuf.Descriptors.DescriptorThe overall sentiment for the document.The overall sentiment for the document.getEntities(int index) Entities, along with their semantic information, in the input document.intEntities, along with their semantic information, in the input document.Entities, along with their semantic information, in the input document.getEntitiesOrBuilder(int index) Entities, along with their semantic information, in the input document.List<? extends EntityOrBuilder>Entities, along with their semantic information, in the input document.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.com.google.protobuf.ByteStringThe language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.getModerationCategories(int index) Harmful and sensitive categories identified in the input document.intHarmful and sensitive categories identified in the input document.Harmful and sensitive categories identified in the input document.getModerationCategoriesOrBuilder(int index) Harmful and sensitive categories identified in the input document.List<? extends ClassificationCategoryOrBuilder>Harmful and sensitive categories identified in the input document.com.google.protobuf.Parser<AnnotateTextResponse>getSentences(int index) Sentences in the input document.intSentences in the input document.Sentences in the input document.getSentencesOrBuilder(int index) Sentences in the input document.List<? extends SentenceOrBuilder>Sentences in the input document.intgetTokens(int index) Tokens, along with their syntactic information, in the input document.intTokens, along with their syntactic information, in the input document.Tokens, along with their syntactic information, in the input document.getTokensOrBuilder(int index) Tokens, along with their syntactic information, in the input document.List<? extends TokenOrBuilder>Tokens, along with their syntactic information, in the input document.booleanThe overall sentiment for the document.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic AnnotateTextResponse.Builderstatic AnnotateTextResponse.BuildernewBuilder(AnnotateTextResponse prototype) protected AnnotateTextResponse.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static AnnotateTextResponseparseDelimitedFrom(InputStream input) static AnnotateTextResponseparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AnnotateTextResponseparseFrom(byte[] data) static AnnotateTextResponseparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AnnotateTextResponseparseFrom(com.google.protobuf.ByteString data) static AnnotateTextResponseparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AnnotateTextResponseparseFrom(com.google.protobuf.CodedInputStream input) static AnnotateTextResponseparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AnnotateTextResponseparseFrom(InputStream input) static AnnotateTextResponseparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AnnotateTextResponseparseFrom(ByteBuffer data) static AnnotateTextResponseparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<AnnotateTextResponse>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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:
getSentencesListin interfaceAnnotateTextResponseOrBuilder
-
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:
getSentencesOrBuilderListin interfaceAnnotateTextResponseOrBuilder
-
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:
getSentencesCountin interfaceAnnotateTextResponseOrBuilder
-
getSentences
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:
getSentencesin interfaceAnnotateTextResponseOrBuilder
-
getSentencesOrBuilder
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:
getSentencesOrBuilderin interfaceAnnotateTextResponseOrBuilder
-
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:
getTokensListin interfaceAnnotateTextResponseOrBuilder
-
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:
getTokensOrBuilderListin interfaceAnnotateTextResponseOrBuilder
-
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:
getTokensCountin interfaceAnnotateTextResponseOrBuilder
-
getTokens
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:
getTokensin interfaceAnnotateTextResponseOrBuilder
-
getTokensOrBuilder
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:
getTokensOrBuilderin interfaceAnnotateTextResponseOrBuilder
-
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:
getEntitiesListin interfaceAnnotateTextResponseOrBuilder
-
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:
getEntitiesOrBuilderListin interfaceAnnotateTextResponseOrBuilder
-
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:
getEntitiesCountin interfaceAnnotateTextResponseOrBuilder
-
getEntities
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:
getEntitiesin interfaceAnnotateTextResponseOrBuilder
-
getEntitiesOrBuilder
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:
getEntitiesOrBuilderin interfaceAnnotateTextResponseOrBuilder
-
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:
hasDocumentSentimentin interfaceAnnotateTextResponseOrBuilder- Returns:
- Whether the documentSentiment field is set.
-
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:
getDocumentSentimentin interfaceAnnotateTextResponseOrBuilder- Returns:
- The documentSentiment.
-
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:
getDocumentSentimentOrBuilderin interfaceAnnotateTextResponseOrBuilder
-
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:
getLanguagein interfaceAnnotateTextResponseOrBuilder- 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:
getLanguageBytesin interfaceAnnotateTextResponseOrBuilder- Returns:
- The bytes for language.
-
getCategoriesList
Categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory categories = 6;- Specified by:
getCategoriesListin interfaceAnnotateTextResponseOrBuilder
-
getCategoriesOrBuilderList
Categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory categories = 6;- Specified by:
getCategoriesOrBuilderListin interfaceAnnotateTextResponseOrBuilder
-
getCategoriesCount
public int getCategoriesCount()Categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory categories = 6;- Specified by:
getCategoriesCountin interfaceAnnotateTextResponseOrBuilder
-
getCategories
Categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory categories = 6;- Specified by:
getCategoriesin interfaceAnnotateTextResponseOrBuilder
-
getCategoriesOrBuilder
Categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory categories = 6;- Specified by:
getCategoriesOrBuilderin interfaceAnnotateTextResponseOrBuilder
-
getModerationCategoriesList
Harmful and sensitive categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;- Specified by:
getModerationCategoriesListin interfaceAnnotateTextResponseOrBuilder
-
getModerationCategoriesOrBuilderList
Harmful and sensitive categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;- Specified by:
getModerationCategoriesOrBuilderListin interfaceAnnotateTextResponseOrBuilder
-
getModerationCategoriesCount
public int getModerationCategoriesCount()Harmful and sensitive categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;- Specified by:
getModerationCategoriesCountin interfaceAnnotateTextResponseOrBuilder
-
getModerationCategories
Harmful and sensitive categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;- Specified by:
getModerationCategoriesin interfaceAnnotateTextResponseOrBuilder
-
getModerationCategoriesOrBuilder
Harmful and sensitive categories identified in the input document.
repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;- Specified by:
getModerationCategoriesOrBuilderin interfaceAnnotateTextResponseOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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
- Throws:
IOException
-
parseFrom
public static AnnotateTextResponse parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected AnnotateTextResponse.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-