As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Agents

class google.cloud.dialogflowcx_v3.services.agents.AgentsAsyncClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.dialogflowcx_v3.services.agents.transports.base.AgentsTransport] = 'grpc_asyncio', client_options: <module 'google.api_core.client_options' from '/workspace/.nox/docs/lib/python3.8/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Service for managing [Agents][google.cloud.dialogflow.cx.v3.Agent].

Instantiates the agents client.

Parameters
  • credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

  • transport (Union[str, AgentsTransport]) – The transport to use. If set to None, a transport is chosen automatically.

  • client_options (ClientOptions) – Custom options for the client. It won’t take effect if a transport instance is provided. (1) The api_endpoint property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, the api_endpoint property takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

static agent_path(project: str, location: str, agent: str)str

Returns a fully-qualified agent string.

static agent_validation_result_path(project: str, location: str, agent: str)str

Returns a fully-qualified agent_validation_result string.

static common_billing_account_path(billing_account: str)str

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str)str

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str)str

Returns a fully-qualified location string.

static common_organization_path(organization: str)str

Returns a fully-qualified organization string.

static common_project_path(project: str)str

Returns a fully-qualified project string.

async create_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.CreateAgentRequest] = None, *, parent: Optional[str] = None, agent: Optional[google.cloud.dialogflowcx_v3.types.agent.Agent] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.Agent[source]

Creates an agent in the specified location.

Note: You should always train flows prior to sending them queries. See the training documentation.

Parameters
  • request (google.cloud.dialogflowcx_v3.types.CreateAgentRequest) – The request object. The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent].

  • parent (str) –

    Required. The location to create a agent for. Format: projects/<Project ID>/locations/<Location ID>.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • agent (google.cloud.dialogflowcx_v3.types.Agent) – Required. The agent to create. This corresponds to the agent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Agents are best described as Natural Language Understanding (NLU) modules

that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent], [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..

Return type

google.cloud.dialogflowcx_v3.types.Agent

async delete_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.DeleteAgentRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())None[source]

Deletes the specified agent.

Parameters
  • request (google.cloud.dialogflowcx_v3.types.DeleteAgentRequest) – The request object. The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3.Agents.DeleteAgent].

  • name (str) –

    Required. The name of the agent to delete. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

static environment_path(project: str, location: str, agent: str, environment: str)str

Returns a fully-qualified environment string.

async export_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.ExportAgentRequest] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.api_core.operation_async.AsyncOperation[source]

Exports the specified agent to a binary file.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: An empty Struct message

  • response: [ExportAgentResponse][google.cloud.dialogflow.cx.v3.ExportAgentResponse]

Parameters
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.dialogflowcx_v3.types.ExportAgentResponse The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent].

Return type

google.api_core.operation_async.AsyncOperation

static flow_path(project: str, location: str, agent: str, flow: str)str

Returns a fully-qualified flow string.

static flow_validation_result_path(project: str, location: str, agent: str, flow: str)str

Returns a fully-qualified flow_validation_result string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

AgentsAsyncClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

AgentsAsyncClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

AgentsAsyncClient

async get_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.GetAgentRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.Agent[source]

Retrieves the specified agent.

Parameters
  • request (google.cloud.dialogflowcx_v3.types.GetAgentRequest) – The request object. The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3.Agents.GetAgent].

  • name (str) –

    Required. The name of the agent. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Agents are best described as Natural Language Understanding (NLU) modules

that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent], [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..

Return type

google.cloud.dialogflowcx_v3.types.Agent

async get_agent_validation_result(request: Optional[google.cloud.dialogflowcx_v3.types.agent.GetAgentValidationResultRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.AgentValidationResult[source]

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.

Parameters
  • request (google.cloud.dialogflowcx_v3.types.GetAgentValidationResultRequest) – The request object. The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].

  • name (str) –

    Required. The agent name. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/validationResult.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].

Return type

google.cloud.dialogflowcx_v3.types.AgentValidationResult

get_transport_class()Type[google.cloud.dialogflowcx_v3.services.agents.transports.base.AgentsTransport]

Returns an appropriate transport class.

Parameters

label – The name of the desired transport. If none is provided, then the first transport in the registry is used.

Returns

The transport class to use.

async list_agents(request: Optional[google.cloud.dialogflowcx_v3.types.agent.ListAgentsRequest] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.services.agents.pagers.ListAgentsAsyncPager[source]

Returns the list of all agents in the specified location.

Parameters
  • request (google.cloud.dialogflowcx_v3.types.ListAgentsRequest) – The request object. The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents].

  • parent (str) –

    Required. The location to list all agents for. Format: projects/<Project ID>/locations/<Location ID>.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.dialogflowcx_v3.services.agents.pagers.ListAgentsAsyncPager

static parse_agent_path(path: str)Dict[str, str]

Parses a agent path into its component segments.

static parse_agent_validation_result_path(path: str)Dict[str, str]

Parses a agent_validation_result path into its component segments.

static parse_common_billing_account_path(path: str)Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str)Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str)Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str)Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str)Dict[str, str]

Parse a project path into its component segments.

static parse_environment_path(path: str)Dict[str, str]

Parses a environment path into its component segments.

static parse_flow_path(path: str)Dict[str, str]

Parses a flow path into its component segments.

static parse_flow_validation_result_path(path: str)Dict[str, str]

Parses a flow_validation_result path into its component segments.

static parse_security_settings_path(path: str)Dict[str, str]

Parses a security_settings path into its component segments.

async restore_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.RestoreAgentRequest] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.api_core.operation_async.AsyncOperation[source]

Restores the specified agent from a binary file.

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. intents, entity types, flows) will be removed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

Note: You should always train flows prior to sending them queries. See the training documentation.

Parameters
Returns

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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 {}.

Return type

google.api_core.operation_async.AsyncOperation

static security_settings_path(project: str, location: str, security_settings: str)str

Returns a fully-qualified security_settings string.

property transport: google.cloud.dialogflowcx_v3.services.agents.transports.base.AgentsTransport

Returns the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

AgentsTransport

async update_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.UpdateAgentRequest] = None, *, agent: Optional[google.cloud.dialogflowcx_v3.types.agent.Agent] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.Agent[source]

Updates the specified agent.

Note: You should always train flows prior to sending them queries. See the training documentation.

Parameters
  • request (google.cloud.dialogflowcx_v3.types.UpdateAgentRequest) – The request object. The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent].

  • agent (google.cloud.dialogflowcx_v3.types.Agent) – Required. The agent to update. This corresponds to the agent field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    The mask to control which fields get updated. If the mask is not present, all fields will be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Agents are best described as Natural Language Understanding (NLU) modules

that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent], [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..

Return type

google.cloud.dialogflowcx_v3.types.Agent

async validate_agent(request: Optional[google.cloud.dialogflowcx_v3.types.agent.ValidateAgentRequest] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.AgentValidationResult[source]

Validates the specified agent and creates or updates validation results. The agent in draft version is validated. Please call this API after the training is completed to get the complete validation results.

Parameters
Returns

The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].

Return type

google.cloud.dialogflowcx_v3.types.AgentValidationResult

class google.cloud.dialogflowcx_v3.services.agents.AgentsClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.dialogflowcx_v3.services.agents.transports.base.AgentsTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Service for managing [Agents][google.cloud.dialogflow.cx.v3.Agent].

Instantiates the agents client.

Parameters
  • credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

  • transport (Union[str, AgentsTransport]) – The transport to use. If set to None, a transport is chosen automatically.

  • client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. It won’t take effect if a transport instance is provided. (1) The api_endpoint property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, the api_endpoint property takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

__exit__(type, value, traceback)[source]

Releases underlying transport’s resources.

Warning

ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!

static agent_path(project: str, location: str, agent: str)str[source]

Returns a fully-qualified agent string.

static agent_validation_result_path(project: str, location: str, agent: str)str[source]

Returns a fully-qualified agent_validation_result string.

static common_billing_account_path(billing_account: str)str[source]

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str)str[source]

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str)str[source]

Returns a fully-qualified location string.

static common_organization_path(organization: str)str[source]

Returns a fully-qualified organization string.

static common_project_path(project: str)str[source]

Returns a fully-qualified project string.

create_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.CreateAgentRequest, dict]] = None, *, parent: Optional[str] = None, agent: Optional[google.cloud.dialogflowcx_v3.types.agent.Agent] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.Agent[source]

Creates an agent in the specified location.

Note: You should always train flows prior to sending them queries. See the training documentation.

Parameters
  • request (Union[google.cloud.dialogflowcx_v3.types.CreateAgentRequest, dict]) – The request object. The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent].

  • parent (str) –

    Required. The location to create a agent for. Format: projects/<Project ID>/locations/<Location ID>.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • agent (google.cloud.dialogflowcx_v3.types.Agent) – Required. The agent to create. This corresponds to the agent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Agents are best described as Natural Language Understanding (NLU) modules

that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent], [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..

Return type

google.cloud.dialogflowcx_v3.types.Agent

delete_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.DeleteAgentRequest, dict]] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())None[source]

Deletes the specified agent.

Parameters
  • request (Union[google.cloud.dialogflowcx_v3.types.DeleteAgentRequest, dict]) – The request object. The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3.Agents.DeleteAgent].

  • name (str) –

    Required. The name of the agent to delete. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

static environment_path(project: str, location: str, agent: str, environment: str)str[source]

Returns a fully-qualified environment string.

export_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.ExportAgentRequest, dict]] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.api_core.operation.Operation[source]

Exports the specified agent to a binary file.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: An empty Struct message

  • response: [ExportAgentResponse][google.cloud.dialogflow.cx.v3.ExportAgentResponse]

Parameters
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.dialogflowcx_v3.types.ExportAgentResponse The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent].

Return type

google.api_core.operation.Operation

static flow_path(project: str, location: str, agent: str, flow: str)str[source]

Returns a fully-qualified flow string.

static flow_validation_result_path(project: str, location: str, agent: str, flow: str)str[source]

Returns a fully-qualified flow_validation_result string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

AgentsClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

AgentsClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

AgentsClient

get_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.GetAgentRequest, dict]] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.Agent[source]

Retrieves the specified agent.

Parameters
  • request (Union[google.cloud.dialogflowcx_v3.types.GetAgentRequest, dict]) – The request object. The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3.Agents.GetAgent].

  • name (str) –

    Required. The name of the agent. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Agents are best described as Natural Language Understanding (NLU) modules

that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent], [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..

Return type

google.cloud.dialogflowcx_v3.types.Agent

get_agent_validation_result(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.GetAgentValidationResultRequest, dict]] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.AgentValidationResult[source]

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.

Parameters
  • request (Union[google.cloud.dialogflowcx_v3.types.GetAgentValidationResultRequest, dict]) – The request object. The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].

  • name (str) –

    Required. The agent name. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/validationResult.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].

Return type

google.cloud.dialogflowcx_v3.types.AgentValidationResult

list_agents(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.ListAgentsRequest, dict]] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.services.agents.pagers.ListAgentsPager[source]

Returns the list of all agents in the specified location.

Parameters
  • request (Union[google.cloud.dialogflowcx_v3.types.ListAgentsRequest, dict]) – The request object. The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents].

  • parent (str) –

    Required. The location to list all agents for. Format: projects/<Project ID>/locations/<Location ID>.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.dialogflowcx_v3.services.agents.pagers.ListAgentsPager

static parse_agent_path(path: str)Dict[str, str][source]

Parses a agent path into its component segments.

static parse_agent_validation_result_path(path: str)Dict[str, str][source]

Parses a agent_validation_result path into its component segments.

static parse_common_billing_account_path(path: str)Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str)Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str)Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str)Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str)Dict[str, str][source]

Parse a project path into its component segments.

static parse_environment_path(path: str)Dict[str, str][source]

Parses a environment path into its component segments.

static parse_flow_path(path: str)Dict[str, str][source]

Parses a flow path into its component segments.

static parse_flow_validation_result_path(path: str)Dict[str, str][source]

Parses a flow_validation_result path into its component segments.

static parse_security_settings_path(path: str)Dict[str, str][source]

Parses a security_settings path into its component segments.

restore_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.RestoreAgentRequest, dict]] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.api_core.operation.Operation[source]

Restores the specified agent from a binary file.

Replaces the current agent with a new one. Note that all existing resources in agent (e.g. intents, entity types, flows) will be removed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

Note: You should always train flows prior to sending them queries. See the training documentation.

Parameters
Returns

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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 {}.

Return type

google.api_core.operation.Operation

static security_settings_path(project: str, location: str, security_settings: str)str[source]

Returns a fully-qualified security_settings string.

property transport: google.cloud.dialogflowcx_v3.services.agents.transports.base.AgentsTransport

Returns the transport used by the client instance.

Returns

The transport used by the client

instance.

Return type

AgentsTransport

update_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.UpdateAgentRequest, dict]] = None, *, agent: Optional[google.cloud.dialogflowcx_v3.types.agent.Agent] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.Agent[source]

Updates the specified agent.

Note: You should always train flows prior to sending them queries. See the training documentation.

Parameters
  • request (Union[google.cloud.dialogflowcx_v3.types.UpdateAgentRequest, dict]) – The request object. The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent].

  • agent (google.cloud.dialogflowcx_v3.types.Agent) – Required. The agent to update. This corresponds to the agent field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    The mask to control which fields get updated. If the mask is not present, all fields will be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Agents are best described as Natural Language Understanding (NLU) modules

that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent], [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..

Return type

google.cloud.dialogflowcx_v3.types.Agent

validate_agent(request: Optional[Union[google.cloud.dialogflowcx_v3.types.agent.ValidateAgentRequest, dict]] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())google.cloud.dialogflowcx_v3.types.agent.AgentValidationResult[source]

Validates the specified agent and creates or updates validation results. The agent in draft version is validated. Please call this API after the training is completed to get the complete validation results.

Parameters
Returns

The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult].

Return type

google.cloud.dialogflowcx_v3.types.AgentValidationResult

class google.cloud.dialogflowcx_v3.services.agents.pagers.ListAgentsAsyncPager(method: Callable[[...], Awaitable[google.cloud.dialogflowcx_v3.types.agent.ListAgentsResponse]], request: google.cloud.dialogflowcx_v3.types.agent.ListAgentsRequest, response: google.cloud.dialogflowcx_v3.types.agent.ListAgentsResponse, *, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_agents requests.

This class thinly wraps an initial google.cloud.dialogflowcx_v3.types.ListAgentsResponse object, and provides an __aiter__ method to iterate through its agents field.

If there are more pages, the __aiter__ method will make additional ListAgents requests and continue to iterate through the agents field on the corresponding responses.

All the usual google.cloud.dialogflowcx_v3.types.ListAgentsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.dialogflowcx_v3.services.agents.pagers.ListAgentsPager(method: Callable[[...], google.cloud.dialogflowcx_v3.types.agent.ListAgentsResponse], request: google.cloud.dialogflowcx_v3.types.agent.ListAgentsRequest, response: google.cloud.dialogflowcx_v3.types.agent.ListAgentsResponse, *, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_agents requests.

This class thinly wraps an initial google.cloud.dialogflowcx_v3.types.ListAgentsResponse object, and provides an __iter__ method to iterate through its agents field.

If there are more pages, the __iter__ method will make additional ListAgents requests and continue to iterate through the agents field on the corresponding responses.

All the usual google.cloud.dialogflowcx_v3.types.ListAgentsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters