blob: 21702b6794c15dab059ce0b7969d205849235113 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="dialogflow_v3.html">Dialogflow API</a> . <a href="dialogflow_v3.projects.html">projects</a> . <a href="dialogflow_v3.projects.locations.html">locations</a> . <a href="dialogflow_v3.projects.locations.agents.html">agents</a> . <a href="dialogflow_v3.projects.locations.agents.intents.html">intents</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#create">create(parent, body=None, languageCode=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates an intent in the specified agent. Note: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).</p>
<p class="toc_element">
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes the specified intent. Note: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).</p>
<p class="toc_element">
<code><a href="#get">get(name, languageCode=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves the specified intent.</p>
<p class="toc_element">
<code><a href="#list">list(parent, intentView=None, languageCode=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns the list of all intents in the specified agent.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#patch">patch(name, body=None, languageCode=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates the specified intent. Note: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="create">create(parent, body=None, languageCode=None, x__xgafv=None)</code>
<pre>Creates an intent in the specified agent. Note: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
Args:
parent: string, Required. The agent to create an intent for. Format: `projects//locations//agents/`. (required)
body: object, The request body.
The object takes the form of:
{ # An intent represents a user&#x27;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.
&quot;description&quot;: &quot;A String&quot;, # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the intent, unique within the agent.
&quot;isFallback&quot;: True or False, # 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.
&quot;labels&quot;: { # The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols &#x27;-&#x27; and &#x27;_&#x27;. 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 &quot;sys-&quot; is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. &quot;sys-head&quot; means the intent is a head intent. &quot;sys.contextual&quot; means the intent is a contextual intent.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;name&quot;: &quot;A String&quot;, # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
&quot;parameters&quot;: [ # The collection of parameters associated with the intent.
{ # Represents an intent parameter.
&quot;entityType&quot;: &quot;A String&quot;, # Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types.
&quot;id&quot;: &quot;A String&quot;, # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
&quot;isList&quot;: True or False, # Indicates whether the parameter represents a list of values.
&quot;redact&quot;: True or False, # Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
},
],
&quot;priority&quot;: 42, # 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.
&quot;trainingPhrases&quot;: [ # The collection of training phrases the agent is trained on to identify the intent.
{ # Represents an example that the agent is trained on to identify the intent.
&quot;id&quot;: &quot;A String&quot;, # Output only. The unique identifier of the training phrase.
&quot;parts&quot;: [ # Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.
{ # Represents a part of a training phrase.
&quot;parameterId&quot;: &quot;A String&quot;, # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
&quot;text&quot;: &quot;A String&quot;, # Required. The text for this part.
},
],
&quot;repeatCount&quot;: 42, # Indicates how many times this example was added to the intent.
},
],
}
languageCode: string, The language of the following fields in `intent`: * `Intent.training_phrases.parts.text` If not specified, the agent&#x27;s default language is used. [Many languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An intent represents a user&#x27;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.
&quot;description&quot;: &quot;A String&quot;, # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the intent, unique within the agent.
&quot;isFallback&quot;: True or False, # 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.
&quot;labels&quot;: { # The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols &#x27;-&#x27; and &#x27;_&#x27;. 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 &quot;sys-&quot; is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. &quot;sys-head&quot; means the intent is a head intent. &quot;sys.contextual&quot; means the intent is a contextual intent.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;name&quot;: &quot;A String&quot;, # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
&quot;parameters&quot;: [ # The collection of parameters associated with the intent.
{ # Represents an intent parameter.
&quot;entityType&quot;: &quot;A String&quot;, # Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types.
&quot;id&quot;: &quot;A String&quot;, # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
&quot;isList&quot;: True or False, # Indicates whether the parameter represents a list of values.
&quot;redact&quot;: True or False, # Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
},
],
&quot;priority&quot;: 42, # 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.
&quot;trainingPhrases&quot;: [ # The collection of training phrases the agent is trained on to identify the intent.
{ # Represents an example that the agent is trained on to identify the intent.
&quot;id&quot;: &quot;A String&quot;, # Output only. The unique identifier of the training phrase.
&quot;parts&quot;: [ # Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.
{ # Represents a part of a training phrase.
&quot;parameterId&quot;: &quot;A String&quot;, # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
&quot;text&quot;: &quot;A String&quot;, # Required. The text for this part.
},
],
&quot;repeatCount&quot;: 42, # Indicates how many times this example was added to the intent.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
<pre>Deletes the specified intent. Note: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
Args:
name: string, Required. The name of the intent to delete. Format: `projects//locations//agents//intents/`. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, languageCode=None, x__xgafv=None)</code>
<pre>Retrieves the specified intent.
Args:
name: string, Required. The name of the intent. Format: `projects//locations//agents//intents/`. (required)
languageCode: string, The language to retrieve the intent for. The following fields are language dependent: * `Intent.training_phrases.parts.text` If not specified, the agent&#x27;s default language is used. [Many languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An intent represents a user&#x27;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.
&quot;description&quot;: &quot;A String&quot;, # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the intent, unique within the agent.
&quot;isFallback&quot;: True or False, # 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.
&quot;labels&quot;: { # The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols &#x27;-&#x27; and &#x27;_&#x27;. 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 &quot;sys-&quot; is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. &quot;sys-head&quot; means the intent is a head intent. &quot;sys.contextual&quot; means the intent is a contextual intent.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;name&quot;: &quot;A String&quot;, # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
&quot;parameters&quot;: [ # The collection of parameters associated with the intent.
{ # Represents an intent parameter.
&quot;entityType&quot;: &quot;A String&quot;, # Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types.
&quot;id&quot;: &quot;A String&quot;, # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
&quot;isList&quot;: True or False, # Indicates whether the parameter represents a list of values.
&quot;redact&quot;: True or False, # Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
},
],
&quot;priority&quot;: 42, # 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.
&quot;trainingPhrases&quot;: [ # The collection of training phrases the agent is trained on to identify the intent.
{ # Represents an example that the agent is trained on to identify the intent.
&quot;id&quot;: &quot;A String&quot;, # Output only. The unique identifier of the training phrase.
&quot;parts&quot;: [ # Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.
{ # Represents a part of a training phrase.
&quot;parameterId&quot;: &quot;A String&quot;, # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
&quot;text&quot;: &quot;A String&quot;, # Required. The text for this part.
},
],
&quot;repeatCount&quot;: 42, # Indicates how many times this example was added to the intent.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, intentView=None, languageCode=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Returns the list of all intents in the specified agent.
Args:
parent: string, Required. The agent to list all intents for. Format: `projects//locations//agents/`. (required)
intentView: string, The resource view to apply to the returned intent.
Allowed values
INTENT_VIEW_UNSPECIFIED - Not specified. Treated as INTENT_VIEW_FULL.
INTENT_VIEW_PARTIAL - Training phrases field is not populated in the response.
INTENT_VIEW_FULL - All fields are populated.
languageCode: string, The language to list intents for. The following fields are language dependent: * `Intent.training_phrases.parts.text` If not specified, the agent&#x27;s default language is used. [Many languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.
pageSize: integer, The maximum number of items to return in a single page. By default 100 and at most 1000.
pageToken: string, The next_page_token value returned from a previous list request.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response message for Intents.ListIntents.
&quot;intents&quot;: [ # The list of intents. There will be a maximum number of items returned based on the page_size field in the request.
{ # An intent represents a user&#x27;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.
&quot;description&quot;: &quot;A String&quot;, # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the intent, unique within the agent.
&quot;isFallback&quot;: True or False, # 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.
&quot;labels&quot;: { # The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols &#x27;-&#x27; and &#x27;_&#x27;. 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 &quot;sys-&quot; is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. &quot;sys-head&quot; means the intent is a head intent. &quot;sys.contextual&quot; means the intent is a contextual intent.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;name&quot;: &quot;A String&quot;, # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
&quot;parameters&quot;: [ # The collection of parameters associated with the intent.
{ # Represents an intent parameter.
&quot;entityType&quot;: &quot;A String&quot;, # Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types.
&quot;id&quot;: &quot;A String&quot;, # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
&quot;isList&quot;: True or False, # Indicates whether the parameter represents a list of values.
&quot;redact&quot;: True or False, # Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
},
],
&quot;priority&quot;: 42, # 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.
&quot;trainingPhrases&quot;: [ # The collection of training phrases the agent is trained on to identify the intent.
{ # Represents an example that the agent is trained on to identify the intent.
&quot;id&quot;: &quot;A String&quot;, # Output only. The unique identifier of the training phrase.
&quot;parts&quot;: [ # Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.
{ # Represents a part of a training phrase.
&quot;parameterId&quot;: &quot;A String&quot;, # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
&quot;text&quot;: &quot;A String&quot;, # Required. The text for this part.
},
],
&quot;repeatCount&quot;: 42, # Indicates how many times this example was added to the intent.
},
],
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more results in the list.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="patch">patch(name, body=None, languageCode=None, updateMask=None, x__xgafv=None)</code>
<pre>Updates the specified intent. Note: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
Args:
name: string, The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`. (required)
body: object, The request body.
The object takes the form of:
{ # An intent represents a user&#x27;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.
&quot;description&quot;: &quot;A String&quot;, # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the intent, unique within the agent.
&quot;isFallback&quot;: True or False, # 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.
&quot;labels&quot;: { # The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols &#x27;-&#x27; and &#x27;_&#x27;. 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 &quot;sys-&quot; is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. &quot;sys-head&quot; means the intent is a head intent. &quot;sys.contextual&quot; means the intent is a contextual intent.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;name&quot;: &quot;A String&quot;, # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
&quot;parameters&quot;: [ # The collection of parameters associated with the intent.
{ # Represents an intent parameter.
&quot;entityType&quot;: &quot;A String&quot;, # Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types.
&quot;id&quot;: &quot;A String&quot;, # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
&quot;isList&quot;: True or False, # Indicates whether the parameter represents a list of values.
&quot;redact&quot;: True or False, # Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
},
],
&quot;priority&quot;: 42, # 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.
&quot;trainingPhrases&quot;: [ # The collection of training phrases the agent is trained on to identify the intent.
{ # Represents an example that the agent is trained on to identify the intent.
&quot;id&quot;: &quot;A String&quot;, # Output only. The unique identifier of the training phrase.
&quot;parts&quot;: [ # Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.
{ # Represents a part of a training phrase.
&quot;parameterId&quot;: &quot;A String&quot;, # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
&quot;text&quot;: &quot;A String&quot;, # Required. The text for this part.
},
],
&quot;repeatCount&quot;: 42, # Indicates how many times this example was added to the intent.
},
],
}
languageCode: string, The language of the following fields in `intent`: * `Intent.training_phrases.parts.text` If not specified, the agent&#x27;s default language is used. [Many languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.
updateMask: string, The mask to control which fields get updated. If the mask is not present, all fields will be updated.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An intent represents a user&#x27;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.
&quot;description&quot;: &quot;A String&quot;, # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the intent, unique within the agent.
&quot;isFallback&quot;: True or False, # 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.
&quot;labels&quot;: { # The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols &#x27;-&#x27; and &#x27;_&#x27;. 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 &quot;sys-&quot; is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. &quot;sys-head&quot; means the intent is a head intent. &quot;sys.contextual&quot; means the intent is a contextual intent.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;name&quot;: &quot;A String&quot;, # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
&quot;parameters&quot;: [ # The collection of parameters associated with the intent.
{ # Represents an intent parameter.
&quot;entityType&quot;: &quot;A String&quot;, # Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types.
&quot;id&quot;: &quot;A String&quot;, # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
&quot;isList&quot;: True or False, # Indicates whether the parameter represents a list of values.
&quot;redact&quot;: True or False, # Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
},
],
&quot;priority&quot;: 42, # 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.
&quot;trainingPhrases&quot;: [ # The collection of training phrases the agent is trained on to identify the intent.
{ # Represents an example that the agent is trained on to identify the intent.
&quot;id&quot;: &quot;A String&quot;, # Output only. The unique identifier of the training phrase.
&quot;parts&quot;: [ # Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set.
{ # Represents a part of a training phrase.
&quot;parameterId&quot;: &quot;A String&quot;, # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
&quot;text&quot;: &quot;A String&quot;, # Required. The text for this part.
},
],
&quot;repeatCount&quot;: 42, # Indicates how many times this example was added to the intent.
},
],
}</pre>
</div>
</body></html>