Class AgentsClient (0.8.0)

AgentsClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.dialogflowcx_v3beta1.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>)

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

Inheritance

builtins.object > AgentsClient

Properties

transport

Returns the transport used by the client instance.

Returns
TypeDescription
AgentsTransportThe transport used by the client instance.

Methods

agent_path

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

Returns a fully-qualified agent string.

Parameters
NameDescription
project
location
agent

agent_validation_result_path

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

Returns a fully-qualified agent_validation_result string.

Parameters
NameDescription
project
location
agent

common_billing_account_path

common_billing_account_path(billing_account: str)

Returns a fully-qualified billing_account string.

Parameter
NameDescription
billing_account

common_folder_path

common_folder_path(folder: str)

Returns a fully-qualified folder string.

Parameter
NameDescription
folder

common_location_path

common_location_path(project: str, location: str)

Returns a fully-qualified location string.

Parameters
NameDescription
project
location

common_organization_path

common_organization_path(organization: str)

Returns a fully-qualified organization string.

Parameter
NameDescription
organization

common_project_path

common_project_path(project: str)

Returns a fully-qualified project string.

Parameter
NameDescription
project

create_agent

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

Creates an agent in the specified location.

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>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.CreateAgentRequest

The request object. The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent].

Returns
TypeDescription
google.cloud.dialogflowcx_v3beta1.types.AgentAgents 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.v3beta1.Intent], [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows..

delete_agent

delete_agent(request: Optional[google.cloud.dialogflowcx_v3beta1.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]] = ())

Deletes the specified agent.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.DeleteAgentRequest

The request object. The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent].

environment_path

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

Returns a fully-qualified environment string.

Parameters
NameDescription
project
location
agent
environment

export_agent

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

Exports the specified agent to a binary file.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.ExportAgentRequest

The request object. The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent].

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be

flow_path

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

Returns a fully-qualified flow string.

Parameters
NameDescription
project
location
agent
flow

flow_validation_result_path

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

Returns a fully-qualified flow_validation_result string.

Parameters
NameDescription
project
location
agent
flow

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameters
NameDescription
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
TypeDescription
AgentsClientThe constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameters
NameDescription
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
TypeDescription
AgentsClientThe constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameters
NameDescription
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
TypeDescription
AgentsClientThe constructed client.

get_agent

get_agent(request: Optional[google.cloud.dialogflowcx_v3beta1.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]] = ())

Retrieves the specified agent.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.GetAgentRequest

The request object. The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent].

Returns
TypeDescription
google.cloud.dialogflowcx_v3beta1.types.AgentAgents 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.v3beta1.Intent], [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows..

get_agent_validation_result

get_agent_validation_result(request: Optional[google.cloud.dialogflowcx_v3beta1.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]] = ())

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

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.GetAgentValidationResultRequest

The request object. The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].

Returns
TypeDescription
google.cloud.dialogflowcx_v3beta1.types.AgentValidationResultThe response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].

list_agents

list_agents(request: Optional[google.cloud.dialogflowcx_v3beta1.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]] = ())

Returns the list of all agents in the specified location.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.ListAgentsRequest

The request object. The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].

Returns
TypeDescription
google.cloud.dialogflowcx_v3beta1.services.agents.pagers.ListAgentsPagerThe response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. Iterating over this object will yield results and resolve additional pages automatically.

parse_agent_path

parse_agent_path(path: str)

Parses a agent path into its component segments.

Parameter
NameDescription
path

parse_agent_validation_result_path

parse_agent_validation_result_path(path: str)

Parses a agent_validation_result path into its component segments.

Parameter
NameDescription
path

parse_common_billing_account_path

parse_common_billing_account_path(path: str)

Parse a billing_account path into its component segments.

Parameter
NameDescription
path

parse_common_folder_path

parse_common_folder_path(path: str)

Parse a folder path into its component segments.

Parameter
NameDescription
path

parse_common_location_path

parse_common_location_path(path: str)

Parse a location path into its component segments.

Parameter
NameDescription
path

parse_common_organization_path

parse_common_organization_path(path: str)

Parse a organization path into its component segments.

Parameter
NameDescription
path

parse_common_project_path

parse_common_project_path(path: str)

Parse a project path into its component segments.

Parameter
NameDescription
path

parse_environment_path

parse_environment_path(path: str)

Parses a environment path into its component segments.

Parameter
NameDescription
path

parse_flow_path

parse_flow_path(path: str)

Parses a flow path into its component segments.

Parameter
NameDescription
path

parse_flow_validation_result_path

parse_flow_validation_result_path(path: str)

Parses a flow_validation_result path into its component segments.

Parameter
NameDescription
path

parse_security_settings_path

parse_security_settings_path(path: str)

Parses a security_settings path into its component segments.

Parameter
NameDescription
path

restore_agent

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

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.

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>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.RestoreAgentRequest

The request object. The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent].

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be

security_settings_path

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

Returns a fully-qualified security_settings string.

Parameters
NameDescription
project
location
security_settings

update_agent

update_agent(request: Optional[google.cloud.dialogflowcx_v3beta1.types.agent.UpdateAgentRequest] = None, *, agent: Optional[google.cloud.dialogflowcx_v3beta1.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]] = ())

Updates 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>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.UpdateAgentRequest

The request object. The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent].

Returns
TypeDescription
google.cloud.dialogflowcx_v3beta1.types.AgentAgents 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.v3beta1.Intent], [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows..

validate_agent

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

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.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3beta1.types.ValidateAgentRequest

The request object. The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent].

Returns
TypeDescription
google.cloud.dialogflowcx_v3beta1.types.AgentValidationResultThe response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult].