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 Type
    Method
    Description
     
     
     
    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.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    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.
    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 mention text.
    The mention text.
    The type of the entity mention.
    int
    The type of the entity mention.
    boolean
    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
    The mention text.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    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.
    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.
    The mention text.
    setText(TextSpan.Builder builderForValue)
    The mention text.
    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, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
    • clear

      public EntityMention.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<EntityMention.Builder>
    • getDefaultInstanceForType

      public EntityMention getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public EntityMention build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public EntityMention buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public EntityMention.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EntityMention.Builder>
    • mergeFrom

      public EntityMention.Builder mergeFrom(EntityMention other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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 interface EntityMentionOrBuilder
      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 interface EntityMentionOrBuilder
      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 interface EntityMentionOrBuilder
    • getTypeValue

      public int getTypeValue()
       The type of the entity mention.
       
      .google.cloud.language.v1.EntityMention.Type type = 2;
      Specified by:
      getTypeValue in interface EntityMentionOrBuilder
      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 interface EntityMentionOrBuilder
      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 interface EntityMentionOrBuilder
      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 interface EntityMentionOrBuilder
      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 interface EntityMentionOrBuilder