public final class Intent extends GeneratedMessageV3 implements IntentOrBuilder
An intent represents a user's intent to interact with a conversational agent.
You can provide information for the Dialogflow API to use to match user input
to an intent by adding training phrases (i.e., examples of user input) to
your intent.
Protobuf type google.cloud.dialogflow.cx.v3.Intent
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IS_FALLBACK_FIELD_NUMBER
public static final int IS_FALLBACK_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PARAMETERS_FIELD_NUMBER
public static final int PARAMETERS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PRIORITY_FIELD_NUMBER
public static final int PRIORITY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TRAINING_PHRASES_FIELD_NUMBER
public static final int TRAINING_PHRASES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Intent getDefaultInstance()
Returns |
Type |
Description |
Intent |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Intent.Builder newBuilder()
newBuilder(Intent prototype)
public static Intent.Builder newBuilder(Intent prototype)
Parameter |
Name |
Description |
prototype |
Intent
|
public static Intent parseDelimitedFrom(InputStream input)
Returns |
Type |
Description |
Intent |
|
public static Intent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Intent |
|
parseFrom(byte[] data)
public static Intent parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
Returns |
Type |
Description |
Intent |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Intent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Intent |
|
parseFrom(ByteString data)
public static Intent parseFrom(ByteString data)
Returns |
Type |
Description |
Intent |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Intent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Intent |
|
public static Intent parseFrom(CodedInputStream input)
Returns |
Type |
Description |
Intent |
|
public static Intent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Intent |
|
public static Intent parseFrom(InputStream input)
Returns |
Type |
Description |
Intent |
|
public static Intent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Intent |
|
parseFrom(ByteBuffer data)
public static Intent parseFrom(ByteBuffer data)
Returns |
Type |
Description |
Intent |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Intent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Intent |
|
parser()
public static Parser<Intent> parser()
Methods
containsLabels(String key)
public boolean containsLabels(String key)
The key/value metadata to label an intent. Labels can contain
lowercase letters, digits and the symbols '-' and '_'. International
characters are allowed, including letters from unicase alphabets. Keys must
start with a letter. Keys and values can be no longer than 63 characters
and no more than 128 bytes.
Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
Dialogflow defined labels include:
- sys-head
- sys-contextual
The above labels do not require value. "sys-head" means the intent is a
head intent. "sys.contextual" means the intent is a contextual intent.
map<string, string> labels = 7;
Parameter |
Name |
Description |
key |
String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public Intent getDefaultInstanceForType()
Returns |
Type |
Description |
Intent |
|
getDescription()
public String getDescription()
Human readable description for better understanding an intent like its
scope, content, result etc. Maximum character limit: 140 characters.
string description = 8;
Returns |
Type |
Description |
String |
The description.
|
getDescriptionBytes()
public ByteString getDescriptionBytes()
Human readable description for better understanding an intent like its
scope, content, result etc. Maximum character limit: 140 characters.
string description = 8;
Returns |
Type |
Description |
ByteString |
The bytes for description.
|
getDisplayName()
public String getDisplayName()
Required. The human-readable name of the intent, unique within the agent.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
Required. The human-readable name of the intent, unique within the agent.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for displayName.
|
getIsFallback()
public boolean getIsFallback()
Indicates whether this is a fallback intent. Currently only default
fallback intent is allowed in the agent, which is added upon agent
creation.
Adding training phrases to fallback intent is useful in the case of
requests that are mistakenly matched, since training phrases assigned to
fallback intents act as negative examples that triggers no-match event.
bool is_fallback = 6;
Returns |
Type |
Description |
boolean |
The isFallback.
|
getLabels()
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
The key/value metadata to label an intent. Labels can contain
lowercase letters, digits and the symbols '-' and '_'. International
characters are allowed, including letters from unicase alphabets. Keys must
start with a letter. Keys and values can be no longer than 63 characters
and no more than 128 bytes.
Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
Dialogflow defined labels include:
- sys-head
- sys-contextual
The above labels do not require value. "sys-head" means the intent is a
head intent. "sys.contextual" means the intent is a contextual intent.
map<string, string> labels = 7;
Returns |
Type |
Description |
int |
|
getLabelsMap()
public Map<String,String> getLabelsMap()
The key/value metadata to label an intent. Labels can contain
lowercase letters, digits and the symbols '-' and '_'. International
characters are allowed, including letters from unicase alphabets. Keys must
start with a letter. Keys and values can be no longer than 63 characters
and no more than 128 bytes.
Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
Dialogflow defined labels include:
- sys-head
- sys-contextual
The above labels do not require value. "sys-head" means the intent is a
head intent. "sys.contextual" means the intent is a contextual intent.
map<string, string> labels = 7;
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
The key/value metadata to label an intent. Labels can contain
lowercase letters, digits and the symbols '-' and '_'. International
characters are allowed, including letters from unicase alphabets. Keys must
start with a letter. Keys and values can be no longer than 63 characters
and no more than 128 bytes.
Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
Dialogflow defined labels include:
- sys-head
- sys-contextual
The above labels do not require value. "sys-head" means the intent is a
head intent. "sys.contextual" means the intent is a contextual intent.
map<string, string> labels = 7;
Returns |
Type |
Description |
String |
|
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
The key/value metadata to label an intent. Labels can contain
lowercase letters, digits and the symbols '-' and '_'. International
characters are allowed, including letters from unicase alphabets. Keys must
start with a letter. Keys and values can be no longer than 63 characters
and no more than 128 bytes.
Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed
Dialogflow defined labels include:
- sys-head
- sys-contextual
The above labels do not require value. "sys-head" means the intent is a
head intent. "sys.contextual" means the intent is a contextual intent.
map<string, string> labels = 7;
Parameter |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
String |
|
getName()
The unique identifier of the intent.
Required for the
Intents.UpdateIntent
method.
Intents.CreateIntent
populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/intents/<Intent ID>
.
string name = 1;
Returns |
Type |
Description |
String |
The name.
|
getNameBytes()
public ByteString getNameBytes()
The unique identifier of the intent.
Required for the
Intents.UpdateIntent
method.
Intents.CreateIntent
populates the name automatically.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/intents/<Intent ID>
.
string name = 1;
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getParameters(int index)
public Intent.Parameter getParameters(int index)
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
Parameter |
Name |
Description |
index |
int
|
getParametersCount()
public int getParametersCount()
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
Returns |
Type |
Description |
int |
|
getParametersList()
public List<Intent.Parameter> getParametersList()
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
getParametersOrBuilder(int index)
public Intent.ParameterOrBuilder getParametersOrBuilder(int index)
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
Parameter |
Name |
Description |
index |
int
|
getParametersOrBuilderList()
public List<? extends Intent.ParameterOrBuilder> getParametersOrBuilderList()
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;
Returns |
Type |
Description |
List<? extends com.google.cloud.dialogflow.cx.v3.Intent.ParameterOrBuilder> |
|
getParserForType()
public Parser<Intent> getParserForType()
Overrides
getPriority()
The priority of this intent. Higher numbers represent higher
priorities.
- If the supplied value is unspecified or 0, the service
translates the value to 500,000, which corresponds to the
Normal
priority in the console.
- If the supplied value is negative, the intent is ignored
in runtime detect intent requests.
int32 priority = 5;
Returns |
Type |
Description |
int |
The priority.
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getTrainingPhrases(int index)
public Intent.TrainingPhrase getTrainingPhrases(int index)
The collection of training phrases the agent is trained on to identify the
intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
Parameter |
Name |
Description |
index |
int
|
getTrainingPhrasesCount()
public int getTrainingPhrasesCount()
The collection of training phrases the agent is trained on to identify the
intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
Returns |
Type |
Description |
int |
|
getTrainingPhrasesList()
public List<Intent.TrainingPhrase> getTrainingPhrasesList()
The collection of training phrases the agent is trained on to identify the
intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
getTrainingPhrasesOrBuilder(int index)
public Intent.TrainingPhraseOrBuilder getTrainingPhrasesOrBuilder(int index)
The collection of training phrases the agent is trained on to identify the
intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
Parameter |
Name |
Description |
index |
int
|
getTrainingPhrasesOrBuilderList()
public List<? extends Intent.TrainingPhraseOrBuilder> getTrainingPhrasesOrBuilderList()
The collection of training phrases the agent is trained on to identify the
intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase training_phrases = 3;
Returns |
Type |
Description |
List<? extends com.google.cloud.dialogflow.cx.v3.Intent.TrainingPhraseOrBuilder> |
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
Name |
Description |
number |
int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Intent.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Intent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Intent.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides