Dialogflow v3 API - Class Agents.AgentsClient (2.7.0)

public class Agents.AgentsClient : ClientBase<Agents.AgentsClient>

Reference documentation and code samples for the Dialogflow v3 API class Agents.AgentsClient.

Client for Agents

Inheritance

object > ClientBase > ClientBaseAgentsAgentsClient > Agents.AgentsClient

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Constructors

AgentsClient()

protected AgentsClient()

Protected parameterless constructor to allow creation of test doubles.

AgentsClient(CallInvoker)

public AgentsClient(CallInvoker callInvoker)

Creates a new client for Agents that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

AgentsClient(ChannelBase)

public AgentsClient(ChannelBase channel)

Creates a new client for Agents

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

AgentsClient(ClientBaseConfiguration)

protected AgentsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateAgent(CreateAgentRequest, CallOptions)

public virtual Agent CreateAgent(CreateAgentRequest request, CallOptions options)

Creates an agent in the specified location.

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

Parameters
NameDescription
requestCreateAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Agent

The response received from the server.

CreateAgent(CreateAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual Agent CreateAgent(CreateAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates an agent in the specified location.

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

Parameters
NameDescription
requestCreateAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Agent

The response received from the server.

CreateAgentAsync(CreateAgentRequest, CallOptions)

public virtual AsyncUnaryCall<Agent> CreateAgentAsync(CreateAgentRequest request, CallOptions options)

Creates an agent in the specified location.

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

Parameters
NameDescription
requestCreateAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAgent

The call object.

CreateAgentAsync(CreateAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Agent> CreateAgentAsync(CreateAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates an agent in the specified location.

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

Parameters
NameDescription
requestCreateAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAgent

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

DeleteAgent(DeleteAgentRequest, CallOptions)

public virtual Empty DeleteAgent(DeleteAgentRequest request, CallOptions options)

Deletes the specified agent.

Parameters
NameDescription
requestDeleteAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAgent(DeleteAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteAgent(DeleteAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified agent.

Parameters
NameDescription
requestDeleteAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAgentAsync(DeleteAgentRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteAgentAsync(DeleteAgentRequest request, CallOptions options)

Deletes the specified agent.

Parameters
NameDescription
requestDeleteAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteAgentAsync(DeleteAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteAgentAsync(DeleteAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified agent.

Parameters
NameDescription
requestDeleteAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

ExportAgent(ExportAgentRequest, CallOptions)

public virtual Operation ExportAgent(ExportAgentRequest request, CallOptions options)

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][google.cloud.dialogflow.cx.v3.ExportAgentResponse]
Parameters
NameDescription
requestExportAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

ExportAgent(ExportAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation ExportAgent(ExportAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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][google.cloud.dialogflow.cx.v3.ExportAgentResponse]
Parameters
NameDescription
requestExportAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

ExportAgentAsync(ExportAgentRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> ExportAgentAsync(ExportAgentRequest request, CallOptions options)

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][google.cloud.dialogflow.cx.v3.ExportAgentResponse]
Parameters
NameDescription
requestExportAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

ExportAgentAsync(ExportAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> ExportAgentAsync(ExportAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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][google.cloud.dialogflow.cx.v3.ExportAgentResponse]
Parameters
NameDescription
requestExportAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

GetAgent(GetAgentRequest, CallOptions)

public virtual Agent GetAgent(GetAgentRequest request, CallOptions options)

Retrieves the specified agent.

Parameters
NameDescription
requestGetAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Agent

The response received from the server.

GetAgent(GetAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual Agent GetAgent(GetAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the specified agent.

Parameters
NameDescription
requestGetAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Agent

The response received from the server.

GetAgentAsync(GetAgentRequest, CallOptions)

public virtual AsyncUnaryCall<Agent> GetAgentAsync(GetAgentRequest request, CallOptions options)

Retrieves the specified agent.

Parameters
NameDescription
requestGetAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAgent

The call object.

GetAgentAsync(GetAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Agent> GetAgentAsync(GetAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the specified agent.

Parameters
NameDescription
requestGetAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAgent

The call object.

GetAgentValidationResult(GetAgentValidationResultRequest, CallOptions)

public virtual AgentValidationResult GetAgentValidationResult(GetAgentValidationResultRequest request, CallOptions options)

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.

Parameters
NameDescription
requestGetAgentValidationResultRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AgentValidationResult

The response received from the server.

GetAgentValidationResult(GetAgentValidationResultRequest, Metadata, DateTime?, CancellationToken)

public virtual AgentValidationResult GetAgentValidationResult(GetAgentValidationResultRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.

Parameters
NameDescription
requestGetAgentValidationResultRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AgentValidationResult

The response received from the server.

GetAgentValidationResultAsync(GetAgentValidationResultRequest, CallOptions)

public virtual AsyncUnaryCall<AgentValidationResult> GetAgentValidationResultAsync(GetAgentValidationResultRequest request, CallOptions options)

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.

Parameters
NameDescription
requestGetAgentValidationResultRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAgentValidationResult

The call object.

GetAgentValidationResultAsync(GetAgentValidationResultRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AgentValidationResult> GetAgentValidationResultAsync(GetAgentValidationResultRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.

Parameters
NameDescription
requestGetAgentValidationResultRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAgentValidationResult

The call object.

ListAgents(ListAgentsRequest, CallOptions)

public virtual ListAgentsResponse ListAgents(ListAgentsRequest request, CallOptions options)

Returns the list of all agents in the specified location.

Parameters
NameDescription
requestListAgentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListAgentsResponse

The response received from the server.

ListAgents(ListAgentsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListAgentsResponse ListAgents(ListAgentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the list of all agents in the specified location.

Parameters
NameDescription
requestListAgentsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListAgentsResponse

The response received from the server.

ListAgentsAsync(ListAgentsRequest, CallOptions)

public virtual AsyncUnaryCall<ListAgentsResponse> ListAgentsAsync(ListAgentsRequest request, CallOptions options)

Returns the list of all agents in the specified location.

Parameters
NameDescription
requestListAgentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListAgentsResponse

The call object.

ListAgentsAsync(ListAgentsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListAgentsResponse> ListAgentsAsync(ListAgentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the list of all agents in the specified location.

Parameters
NameDescription
requestListAgentsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListAgentsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override Agents.AgentsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
AgentsAgentsClient
Overrides

RestoreAgent(RestoreAgentRequest, CallOptions)

public virtual Operation RestoreAgent(RestoreAgentRequest request, CallOptions options)

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:

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

Parameters
NameDescription
requestRestoreAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

RestoreAgent(RestoreAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation RestoreAgent(RestoreAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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:

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

Parameters
NameDescription
requestRestoreAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

RestoreAgentAsync(RestoreAgentRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> RestoreAgentAsync(RestoreAgentRequest request, CallOptions options)

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:

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

Parameters
NameDescription
requestRestoreAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

RestoreAgentAsync(RestoreAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> RestoreAgentAsync(RestoreAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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:

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

Parameters
NameDescription
requestRestoreAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

UpdateAgent(UpdateAgentRequest, CallOptions)

public virtual Agent UpdateAgent(UpdateAgentRequest request, CallOptions options)

Updates the specified agent.

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

Parameters
NameDescription
requestUpdateAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Agent

The response received from the server.

UpdateAgent(UpdateAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual Agent UpdateAgent(UpdateAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the specified agent.

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

Parameters
NameDescription
requestUpdateAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Agent

The response received from the server.

UpdateAgentAsync(UpdateAgentRequest, CallOptions)

public virtual AsyncUnaryCall<Agent> UpdateAgentAsync(UpdateAgentRequest request, CallOptions options)

Updates the specified agent.

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

Parameters
NameDescription
requestUpdateAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAgent

The call object.

UpdateAgentAsync(UpdateAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Agent> UpdateAgentAsync(UpdateAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the specified agent.

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

Parameters
NameDescription
requestUpdateAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAgent

The call object.

ValidateAgent(ValidateAgentRequest, CallOptions)

public virtual AgentValidationResult ValidateAgent(ValidateAgentRequest request, CallOptions options)

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.

Parameters
NameDescription
requestValidateAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AgentValidationResult

The response received from the server.

ValidateAgent(ValidateAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AgentValidationResult ValidateAgent(ValidateAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestValidateAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AgentValidationResult

The response received from the server.

ValidateAgentAsync(ValidateAgentRequest, CallOptions)

public virtual AsyncUnaryCall<AgentValidationResult> ValidateAgentAsync(ValidateAgentRequest request, CallOptions options)

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.

Parameters
NameDescription
requestValidateAgentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAgentValidationResult

The call object.

ValidateAgentAsync(ValidateAgentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AgentValidationResult> ValidateAgentAsync(ValidateAgentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestValidateAgentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAgentValidationResult

The call object.