Documentation

Google_Service_Dialogflow_Resource_ProjectsAgent extends Google_Service_Resource
in package

The "agent" collection of methods.

Typical usage is: $dialogflowService = new Google_Service_Dialogflow(...); $agent = $dialogflowService->agent;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
export()  : Google_Service_Dialogflow_GoogleLongrunningOperation
Exports the specified agent to a ZIP file. Operation (agent.export)
getFulfillment()  : Google_Service_Dialogflow_GoogleCloudDialogflowV2Fulfillment
Retrieves the fulfillment. (agent.getFulfillment)
getValidationResult()  : Google_Service_Dialogflow_GoogleCloudDialogflowV2ValidationResult
Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.
import()  : Google_Service_Dialogflow_GoogleLongrunningOperation
Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. (agent.import)
restore()  : Google_Service_Dialogflow_GoogleLongrunningOperation
Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. (agent.restore)
search()  : Google_Service_Dialogflow_GoogleCloudDialogflowV2SearchAgentsResponse
Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub- Collections](https://cloud.google.com/apis/design/design_patterns#list_sub- collections). (agent.search)
train()  : Google_Service_Dialogflow_GoogleLongrunningOperation
Trains the specified agent. Operation (agent.train)
updateFulfillment()  : Google_Service_Dialogflow_GoogleCloudDialogflowV2Fulfillment
Updates the fulfillment. (agent.updateFulfillment)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

export()

Exports the specified agent to a ZIP file. Operation (agent.export)

public export(string $parent, Google_Service_Dialogflow_GoogleCloudDialogflowV2ExportAgentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleLongrunningOperation
Parameters
$parent : string

Required. The project that the agent to export is associated with. Format: projects/.

$postBody : Google_Service_Dialogflow_GoogleCloudDialogflowV2ExportAgentRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Dialogflow_GoogleLongrunningOperation

getValidationResult()

Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.

public getValidationResult(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleCloudDialogflowV2ValidationResult

(agent.getValidationResult)

Parameters
$parent : string

Required. The project that the agent is associated with. Format: projects/.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string languageCode Optional. The language for which you want a validation result. If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

Return values
Google_Service_Dialogflow_GoogleCloudDialogflowV2ValidationResult

import()

Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. (agent.import)

public import(string $parent, Google_Service_Dialogflow_GoogleCloudDialogflowV2ImportAgentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleLongrunningOperation
Parameters
$parent : string

Required. The project that the agent to import is associated with. Format: projects/.

$postBody : Google_Service_Dialogflow_GoogleCloudDialogflowV2ImportAgentRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Dialogflow_GoogleLongrunningOperation

restore()

Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. (agent.restore)

public restore(string $parent, Google_Service_Dialogflow_GoogleCloudDialogflowV2RestoreAgentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleLongrunningOperation
Parameters
$parent : string

Required. The project that the agent to restore is associated with. Format: projects/.

$postBody : Google_Service_Dialogflow_GoogleCloudDialogflowV2RestoreAgentRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Dialogflow_GoogleLongrunningOperation

Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub- Collections](https://cloud.google.com/apis/design/design_patterns#list_sub- collections). (agent.search)

public search(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleCloudDialogflowV2SearchAgentsResponse
Parameters
$parent : string

Required. The project to list agents from. Format: projects/.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string pageToken The next_page_token value returned from a previous list request.

opt_param

int pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.

Return values
Google_Service_Dialogflow_GoogleCloudDialogflowV2SearchAgentsResponse

train()

Trains the specified agent. Operation (agent.train)

public train(string $parent, Google_Service_Dialogflow_GoogleCloudDialogflowV2TrainAgentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleLongrunningOperation
Parameters
$parent : string

Required. The project that the agent to train is associated with. Format: projects/.

$postBody : Google_Service_Dialogflow_GoogleCloudDialogflowV2TrainAgentRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Dialogflow_GoogleLongrunningOperation

updateFulfillment()

Updates the fulfillment. (agent.updateFulfillment)

public updateFulfillment(string $name, Google_Service_Dialogflow_GoogleCloudDialogflowV2Fulfillment $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Dialogflow_GoogleCloudDialogflowV2Fulfillment
Parameters
$name : string

Required. The unique identifier of the fulfillment. Format: projects//agent/fulfillment.

$postBody : Google_Service_Dialogflow_GoogleCloudDialogflowV2Fulfillment
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

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

Return values
Google_Service_Dialogflow_GoogleCloudDialogflowV2Fulfillment

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results