Class EntityMention.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
- com.google.cloud.language.v1beta2.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.GeneratedMessageV3.Builder<EntityMention.Builder> implements EntityMentionOrBuilder
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.
Protobuf typegoogle.cloud.language.v1beta2.EntityMention
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityMention.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)EntityMentionbuild()EntityMentionbuildPartial()EntityMention.Builderclear()EntityMention.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)EntityMention.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)EntityMention.BuilderclearSentiment()For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.EntityMention.BuilderclearText()The mention text.EntityMention.BuilderclearType()The type of the entity mention.EntityMention.Builderclone()EntityMentiongetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()SentimentgetSentiment()For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.Sentiment.BuildergetSentimentBuilder()For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.SentimentOrBuildergetSentimentOrBuilder()For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.TextSpangetText()The mention text.TextSpan.BuildergetTextBuilder()The mention text.TextSpanOrBuildergetTextOrBuilder()The mention text.EntityMention.TypegetType()The type of the entity mention.intgetTypeValue()The type of the entity mention.booleanhasSentiment()For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()EntityMention.BuildermergeFrom(EntityMention other)EntityMention.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)EntityMention.BuildermergeFrom(com.google.protobuf.Message other)EntityMention.BuildermergeSentiment(Sentiment value)For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.EntityMention.BuildermergeText(TextSpan value)The mention text.EntityMention.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)EntityMention.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)EntityMention.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)EntityMention.BuildersetSentiment(Sentiment value)For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.EntityMention.BuildersetSentiment(Sentiment.Builder builderForValue)For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.EntityMention.BuildersetText(TextSpan value)The mention text.EntityMention.BuildersetText(TextSpan.Builder builderForValue)The mention text.EntityMention.BuildersetType(EntityMention.Type value)The type of the entity mention.EntityMention.BuildersetTypeValue(int value)The type of the entity mention.EntityMention.BuildersetUnknownFields(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, internalGetMapField, internalGetMutableMapField, 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()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
clear
public EntityMention.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<EntityMention.Builder>
-
getDefaultInstanceForType
public EntityMention getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public EntityMention build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public EntityMention buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public EntityMention.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
setField
public EntityMention.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
clearField
public EntityMention.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
clearOneof
public EntityMention.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
setRepeatedField
public EntityMention.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
addRepeatedField
public EntityMention.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
mergeFrom
public EntityMention.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<EntityMention.Builder>
-
mergeFrom
public EntityMention.Builder mergeFrom(EntityMention other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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.v1beta2.TextSpan text = 1;- Specified by:
hasTextin interfaceEntityMentionOrBuilder- Returns:
- Whether the text field is set.
-
getText
public TextSpan getText()
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;- Specified by:
getTextin interfaceEntityMentionOrBuilder- Returns:
- The text.
-
setText
public EntityMention.Builder setText(TextSpan value)
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;
-
setText
public EntityMention.Builder setText(TextSpan.Builder builderForValue)
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;
-
mergeText
public EntityMention.Builder mergeText(TextSpan value)
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;
-
clearText
public EntityMention.Builder clearText()
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;
-
getTextBuilder
public TextSpan.Builder getTextBuilder()
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;
-
getTextOrBuilder
public TextSpanOrBuilder getTextOrBuilder()
The mention text.
.google.cloud.language.v1beta2.TextSpan text = 1;- Specified by:
getTextOrBuilderin interfaceEntityMentionOrBuilder
-
getTypeValue
public int getTypeValue()
The type of the entity mention.
.google.cloud.language.v1beta2.EntityMention.Type type = 2;- Specified by:
getTypeValuein interfaceEntityMentionOrBuilder- Returns:
- The enum numeric value on the wire for type.
-
setTypeValue
public EntityMention.Builder setTypeValue(int value)
The type of the entity mention.
.google.cloud.language.v1beta2.EntityMention.Type type = 2;- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
getType
public EntityMention.Type getType()
The type of the entity mention.
.google.cloud.language.v1beta2.EntityMention.Type type = 2;- Specified by:
getTypein interfaceEntityMentionOrBuilder- Returns:
- The type.
-
setType
public EntityMention.Builder setType(EntityMention.Type value)
The type of the entity mention.
.google.cloud.language.v1beta2.EntityMention.Type type = 2;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
public EntityMention.Builder clearType()
The type of the entity mention.
.google.cloud.language.v1beta2.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.v1beta2.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.v1beta2.Sentiment sentiment = 3;- Specified by:
hasSentimentin interfaceEntityMentionOrBuilder- 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.v1beta2.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.v1beta2.Sentiment sentiment = 3;- Specified by:
getSentimentin interfaceEntityMentionOrBuilder- Returns:
- The sentiment.
-
setSentiment
public EntityMention.Builder setSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;
-
setSentiment
public EntityMention.Builder setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;
-
mergeSentiment
public EntityMention.Builder mergeSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;
-
clearSentiment
public EntityMention.Builder clearSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;
-
getSentimentBuilder
public Sentiment.Builder getSentimentBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;
-
getSentimentOrBuilder
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;- Specified by:
getSentimentOrBuilderin interfaceEntityMentionOrBuilder
-
setUnknownFields
public final EntityMention.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
mergeUnknownFields
public final EntityMention.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
-