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.GeneratedMessageV3.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.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.v1.EntityMention
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityMention.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
EntityMention
build()
EntityMention
buildPartial()
EntityMention.Builder
clear()
EntityMention.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
EntityMention.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
EntityMention.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 sentiment expressed for this mention of the entity in the provided document.EntityMention.Builder
clearText()
The mention text.EntityMention.Builder
clearType()
The type of the entity mention.EntityMention.Builder
clone()
EntityMention
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
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 sentiment expressed for this mention of the 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 sentiment expressed for this mention of the 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 sentiment expressed for this mention of the entity in the provided document.TextSpan
getText()
The mention text.TextSpan.Builder
getTextBuilder()
The mention text.TextSpanOrBuilder
getTextOrBuilder()
The mention text.EntityMention.Type
getType()
The type of the entity mention.int
getTypeValue()
The type of the entity mention.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.boolean
hasText()
The mention text.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
EntityMention.Builder
mergeFrom(EntityMention other)
EntityMention.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
EntityMention.Builder
mergeFrom(com.google.protobuf.Message other)
EntityMention.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 sentiment expressed for this mention of the entity in the provided document.EntityMention.Builder
mergeText(TextSpan value)
The mention text.EntityMention.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
EntityMention.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
EntityMention.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
EntityMention.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 sentiment expressed for this mention of the entity in the provided document.EntityMention.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 sentiment expressed for this mention of the entity in the provided document.EntityMention.Builder
setText(TextSpan value)
The mention text.EntityMention.Builder
setText(TextSpan.Builder builderForValue)
The mention text.EntityMention.Builder
setType(EntityMention.Type value)
The type of the entity mention.EntityMention.Builder
setTypeValue(int value)
The type of the entity mention.EntityMention.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, 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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
clear
public EntityMention.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<EntityMention.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<EntityMention.Builder>
-
getDefaultInstanceForType
public EntityMention getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public EntityMention build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public EntityMention buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public EntityMention.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<EntityMention.Builder>
-
setField
public EntityMention.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<EntityMention.Builder>
-
clearField
public EntityMention.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<EntityMention.Builder>
-
clearOneof
public EntityMention.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<EntityMention.Builder>
-
setRepeatedField
public EntityMention.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<EntityMention.Builder>
-
addRepeatedField
public EntityMention.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<EntityMention.Builder>
-
mergeFrom
public EntityMention.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<EntityMention.Builder>
-
mergeFrom
public EntityMention.Builder mergeFrom(EntityMention other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
hasText
in interfaceEntityMentionOrBuilder
- Returns:
- Whether the text field is set.
-
getText
public TextSpan getText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
- Specified by:
getText
in interfaceEntityMentionOrBuilder
- Returns:
- The text.
-
setText
public EntityMention.Builder setText(TextSpan value)
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
-
setText
public EntityMention.Builder setText(TextSpan.Builder builderForValue)
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
-
mergeText
public EntityMention.Builder mergeText(TextSpan value)
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
-
clearText
public EntityMention.Builder clearText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
-
getTextBuilder
public TextSpan.Builder getTextBuilder()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
-
getTextOrBuilder
public TextSpanOrBuilder getTextOrBuilder()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
- Specified by:
getTextOrBuilder
in interfaceEntityMentionOrBuilder
-
getTypeValue
public int getTypeValue()
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
- Specified by:
getTypeValue
in 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.v1.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.v1.EntityMention.Type type = 2;
- Specified by:
getType
in interfaceEntityMentionOrBuilder
- Returns:
- The type.
-
setType
public EntityMention.Builder setType(EntityMention.Type value)
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
public EntityMention.Builder 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:
hasSentiment
in 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.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:
getSentiment
in 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.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
public EntityMention.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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
-
mergeSentiment
public EntityMention.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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
-
clearSentiment
public EntityMention.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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
-
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
-
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 sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
- Specified by:
getSentimentOrBuilder
in interfaceEntityMentionOrBuilder
-
setUnknownFields
public final EntityMention.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
mergeUnknownFields
public final EntityMention.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<EntityMention.Builder>
-
-