Class EntityType (4.12.0)

public final class EntityType extends GeneratedMessageV3 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 Fields

AUTO_EXPANSION_MODE_FIELD_NUMBER

public static final int AUTO_EXPANSION_MODE_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER

public static final int ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER
Field Value
Type Description
int

ENTITIES_FIELD_NUMBER

public static final int ENTITIES_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EntityType getDefaultInstance()
Returns
Type Description
EntityType

getDescriptor()

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

newBuilder()

public static EntityType.Builder newBuilder()
Returns
Type Description
EntityType.Builder

newBuilder(EntityType prototype)

public static EntityType.Builder newBuilder(EntityType prototype)
Parameter
Name Description
prototype EntityType
Returns
Type Description
EntityType.Builder

parseDelimitedFrom(InputStream input)

public static EntityType parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EntityType
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityType parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EntityType parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EntityType parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EntityType parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EntityType
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EntityType parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EntityType
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EntityType parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityType
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EntityType> parser()
Returns
Type Description
Parser<EntityType>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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
Type Description
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
Type Description
int

The enum numeric value on the wire for autoExpansionMode.

getDefaultInstanceForType()

public EntityType getDefaultInstanceForType()
Returns
Type Description
EntityType

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

Parameter
Name Description
index int
Returns
Type Description
EntityType.Entity

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

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

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<EntityType> getParserForType()
Returns
Type Description
Parser<EntityType>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EntityType.Builder newBuilderForType()
Returns
Type Description
EntityType.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EntityType.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EntityType.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public EntityType.Builder toBuilder()
Returns
Type Description
EntityType.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides Exceptions
Type Description
IOException