Class Intent.Builder (0.52.0)

public static final class Intent.Builder extends GeneratedMessageV3.Builder<Intent.Builder> 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

Implements

IntentOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllParameters(Iterable<? extends Intent.Parameter> values)

public Intent.Builder addAllParameters(Iterable<? extends Intent.Parameter> values)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.cx.v3.Intent.Parameter>
Returns
TypeDescription
Intent.Builder

addAllTrainingPhrases(Iterable<? extends Intent.TrainingPhrase> values)

public Intent.Builder addAllTrainingPhrases(Iterable<? extends Intent.TrainingPhrase> values)

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
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase>
Returns
TypeDescription
Intent.Builder

addParameters(Intent.Parameter value)

public Intent.Builder addParameters(Intent.Parameter value)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameter
NameDescription
valueIntent.Parameter
Returns
TypeDescription
Intent.Builder

addParameters(Intent.Parameter.Builder builderForValue)

public Intent.Builder addParameters(Intent.Parameter.Builder builderForValue)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameter
NameDescription
builderForValueIntent.Parameter.Builder
Returns
TypeDescription
Intent.Builder

addParameters(int index, Intent.Parameter value)

public Intent.Builder addParameters(int index, Intent.Parameter value)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameters
NameDescription
indexint
valueIntent.Parameter
Returns
TypeDescription
Intent.Builder

addParameters(int index, Intent.Parameter.Builder builderForValue)

public Intent.Builder addParameters(int index, Intent.Parameter.Builder builderForValue)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameters
NameDescription
indexint
builderForValueIntent.Parameter.Builder
Returns
TypeDescription
Intent.Builder

addParametersBuilder()

public Intent.Parameter.Builder addParametersBuilder()

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Returns
TypeDescription
Intent.Parameter.Builder

addParametersBuilder(int index)

public Intent.Parameter.Builder addParametersBuilder(int index)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
Intent.Parameter.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Intent.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Intent.Builder
Overrides

addTrainingPhrases(Intent.TrainingPhrase value)

public Intent.Builder addTrainingPhrases(Intent.TrainingPhrase value)

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
NameDescription
valueIntent.TrainingPhrase
Returns
TypeDescription
Intent.Builder

addTrainingPhrases(Intent.TrainingPhrase.Builder builderForValue)

public Intent.Builder addTrainingPhrases(Intent.TrainingPhrase.Builder builderForValue)

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
NameDescription
builderForValueIntent.TrainingPhrase.Builder
Returns
TypeDescription
Intent.Builder

addTrainingPhrases(int index, Intent.TrainingPhrase value)

public Intent.Builder addTrainingPhrases(int index, Intent.TrainingPhrase value)

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;

Parameters
NameDescription
indexint
valueIntent.TrainingPhrase
Returns
TypeDescription
Intent.Builder

addTrainingPhrases(int index, Intent.TrainingPhrase.Builder builderForValue)

public Intent.Builder addTrainingPhrases(int index, Intent.TrainingPhrase.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueIntent.TrainingPhrase.Builder
Returns
TypeDescription
Intent.Builder

addTrainingPhrasesBuilder()

public Intent.TrainingPhrase.Builder addTrainingPhrasesBuilder()

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
TypeDescription
Intent.TrainingPhrase.Builder

addTrainingPhrasesBuilder(int index)

public Intent.TrainingPhrase.Builder addTrainingPhrasesBuilder(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
NameDescription
indexint
Returns
TypeDescription
Intent.TrainingPhrase.Builder

build()

public Intent build()
Returns
TypeDescription
Intent

buildPartial()

public Intent buildPartial()
Returns
TypeDescription
Intent

clear()

public Intent.Builder clear()
Returns
TypeDescription
Intent.Builder
Overrides

clearDescription()

public Intent.Builder clearDescription()

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

string description = 8;

Returns
TypeDescription
Intent.Builder

This builder for chaining.

clearDisplayName()

public Intent.Builder clearDisplayName()

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

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

Returns
TypeDescription
Intent.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Intent.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Intent.Builder
Overrides

clearIsFallback()

public Intent.Builder clearIsFallback()

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
TypeDescription
Intent.Builder

This builder for chaining.

clearLabels()

public Intent.Builder clearLabels()
Returns
TypeDescription
Intent.Builder

clearName()

public Intent.Builder clearName()

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
TypeDescription
Intent.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Intent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Intent.Builder
Overrides

clearParameters()

public Intent.Builder clearParameters()

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Returns
TypeDescription
Intent.Builder

clearPriority()

public Intent.Builder clearPriority()

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
TypeDescription
Intent.Builder

This builder for chaining.

clearTrainingPhrases()

public Intent.Builder clearTrainingPhrases()

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
TypeDescription
Intent.Builder

clone()

public Intent.Builder clone()
Returns
TypeDescription
Intent.Builder
Overrides

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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public Intent getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The isFallback.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
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;

Returns
TypeDescription
Map<String,String>

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;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public 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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Intent.Parameter

getParametersBuilder(int index)

public Intent.Parameter.Builder getParametersBuilder(int index)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
Intent.Parameter.Builder

getParametersBuilderList()

public List<Intent.Parameter.Builder> getParametersBuilderList()

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Returns
TypeDescription
List<Builder>

getParametersCount()

public int getParametersCount()

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Returns
TypeDescription
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;

Returns
TypeDescription
List<Parameter>

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
NameDescription
indexint
Returns
TypeDescription
Intent.ParameterOrBuilder

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
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3.Intent.ParameterOrBuilder>

getPriority()

public 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;

Returns
TypeDescription
int

The priority.

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
NameDescription
indexint
Returns
TypeDescription
Intent.TrainingPhrase

getTrainingPhrasesBuilder(int index)

public Intent.TrainingPhrase.Builder getTrainingPhrasesBuilder(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
NameDescription
indexint
Returns
TypeDescription
Intent.TrainingPhrase.Builder

getTrainingPhrasesBuilderList()

public List<Intent.TrainingPhrase.Builder> getTrainingPhrasesBuilderList()

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
TypeDescription
List<Builder>

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
TypeDescription
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;

Returns
TypeDescription
List<TrainingPhrase>

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
NameDescription
indexint
Returns
TypeDescription
Intent.TrainingPhraseOrBuilder

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
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3.Intent.TrainingPhraseOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Intent other)

public Intent.Builder mergeFrom(Intent other)
Parameter
NameDescription
otherIntent
Returns
TypeDescription
Intent.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Intent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Intent.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Intent.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Intent.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Intent.Builder
Overrides

putAllLabels(Map<String,String> values)

public Intent.Builder putAllLabels(Map<String,String> values)

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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Intent.Builder

putLabels(String key, String value)

public Intent.Builder putLabels(String key, String value)

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;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Intent.Builder

removeLabels(String key)

public Intent.Builder removeLabels(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
NameDescription
keyString
Returns
TypeDescription
Intent.Builder

removeParameters(int index)

public Intent.Builder removeParameters(int index)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
Intent.Builder

removeTrainingPhrases(int index)

public Intent.Builder removeTrainingPhrases(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
NameDescription
indexint
Returns
TypeDescription
Intent.Builder

setDescription(String value)

public Intent.Builder setDescription(String value)

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

string description = 8;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Intent.Builder setDescriptionBytes(ByteString value)

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

string description = 8;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setDisplayName(String value)

public Intent.Builder setDisplayName(String value)

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

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

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Intent.Builder setDisplayNameBytes(ByteString value)

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

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

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Intent.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Intent.Builder
Overrides

setIsFallback(boolean value)

public Intent.Builder setIsFallback(boolean value)

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;

Parameter
NameDescription
valueboolean

The isFallback to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setName(String value)

public Intent.Builder setName(String value)

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;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Intent.Builder setNameBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setParameters(int index, Intent.Parameter value)

public Intent.Builder setParameters(int index, Intent.Parameter value)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameters
NameDescription
indexint
valueIntent.Parameter
Returns
TypeDescription
Intent.Builder

setParameters(int index, Intent.Parameter.Builder builderForValue)

public Intent.Builder setParameters(int index, Intent.Parameter.Builder builderForValue)

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3.Intent.Parameter parameters = 4;

Parameters
NameDescription
indexint
builderForValueIntent.Parameter.Builder
Returns
TypeDescription
Intent.Builder

setPriority(int value)

public Intent.Builder setPriority(int value)

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;

Parameter
NameDescription
valueint

The priority to set.

Returns
TypeDescription
Intent.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Intent.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Intent.Builder
Overrides

setTrainingPhrases(int index, Intent.TrainingPhrase value)

public Intent.Builder setTrainingPhrases(int index, Intent.TrainingPhrase value)

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;

Parameters
NameDescription
indexint
valueIntent.TrainingPhrase
Returns
TypeDescription
Intent.Builder

setTrainingPhrases(int index, Intent.TrainingPhrase.Builder builderForValue)

public Intent.Builder setTrainingPhrases(int index, Intent.TrainingPhrase.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueIntent.TrainingPhrase.Builder
Returns
TypeDescription
Intent.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Intent.Builder
Overrides