Google Cloud Dialogflow v2 API - Class Agents.AgentsBase (4.22.0)

[BindServiceMethod(typeof(Agents), "BindService")]
public abstract class Agents.AgentsBase

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class Agents.AgentsBase.

Base class for server-side implementations of Agents

Inheritance

object > Agents.AgentsBase

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Methods

DeleteAgent(DeleteAgentRequest, ServerCallContext)

public virtual Task<Empty> DeleteAgent(DeleteAgentRequest request, ServerCallContext context)

Deletes the specified agent.

Parameters
Name Description
request DeleteAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskEmpty

The response to send back to the client (wrapped by a task).

ExportAgent(ExportAgentRequest, ServerCallContext)

public virtual Task<Operation> ExportAgent(ExportAgentRequest request, ServerCallContext context)

Exports the specified agent to a ZIP 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.v2.ExportAgentResponse]
Parameters
Name Description
request ExportAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

GetAgent(GetAgentRequest, ServerCallContext)

public virtual Task<Agent> GetAgent(GetAgentRequest request, ServerCallContext context)

Retrieves the specified agent.

Parameters
Name Description
request GetAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskAgent

The response to send back to the client (wrapped by a task).

GetValidationResult(GetValidationResultRequest, ServerCallContext)

public virtual Task<ValidationResult> GetValidationResult(GetValidationResultRequest request, ServerCallContext context)

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

Parameters
Name Description
request GetValidationResultRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskValidationResult

The response to send back to the client (wrapped by a task).

ImportAgent(ImportAgentRequest, ServerCallContext)

public virtual Task<Operation> ImportAgent(ImportAgentRequest request, ServerCallContext context)

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][google.cloud.dialogflow.v2.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][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train explicitly.

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

The operation only tracks when importing is complete, not when it is done training.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request ImportAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

RestoreAgent(RestoreAgentRequest, ServerCallContext)

public virtual Task<Operation> RestoreAgent(RestoreAgentRequest request, ServerCallContext context)

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][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train explicitly.

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

The operation only tracks when restoring is complete, not when it is done training.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request RestoreAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

SearchAgents(SearchAgentsRequest, ServerCallContext)

public virtual Task<SearchAgentsResponse> SearchAgents(SearchAgentsRequest request, ServerCallContext context)

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.

Parameters
Name Description
request SearchAgentsRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskSearchAgentsResponse

The response to send back to the client (wrapped by a task).

SetAgent(SetAgentRequest, ServerCallContext)

public virtual Task<Agent> SetAgent(SetAgentRequest request, ServerCallContext context)

Creates/updates the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request SetAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskAgent

The response to send back to the client (wrapped by a task).

TrainAgent(TrainAgentRequest, ServerCallContext)

public virtual Task<Operation> TrainAgent(TrainAgentRequest request, ServerCallContext context)

Trains the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request TrainAgentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).