Class AnnotateTextResponse.Builder (2.23.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.language.v1.ClassificationCategory>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.language.v1.Entity>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.language.v1.ClassificationCategory>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.language.v1.Sentence>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.language.v1.Token>
Returns
TypeDescription
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
NameDescription
valueClassificationCategory
Returns
TypeDescription
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
NameDescription
builderForValueClassificationCategory.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueClassificationCategory
Returns
TypeDescription
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
NameDescription
indexint
builderForValueClassificationCategory.Builder
Returns
TypeDescription
AnnotateTextResponse.Builder

addCategoriesBuilder()

public ClassificationCategory.Builder addCategoriesBuilder()

Categories identified in the input document.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueEntity
Returns
TypeDescription
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
NameDescription
builderForValueEntity.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueEntity
Returns
TypeDescription
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
NameDescription
indexint
builderForValueEntity.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueClassificationCategory
Returns
TypeDescription
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
NameDescription
builderForValueClassificationCategory.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueClassificationCategory
Returns
TypeDescription
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
NameDescription
indexint
builderForValueClassificationCategory.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ClassificationCategory.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotateTextResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueSentence
Returns
TypeDescription
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
NameDescription
builderForValueSentence.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSentence
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSentence.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueToken
Returns
TypeDescription
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
NameDescription
builderForValueToken.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueToken
Returns
TypeDescription
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
NameDescription
indexint
builderForValueToken.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Token.Builder

build()

public AnnotateTextResponse build()
Returns
TypeDescription
AnnotateTextResponse

buildPartial()

public AnnotateTextResponse buildPartial()
Returns
TypeDescription
AnnotateTextResponse

clear()

public AnnotateTextResponse.Builder clear()
Returns
TypeDescription
AnnotateTextResponse.Builder
Overrides

clearCategories()

public AnnotateTextResponse.Builder clearCategories()

Categories identified in the input document.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
AnnotateTextResponse.Builder

clearField(Descriptors.FieldDescriptor field)

public AnnotateTextResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
AnnotateTextResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotateTextResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
AnnotateTextResponse.Builder

clone()

public AnnotateTextResponse.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ClassificationCategory.Builder

getCategoriesBuilderList()

public List<ClassificationCategory.Builder> getCategoriesBuilderList()

Categories identified in the input document.

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

Returns
TypeDescription
List<Builder>

getCategoriesCount()

public int getCategoriesCount()

Categories identified in the input document.

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

Returns
TypeDescription
int

getCategoriesList()

public List<ClassificationCategory> getCategoriesList()

Categories identified in the input document.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ClassificationCategoryOrBuilder

getCategoriesOrBuilderList()

public List<? extends ClassificationCategoryOrBuilder> getCategoriesOrBuilderList()

Categories identified in the input document.

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

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

getDefaultInstanceForType()

public AnnotateTextResponse getDefaultInstanceForType()
Returns
TypeDescription
AnnotateTextResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the documentSentiment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueSentiment
Returns
TypeDescription
AnnotateTextResponse.Builder

mergeFrom(AnnotateTextResponse other)

public AnnotateTextResponse.Builder mergeFrom(AnnotateTextResponse other)
Parameter
NameDescription
otherAnnotateTextResponse
Returns
TypeDescription
AnnotateTextResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotateTextResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotateTextResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AnnotateTextResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AnnotateTextResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateTextResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valueClassificationCategory
Returns
TypeDescription
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
NameDescription
indexint
builderForValueClassificationCategory.Builder
Returns
TypeDescription
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
NameDescription
valueSentiment
Returns
TypeDescription
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
NameDescription
builderForValueSentiment.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueEntity
Returns
TypeDescription
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
NameDescription
indexint
builderForValueEntity.Builder
Returns
TypeDescription
AnnotateTextResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotateTextResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The language to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for language to set.

Returns
TypeDescription
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
NameDescription
indexint
valueClassificationCategory
Returns
TypeDescription
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
NameDescription
indexint
builderForValueClassificationCategory.Builder
Returns
TypeDescription
AnnotateTextResponse.Builder

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

public AnnotateTextResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueSentence
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSentence.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueToken
Returns
TypeDescription
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
NameDescription
indexint
builderForValueToken.Builder
Returns
TypeDescription
AnnotateTextResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateTextResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AnnotateTextResponse.Builder
Overrides