Class Agents.AgentsClient (2.0.0)

public class AgentsClient : ClientBase<Agents.AgentsClient>

Client for Agents

Inheritance

Object > ClientBase > ClientBase<Agents.AgentsClient> > 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(ClientBase.ClientBaseConfiguration)

protected AgentsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Agent>

The call object.

CreateAgentAsync(CreateAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Agent>

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

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

Returns
TypeDescription
Operations.OperationsClient

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Empty>

The call object.

DeleteAgentAsync(DeleteAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Empty>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

ExportAgentAsync(ExportAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Agent>

The call object.

GetAgentAsync(GetAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Agent>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<AgentValidationResult>

The call object.

GetAgentValidationResultAsync(GetAgentValidationResultRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<AgentValidationResult>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListAgentsResponse>

The call object.

ListAgentsAsync(ListAgentsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListAgentsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
Agents.AgentsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Dialogflow.Cx.V3.Agents.AgentsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

RestoreAgentAsync(RestoreAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Agent>

The call object.

UpdateAgentAsync(UpdateAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Agent>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<AgentValidationResult>

The call object.

ValidateAgentAsync(ValidateAgentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<AgentValidationResult>

The call object.