Class EntityType.Builder (4.61.0)

public static final class EntityType.Builder extends GeneratedMessageV3.Builder<EntityType.Builder> implements EntityTypeOrBuilder

Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted.

Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent.

For more information, see the Entity guide.

Protobuf type google.cloud.dialogflow.v2beta1.EntityType

Implements

EntityTypeOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllEntities(Iterable<? extends EntityType.Entity> values)

public EntityType.Builder addAllEntities(Iterable<? extends EntityType.Entity> values)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2beta1.EntityType.Entity>
Returns
Type Description
EntityType.Builder

addEntities(EntityType.Entity value)

public EntityType.Builder addEntities(EntityType.Entity value)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value EntityType.Entity
Returns
Type Description
EntityType.Builder

addEntities(EntityType.Entity.Builder builderForValue)

public EntityType.Builder addEntities(EntityType.Entity.Builder builderForValue)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue EntityType.Entity.Builder
Returns
Type Description
EntityType.Builder

addEntities(int index, EntityType.Entity value)

public EntityType.Builder addEntities(int index, EntityType.Entity value)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value EntityType.Entity
Returns
Type Description
EntityType.Builder

addEntities(int index, EntityType.Entity.Builder builderForValue)

public EntityType.Builder addEntities(int index, EntityType.Entity.Builder builderForValue)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue EntityType.Entity.Builder
Returns
Type Description
EntityType.Builder

addEntitiesBuilder()

public EntityType.Entity.Builder addEntitiesBuilder()

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EntityType.Entity.Builder

addEntitiesBuilder(int index)

public EntityType.Entity.Builder addEntitiesBuilder(int index)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
EntityType.Entity.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EntityType.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
EntityType.Builder
Overrides

build()

public EntityType build()
Returns
Type Description
EntityType

buildPartial()

public EntityType buildPartial()
Returns
Type Description
EntityType

clear()

public EntityType.Builder clear()
Returns
Type Description
EntityType.Builder
Overrides

clearAutoExpansionMode()

public EntityType.Builder clearAutoExpansionMode()

Optional. Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EntityType.Builder

This builder for chaining.

clearDisplayName()

public EntityType.Builder clearDisplayName()

Required. The name of the entity type.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
EntityType.Builder

This builder for chaining.

clearEnableFuzzyExtraction()

public EntityType.Builder clearEnableFuzzyExtraction()

Optional. Enables fuzzy entity extraction during classification.

bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EntityType.Builder

This builder for chaining.

clearEntities()

public EntityType.Builder clearEntities()

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EntityType.Builder

clearField(Descriptors.FieldDescriptor field)

public EntityType.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
EntityType.Builder
Overrides

clearKind()

public EntityType.Builder clearKind()

Required. Indicates the kind of entity type.

.google.cloud.dialogflow.v2beta1.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
EntityType.Builder

This builder for chaining.

clearName()

public EntityType.Builder clearName()

The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>

string name = 1;

Returns
Type Description
EntityType.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public EntityType.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
EntityType.Builder
Overrides

clone()

public EntityType.Builder clone()
Returns
Type Description
EntityType.Builder
Overrides

getAutoExpansionMode()

public EntityType.AutoExpansionMode getAutoExpansionMode()

Optional. Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EntityType.AutoExpansionMode

The autoExpansionMode.

getAutoExpansionModeValue()

public int getAutoExpansionModeValue()

Optional. Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for autoExpansionMode.

getDefaultInstanceForType()

public EntityType getDefaultInstanceForType()
Returns
Type Description
EntityType

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The name of the entity type.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of the entity type.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getEnableFuzzyExtraction()

public boolean getEnableFuzzyExtraction()

Optional. Enables fuzzy entity extraction during classification.

bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The enableFuzzyExtraction.

getEntities(int index)

public EntityType.Entity getEntities(int index)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
EntityType.Entity

getEntitiesBuilder(int index)

public EntityType.Entity.Builder getEntitiesBuilder(int index)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
EntityType.Entity.Builder

getEntitiesBuilderList()

public List<EntityType.Entity.Builder> getEntitiesBuilderList()

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getEntitiesCount()

public int getEntitiesCount()

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getEntitiesList()

public List<EntityType.Entity> getEntitiesList()

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Entity>

getEntitiesOrBuilder(int index)

public EntityType.EntityOrBuilder getEntitiesOrBuilder(int index)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
EntityType.EntityOrBuilder

getEntitiesOrBuilderList()

public List<? extends EntityType.EntityOrBuilder> getEntitiesOrBuilderList()

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2beta1.EntityType.EntityOrBuilder>

getKind()

public EntityType.Kind getKind()

Required. Indicates the kind of entity type.

.google.cloud.dialogflow.v2beta1.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
EntityType.Kind

The kind.

getKindValue()

public int getKindValue()

Required. Indicates the kind of entity type.

.google.cloud.dialogflow.v2beta1.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for kind.

getName()

public String getName()

The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(EntityType other)

public EntityType.Builder mergeFrom(EntityType other)
Parameter
Name Description
other EntityType
Returns
Type Description
EntityType.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EntityType.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public EntityType.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
EntityType.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EntityType.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
EntityType.Builder
Overrides

removeEntities(int index)

public EntityType.Builder removeEntities(int index)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
EntityType.Builder

setAutoExpansionMode(EntityType.AutoExpansionMode value)

public EntityType.Builder setAutoExpansionMode(EntityType.AutoExpansionMode value)

Optional. Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value EntityType.AutoExpansionMode

The autoExpansionMode to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setAutoExpansionModeValue(int value)

public EntityType.Builder setAutoExpansionModeValue(int value)

Optional. Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for autoExpansionMode to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setDisplayName(String value)

public EntityType.Builder setDisplayName(String value)

Required. The name of the entity type.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public EntityType.Builder setDisplayNameBytes(ByteString value)

Required. The name of the entity type.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setEnableFuzzyExtraction(boolean value)

public EntityType.Builder setEnableFuzzyExtraction(boolean value)

Optional. Enables fuzzy entity extraction during classification.

bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The enableFuzzyExtraction to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setEntities(int index, EntityType.Entity value)

public EntityType.Builder setEntities(int index, EntityType.Entity value)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value EntityType.Entity
Returns
Type Description
EntityType.Builder

setEntities(int index, EntityType.Entity.Builder builderForValue)

public EntityType.Builder setEntities(int index, EntityType.Entity.Builder builderForValue)

Optional. The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.v2beta1.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue EntityType.Entity.Builder
Returns
Type Description
EntityType.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public EntityType.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
EntityType.Builder
Overrides

setKind(EntityType.Kind value)

public EntityType.Builder setKind(EntityType.Kind value)

Required. Indicates the kind of entity type.

.google.cloud.dialogflow.v2beta1.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value EntityType.Kind

The kind to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setKindValue(int value)

public EntityType.Builder setKindValue(int value)

Required. Indicates the kind of entity type.

.google.cloud.dialogflow.v2beta1.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for kind to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setName(String value)

public EntityType.Builder setName(String value)

The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setNameBytes(ByteString value)

public EntityType.Builder setNameBytes(ByteString value)

The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
EntityType.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public EntityType.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
EntityType.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final EntityType.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
EntityType.Builder
Overrides