Class AnalyzeEntitySentimentResponse.Builder (2.43.0)

public static final class AnalyzeEntitySentimentResponse.Builder extends GeneratedMessageV3.Builder<AnalyzeEntitySentimentResponse.Builder> implements AnalyzeEntitySentimentResponseOrBuilder

The entity-level sentiment analysis response message.

Protobuf type google.cloud.language.v1.AnalyzeEntitySentimentResponse

Static Methods

getDescriptor()

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

Methods

addAllEntities(Iterable<? extends Entity> values)

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

The recognized entities in the input document with associated sentiments.

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

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

addEntities(Entity value)

public AnalyzeEntitySentimentResponse.Builder addEntities(Entity value)

The recognized entities in the input document with associated sentiments.

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

Parameter
Name Description
value Entity
Returns
Type Description
AnalyzeEntitySentimentResponse.Builder

addEntities(Entity.Builder builderForValue)

public AnalyzeEntitySentimentResponse.Builder addEntities(Entity.Builder builderForValue)

The recognized entities in the input document with associated sentiments.

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

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

addEntities(int index, Entity value)

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

The recognized entities in the input document with associated sentiments.

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

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

addEntities(int index, Entity.Builder builderForValue)

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

The recognized entities in the input document with associated sentiments.

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

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

addEntitiesBuilder()

public Entity.Builder addEntitiesBuilder()

The recognized entities in the input document with associated sentiments.

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

Returns
Type Description
Entity.Builder

addEntitiesBuilder(int index)

public Entity.Builder addEntitiesBuilder(int index)

The recognized entities in the input document with associated sentiments.

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

Parameter
Name Description
index int
Returns
Type Description
Entity.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnalyzeEntitySentimentResponse build()
Returns
Type Description
AnalyzeEntitySentimentResponse

buildPartial()

public AnalyzeEntitySentimentResponse buildPartial()
Returns
Type Description
AnalyzeEntitySentimentResponse

clear()

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

clearEntities()

public AnalyzeEntitySentimentResponse.Builder clearEntities()

The recognized entities in the input document with associated sentiments.

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

Returns
Type Description
AnalyzeEntitySentimentResponse.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLanguage()

public AnalyzeEntitySentimentResponse.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 = 2;

Returns
Type Description
AnalyzeEntitySentimentResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public AnalyzeEntitySentimentResponse getDefaultInstanceForType()
Returns
Type Description
AnalyzeEntitySentimentResponse

getDescriptorForType()

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

getEntities(int index)

public Entity getEntities(int index)

The recognized entities in the input document with associated sentiments.

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

Parameter
Name Description
index int
Returns
Type Description
Entity

getEntitiesBuilder(int index)

public Entity.Builder getEntitiesBuilder(int index)

The recognized entities in the input document with associated sentiments.

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

Parameter
Name Description
index int
Returns
Type Description
Entity.Builder

getEntitiesBuilderList()

public List<Entity.Builder> getEntitiesBuilderList()

The recognized entities in the input document with associated sentiments.

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

Returns
Type Description
List<Builder>

getEntitiesCount()

public int getEntitiesCount()

The recognized entities in the input document with associated sentiments.

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

Returns
Type Description
int

getEntitiesList()

public List<Entity> getEntitiesList()

The recognized entities in the input document with associated sentiments.

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

Returns
Type Description
List<Entity>

getEntitiesOrBuilder(int index)

public EntityOrBuilder getEntitiesOrBuilder(int index)

The recognized entities in the input document with associated sentiments.

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

Parameter
Name Description
index int
Returns
Type Description
EntityOrBuilder

getEntitiesOrBuilderList()

public List<? extends EntityOrBuilder> getEntitiesOrBuilderList()

The recognized entities in the input document with associated sentiments.

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

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 = 2;

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 = 2;

Returns
Type Description
ByteString

The bytes for language.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AnalyzeEntitySentimentResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeEntities(int index)

public AnalyzeEntitySentimentResponse.Builder removeEntities(int index)

The recognized entities in the input document with associated sentiments.

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

Parameter
Name Description
index int
Returns
Type Description
AnalyzeEntitySentimentResponse.Builder

setEntities(int index, Entity value)

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

The recognized entities in the input document with associated sentiments.

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

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

setEntities(int index, Entity.Builder builderForValue)

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

The recognized entities in the input document with associated sentiments.

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

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setLanguage(String value)

public AnalyzeEntitySentimentResponse.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 = 2;

Parameter
Name Description
value String

The language to set.

Returns
Type Description
AnalyzeEntitySentimentResponse.Builder

This builder for chaining.

setLanguageBytes(ByteString value)

public AnalyzeEntitySentimentResponse.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 = 2;

Parameter
Name Description
value ByteString

The bytes for language to set.

Returns
Type Description
AnalyzeEntitySentimentResponse.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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