Google Cloud Dialogflow v2beta1 API - Class AgentsClientImpl (1.0.0-beta21)

public sealed class AgentsClientImpl : AgentsClient

Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class AgentsClientImpl.

Agents client wrapper implementation, for convenient use.

Inheritance

object > AgentsClient > AgentsClientImpl

Namespace

Google.Cloud.Dialogflow.V2Beta1

Assembly

Google.Cloud.Dialogflow.V2Beta1.dll

Remarks

Service for managing [Agents][google.cloud.dialogflow.v2beta1.Agent].

Constructors

AgentsClientImpl(AgentsClient, AgentsSettings, ILogger)

public AgentsClientImpl(Agents.AgentsClient grpcClient, AgentsSettings settings, ILogger logger)

Constructs a client wrapper for the Agents service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient AgentsAgentsClient

The underlying gRPC client.

settings AgentsSettings

The base AgentsSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

ExportAgentOperationsClient

public override OperationsClient ExportAgentOperationsClient { get; }

The long-running operations client for ExportAgent.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override Agents.AgentsClient GrpcClient { get; }

The underlying gRPC Agents client

Property Value
Type Description
AgentsAgentsClient
Overrides

ImportAgentOperationsClient

public override OperationsClient ImportAgentOperationsClient { get; }

The long-running operations client for ImportAgent.

Property Value
Type Description
OperationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient
Overrides

RestoreAgentOperationsClient

public override OperationsClient RestoreAgentOperationsClient { get; }

The long-running operations client for RestoreAgent.

Property Value
Type Description
OperationsClient
Overrides

TrainAgentOperationsClient

public override OperationsClient TrainAgentOperationsClient { get; }

The long-running operations client for TrainAgent.

Property Value
Type Description
OperationsClient
Overrides

Methods

DeleteAgent(DeleteAgentRequest, CallSettings)

public override void DeleteAgent(DeleteAgentRequest request, CallSettings callSettings = null)

Deletes the specified agent.

Parameters
Name Description
request DeleteAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteAgentAsync(DeleteAgentRequest, CallSettings)

public override Task DeleteAgentAsync(DeleteAgentRequest request, CallSettings callSettings = null)

Deletes the specified agent.

Parameters
Name Description
request DeleteAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

ExportAgent(ExportAgentRequest, CallSettings)

public override Operation<ExportAgentResponse, Struct> ExportAgent(ExportAgentRequest request, CallSettings callSettings = null)

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.v2beta1.ExportAgentResponse]
Parameters
Name Description
request ExportAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExportAgentResponseStruct

The RPC response.

Overrides

ExportAgentAsync(ExportAgentRequest, CallSettings)

public override Task<Operation<ExportAgentResponse, Struct>> ExportAgentAsync(ExportAgentRequest request, CallSettings callSettings = null)

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.v2beta1.ExportAgentResponse]
Parameters
Name Description
request ExportAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExportAgentResponseStruct

A Task containing the RPC response.

Overrides

GetAgent(GetAgentRequest, CallSettings)

public override Agent GetAgent(GetAgentRequest request, CallSettings callSettings = null)

Retrieves the specified agent.

Parameters
Name Description
request GetAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Agent

The RPC response.

Overrides

GetAgentAsync(GetAgentRequest, CallSettings)

public override Task<Agent> GetAgentAsync(GetAgentRequest request, CallSettings callSettings = null)

Retrieves the specified agent.

Parameters
Name Description
request GetAgentRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Overrides

GetValidationResult(GetValidationResultRequest, CallSettings)

public override ValidationResult GetValidationResult(GetValidationResultRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ValidationResult

The RPC response.

Overrides

GetValidationResultAsync(GetValidationResultRequest, CallSettings)

public override Task<ValidationResult> GetValidationResultAsync(GetValidationResultRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskValidationResult

A Task containing the RPC response.

Overrides

ImportAgent(ImportAgentRequest, CallSettings)

public override Operation<Empty, Struct> ImportAgent(ImportAgentRequest request, CallSettings callSettings = null)

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.v2beta1.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.v2beta1.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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Overrides

ImportAgentAsync(ImportAgentRequest, CallSettings)

public override Task<Operation<Empty, Struct>> ImportAgentAsync(ImportAgentRequest request, CallSettings callSettings = null)

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.v2beta1.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.v2beta1.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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Overrides

RestoreAgent(RestoreAgentRequest, CallSettings)

public override Operation<Empty, Struct> RestoreAgent(RestoreAgentRequest request, CallSettings callSettings = null)

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.v2beta1.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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Overrides

RestoreAgentAsync(RestoreAgentRequest, CallSettings)

public override Task<Operation<Empty, Struct>> RestoreAgentAsync(RestoreAgentRequest request, CallSettings callSettings = null)

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.v2beta1.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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Overrides

SearchAgents(SearchAgentsRequest, CallSettings)

public override PagedEnumerable<SearchAgentsResponse, Agent> SearchAgents(SearchAgentsRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableSearchAgentsResponseAgent

A pageable sequence of Agent resources.

Overrides

SearchAgentsAsync(SearchAgentsRequest, CallSettings)

public override PagedAsyncEnumerable<SearchAgentsResponse, Agent> SearchAgentsAsync(SearchAgentsRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableSearchAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Overrides

SetAgent(SetAgentRequest, CallSettings)

public override Agent SetAgent(SetAgentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Agent

The RPC response.

Overrides

SetAgentAsync(SetAgentRequest, CallSettings)

public override Task<Agent> SetAgentAsync(SetAgentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Overrides

TrainAgent(TrainAgentRequest, CallSettings)

public override Operation<Empty, Struct> TrainAgent(TrainAgentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Overrides

TrainAgentAsync(TrainAgentRequest, CallSettings)

public override Task<Operation<Empty, Struct>> TrainAgentAsync(TrainAgentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Overrides