/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder clearEntities() { if (entitiesBuilder_ == null) { entities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { entitiesBuilder_.clear(); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder addEntities(com.google.cloud.language.v1.Entity value) { if (entitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntitiesIsMutable(); entities_.add(value); onChanged(); } else { entitiesBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder addEntities(int index, com.google.cloud.language.v1.Entity value) { if (entitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntitiesIsMutable(); entities_.add(index, value); onChanged(); } else { entitiesBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder setEntities( int index, com.google.cloud.language.v1.Entity.Builder builderForValue) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.set(index, builderForValue.build()); onChanged(); } else { entitiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder addEntities(com.google.cloud.language.v1.Entity.Builder builderForValue) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.add(builderForValue.build()); onChanged(); } else { entitiesBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder removeEntities(int index) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.remove(index); onChanged(); } else { entitiesBuilder_.remove(index); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder clearEntities() { if (entitiesBuilder_ == null) { entities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { entitiesBuilder_.clear(); } return this; } /**
/** * * * <pre> * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. * See [Document.language][google.cloud.language.v1.Document.language] field for more details. * </pre> * * <code>string language = 2;</code> */ public Builder setLanguageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); language_ = value; onChanged(); return this; }
/** * * * <pre> * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. * See [Document.language][google.cloud.language.v1.Document.language] field for more details. * </pre> * * <code>string language = 2;</code> */ public Builder setLanguage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } language_ = value; onChanged(); return this; } /**
/** * * * <pre> * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. * See [Document.language][google.cloud.language.v1.Document.language] field for more details. * </pre> * * <code>string language = 2;</code> */ public Builder clearLanguage() { language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder setEntities(int index, com.google.cloud.language.v1.Entity value) { if (entitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntitiesIsMutable(); entities_.set(index, value); onChanged(); } else { entitiesBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder addEntities( int index, com.google.cloud.language.v1.Entity.Builder builderForValue) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.add(index, builderForValue.build()); onChanged(); } else { entitiesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder setEntities( int index, com.google.cloud.language.v1.Entity.Builder builderForValue) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.set(index, builderForValue.build()); onChanged(); } else { entitiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder addAllEntities( java.lang.Iterable<? extends com.google.cloud.language.v1.Entity> values) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entities_); onChanged(); } else { entitiesBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. * See [Document.language][google.cloud.language.v1.Document.language] field for more details. * </pre> * * <code>string language = 2;</code> */ public Builder setLanguage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } language_ = value; onChanged(); return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder removeEntities(int index) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.remove(index); onChanged(); } else { entitiesBuilder_.remove(index); } return this; } /**
/** * * * <pre> * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. * See [Document.language][google.cloud.language.v1.Document.language] field for more details. * </pre> * * <code>string language = 2;</code> */ public Builder setLanguageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); language_ = value; onChanged(); return this; }
/** * * * <pre> * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. * See [Document.language][google.cloud.language.v1.Document.language] field for more details. * </pre> * * <code>string language = 2;</code> */ public Builder clearLanguage() { language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /**
/** * * * <pre> * The recognized entities in the input document. * </pre> * * <code>repeated .google.cloud.language.v1.Entity entities = 1;</code> */ public Builder addEntities(com.google.cloud.language.v1.Entity.Builder builderForValue) { if (entitiesBuilder_ == null) { ensureEntitiesIsMutable(); entities_.add(builderForValue.build()); onChanged(); } else { entitiesBuilder_.addMessage(builderForValue.build()); } return this; } /**