class ProjectsLocationsAgents extends Resource (View source)

The "agents" collection of methods.

Typical usage is:

 $dialogflowService = new Google\Service\Dialogflow(...);
 $agents = $dialogflowService->projects_locations_agents;

Methods

create(string $parent, GoogleCloudDialogflowCxV3Agent $postBody, array $optParams = [])

Creates an agent in the specified location. Note: You should always train flows prior to sending them queries. See the training documentation.

delete(string $name, array $optParams = [])

Deletes the specified agent. (agents.delete)

export(string $name, GoogleCloudDialogflowCxV3ExportAgentRequest $postBody, array $optParams = [])

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 (agents.export)

get(string $name, array $optParams = [])

Retrieves the specified agent. (agents.get)

getGenerativeSettings(string $name, array $optParams = [])

Gets the generative settings for the agent. (agents.getGenerativeSettings)

getValidationResult(string $name, array $optParams = [])

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called. (agents.getValidationResult)

listProjectsLocationsAgents(string $parent, array $optParams = [])

Returns the list of all agents in the specified location.

patch(string $name, GoogleCloudDialogflowCxV3Agent $postBody, array $optParams = [])

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

restore(string $name, GoogleCloudDialogflowCxV3RestoreAgentRequest $postBody, array $optParams = [])

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: - metadata: An empty Struct message - response: An Empty message Note: You should always train flows prior to sending them queries. See the training documentation.

updateGenerativeSettings(string $name, GoogleCloudDialogflowCxV3GenerativeSettings $postBody, array $optParams = [])

Updates the generative settings for the agent.

validate(string $name, GoogleCloudDialogflowCxV3ValidateAgentRequest $postBody, array $optParams = [])

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. (agents.validate)

Details

GoogleCloudDialogflowCxV3Agent create(string $parent, GoogleCloudDialogflowCxV3Agent $postBody, array $optParams = [])

Creates an agent in the specified location. Note: You should always train flows prior to sending them queries. See the training documentation.

(agents.create)

Parameters

string $parent

Required. The location to create a agent for. Format: projects//locations/.

GoogleCloudDialogflowCxV3Agent $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3Agent

Exceptions

Exception

GoogleProtobufEmpty delete(string $name, array $optParams = [])

Deletes the specified agent. (agents.delete)

Parameters

string $name

Required. The name of the agent to delete. Format: projects//locations//agents/.

array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleLongrunningOperation export(string $name, GoogleCloudDialogflowCxV3ExportAgentRequest $postBody, array $optParams = [])

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 (agents.export)

Parameters

string $name

Required. The name of the agent to export. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3ExportAgentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDialogflowCxV3Agent get(string $name, array $optParams = [])

Retrieves the specified agent. (agents.get)

Parameters

string $name

Required. The name of the agent. Format: projects//locations//agents/.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3Agent

Exceptions

Exception

GoogleCloudDialogflowCxV3GenerativeSettings getGenerativeSettings(string $name, array $optParams = [])

Gets the generative settings for the agent. (agents.getGenerativeSettings)

Parameters

string $name

Required. Format: projects//locations//agents//generativeSettings.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3GenerativeSettings

Exceptions

Exception

GoogleCloudDialogflowCxV3AgentValidationResult getValidationResult(string $name, array $optParams = [])

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called. (agents.getValidationResult)

Parameters

string $name

Required. The agent name. Format: projects//locations//agents//validationResult.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3AgentValidationResult

Exceptions

Exception

GoogleCloudDialogflowCxV3ListAgentsResponse listProjectsLocationsAgents(string $parent, array $optParams = [])

Returns the list of all agents in the specified location.

(agents.listProjectsLocationsAgents)

Parameters

string $parent

Required. The location to list all agents for. Format: projects//locations/.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3ListAgentsResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3Agent patch(string $name, GoogleCloudDialogflowCxV3Agent $postBody, array $optParams = [])

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

(agents.patch)

Parameters

string $name

The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3Agent $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3Agent

Exceptions

Exception

GoogleLongrunningOperation restore(string $name, GoogleCloudDialogflowCxV3RestoreAgentRequest $postBody, array $optParams = [])

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: - metadata: An empty Struct message - response: An Empty message Note: You should always train flows prior to sending them queries. See the training documentation.

(agents.restore)

Parameters

string $name

Required. The name of the agent to restore into. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3RestoreAgentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDialogflowCxV3GenerativeSettings updateGenerativeSettings(string $name, GoogleCloudDialogflowCxV3GenerativeSettings $postBody, array $optParams = [])

Updates the generative settings for the agent.

(agents.updateGenerativeSettings)

Parameters

string $name

Format: projects//locations//agents//generativeSettings.

GoogleCloudDialogflowCxV3GenerativeSettings $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3GenerativeSettings

Exceptions

Exception

GoogleCloudDialogflowCxV3AgentValidationResult validate(string $name, GoogleCloudDialogflowCxV3ValidateAgentRequest $postBody, array $optParams = [])

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. (agents.validate)

Parameters

string $name

Required. The agent to validate. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3ValidateAgentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3AgentValidationResult

Exceptions

Exception