public final class Intent extends com.google.protobuf.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| Modifier and Type | Class and Description |
|---|---|
static class |
Intent.Builder
An intent represents a user's intent to interact with a conversational agent.
|
static class |
Intent.Parameter
Represents an intent parameter.
|
static interface |
Intent.ParameterOrBuilder |
static class |
Intent.TrainingPhrase
Represents an example that the agent is trained on to identify the intent.
|
static interface |
Intent.TrainingPhraseOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
DESCRIPTION_FIELD_NUMBER |
static int |
DISPLAY_NAME_FIELD_NUMBER |
static int |
IS_FALLBACK_FIELD_NUMBER |
static int |
LABELS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PARAMETERS_FIELD_NUMBER |
static int |
PRIORITY_FIELD_NUMBER |
static int |
TRAINING_PHRASES_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsLabels(String key)
The key/value metadata to label an intent.
|
boolean |
equals(Object obj) |
static Intent |
getDefaultInstance() |
Intent |
getDefaultInstanceForType() |
String |
getDescription()
Human readable description for better understanding an intent like its
scope, content, result etc.
|
com.google.protobuf.ByteString |
getDescriptionBytes()
Human readable description for better understanding an intent like its
scope, content, result etc.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getDisplayName()
Required.
|
com.google.protobuf.ByteString |
getDisplayNameBytes()
Required.
|
boolean |
getIsFallback()
Indicates whether this is a fallback intent.
|
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
The key/value metadata to label an intent.
|
Map<String,String> |
getLabelsMap()
The key/value metadata to label an intent.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
The key/value metadata to label an intent.
|
String |
getLabelsOrThrow(String key)
The key/value metadata to label an intent.
|
String |
getName()
The unique identifier of the intent.
|
com.google.protobuf.ByteString |
getNameBytes()
The unique identifier of the intent.
|
Intent.Parameter |
getParameters(int index)
The collection of parameters associated with the intent.
|
int |
getParametersCount()
The collection of parameters associated with the intent.
|
List<Intent.Parameter> |
getParametersList()
The collection of parameters associated with the intent.
|
Intent.ParameterOrBuilder |
getParametersOrBuilder(int index)
The collection of parameters associated with the intent.
|
List<? extends Intent.ParameterOrBuilder> |
getParametersOrBuilderList()
The collection of parameters associated with the intent.
|
com.google.protobuf.Parser<Intent> |
getParserForType() |
int |
getPriority()
The priority of this intent.
|
int |
getSerializedSize() |
Intent.TrainingPhrase |
getTrainingPhrases(int index)
The collection of training phrases the agent is trained on to identify the
intent.
|
int |
getTrainingPhrasesCount()
The collection of training phrases the agent is trained on to identify the
intent.
|
List<Intent.TrainingPhrase> |
getTrainingPhrasesList()
The collection of training phrases the agent is trained on to identify the
intent.
|
Intent.TrainingPhraseOrBuilder |
getTrainingPhrasesOrBuilder(int index)
The collection of training phrases the agent is trained on to identify the
intent.
|
List<? extends Intent.TrainingPhraseOrBuilder> |
getTrainingPhrasesOrBuilderList()
The collection of training phrases the agent is trained on to identify the
intent.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static Intent.Builder |
newBuilder() |
static Intent.Builder |
newBuilder(Intent prototype) |
Intent.Builder |
newBuilderForType() |
protected Intent.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Intent |
parseDelimitedFrom(InputStream input) |
static Intent |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Intent |
parseFrom(byte[] data) |
static Intent |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Intent |
parseFrom(ByteBuffer data) |
static Intent |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Intent |
parseFrom(com.google.protobuf.ByteString data) |
static Intent |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Intent |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Intent |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Intent |
parseFrom(InputStream input) |
static Intent |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Intent> |
parser() |
Intent.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
public static final int TRAINING_PHRASES_FIELD_NUMBER
public static final int PARAMETERS_FIELD_NUMBER
public static final int PRIORITY_FIELD_NUMBER
public static final int IS_FALLBACK_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getName()
The unique identifier of the intent. Required for the [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] method. [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.
string name = 1;getName in interface IntentOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The unique identifier of the intent. Required for the [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] method. [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.
string name = 1;getNameBytes in interface IntentOrBuilderpublic String getDisplayName()
Required. The human-readable name of the intent, unique within the agent.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];getDisplayName in interface IntentOrBuilderpublic com.google.protobuf.ByteString getDisplayNameBytes()
Required. The human-readable name of the intent, unique within the agent.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];getDisplayNameBytes in interface IntentOrBuilderpublic 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;
getTrainingPhrasesList in interface IntentOrBuilderpublic 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;
getTrainingPhrasesOrBuilderList in interface IntentOrBuilderpublic 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;
getTrainingPhrasesCount in interface IntentOrBuilderpublic 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;
getTrainingPhrases in interface IntentOrBuilderpublic 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;
getTrainingPhrasesOrBuilder in interface IntentOrBuilderpublic List<Intent.Parameter> getParametersList()
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;getParametersList in interface IntentOrBuilderpublic List<? extends Intent.ParameterOrBuilder> getParametersOrBuilderList()
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;getParametersOrBuilderList in interface IntentOrBuilderpublic int getParametersCount()
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;getParametersCount in interface IntentOrBuilderpublic Intent.Parameter getParameters(int index)
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;getParameters in interface IntentOrBuilderpublic Intent.ParameterOrBuilder getParametersOrBuilder(int index)
The collection of parameters associated with the intent.
repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;getParametersOrBuilder in interface IntentOrBuilderpublic int 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;getPriority in interface IntentOrBuilderpublic 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;getIsFallback in interface IntentOrBuilderpublic int getLabelsCount()
IntentOrBuilderThe 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;getLabelsCount in interface IntentOrBuilderpublic 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;containsLabels in interface IntentOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface IntentOrBuilderpublic 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;getLabelsMap in interface IntentOrBuilderpublic 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;getLabelsOrDefault in interface IntentOrBuilderpublic 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;getLabelsOrThrow in interface IntentOrBuilderpublic String getDescription()
Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
string description = 8;getDescription in interface IntentOrBuilderpublic com.google.protobuf.ByteString getDescriptionBytes()
Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
string description = 8;getDescriptionBytes in interface IntentOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Intent parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Intent parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Intent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Intent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Intent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Intent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Intent parseFrom(InputStream input) throws IOException
IOExceptionpublic static Intent parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Intent parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Intent parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Intent parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Intent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Intent.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Intent.Builder newBuilder()
public static Intent.Builder newBuilder(Intent prototype)
public Intent.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Intent.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Intent getDefaultInstance()
public static com.google.protobuf.Parser<Intent> parser()
public com.google.protobuf.Parser<Intent> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Intent getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.