public sealed class AgentsClientImpl : AgentsClient
Reference documentation and code samples for the Google Cloud Dialogflow v2 API class AgentsClientImpl.
Agents client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Dialogflow.V2Assembly
Google.Cloud.Dialogflow.V2.dll
Remarks
Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
Constructors
AgentsClientImpl(Agents.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 | Agents.AgentsClient 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 |
GrpcClient
public override Agents.AgentsClient GrpcClient { get; }
The underlying gRPC Agents client
Property Value | |
---|---|
Type | Description |
Agents.AgentsClient |
ImportAgentOperationsClient
public override OperationsClient ImportAgentOperationsClient { get; }
The long-running operations client for ImportAgent
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
LocationsClient
public override LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RestoreAgentOperationsClient
public override OperationsClient RestoreAgentOperationsClient { get; }
The long-running operations client for RestoreAgent
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
TrainAgentOperationsClient
public override OperationsClient TrainAgentOperationsClient { get; }
The long-running operations client for TrainAgent
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
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. |
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. |
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 messageresponse
: [ExportAgentResponse][google.cloud.dialogflow.v2.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 |
Operation<ExportAgentResponse, Struct> | The RPC response. |
ExportAgentAsync(ExportAgentRequest, CallSettings)
public override async 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 messageresponse
: [ExportAgentResponse][google.cloud.dialogflow.v2.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 |
Task<Operation<ExportAgentResponse, Struct>> | A Task containing the RPC response. |
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. |
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 |
Task<Agent> | A Task containing the RPC response. |
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. |
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 |
Task<ValidationResult> | A Task containing the RPC response. |
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.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:
metadata
: An empty Struct messageresponse
: An Empty message
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 |
Operation<Empty, Struct> | The RPC response. |
ImportAgentAsync(ImportAgentRequest, CallSettings)
public override async 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.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:
metadata
: An empty Struct messageresponse
: An Empty message
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 |
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
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.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:
metadata
: An empty Struct messageresponse
: An Empty message
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 |
Operation<Empty, Struct> | The RPC response. |
RestoreAgentAsync(RestoreAgentRequest, CallSettings)
public override async 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.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:
metadata
: An empty Struct messageresponse
: An Empty message
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 |
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
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 |
PagedEnumerable<SearchAgentsResponse, Agent> | A pageable sequence of Agent resources. |
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 |
PagedAsyncEnumerable<SearchAgentsResponse, Agent> | A pageable asynchronous sequence of Agent resources. |
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. |
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 |
Task<Agent> | A Task containing the RPC response. |
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:
metadata
: An empty Struct messageresponse
: An Empty message
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 |
Operation<Empty, Struct> | The RPC response. |
TrainAgentAsync(TrainAgentRequest, CallSettings)
public override async 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:
metadata
: An empty Struct messageresponse
: An Empty message
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 |
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |