/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public Builder setText(com.google.cloud.language.v1.TextSpan value) { if (textBuilder_ == null) { if (value == null) { throw new NullPointerException(); } text_ = value; onChanged(); } else { textBuilder_.setMessage(value); } 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 Builder setSentiment(com.google.cloud.language.v1.Sentiment value) { if (sentimentBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sentiment_ = value; onChanged(); } else { sentimentBuilder_.setMessage(value); } 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(); } /**
/** * * * <pre> * The type of the entity mention. * </pre> * * <code>.google.cloud.language.v1.EntityMention.Type type = 2;</code> */ public Builder setType(com.google.cloud.language.v1.EntityMention.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); 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(); } /**
public Builder mergeFrom(com.google.cloud.language.v1.EntityMention other) { if (other == com.google.cloud.language.v1.EntityMention.getDefaultInstance()) return this; if (other.hasText()) { mergeText(other.getText()); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasSentiment()) { mergeSentiment(other.getSentiment()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The type of the entity mention. * </pre> * * <code>.google.cloud.language.v1.EntityMention.Type type = 2;</code> */ public Builder clearType() { type_ = 0; onChanged(); 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(); } /**
/** * * * <pre> * The type of the entity mention. * </pre> * * <code>.google.cloud.language.v1.EntityMention.Type type = 2;</code> */ public Builder setTypeValue(int value) { type_ = value; onChanged(); 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 Builder mergeSentiment(com.google.cloud.language.v1.Sentiment value) { if (sentimentBuilder_ == null) { if (sentiment_ != null) { sentiment_ = com.google.cloud.language.v1.Sentiment.newBuilder(sentiment_) .mergeFrom(value) .buildPartial(); } else { sentiment_ = value; } onChanged(); } else { sentimentBuilder_.mergeFrom(value); } 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 Builder clearSentiment() { if (sentimentBuilder_ == null) { sentiment_ = null; onChanged(); } else { sentiment_ = null; sentimentBuilder_ = null; } return this; } /**
/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public Builder mergeText(com.google.cloud.language.v1.TextSpan value) { if (textBuilder_ == null) { if (text_ != null) { text_ = com.google.cloud.language.v1.TextSpan.newBuilder(text_) .mergeFrom(value) .buildPartial(); } else { text_ = value; } onChanged(); } else { textBuilder_.mergeFrom(value); } 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 Builder setSentiment(com.google.cloud.language.v1.Sentiment.Builder builderForValue) { if (sentimentBuilder_ == null) { sentiment_ = builderForValue.build(); onChanged(); } else { sentimentBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The mention text. * </pre> * * <code>.google.cloud.language.v1.TextSpan text = 1;</code> */ public Builder clearText() { if (textBuilder_ == null) { text_ = null; onChanged(); } else { text_ = null; textBuilder_ = null; } return this; } /**
/** * * * <pre> * The type of the entity mention. * </pre> * * <code>.google.cloud.language.v1.EntityMention.Type type = 2;</code> */ public Builder setType(com.google.cloud.language.v1.EntityMention.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); 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 Builder setText(com.google.cloud.language.v1.TextSpan.Builder builderForValue) { if (textBuilder_ == null) { text_ = builderForValue.build(); onChanged(); } else { textBuilder_.setMessage(builderForValue.build()); } return this; } /**
public Builder mergeFrom(com.google.cloud.language.v1.EntityMention other) { if (other == com.google.cloud.language.v1.EntityMention.getDefaultInstance()) return this; if (other.hasText()) { mergeText(other.getText()); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasSentiment()) { mergeSentiment(other.getSentiment()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The type of the entity mention. * </pre> * * <code>.google.cloud.language.v1.EntityMention.Type type = 2;</code> */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /**
/** * * * <pre> * The type of the entity mention. * </pre> * * <code>.google.cloud.language.v1.EntityMention.Type type = 2;</code> */ public Builder clearType() { type_ = 0; onChanged(); return this; }