Class Intent.Builder (0.17.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.v3beta1.Intent

Implements

IntentOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter>
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase>
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameter
Name Description
value Intent.Parameter
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameter
Name Description
builderForValue Intent.Parameter.Builder
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameters
Name Description
index int
value Intent.Parameter
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameters
Name Description
index int
builderForValue Intent.Parameter.Builder
Returns
Type Description
Intent.Builder

addParametersBuilder()

public Intent.Parameter.Builder addParametersBuilder()

The collection of parameters associated with the intent.

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

Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
Intent.Parameter.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Intent.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
value Intent.TrainingPhrase
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
builderForValue Intent.TrainingPhrase.Builder
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameters
Name Description
index int
value Intent.TrainingPhrase
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameters
Name Description
index int
builderForValue Intent.TrainingPhrase.Builder
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
index int
Returns
Type Description
Intent.TrainingPhrase.Builder

build()

public Intent build()
Returns
Type Description
Intent

buildPartial()

public Intent buildPartial()
Returns
Type Description
Intent

clear()

public Intent.Builder clear()
Returns
Type Description
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
Type Description
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
Type Description
Intent.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Intent.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
Intent.Builder

This builder for chaining.

clearLabels()

public Intent.Builder clearLabels()
Returns
Type Description
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
Type Description
Intent.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Intent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Intent.Builder
Overrides

clearParameters()

public Intent.Builder clearParameters()

The collection of parameters associated with the intent.

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

Returns
Type Description
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
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Returns
Type Description
Intent.Builder

clone()

public Intent.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

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.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
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()

Use #getLabelsMap() instead.

Returns
Type Description
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
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;

Returns
Type Description
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
Name Description
key String
defaultValue String
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

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
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
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.v3beta1.Intent.Parameter parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameter
Name Description
index int
Returns
Type Description
Intent.Parameter.Builder

getParametersBuilderList()

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

The collection of parameters associated with the intent.

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

Returns
Type Description
List<Builder>

getParametersCount()

public int getParametersCount()

The collection of parameters associated with the intent.

repeated .google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Intent.Parameter parameters = 4;

Returns
Type Description
List<Parameter>

getParametersOrBuilder(int index)

public Intent.ParameterOrBuilder getParametersOrBuilder(int index)

The collection of parameters associated with the intent.

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

Parameter
Name Description
index int
Returns
Type Description
Intent.ParameterOrBuilder

getParametersOrBuilderList()

public List<? extends Intent.ParameterOrBuilder> getParametersOrBuilderList()

The collection of parameters associated with the intent.

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

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.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
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
index int
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
index int
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Returns
Type Description
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.v3beta1.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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
index int
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhraseOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Intent other)

public Intent.Builder mergeFrom(Intent other)
Parameter
Name Description
other Intent
Returns
Type Description
Intent.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Intent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Intent.Builder
Overrides Exceptions
Type Description
IOException

mergeFrom(Message other)

public Intent.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Intent.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
Intent.Builder

removeParameters(int index)

public Intent.Builder removeParameters(int index)

The collection of parameters associated with the intent.

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

Parameter
Name Description
index int
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameter
Name Description
index int
Returns
Type Description
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
Name Description
value String

The description to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
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
Name Description
value String

The displayName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Intent.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Intent.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value boolean

The isFallback to set.

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameters
Name Description
index int
value Intent.Parameter
Returns
Type Description
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.v3beta1.Intent.Parameter parameters = 4;

Parameters
Name Description
index int
builderForValue Intent.Parameter.Builder
Returns
Type Description
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
Name Description
value int

The priority to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameters
Name Description
index int
value Intent.TrainingPhrase
Returns
Type Description
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.v3beta1.Intent.TrainingPhrase training_phrases = 3;

Parameters
Name Description
index int
builderForValue Intent.TrainingPhrase.Builder
Returns
Type Description
Intent.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Intent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Intent.Builder
Overrides