Class AnnotateTextResponse.Builder (2.48.0)

public static final class AnnotateTextResponse.Builder extends GeneratedMessageV3.Builder<AnnotateTextResponse.Builder> implements AnnotateTextResponseOrBuilder

The text annotations response message.

Protobuf type google.cloud.language.v1.AnnotateTextResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllCategories(Iterable<? extends ClassificationCategory> values)

public AnnotateTextResponse.Builder addAllCategories(Iterable<? extends ClassificationCategory> values)

Categories identified in the input document.

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

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

addAllEntities(Iterable<? extends Entity> values)

public AnnotateTextResponse.Builder addAllEntities(Iterable<? extends Entity> values)

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

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

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

addAllModerationCategories(Iterable<? extends ClassificationCategory> values)

public AnnotateTextResponse.Builder addAllModerationCategories(Iterable<? extends ClassificationCategory> values)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

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

addAllSentences(Iterable<? extends Sentence> values)

public AnnotateTextResponse.Builder addAllSentences(Iterable<? extends Sentence> values)

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

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

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

addAllTokens(Iterable<? extends Token> values)

public AnnotateTextResponse.Builder addAllTokens(Iterable<? extends Token> values)

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

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

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

addCategories(ClassificationCategory value)

public AnnotateTextResponse.Builder addCategories(ClassificationCategory value)

Categories identified in the input document.

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

Parameter
Name Description
value ClassificationCategory
Returns
Type Description
AnnotateTextResponse.Builder

addCategories(ClassificationCategory.Builder builderForValue)

public AnnotateTextResponse.Builder addCategories(ClassificationCategory.Builder builderForValue)

Categories identified in the input document.

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

Parameter
Name Description
builderForValue ClassificationCategory.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addCategories(int index, ClassificationCategory value)

public AnnotateTextResponse.Builder addCategories(int index, ClassificationCategory value)

Categories identified in the input document.

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

Parameters
Name Description
index int
value ClassificationCategory
Returns
Type Description
AnnotateTextResponse.Builder

addCategories(int index, ClassificationCategory.Builder builderForValue)

public AnnotateTextResponse.Builder addCategories(int index, ClassificationCategory.Builder builderForValue)

Categories identified in the input document.

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

Parameters
Name Description
index int
builderForValue ClassificationCategory.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addCategoriesBuilder()

public ClassificationCategory.Builder addCategoriesBuilder()

Categories identified in the input document.

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

Returns
Type Description
ClassificationCategory.Builder

addCategoriesBuilder(int index)

public ClassificationCategory.Builder addCategoriesBuilder(int index)

Categories identified in the input document.

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

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory.Builder

addEntities(Entity value)

public AnnotateTextResponse.Builder addEntities(Entity value)

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

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

Parameter
Name Description
value Entity
Returns
Type Description
AnnotateTextResponse.Builder

addEntities(Entity.Builder builderForValue)

public AnnotateTextResponse.Builder addEntities(Entity.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue Entity.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addEntities(int index, Entity value)

public AnnotateTextResponse.Builder addEntities(int index, Entity value)

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

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

Parameters
Name Description
index int
value Entity
Returns
Type Description
AnnotateTextResponse.Builder

addEntities(int index, Entity.Builder builderForValue)

public AnnotateTextResponse.Builder addEntities(int index, Entity.Builder builderForValue)

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

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

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

addEntitiesBuilder()

public Entity.Builder addEntitiesBuilder()

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

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

Returns
Type Description
Entity.Builder

addEntitiesBuilder(int index)

public Entity.Builder addEntitiesBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Entity.Builder

addModerationCategories(ClassificationCategory value)

public AnnotateTextResponse.Builder addModerationCategories(ClassificationCategory value)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
value ClassificationCategory
Returns
Type Description
AnnotateTextResponse.Builder

addModerationCategories(ClassificationCategory.Builder builderForValue)

public AnnotateTextResponse.Builder addModerationCategories(ClassificationCategory.Builder builderForValue)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
builderForValue ClassificationCategory.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addModerationCategories(int index, ClassificationCategory value)

public AnnotateTextResponse.Builder addModerationCategories(int index, ClassificationCategory value)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameters
Name Description
index int
value ClassificationCategory
Returns
Type Description
AnnotateTextResponse.Builder

addModerationCategories(int index, ClassificationCategory.Builder builderForValue)

public AnnotateTextResponse.Builder addModerationCategories(int index, ClassificationCategory.Builder builderForValue)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameters
Name Description
index int
builderForValue ClassificationCategory.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addModerationCategoriesBuilder()

public ClassificationCategory.Builder addModerationCategoriesBuilder()

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Returns
Type Description
ClassificationCategory.Builder

addModerationCategoriesBuilder(int index)

public ClassificationCategory.Builder addModerationCategoriesBuilder(int index)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotateTextResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

addSentences(Sentence value)

public AnnotateTextResponse.Builder addSentences(Sentence value)

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

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

Parameter
Name Description
value Sentence
Returns
Type Description
AnnotateTextResponse.Builder

addSentences(Sentence.Builder builderForValue)

public AnnotateTextResponse.Builder addSentences(Sentence.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue Sentence.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addSentences(int index, Sentence value)

public AnnotateTextResponse.Builder addSentences(int index, Sentence value)

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

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

Parameters
Name Description
index int
value Sentence
Returns
Type Description
AnnotateTextResponse.Builder

addSentences(int index, Sentence.Builder builderForValue)

public AnnotateTextResponse.Builder addSentences(int index, Sentence.Builder builderForValue)

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

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

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

addSentencesBuilder()

public Sentence.Builder addSentencesBuilder()

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

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

Returns
Type Description
Sentence.Builder

addSentencesBuilder(int index)

public Sentence.Builder addSentencesBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Sentence.Builder

addTokens(Token value)

public AnnotateTextResponse.Builder addTokens(Token value)

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

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

Parameter
Name Description
value Token
Returns
Type Description
AnnotateTextResponse.Builder

addTokens(Token.Builder builderForValue)

public AnnotateTextResponse.Builder addTokens(Token.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue Token.Builder
Returns
Type Description
AnnotateTextResponse.Builder

addTokens(int index, Token value)

public AnnotateTextResponse.Builder addTokens(int index, Token value)

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

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

Parameters
Name Description
index int
value Token
Returns
Type Description
AnnotateTextResponse.Builder

addTokens(int index, Token.Builder builderForValue)

public AnnotateTextResponse.Builder addTokens(int index, Token.Builder builderForValue)

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

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

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

addTokensBuilder()

public Token.Builder addTokensBuilder()

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

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

Returns
Type Description
Token.Builder

addTokensBuilder(int index)

public Token.Builder addTokensBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Token.Builder

build()

public AnnotateTextResponse build()
Returns
Type Description
AnnotateTextResponse

buildPartial()

public AnnotateTextResponse buildPartial()
Returns
Type Description
AnnotateTextResponse

clear()

public AnnotateTextResponse.Builder clear()
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

clearCategories()

public AnnotateTextResponse.Builder clearCategories()

Categories identified in the input document.

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

Returns
Type Description
AnnotateTextResponse.Builder

clearDocumentSentiment()

public AnnotateTextResponse.Builder clearDocumentSentiment()

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

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

Returns
Type Description
AnnotateTextResponse.Builder

clearEntities()

public AnnotateTextResponse.Builder clearEntities()

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

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

Returns
Type Description
AnnotateTextResponse.Builder

clearField(Descriptors.FieldDescriptor field)

public AnnotateTextResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

clearLanguage()

public AnnotateTextResponse.Builder clearLanguage()

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.

clearModerationCategories()

public AnnotateTextResponse.Builder clearModerationCategories()

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Returns
Type Description
AnnotateTextResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotateTextResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

clearSentences()

public AnnotateTextResponse.Builder clearSentences()

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

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

Returns
Type Description
AnnotateTextResponse.Builder

clearTokens()

public AnnotateTextResponse.Builder clearTokens()

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

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

Returns
Type Description
AnnotateTextResponse.Builder

clone()

public AnnotateTextResponse.Builder clone()
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

getCategories(int index)

public ClassificationCategory getCategories(int index)

Categories identified in the input document.

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

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory

getCategoriesBuilder(int index)

public ClassificationCategory.Builder getCategoriesBuilder(int index)

Categories identified in the input document.

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

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory.Builder

getCategoriesBuilderList()

public List<ClassificationCategory.Builder> getCategoriesBuilderList()

Categories identified in the input document.

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

Returns
Type Description
List<Builder>

getCategoriesCount()

public int getCategoriesCount()

Categories identified in the input document.

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

Returns
Type Description
int

getCategoriesList()

public List<ClassificationCategory> getCategoriesList()

Categories identified in the input document.

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

Returns
Type Description
List<ClassificationCategory>

getCategoriesOrBuilder(int index)

public ClassificationCategoryOrBuilder getCategoriesOrBuilder(int index)

Categories identified in the input document.

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

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategoryOrBuilder

getCategoriesOrBuilderList()

public List<? extends ClassificationCategoryOrBuilder> getCategoriesOrBuilderList()

Categories identified in the input document.

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

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

getDefaultInstanceForType()

public AnnotateTextResponse getDefaultInstanceForType()
Returns
Type Description
AnnotateTextResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDocumentSentiment()

public Sentiment getDocumentSentiment()

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

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

Returns
Type Description
Sentiment

The documentSentiment.

getDocumentSentimentBuilder()

public Sentiment.Builder getDocumentSentimentBuilder()

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

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

Returns
Type Description
Sentiment.Builder

getDocumentSentimentOrBuilder()

public SentimentOrBuilder getDocumentSentimentOrBuilder()

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

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

Returns
Type Description
SentimentOrBuilder

getEntities(int index)

public Entity getEntities(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Entity

getEntitiesBuilder(int index)

public Entity.Builder getEntitiesBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Entity.Builder

getEntitiesBuilderList()

public List<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.v1.Entity entities = 3;

Returns
Type Description
List<Builder>

getEntitiesCount()

public int getEntitiesCount()

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

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

Returns
Type Description
int

getEntitiesList()

public List<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.v1.Entity entities = 3;

Returns
Type Description
List<Entity>

getEntitiesOrBuilder(int index)

public EntityOrBuilder getEntitiesOrBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
EntityOrBuilder

getEntitiesOrBuilderList()

public List<? extends EntityOrBuilder> getEntitiesOrBuilderList()

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

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

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

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

string language = 5;

Returns
Type Description
String

The language.

getLanguageBytes()

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

string language = 5;

Returns
Type Description
ByteString

The bytes for language.

getModerationCategories(int index)

public ClassificationCategory getModerationCategories(int index)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory

getModerationCategoriesBuilder(int index)

public ClassificationCategory.Builder getModerationCategoriesBuilder(int index)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory.Builder

getModerationCategoriesBuilderList()

public List<ClassificationCategory.Builder> getModerationCategoriesBuilderList()

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Returns
Type Description
List<Builder>

getModerationCategoriesCount()

public int getModerationCategoriesCount()

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Returns
Type Description
int

getModerationCategoriesList()

public List<ClassificationCategory> getModerationCategoriesList()

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Returns
Type Description
List<ClassificationCategory>

getModerationCategoriesOrBuilder(int index)

public ClassificationCategoryOrBuilder getModerationCategoriesOrBuilder(int index)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategoryOrBuilder

getModerationCategoriesOrBuilderList()

public List<? extends ClassificationCategoryOrBuilder> getModerationCategoriesOrBuilderList()

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

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

getSentences(int index)

public Sentence getSentences(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Sentence

getSentencesBuilder(int index)

public Sentence.Builder getSentencesBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Sentence.Builder

getSentencesBuilderList()

public List<Sentence.Builder> getSentencesBuilderList()

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

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

Returns
Type Description
List<Builder>

getSentencesCount()

public int getSentencesCount()

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

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

Returns
Type Description
int

getSentencesList()

public List<Sentence> getSentencesList()

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

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

Returns
Type Description
List<Sentence>

getSentencesOrBuilder(int index)

public SentenceOrBuilder getSentencesOrBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
SentenceOrBuilder

getSentencesOrBuilderList()

public List<? extends SentenceOrBuilder> getSentencesOrBuilderList()

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

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

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

getTokens(int index)

public Token getTokens(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Token

getTokensBuilder(int index)

public Token.Builder getTokensBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
Token.Builder

getTokensBuilderList()

public List<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.v1.Token tokens = 2;

Returns
Type Description
List<Builder>

getTokensCount()

public int getTokensCount()

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

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

Returns
Type Description
int

getTokensList()

public List<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.v1.Token tokens = 2;

Returns
Type Description
List<Token>

getTokensOrBuilder(int index)

public TokenOrBuilder getTokensOrBuilder(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
TokenOrBuilder

getTokensOrBuilderList()

public List<? extends TokenOrBuilder> getTokensOrBuilderList()

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

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

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

hasDocumentSentiment()

public boolean hasDocumentSentiment()

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

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

Returns
Type Description
boolean

Whether the documentSentiment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDocumentSentiment(Sentiment value)

public AnnotateTextResponse.Builder mergeDocumentSentiment(Sentiment value)

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

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

Parameter
Name Description
value Sentiment
Returns
Type Description
AnnotateTextResponse.Builder

mergeFrom(AnnotateTextResponse other)

public AnnotateTextResponse.Builder mergeFrom(AnnotateTextResponse other)
Parameter
Name Description
other AnnotateTextResponse
Returns
Type Description
AnnotateTextResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotateTextResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateTextResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AnnotateTextResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateTextResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

removeCategories(int index)

public AnnotateTextResponse.Builder removeCategories(int index)

Categories identified in the input document.

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

Parameter
Name Description
index int
Returns
Type Description
AnnotateTextResponse.Builder

removeEntities(int index)

public AnnotateTextResponse.Builder removeEntities(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
AnnotateTextResponse.Builder

removeModerationCategories(int index)

public AnnotateTextResponse.Builder removeModerationCategories(int index)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameter
Name Description
index int
Returns
Type Description
AnnotateTextResponse.Builder

removeSentences(int index)

public AnnotateTextResponse.Builder removeSentences(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
AnnotateTextResponse.Builder

removeTokens(int index)

public AnnotateTextResponse.Builder removeTokens(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
AnnotateTextResponse.Builder

setCategories(int index, ClassificationCategory value)

public AnnotateTextResponse.Builder setCategories(int index, ClassificationCategory value)

Categories identified in the input document.

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

Parameters
Name Description
index int
value ClassificationCategory
Returns
Type Description
AnnotateTextResponse.Builder

setCategories(int index, ClassificationCategory.Builder builderForValue)

public AnnotateTextResponse.Builder setCategories(int index, ClassificationCategory.Builder builderForValue)

Categories identified in the input document.

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

Parameters
Name Description
index int
builderForValue ClassificationCategory.Builder
Returns
Type Description
AnnotateTextResponse.Builder

setDocumentSentiment(Sentiment value)

public AnnotateTextResponse.Builder setDocumentSentiment(Sentiment value)

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

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

Parameter
Name Description
value Sentiment
Returns
Type Description
AnnotateTextResponse.Builder

setDocumentSentiment(Sentiment.Builder builderForValue)

public AnnotateTextResponse.Builder setDocumentSentiment(Sentiment.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue Sentiment.Builder
Returns
Type Description
AnnotateTextResponse.Builder

setEntities(int index, Entity value)

public AnnotateTextResponse.Builder setEntities(int index, Entity value)

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

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

Parameters
Name Description
index int
value Entity
Returns
Type Description
AnnotateTextResponse.Builder

setEntities(int index, Entity.Builder builderForValue)

public AnnotateTextResponse.Builder setEntities(int index, Entity.Builder builderForValue)

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

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

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

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotateTextResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

setLanguage(String value)

public AnnotateTextResponse.Builder setLanguage(String value)

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)

public AnnotateTextResponse.Builder setLanguageBytes(ByteString value)

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.

setModerationCategories(int index, ClassificationCategory value)

public AnnotateTextResponse.Builder setModerationCategories(int index, ClassificationCategory value)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameters
Name Description
index int
value ClassificationCategory
Returns
Type Description
AnnotateTextResponse.Builder

setModerationCategories(int index, ClassificationCategory.Builder builderForValue)

public AnnotateTextResponse.Builder setModerationCategories(int index, ClassificationCategory.Builder builderForValue)

Harmful and sensitive categories identified in the input document.

repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7;

Parameters
Name Description
index int
builderForValue ClassificationCategory.Builder
Returns
Type Description
AnnotateTextResponse.Builder

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

public AnnotateTextResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AnnotateTextResponse.Builder
Overrides

setSentences(int index, Sentence value)

public AnnotateTextResponse.Builder setSentences(int index, Sentence value)

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

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

Parameters
Name Description
index int
value Sentence
Returns
Type Description
AnnotateTextResponse.Builder

setSentences(int index, Sentence.Builder builderForValue)

public AnnotateTextResponse.Builder setSentences(int index, Sentence.Builder builderForValue)

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

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

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

setTokens(int index, Token value)

public AnnotateTextResponse.Builder setTokens(int index, Token value)

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

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

Parameters
Name Description
index int
value Token
Returns
Type Description
AnnotateTextResponse.Builder

setTokens(int index, Token.Builder builderForValue)

public AnnotateTextResponse.Builder setTokens(int index, Token.Builder builderForValue)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateTextResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotateTextResponse.Builder
Overrides