/** * * * <pre> * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * </pre> * * <code>repeated .google.cloud.language.v1.EntityMention mentions = 5;</code> */ public Builder addMentions( int index, com.google.cloud.language.v1.EntityMention.Builder builderForValue) { if (mentionsBuilder_ == null) { ensureMentionsIsMutable(); mentions_.add(index, builderForValue.build()); onChanged(); } else { mentionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * 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. * </pre> * * <code>.google.cloud.language.v1.Sentiment sentiment = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.Sentiment, com.google.cloud.language.v1.Sentiment.Builder, com.google.cloud.language.v1.SentimentOrBuilder> getSentimentFieldBuilder() { if (sentimentBuilder_ == null) { sentimentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.Sentiment, com.google.cloud.language.v1.Sentiment.Builder, com.google.cloud.language.v1.SentimentOrBuilder>( getSentiment(), getParentForChildren(), isClean()); sentiment_ = null; } return sentimentBuilder_; }
/** * * * <pre> * 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. * </pre> * * <code>.google.cloud.language.v1.Sentiment sentiment = 3;</code> */ public com.google.cloud.language.v1.Sentiment.Builder getSentimentBuilder() { onChanged(); return getSentimentFieldBuilder().getBuilder(); } /**
/** * * * <pre> * 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. * </pre> * * <code>.google.cloud.language.v1.Sentiment sentiment = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.Sentiment, com.google.cloud.language.v1.Sentiment.Builder, com.google.cloud.language.v1.SentimentOrBuilder> getSentimentFieldBuilder() { if (sentimentBuilder_ == null) { sentimentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.Sentiment, com.google.cloud.language.v1.Sentiment.Builder, com.google.cloud.language.v1.SentimentOrBuilder>( getSentiment(), getParentForChildren(), isClean()); sentiment_ = null; } return sentimentBuilder_; }
/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.TextSpan, com.google.cloud.language.v1.TextSpan.Builder, com.google.cloud.language.v1.TextSpanOrBuilder> getTextFieldBuilder() { if (textBuilder_ == null) { textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.TextSpan, com.google.cloud.language.v1.TextSpan.Builder, com.google.cloud.language.v1.TextSpanOrBuilder>( getText(), getParentForChildren(), isClean()); text_ = null; } return textBuilder_; }
/** * * * <pre> * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * </pre> * * <code>repeated .google.cloud.language.v1.EntityMention mentions = 5;</code> */ public Builder addMentions(com.google.cloud.language.v1.EntityMention.Builder builderForValue) { if (mentionsBuilder_ == null) { ensureMentionsIsMutable(); mentions_.add(builderForValue.build()); onChanged(); } else { mentionsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * </pre> * * <code>repeated .google.cloud.language.v1.EntityMention mentions = 5;</code> */ public Builder addMentions( int index, com.google.cloud.language.v1.EntityMention.Builder builderForValue) { if (mentionsBuilder_ == null) { ensureMentionsIsMutable(); mentions_.add(index, builderForValue.build()); onChanged(); } else { mentionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * </pre> * * <code>repeated .google.cloud.language.v1.EntityMention mentions = 5;</code> */ public Builder setMentions( int index, com.google.cloud.language.v1.EntityMention.Builder builderForValue) { if (mentionsBuilder_ == null) { ensureMentionsIsMutable(); mentions_.set(index, builderForValue.build()); onChanged(); } else { mentionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * 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. * </pre> * * <code>.google.cloud.language.v1.Sentiment sentiment = 3;</code> */ public com.google.cloud.language.v1.Sentiment.Builder getSentimentBuilder() { onChanged(); return getSentimentFieldBuilder().getBuilder(); } /**
/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public com.google.cloud.language.v1.TextSpan.Builder getTextBuilder() { onChanged(); return getTextFieldBuilder().getBuilder(); } /**
private Builder() { maybeForceBuilderInitialization(); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public com.google.cloud.language.v1.EntityMention build() { com.google.cloud.language.v1.EntityMention result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.TextSpan, com.google.cloud.language.v1.TextSpan.Builder, com.google.cloud.language.v1.TextSpanOrBuilder> getTextFieldBuilder() { if (textBuilder_ == null) { textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.language.v1.TextSpan, com.google.cloud.language.v1.TextSpan.Builder, com.google.cloud.language.v1.TextSpanOrBuilder>( getText(), getParentForChildren(), isClean()); text_ = null; } return textBuilder_; }
/** * * * <pre> * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * </pre> * * <code>repeated .google.cloud.language.v1.EntityMention mentions = 5;</code> */ public Builder setMentions( int index, com.google.cloud.language.v1.EntityMention.Builder builderForValue) { if (mentionsBuilder_ == null) { ensureMentionsIsMutable(); mentions_.set(index, builderForValue.build()); onChanged(); } else { mentionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * </pre> * * <code>repeated .google.cloud.language.v1.EntityMention mentions = 5;</code> */ public Builder addMentions(com.google.cloud.language.v1.EntityMention.Builder builderForValue) { if (mentionsBuilder_ == null) { ensureMentionsIsMutable(); mentions_.add(builderForValue.build()); onChanged(); } else { mentionsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public com.google.cloud.language.v1.TextSpan.Builder getTextBuilder() { onChanged(); return getTextFieldBuilder().getBuilder(); } /**