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
Static Fields
AUTO_EXPANSION_MODE_FIELD_NUMBER
public static final int AUTO_EXPANSION_MODE_FIELD_NUMBER
Field Value
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
public static final int ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER
Field Value
ENTITIES_FIELD_NUMBER
public static final int ENTITIES_FIELD_NUMBER
Field Value
KIND_FIELD_NUMBER
public static final int KIND_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static EntityType getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static EntityType.Builder newBuilder()
Returns
newBuilder(EntityType prototype)
public static EntityType.Builder newBuilder(EntityType prototype)
Parameter
Returns
public static EntityType parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static EntityType parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static EntityType parseFrom(byte[] data)
Parameter
Name |
Description |
data |
byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static EntityType parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static EntityType parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static EntityType parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EntityType parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static EntityType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EntityType parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static EntityType parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static EntityType parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static EntityType parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<EntityType> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
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
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
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.
|
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
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
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
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
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
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()
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
getParserForType()
public Parser<EntityType> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public EntityType.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected EntityType.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public EntityType.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions