Dialogflow API . projects . locations . agents . intents

Instance Methods

close()

Close httplib2 connections.

create(parent, body=None, languageCode=None, x__xgafv=None)

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).

delete(name, x__xgafv=None)

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).

export(parent, body=None, x__xgafv=None)

Exports the selected intents. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: ExportIntentsMetadata - `response`: ExportIntentsResponse

get(name, languageCode=None, x__xgafv=None)

Retrieves the specified intent.

import_(parent, body=None, x__xgafv=None)

Imports the specified intents into the agent. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: ImportIntentsMetadata - `response`: ImportIntentsResponse

list(parent, intentView=None, languageCode=None, pageSize=None, pageToken=None, x__xgafv=None)

Returns the list of all intents in the specified agent.

list_next()

Retrieves the next page of results.

patch(name, body=None, languageCode=None, updateMask=None, x__xgafv=None)

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).

Method Details

close()
Close httplib2 connections.
create(parent, body=None, languageCode=None, x__xgafv=None)
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'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.
  "description": "A String", # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
  "displayName": "A String", # Required. The human-readable name of the intent, unique within the agent.
  "isFallback": 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.
  "labels": { # 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.
    "a_key": "A String",
  },
  "name": "A String", # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
  "parameters": [ # The collection of parameters associated with the intent.
    { # Represents an intent parameter.
      "entityType": "A String", # 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.
      "id": "A String", # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
      "isList": True or False, # Indicates whether the parameter represents a list of values.
      "redact": 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.
    },
  ],
  "priority": 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.
  "trainingPhrases": [ # 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.
      "id": "A String", # Output only. The unique identifier of the training phrase.
      "parts": [ # 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.
          "parameterId": "A String", # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
          "text": "A String", # Required. The text for this part.
        },
      ],
      "repeatCount": 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'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'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.
  "description": "A String", # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
  "displayName": "A String", # Required. The human-readable name of the intent, unique within the agent.
  "isFallback": 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.
  "labels": { # 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.
    "a_key": "A String",
  },
  "name": "A String", # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
  "parameters": [ # The collection of parameters associated with the intent.
    { # Represents an intent parameter.
      "entityType": "A String", # 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.
      "id": "A String", # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
      "isList": True or False, # Indicates whether the parameter represents a list of values.
      "redact": 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.
    },
  ],
  "priority": 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.
  "trainingPhrases": [ # 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.
      "id": "A String", # Output only. The unique identifier of the training phrase.
      "parts": [ # 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.
          "parameterId": "A String", # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
          "text": "A String", # Required. The text for this part.
        },
      ],
      "repeatCount": 42, # Indicates how many times this example was added to the intent.
    },
  ],
}
delete(name, x__xgafv=None)
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); }
}
export(parent, body=None, x__xgafv=None)
Exports the selected intents. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: ExportIntentsMetadata - `response`: ExportIntentsResponse

Args:
  parent: string, Required. The name of the parent agent to export intents. Format: `projects//locations//agents/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Intents.ExportIntents.
  "dataFormat": "A String", # Optional. The data format of the exported intents. If not specified, `BLOB` is assumed.
  "intents": [ # Required. The name of the intents to export. Format: `projects//locations//agents//intents/`.
    "A String",
  ],
  "intentsContentInline": True or False, # Optional. The option to return the serialized intents inline.
  "intentsUri": "A String", # Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the intents to. The format of this URI must be `gs:///`. Dialogflow performs a write operation for the Cloud Storage object on the caller's behalf, so your request authentication must have write permissions for the object. For more information, see [Dialogflow access control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
get(name, languageCode=None, x__xgafv=None)
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'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'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.
  "description": "A String", # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
  "displayName": "A String", # Required. The human-readable name of the intent, unique within the agent.
  "isFallback": 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.
  "labels": { # 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.
    "a_key": "A String",
  },
  "name": "A String", # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
  "parameters": [ # The collection of parameters associated with the intent.
    { # Represents an intent parameter.
      "entityType": "A String", # 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.
      "id": "A String", # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
      "isList": True or False, # Indicates whether the parameter represents a list of values.
      "redact": 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.
    },
  ],
  "priority": 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.
  "trainingPhrases": [ # 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.
      "id": "A String", # Output only. The unique identifier of the training phrase.
      "parts": [ # 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.
          "parameterId": "A String", # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
          "text": "A String", # Required. The text for this part.
        },
      ],
      "repeatCount": 42, # Indicates how many times this example was added to the intent.
    },
  ],
}
import_(parent, body=None, x__xgafv=None)
Imports the specified intents into the agent. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: ImportIntentsMetadata - `response`: ImportIntentsResponse

Args:
  parent: string, Required. The agent to import the intents into. Format: `projects//locations//agents/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Intents.ImportIntents.
  "intentsContent": { # Inline source for a Dialogflow operation that reads or imports objects (e.g. intents) into Dialogflow. # Uncompressed byte content of intents.
    "content": "A String", # The uncompressed byte content for the objects.
  },
  "intentsUri": "A String", # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to import intents from. The format of this URI must be `gs:///`. Dialogflow performs a read operation for the Cloud Storage object on the caller's behalf, so your request authentication must have read permissions for the object. For more information, see [Dialogflow access control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
  "mergeOption": "A String", # Merge option for importing intents. If not specified, `REJECT` is assumed.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
list(parent, intentView=None, languageCode=None, pageSize=None, pageToken=None, x__xgafv=None)
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'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.
  "intents": [ # 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'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.
      "description": "A String", # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
      "displayName": "A String", # Required. The human-readable name of the intent, unique within the agent.
      "isFallback": 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.
      "labels": { # 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.
        "a_key": "A String",
      },
      "name": "A String", # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
      "parameters": [ # The collection of parameters associated with the intent.
        { # Represents an intent parameter.
          "entityType": "A String", # 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.
          "id": "A String", # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
          "isList": True or False, # Indicates whether the parameter represents a list of values.
          "redact": 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.
        },
      ],
      "priority": 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.
      "trainingPhrases": [ # 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.
          "id": "A String", # Output only. The unique identifier of the training phrase.
          "parts": [ # 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.
              "parameterId": "A String", # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
              "text": "A String", # Required. The text for this part.
            },
          ],
          "repeatCount": 42, # Indicates how many times this example was added to the intent.
        },
      ],
    },
  ],
  "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
}
list_next()
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 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(name, body=None, languageCode=None, updateMask=None, x__xgafv=None)
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'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.
  "description": "A String", # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
  "displayName": "A String", # Required. The human-readable name of the intent, unique within the agent.
  "isFallback": 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.
  "labels": { # 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.
    "a_key": "A String",
  },
  "name": "A String", # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
  "parameters": [ # The collection of parameters associated with the intent.
    { # Represents an intent parameter.
      "entityType": "A String", # 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.
      "id": "A String", # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
      "isList": True or False, # Indicates whether the parameter represents a list of values.
      "redact": 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.
    },
  ],
  "priority": 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.
  "trainingPhrases": [ # 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.
      "id": "A String", # Output only. The unique identifier of the training phrase.
      "parts": [ # 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.
          "parameterId": "A String", # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
          "text": "A String", # Required. The text for this part.
        },
      ],
      "repeatCount": 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'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'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.
  "description": "A String", # Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
  "displayName": "A String", # Required. The human-readable name of the intent, unique within the agent.
  "isFallback": 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.
  "labels": { # 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.
    "a_key": "A String",
  },
  "name": "A String", # The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`.
  "parameters": [ # The collection of parameters associated with the intent.
    { # Represents an intent parameter.
      "entityType": "A String", # 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.
      "id": "A String", # Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
      "isList": True or False, # Indicates whether the parameter represents a list of values.
      "redact": 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.
    },
  ],
  "priority": 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.
  "trainingPhrases": [ # 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.
      "id": "A String", # Output only. The unique identifier of the training phrase.
      "parts": [ # 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.
          "parameterId": "A String", # The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
          "text": "A String", # Required. The text for this part.
        },
      ],
      "repeatCount": 42, # Indicates how many times this example was added to the intent.
    },
  ],
}