Class EntityType.Builder (4.7.2)

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.v2.EntityType

Implements

EntityTypeOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.v2.EntityType.Entity>
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueEntityType.Entity
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueEntityType.Entity.Builder
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueEntityType.Entity
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueEntityType.Entity.Builder
Returns
TypeDescription
EntityType.Builder

addEntitiesBuilder()

public EntityType.Entity.Builder addEntitiesBuilder()

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

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

Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityType.Entity.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EntityType.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EntityType.Builder
Overrides

build()

public EntityType build()
Returns
TypeDescription
EntityType

buildPartial()

public EntityType buildPartial()
Returns
TypeDescription
EntityType

clear()

public EntityType.Builder clear()
Returns
TypeDescription
EntityType.Builder
Overrides

clearAutoExpansionMode()

public EntityType.Builder clearAutoExpansionMode()

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

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EntityType.Builder

clearField(Descriptors.FieldDescriptor field)

public EntityType.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
EntityType.Builder
Overrides

clearKind()

public EntityType.Builder clearKind()

Required. Indicates the kind of entity type.

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

Returns
TypeDescription
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. Format: projects/<Project ID>/agent/entityTypes/<Entity Type ID>.

string name = 1;

Returns
TypeDescription
EntityType.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public EntityType.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
EntityType.Builder
Overrides

clone()

public EntityType.Builder clone()
Returns
TypeDescription
EntityType.Builder
Overrides

getAutoExpansionMode()

public EntityType.AutoExpansionMode getAutoExpansionMode()

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

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

Returns
TypeDescription
EntityType.AutoExpansionMode

The autoExpansionMode.

getAutoExpansionModeValue()

public int getAutoExpansionModeValue()

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

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

Returns
TypeDescription
int

The enum numeric value on the wire for autoExpansionMode.

getDefaultInstanceForType()

public EntityType getDefaultInstanceForType()
Returns
TypeDescription
EntityType

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The name of the entity type.

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

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of the entity type.

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

Returns
TypeDescription
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
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Builder>

getEntitiesCount()

public int getEntitiesCount()

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

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

Returns
TypeDescription
int

getEntitiesList()

public List<EntityType.Entity> getEntitiesList()

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

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

Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityType.EntityOrBuilder

getEntitiesOrBuilderList()

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

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

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

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.v2.EntityType.EntityOrBuilder>

getKind()

public EntityType.Kind getKind()

Required. Indicates the kind of entity type.

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

Returns
TypeDescription
EntityType.Kind

The kind.

getKindValue()

public int getKindValue()

Required. Indicates the kind of entity type.

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

Returns
TypeDescription
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. Format: projects/<Project ID>/agent/entityTypes/<Entity Type ID>.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: projects/<Project ID>/agent/entityTypes/<Entity Type ID>.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(EntityType other)

public EntityType.Builder mergeFrom(EntityType other)
Parameter
NameDescription
otherEntityType
Returns
TypeDescription
EntityType.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EntityType.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public EntityType.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EntityType.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EntityType.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueEntityType.AutoExpansionMode

The autoExpansionMode to set.

Returns
TypeDescription
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.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The enableFuzzyExtraction to set.

Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueEntityType.Entity
Returns
TypeDescription
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.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueEntityType.Entity.Builder
Returns
TypeDescription
EntityType.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public EntityType.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EntityType.Builder
Overrides

setKind(EntityType.Kind value)

public EntityType.Builder setKind(EntityType.Kind value)

Required. Indicates the kind of entity type.

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

Parameter
NameDescription
valueEntityType.Kind

The kind to set.

Returns
TypeDescription
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.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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. Format: projects/<Project ID>/agent/entityTypes/<Entity Type ID>.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
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. Format: projects/<Project ID>/agent/entityTypes/<Entity Type ID>.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EntityType.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final EntityType.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EntityType.Builder
Overrides