Class EntityType (0.52.0)

public final class EntityType extends GeneratedMessageV3 implements EntityTypeOrBuilder

Entities are extracted from user input and represent parameters that are meaningful to your application. For example, a date range, a proper name such as a geographic location or landmark, and so on. Entities represent actionable data for your application.

When you define an entity, you can also include synonyms that all map to that entity. For example, "soft drink", "soda", "pop", and so on.

There are three types of entities:

  • System - entities that are defined by the Dialogflow API for common data types such as date, time, currency, and so on. A system entity is represented by the EntityType type.

  • Custom - entities that are defined by you that represent actionable data that is meaningful to your application. For example, you could define a pizza.sauce entity for red or white pizza sauce, a pizza.cheese entity for the different types of cheese on a pizza, a pizza.topping entity for different toppings, and so on. A custom entity is represented by the EntityType type.

  • User - entities that are built for an individual user such as favorites, preferences, playlists, and so on. A user entity is represented by the SessionEntityType type.

    For more information about entity types, see the Dialogflow documentation.

Protobuf type google.cloud.dialogflow.cx.v3.EntityType

Implements

EntityTypeOrBuilder

Static Fields

AUTO_EXPANSION_MODE_FIELD_NUMBER

public static final int AUTO_EXPANSION_MODE_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER

public static final int ENABLE_FUZZY_EXTRACTION_FIELD_NUMBER
Field Value
TypeDescription
int

ENTITIES_FIELD_NUMBER

public static final int ENTITIES_FIELD_NUMBER
Field Value
TypeDescription
int

EXCLUDED_PHRASES_FIELD_NUMBER

public static final int EXCLUDED_PHRASES_FIELD_NUMBER
Field Value
TypeDescription
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

REDACT_FIELD_NUMBER

public static final int REDACT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static EntityType getDefaultInstance()
Returns
TypeDescription
EntityType

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static EntityType.Builder newBuilder()
Returns
TypeDescription
EntityType.Builder

newBuilder(EntityType prototype)

public static EntityType.Builder newBuilder(EntityType prototype)
Parameter
NameDescription
prototypeEntityType
Returns
TypeDescription
EntityType.Builder

parseDelimitedFrom(InputStream input)

public static EntityType parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityType parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static EntityType parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EntityType parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EntityType parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static EntityType parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static EntityType parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EntityType parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityType
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<EntityType> parser()
Returns
TypeDescription
Parser<EntityType>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAutoExpansionMode()

public EntityType.AutoExpansionMode getAutoExpansionMode()

Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4;

Returns
TypeDescription
EntityType.AutoExpansionMode

The autoExpansionMode.

getAutoExpansionModeValue()

public int getAutoExpansionModeValue()

Indicates whether the entity type can be automatically expanded.

.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode auto_expansion_mode = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for autoExpansionMode.

getDefaultInstanceForType()

public EntityType getDefaultInstanceForType()
Returns
TypeDescription
EntityType

getDisplayName()

public String getDisplayName()

Required. The human-readable name of the entity type, unique within the agent.

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

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The human-readable name of the entity type, unique within the agent.

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

Returns
TypeDescription
ByteString

The bytes for displayName.

getEnableFuzzyExtraction()

public boolean getEnableFuzzyExtraction()

Enables fuzzy entity extraction during classification.

bool enable_fuzzy_extraction = 7;

Returns
TypeDescription
boolean

The enableFuzzyExtraction.

getEntities(int index)

public EntityType.Entity getEntities(int index)

The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityType.Entity

getEntitiesCount()

public int getEntitiesCount()

The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5;

Returns
TypeDescription
int

getEntitiesList()

public List<EntityType.Entity> getEntitiesList()

The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5;

Returns
TypeDescription
List<Entity>

getEntitiesOrBuilder(int index)

public EntityType.EntityOrBuilder getEntitiesOrBuilder(int index)

The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityType.EntityOrBuilder

getEntitiesOrBuilderList()

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

The collection of entity entries associated with the entity type.

repeated .google.cloud.dialogflow.cx.v3.EntityType.Entity entities = 5;

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

getExcludedPhrases(int index)

public EntityType.ExcludedPhrase getExcludedPhrases(int index)

Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion. If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.

repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityType.ExcludedPhrase

getExcludedPhrasesCount()

public int getExcludedPhrasesCount()

Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion. If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.

repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6;

Returns
TypeDescription
int

getExcludedPhrasesList()

public List<EntityType.ExcludedPhrase> getExcludedPhrasesList()

Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion. If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.

repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6;

Returns
TypeDescription
List<ExcludedPhrase>

getExcludedPhrasesOrBuilder(int index)

public EntityType.ExcludedPhraseOrBuilder getExcludedPhrasesOrBuilder(int index)

Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion. If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.

repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityType.ExcludedPhraseOrBuilder

getExcludedPhrasesOrBuilderList()

public List<? extends EntityType.ExcludedPhraseOrBuilder> getExcludedPhrasesOrBuilderList()

Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion. If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.

repeated .google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase excluded_phrases = 6;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhraseOrBuilder>

getKind()

public EntityType.Kind getKind()

Required. Indicates the kind of entity type.

.google.cloud.dialogflow.cx.v3.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.cx.v3.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. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/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. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type ID>.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<EntityType> getParserForType()
Returns
TypeDescription
Parser<EntityType>
Overrides

getRedact()

public boolean getRedact()

Indicates whether parameters of the entity type should be redacted in log. If redaction is enabled, page parameters and intent parameters referring to the entity type will be replaced by parameter name when logging.

bool redact = 9;

Returns
TypeDescription
boolean

The redact.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public EntityType.Builder newBuilderForType()
Returns
TypeDescription
EntityType.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EntityType.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
EntityType.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public EntityType.Builder toBuilder()
Returns
TypeDescription
EntityType.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException