Class AnnotateTextResponse.Builder (2.8.0)

publicstaticfinalclass AnnotateTextResponse.BuilderextendsGeneratedMessageV3.Builder<AnnotateTextResponse.Builder>implementsAnnotateTextResponseOrBuilder

The text annotations response message.

Protobuf type google.cloud.language.v1beta2.AnnotateTextResponse

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addAllCategories(Iterable<? extends ClassificationCategory> values)

publicAnnotateTextResponse.BuilderaddAllCategories(Iterable<?extendsClassificationCategory>values)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v1beta2.ClassificationCategory>
Returns
Type Description

addAllEntities(Iterable<? extends Entity> values)

publicAnnotateTextResponse.BuilderaddAllEntities(Iterable<?extendsEntity>values)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v1beta2.Entity>
Returns
Type Description

addAllSentences(Iterable<? extends Sentence> values)

publicAnnotateTextResponse.BuilderaddAllSentences(Iterable<?extendsSentence>values)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v1beta2.Sentence>
Returns
Type Description

addAllTokens(Iterable<? extends Token> values)

publicAnnotateTextResponse.BuilderaddAllTokens(Iterable<?extendsToken>values)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v1beta2.Token>
Returns
Type Description

addCategories(ClassificationCategory value)

publicAnnotateTextResponse.BuilderaddCategories(ClassificationCategoryvalue)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
Returns
Type Description

addCategories(ClassificationCategory.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddCategories(ClassificationCategory.BuilderbuilderForValue)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
Returns
Type Description

addCategories(int index, ClassificationCategory value)

publicAnnotateTextResponse.BuilderaddCategories(intindex,ClassificationCategoryvalue)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameters
Name Description
index int
Returns
Type Description

addCategories(int index, ClassificationCategory.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddCategories(intindex,ClassificationCategory.BuilderbuilderForValue)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameters
Name Description
index int
Returns
Type Description

addCategoriesBuilder()

publicClassificationCategory.BuilderaddCategoriesBuilder()

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Returns
Type Description

addCategoriesBuilder(int index)

publicClassificationCategory.BuilderaddCategoriesBuilder(intindex)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
index int
Returns
Type Description

addEntities(Entity value)

publicAnnotateTextResponse.BuilderaddEntities(Entityvalue)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
value Entity
Returns
Type Description

addEntities(Entity.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddEntities(Entity.BuilderbuilderForValue)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
builderForValue Entity.Builder
Returns
Type Description

addEntities(int index, Entity value)

publicAnnotateTextResponse.BuilderaddEntities(intindex,Entityvalue)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameters
Name Description
index int
value Entity
Returns
Type Description

addEntities(int index, Entity.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddEntities(intindex,Entity.BuilderbuilderForValue)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameters
Name Description
index int
builderForValue Entity.Builder
Returns
Type Description

addEntitiesBuilder()

publicEntity.BuilderaddEntitiesBuilder()

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Returns
Type Description

addEntitiesBuilder(int index)

publicEntity.BuilderaddEntitiesBuilder(intindex)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
index int
Returns
Type Description

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicAnnotateTextResponse.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

addSentences(Sentence value)

publicAnnotateTextResponse.BuilderaddSentences(Sentencevalue)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
value Sentence
Returns
Type Description

addSentences(Sentence.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddSentences(Sentence.BuilderbuilderForValue)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
builderForValue Sentence.Builder
Returns
Type Description

addSentences(int index, Sentence value)

publicAnnotateTextResponse.BuilderaddSentences(intindex,Sentencevalue)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameters
Name Description
index int
value Sentence
Returns
Type Description

addSentences(int index, Sentence.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddSentences(intindex,Sentence.BuilderbuilderForValue)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameters
Name Description
index int
builderForValue Sentence.Builder
Returns
Type Description

addSentencesBuilder()

publicSentence.BuilderaddSentencesBuilder()

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Returns
Type Description

addSentencesBuilder(int index)

publicSentence.BuilderaddSentencesBuilder(intindex)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

addTokens(Token value)

publicAnnotateTextResponse.BuilderaddTokens(Tokenvalue)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
value Token
Returns
Type Description

addTokens(Token.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddTokens(Token.BuilderbuilderForValue)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
builderForValue Token.Builder
Returns
Type Description

addTokens(int index, Token value)

publicAnnotateTextResponse.BuilderaddTokens(intindex,Tokenvalue)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameters
Name Description
index int
value Token
Returns
Type Description

addTokens(int index, Token.Builder builderForValue)

publicAnnotateTextResponse.BuilderaddTokens(intindex,Token.BuilderbuilderForValue)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameters
Name Description
index int
builderForValue Token.Builder
Returns
Type Description

addTokensBuilder()

publicToken.BuilderaddTokensBuilder()

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Returns
Type Description

addTokensBuilder(int index)

publicToken.BuilderaddTokensBuilder(intindex)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

build()

publicAnnotateTextResponsebuild()
Returns
Type Description

buildPartial()

publicAnnotateTextResponsebuildPartial()
Returns
Type Description

clear()

publicAnnotateTextResponse.Builderclear()
Returns
Type Description
Overrides

clearCategories()

publicAnnotateTextResponse.BuilderclearCategories()

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Returns
Type Description

clearDocumentSentiment()

publicAnnotateTextResponse.BuilderclearDocumentSentiment()

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Returns
Type Description

clearEntities()

publicAnnotateTextResponse.BuilderclearEntities()

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Returns
Type Description

clearField(Descriptors.FieldDescriptor field)

publicAnnotateTextResponse.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearLanguage()

publicAnnotateTextResponse.BuilderclearLanguage()

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 field for more details.

string language = 5;

Returns
Type Description
AnnotateTextResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicAnnotateTextResponse.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clearSentences()

publicAnnotateTextResponse.BuilderclearSentences()

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Returns
Type Description

clearTokens()

publicAnnotateTextResponse.BuilderclearTokens()

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Returns
Type Description

clone()

publicAnnotateTextResponse.Builderclone()
Returns
Type Description
Overrides

getCategories(int index)

publicClassificationCategorygetCategories(intindex)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
index int
Returns
Type Description

getCategoriesBuilder(int index)

publicClassificationCategory.BuildergetCategoriesBuilder(intindex)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
index int
Returns
Type Description

getCategoriesBuilderList()

publicList<ClassificationCategory.Builder>getCategoriesBuilderList()

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Returns
Type Description

getCategoriesCount()

publicintgetCategoriesCount()

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Returns
Type Description
int

getCategoriesList()

publicList<ClassificationCategory>getCategoriesList()

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Returns
Type Description

getCategoriesOrBuilder(int index)

publicClassificationCategoryOrBuildergetCategoriesOrBuilder(intindex)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
index int
Returns
Type Description

getCategoriesOrBuilderList()

publicList<?extendsClassificationCategoryOrBuilder>getCategoriesOrBuilderList()

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Returns
Type Description
List<? extends com.google.cloud.language.v1beta2.ClassificationCategoryOrBuilder>

getDefaultInstanceForType()

publicAnnotateTextResponsegetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getDocumentSentiment()

publicSentimentgetDocumentSentiment()

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Returns
Type Description
Sentiment

The documentSentiment.

getDocumentSentimentBuilder()

publicSentiment.BuildergetDocumentSentimentBuilder()

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Returns
Type Description

getDocumentSentimentOrBuilder()

publicSentimentOrBuildergetDocumentSentimentOrBuilder()

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Returns
Type Description

getEntities(int index)

publicEntitygetEntities(intindex)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
index int
Returns
Type Description

getEntitiesBuilder(int index)

publicEntity.BuildergetEntitiesBuilder(intindex)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
index int
Returns
Type Description

getEntitiesBuilderList()

publicList<Entity.Builder>getEntitiesBuilderList()

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Returns
Type Description

getEntitiesCount()

publicintgetEntitiesCount()

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Returns
Type Description
int

getEntitiesList()

publicList<Entity>getEntitiesList()

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Returns
Type Description

getEntitiesOrBuilder(int index)

publicEntityOrBuildergetEntitiesOrBuilder(intindex)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
index int
Returns
Type Description

getEntitiesOrBuilderList()

publicList<?extendsEntityOrBuilder>getEntitiesOrBuilderList()

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Returns
Type Description
List<? extends com.google.cloud.language.v1beta2.EntityOrBuilder>

getLanguage()

publicStringgetLanguage()

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 field for more details.

string language = 5;

Returns
Type Description
String

The language.

getLanguageBytes()

publicByteStringgetLanguageBytes()

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 field for more details.

string language = 5;

Returns
Type Description
ByteString

The bytes for language.

getSentences(int index)

publicSentencegetSentences(intindex)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

getSentencesBuilder(int index)

publicSentence.BuildergetSentencesBuilder(intindex)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

getSentencesBuilderList()

publicList<Sentence.Builder>getSentencesBuilderList()

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Returns
Type Description

getSentencesCount()

publicintgetSentencesCount()

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Returns
Type Description
int

getSentencesList()

publicList<Sentence>getSentencesList()

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Returns
Type Description

getSentencesOrBuilder(int index)

publicSentenceOrBuildergetSentencesOrBuilder(intindex)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

getSentencesOrBuilderList()

publicList<?extendsSentenceOrBuilder>getSentencesOrBuilderList()

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Returns
Type Description
List<? extends com.google.cloud.language.v1beta2.SentenceOrBuilder>

getTokens(int index)

publicTokengetTokens(intindex)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

getTokensBuilder(int index)

publicToken.BuildergetTokensBuilder(intindex)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

getTokensBuilderList()

publicList<Token.Builder>getTokensBuilderList()

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Returns
Type Description

getTokensCount()

publicintgetTokensCount()

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Returns
Type Description
int

getTokensList()

publicList<Token>getTokensList()

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Returns
Type Description

getTokensOrBuilder(int index)

publicTokenOrBuildergetTokensOrBuilder(intindex)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

getTokensOrBuilderList()

publicList<?extendsTokenOrBuilder>getTokensOrBuilderList()

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Returns
Type Description
List<? extends com.google.cloud.language.v1beta2.TokenOrBuilder>

hasDocumentSentiment()

publicbooleanhasDocumentSentiment()

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Returns
Type Description
boolean

Whether the documentSentiment field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeDocumentSentiment(Sentiment value)

publicAnnotateTextResponse.BuildermergeDocumentSentiment(Sentimentvalue)

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Parameter
Name Description
value Sentiment
Returns
Type Description

mergeFrom(AnnotateTextResponse other)

publicAnnotateTextResponse.BuildermergeFrom(AnnotateTextResponseother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicAnnotateTextResponse.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicAnnotateTextResponse.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalAnnotateTextResponse.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

removeCategories(int index)

publicAnnotateTextResponse.BuilderremoveCategories(intindex)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameter
Name Description
index int
Returns
Type Description

removeEntities(int index)

publicAnnotateTextResponse.BuilderremoveEntities(intindex)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameter
Name Description
index int
Returns
Type Description

removeSentences(int index)

publicAnnotateTextResponse.BuilderremoveSentences(intindex)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

removeTokens(int index)

publicAnnotateTextResponse.BuilderremoveTokens(intindex)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

setCategories(int index, ClassificationCategory value)

publicAnnotateTextResponse.BuildersetCategories(intindex,ClassificationCategoryvalue)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameters
Name Description
index int
Returns
Type Description

setCategories(int index, ClassificationCategory.Builder builderForValue)

publicAnnotateTextResponse.BuildersetCategories(intindex,ClassificationCategory.BuilderbuilderForValue)

Categories identified in the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6;

Parameters
Name Description
index int
Returns
Type Description

setDocumentSentiment(Sentiment value)

publicAnnotateTextResponse.BuildersetDocumentSentiment(Sentimentvalue)

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Parameter
Name Description
value Sentiment
Returns
Type Description

setDocumentSentiment(Sentiment.Builder builderForValue)

publicAnnotateTextResponse.BuildersetDocumentSentiment(Sentiment.BuilderbuilderForValue)

The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.

.google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Parameter
Name Description
builderForValue Sentiment.Builder
Returns
Type Description

setEntities(int index, Entity value)

publicAnnotateTextResponse.BuildersetEntities(intindex,Entityvalue)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameters
Name Description
index int
value Entity
Returns
Type Description

setEntities(int index, Entity.Builder builderForValue)

publicAnnotateTextResponse.BuildersetEntities(intindex,Entity.BuilderbuilderForValue)

Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.

repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameters
Name Description
index int
builderForValue Entity.Builder
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicAnnotateTextResponse.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setLanguage(String value)

publicAnnotateTextResponse.BuildersetLanguage(Stringvalue)

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 field for more details.

string language = 5;

Parameter
Name Description
value String

The language to set.

Returns
Type Description
AnnotateTextResponse.Builder

This builder for chaining.

setLanguageBytes(ByteString value)

publicAnnotateTextResponse.BuildersetLanguageBytes(ByteStringvalue)

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 field for more details.

string language = 5;

Parameter
Name Description
value ByteString

The bytes for language to set.

Returns
Type Description
AnnotateTextResponse.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicAnnotateTextResponse.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setSentences(int index, Sentence value)

publicAnnotateTextResponse.BuildersetSentences(intindex,Sentencevalue)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameters
Name Description
index int
value Sentence
Returns
Type Description

setSentences(int index, Sentence.Builder builderForValue)

publicAnnotateTextResponse.BuildersetSentences(intindex,Sentence.BuilderbuilderForValue)

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameters
Name Description
index int
builderForValue Sentence.Builder
Returns
Type Description

setTokens(int index, Token value)

publicAnnotateTextResponse.BuildersetTokens(intindex,Tokenvalue)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameters
Name Description
index int
value Token
Returns
Type Description

setTokens(int index, Token.Builder builderForValue)

publicAnnotateTextResponse.BuildersetTokens(intindex,Token.BuilderbuilderForValue)

Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.

repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameters
Name Description
index int
builderForValue Token.Builder
Returns
Type Description

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalAnnotateTextResponse.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.