Package com.google.cloud.language.v1
Class Entity.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
- com.google.cloud.language.v1.Entity.Builder
-
- All Implemented Interfaces:
EntityOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- Entity
public static final class Entity.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder> implements EntityOrBuilder
Represents a phrase in the text that is a known entity, such as a person, an organization, or location. The API associates information, such as salience and mentions, with entities.
Protobuf typegoogle.cloud.language.v1.Entity
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Entity.Builder
addAllMentions(Iterable<? extends EntityMention> values)
The mentions of this entity in the input document.Entity.Builder
addMentions(int index, EntityMention value)
The mentions of this entity in the input document.Entity.Builder
addMentions(int index, EntityMention.Builder builderForValue)
The mentions of this entity in the input document.Entity.Builder
addMentions(EntityMention value)
The mentions of this entity in the input document.Entity.Builder
addMentions(EntityMention.Builder builderForValue)
The mentions of this entity in the input document.EntityMention.Builder
addMentionsBuilder()
The mentions of this entity in the input document.EntityMention.Builder
addMentionsBuilder(int index)
The mentions of this entity in the input document.Entity.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Entity
build()
Entity
buildPartial()
Entity.Builder
clear()
Entity.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Entity.Builder
clearMentions()
The mentions of this entity in the input document.Entity.Builder
clearMetadata()
Entity.Builder
clearName()
The representative name for the entity.Entity.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Entity.Builder
clearSalience()
The salience score associated with the entity in the [0, 1.0] range.Entity.Builder
clearSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.Entity.Builder
clearType()
The entity type.Entity.Builder
clone()
boolean
containsMetadata(String key)
Metadata associated with the entity.Entity
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
EntityMention
getMentions(int index)
The mentions of this entity in the input document.EntityMention.Builder
getMentionsBuilder(int index)
The mentions of this entity in the input document.List<EntityMention.Builder>
getMentionsBuilderList()
The mentions of this entity in the input document.int
getMentionsCount()
The mentions of this entity in the input document.List<EntityMention>
getMentionsList()
The mentions of this entity in the input document.EntityMentionOrBuilder
getMentionsOrBuilder(int index)
The mentions of this entity in the input document.List<? extends EntityMentionOrBuilder>
getMentionsOrBuilderList()
The mentions of this entity in the input document.Map<String,String>
getMetadata()
Deprecated.int
getMetadataCount()
Metadata associated with the entity.Map<String,String>
getMetadataMap()
Metadata associated with the entity.String
getMetadataOrDefault(String key, String defaultValue)
Metadata associated with the entity.String
getMetadataOrThrow(String key)
Metadata associated with the entity.Map<String,String>
getMutableMetadata()
Deprecated.String
getName()
The representative name for the entity.com.google.protobuf.ByteString
getNameBytes()
The representative name for the entity.float
getSalience()
The salience score associated with the entity in the [0, 1.0] range.Sentiment
getSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.Sentiment.Builder
getSentimentBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.SentimentOrBuilder
getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.Entity.Type
getType()
The entity type.int
getTypeValue()
The entity type.boolean
hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
Entity.Builder
mergeFrom(Entity other)
Entity.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Entity.Builder
mergeFrom(com.google.protobuf.Message other)
Entity.Builder
mergeSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.Entity.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Entity.Builder
putAllMetadata(Map<String,String> values)
Metadata associated with the entity.Entity.Builder
putMetadata(String key, String value)
Metadata associated with the entity.Entity.Builder
removeMentions(int index)
The mentions of this entity in the input document.Entity.Builder
removeMetadata(String key)
Metadata associated with the entity.Entity.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Entity.Builder
setMentions(int index, EntityMention value)
The mentions of this entity in the input document.Entity.Builder
setMentions(int index, EntityMention.Builder builderForValue)
The mentions of this entity in the input document.Entity.Builder
setName(String value)
The representative name for the entity.Entity.Builder
setNameBytes(com.google.protobuf.ByteString value)
The representative name for the entity.Entity.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Entity.Builder
setSalience(float value)
The salience score associated with the entity in the [0, 1.0] range.Entity.Builder
setSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.Entity.Builder
setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.Entity.Builder
setType(Entity.Type value)
The entity type.Entity.Builder
setTypeValue(int value)
The entity type.Entity.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
clear
public Entity.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
getDefaultInstanceForType
public Entity getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Entity build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Entity buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Entity.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
setField
public Entity.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
clearField
public Entity.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
clearOneof
public Entity.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
setRepeatedField
public Entity.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
addRepeatedField
public Entity.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
mergeFrom
public Entity.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Entity.Builder>
-
mergeFrom
public Entity.Builder mergeFrom(Entity other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
mergeFrom
public Entity.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Entity.Builder>
- Throws:
IOException
-
getName
public String getName()
The representative name for the entity.
string name = 1;
- Specified by:
getName
in interfaceEntityOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
The representative name for the entity.
string name = 1;
- Specified by:
getNameBytes
in interfaceEntityOrBuilder
- Returns:
- The bytes for name.
-
setName
public Entity.Builder setName(String value)
The representative name for the entity.
string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Entity.Builder clearName()
The representative name for the entity.
string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
public Entity.Builder setNameBytes(com.google.protobuf.ByteString value)
The representative name for the entity.
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getTypeValue
public int getTypeValue()
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
- Specified by:
getTypeValue
in interfaceEntityOrBuilder
- Returns:
- The enum numeric value on the wire for type.
-
setTypeValue
public Entity.Builder setTypeValue(int value)
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
- Parameters:
value
- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
getType
public Entity.Type getType()
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
- Specified by:
getType
in interfaceEntityOrBuilder
- Returns:
- The type.
-
setType
public Entity.Builder setType(Entity.Type value)
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
- Parameters:
value
- The type to set.- Returns:
- This builder for chaining.
-
clearType
public Entity.Builder clearType()
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
- Returns:
- This builder for chaining.
-
getMetadataCount
public int getMetadataCount()
Description copied from interface:EntityOrBuilder
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
- Specified by:
getMetadataCount
in interfaceEntityOrBuilder
-
containsMetadata
public boolean containsMetadata(String key)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
- Specified by:
containsMetadata
in interfaceEntityOrBuilder
-
getMetadata
@Deprecated public Map<String,String> getMetadata()
Deprecated.UsegetMetadataMap()
instead.- Specified by:
getMetadata
in interfaceEntityOrBuilder
-
getMetadataMap
public Map<String,String> getMetadataMap()
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
- Specified by:
getMetadataMap
in interfaceEntityOrBuilder
-
getMetadataOrDefault
public String getMetadataOrDefault(String key, String defaultValue)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
- Specified by:
getMetadataOrDefault
in interfaceEntityOrBuilder
-
getMetadataOrThrow
public String getMetadataOrThrow(String key)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
- Specified by:
getMetadataOrThrow
in interfaceEntityOrBuilder
-
clearMetadata
public Entity.Builder clearMetadata()
-
removeMetadata
public Entity.Builder removeMetadata(String key)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
-
getMutableMetadata
@Deprecated public Map<String,String> getMutableMetadata()
Deprecated.Use alternate mutation accessors instead.
-
putMetadata
public Entity.Builder putMetadata(String key, String value)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
-
putAllMetadata
public Entity.Builder putAllMetadata(Map<String,String> values)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
-
getSalience
public float getSalience()
The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
float salience = 4;
- Specified by:
getSalience
in interfaceEntityOrBuilder
- Returns:
- The salience.
-
setSalience
public Entity.Builder setSalience(float value)
The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
float salience = 4;
- Parameters:
value
- The salience to set.- Returns:
- This builder for chaining.
-
clearSalience
public Entity.Builder clearSalience()
The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
float salience = 4;
- Returns:
- This builder for chaining.
-
getMentionsList
public List<EntityMention> getMentionsList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
- Specified by:
getMentionsList
in interfaceEntityOrBuilder
-
getMentionsCount
public int getMentionsCount()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
- Specified by:
getMentionsCount
in interfaceEntityOrBuilder
-
getMentions
public EntityMention getMentions(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
- Specified by:
getMentions
in interfaceEntityOrBuilder
-
setMentions
public Entity.Builder setMentions(int index, EntityMention value)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
setMentions
public Entity.Builder setMentions(int index, EntityMention.Builder builderForValue)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
addMentions
public Entity.Builder addMentions(EntityMention value)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
addMentions
public Entity.Builder addMentions(int index, EntityMention value)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
addMentions
public Entity.Builder addMentions(EntityMention.Builder builderForValue)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
addMentions
public Entity.Builder addMentions(int index, EntityMention.Builder builderForValue)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
addAllMentions
public Entity.Builder addAllMentions(Iterable<? extends EntityMention> values)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
clearMentions
public Entity.Builder clearMentions()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
removeMentions
public Entity.Builder removeMentions(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
getMentionsBuilder
public EntityMention.Builder getMentionsBuilder(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
getMentionsOrBuilder
public EntityMentionOrBuilder getMentionsOrBuilder(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
- Specified by:
getMentionsOrBuilder
in interfaceEntityOrBuilder
-
getMentionsOrBuilderList
public List<? extends EntityMentionOrBuilder> getMentionsOrBuilderList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
- Specified by:
getMentionsOrBuilderList
in interfaceEntityOrBuilder
-
addMentionsBuilder
public EntityMention.Builder addMentionsBuilder()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
addMentionsBuilder
public EntityMention.Builder addMentionsBuilder(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
getMentionsBuilderList
public List<EntityMention.Builder> getMentionsBuilderList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
-
hasSentiment
public boolean hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
- Specified by:
hasSentiment
in interfaceEntityOrBuilder
- Returns:
- Whether the sentiment field is set.
-
getSentiment
public Sentiment getSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
- Specified by:
getSentiment
in interfaceEntityOrBuilder
- Returns:
- The sentiment.
-
setSentiment
public Entity.Builder setSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
-
setSentiment
public Entity.Builder setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
-
mergeSentiment
public Entity.Builder mergeSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
-
clearSentiment
public Entity.Builder clearSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
-
getSentimentBuilder
public Sentiment.Builder getSentimentBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
-
getSentimentOrBuilder
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
- Specified by:
getSentimentOrBuilder
in interfaceEntityOrBuilder
-
setUnknownFields
public final Entity.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
mergeUnknownFields
public final Entity.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
-
-