Package com.google.cloud.language.v1
Class EntityMention.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
com.google.cloud.language.v1.EntityMention.Builder
- All Implemented Interfaces:
EntityMentionOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- EntityMention
public static final class EntityMention.Builder
extends com.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
implements EntityMentionOrBuilder
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.Protobuf type
google.cloud.language.v1.EntityMention-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()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 sentiment expressed for this mention of the entity in the provided document.The mention text.The type of the entity mention.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorFor 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 sentiment expressed for this mention of the entity in the provided document.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 sentiment expressed for this mention of the entity in the provided document.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 sentiment expressed for this mention of the entity in the provided document.getText()The mention text.The mention text.The mention text.getType()The type of the entity mention.intThe type of the entity mention.booleanFor 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 sentiment expressed for this mention of the entity in the provided document.booleanhasText()The mention text.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(EntityMention other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) 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 sentiment expressed for this mention of the entity in the provided document.The mention text.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 sentiment expressed for this mention of the entity in the provided document.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 sentiment expressed for this mention of the entity in the provided document.The mention text.setText(TextSpan.Builder builderForValue) The mention text.setType(EntityMention.Type value) The type of the entity mention.setTypeValue(int value) The type of the entity mention.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<EntityMention.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
-
mergeFrom
public EntityMention.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<EntityMention.Builder>- Throws:
IOException
-
hasText
public boolean hasText()The mention text.
.google.cloud.language.v1.TextSpan text = 1;- Specified by:
hasTextin interfaceEntityMentionOrBuilder- Returns:
- Whether the text field is set.
-
getText
The mention text.
.google.cloud.language.v1.TextSpan text = 1;- Specified by:
getTextin interfaceEntityMentionOrBuilder- Returns:
- The text.
-
setText
The mention text.
.google.cloud.language.v1.TextSpan text = 1; -
setText
The mention text.
.google.cloud.language.v1.TextSpan text = 1; -
mergeText
The mention text.
.google.cloud.language.v1.TextSpan text = 1; -
clearText
The mention text.
.google.cloud.language.v1.TextSpan text = 1; -
getTextBuilder
The mention text.
.google.cloud.language.v1.TextSpan text = 1; -
getTextOrBuilder
The mention text.
.google.cloud.language.v1.TextSpan text = 1;- Specified by:
getTextOrBuilderin interfaceEntityMentionOrBuilder
-
getTypeValue
public int getTypeValue()The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;- Specified by:
getTypeValuein interfaceEntityMentionOrBuilder- Returns:
- The enum numeric value on the wire for type.
-
setTypeValue
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
getType
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;- Specified by:
getTypein interfaceEntityMentionOrBuilder- Returns:
- The type.
-
setType
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;- Returns:
- This builder for chaining.
-
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;- Specified by:
hasSentimentin interfaceEntityMentionOrBuilder- Returns:
- Whether the sentiment field is set.
-
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;- Specified by:
getSentimentin interfaceEntityMentionOrBuilder- Returns:
- The sentiment.
-
setSentiment
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3; -
setSentiment
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3; -
mergeSentiment
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3; -
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3; -
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3; -
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;- Specified by:
getSentimentOrBuilderin interfaceEntityMentionOrBuilder
-