Google Cloud Dialogflow v2 API - Class Contexts.ContextsClient (4.11.0)

public class Contexts.ContextsClient : ClientBase<Contexts.ContextsClient>

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class Contexts.ContextsClient.

Client for Contexts

Inheritance

object > ClientBase > ClientBaseContextsContextsClient > Contexts.ContextsClient

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Constructors

ContextsClient()

protected ContextsClient()

Protected parameterless constructor to allow creation of test doubles.

ContextsClient(CallInvoker)

public ContextsClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ContextsClient(ChannelBase)

public ContextsClient(ChannelBase channel)

Creates a new client for Contexts

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ContextsClient(ClientBaseConfiguration)

protected ContextsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateContext(CreateContextRequest, CallOptions)

public virtual Context CreateContext(CreateContextRequest request, CallOptions options)

Creates a context.

If the specified context already exists, overrides the context.

Parameters
NameDescription
requestCreateContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Context

The response received from the server.

CreateContext(CreateContextRequest, Metadata, DateTime?, CancellationToken)

public virtual Context CreateContext(CreateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a context.

If the specified context already exists, overrides the context.

Parameters
NameDescription
requestCreateContextRequest

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
Context

The response received from the server.

CreateContextAsync(CreateContextRequest, CallOptions)

public virtual AsyncUnaryCall<Context> CreateContextAsync(CreateContextRequest request, CallOptions options)

Creates a context.

If the specified context already exists, overrides the context.

Parameters
NameDescription
requestCreateContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallContext

The call object.

CreateContextAsync(CreateContextRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Context> CreateContextAsync(CreateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a context.

If the specified context already exists, overrides the context.

Parameters
NameDescription
requestCreateContextRequest

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
AsyncUnaryCallContext

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.

DeleteAllContexts(DeleteAllContextsRequest, CallOptions)

public virtual Empty DeleteAllContexts(DeleteAllContextsRequest request, CallOptions options)

Deletes all active contexts in the specified session.

Parameters
NameDescription
requestDeleteAllContextsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAllContexts(DeleteAllContextsRequest, Metadata, DateTime?, CancellationToken)

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

Deletes all active contexts in the specified session.

Parameters
NameDescription
requestDeleteAllContextsRequest

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.

DeleteAllContextsAsync(DeleteAllContextsRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteAllContextsAsync(DeleteAllContextsRequest request, CallOptions options)

Deletes all active contexts in the specified session.

Parameters
NameDescription
requestDeleteAllContextsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteAllContextsAsync(DeleteAllContextsRequest, Metadata, DateTime?, CancellationToken)

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

Deletes all active contexts in the specified session.

Parameters
NameDescription
requestDeleteAllContextsRequest

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.

DeleteContext(DeleteContextRequest, CallOptions)

public virtual Empty DeleteContext(DeleteContextRequest request, CallOptions options)

Deletes the specified context.

Parameters
NameDescription
requestDeleteContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteContext(DeleteContextRequest, Metadata, DateTime?, CancellationToken)

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

Deletes the specified context.

Parameters
NameDescription
requestDeleteContextRequest

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.

DeleteContextAsync(DeleteContextRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteContextAsync(DeleteContextRequest request, CallOptions options)

Deletes the specified context.

Parameters
NameDescription
requestDeleteContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteContextAsync(DeleteContextRequest, Metadata, DateTime?, CancellationToken)

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

Deletes the specified context.

Parameters
NameDescription
requestDeleteContextRequest

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.

GetContext(GetContextRequest, CallOptions)

public virtual Context GetContext(GetContextRequest request, CallOptions options)

Retrieves the specified context.

Parameters
NameDescription
requestGetContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Context

The response received from the server.

GetContext(GetContextRequest, Metadata, DateTime?, CancellationToken)

public virtual Context GetContext(GetContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the specified context.

Parameters
NameDescription
requestGetContextRequest

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
Context

The response received from the server.

GetContextAsync(GetContextRequest, CallOptions)

public virtual AsyncUnaryCall<Context> GetContextAsync(GetContextRequest request, CallOptions options)

Retrieves the specified context.

Parameters
NameDescription
requestGetContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallContext

The call object.

GetContextAsync(GetContextRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Context> GetContextAsync(GetContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the specified context.

Parameters
NameDescription
requestGetContextRequest

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
AsyncUnaryCallContext

The call object.

ListContexts(ListContextsRequest, CallOptions)

public virtual ListContextsResponse ListContexts(ListContextsRequest request, CallOptions options)

Returns the list of all contexts in the specified session.

Parameters
NameDescription
requestListContextsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListContextsResponse

The response received from the server.

ListContexts(ListContextsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListContextsResponse ListContexts(ListContextsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the list of all contexts in the specified session.

Parameters
NameDescription
requestListContextsRequest

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
ListContextsResponse

The response received from the server.

ListContextsAsync(ListContextsRequest, CallOptions)

public virtual AsyncUnaryCall<ListContextsResponse> ListContextsAsync(ListContextsRequest request, CallOptions options)

Returns the list of all contexts in the specified session.

Parameters
NameDescription
requestListContextsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListContextsResponse

The call object.

ListContextsAsync(ListContextsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListContextsResponse> ListContextsAsync(ListContextsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the list of all contexts in the specified session.

Parameters
NameDescription
requestListContextsRequest

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
AsyncUnaryCallListContextsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override Contexts.ContextsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ContextsContextsClient
Overrides

UpdateContext(UpdateContextRequest, CallOptions)

public virtual Context UpdateContext(UpdateContextRequest request, CallOptions options)

Updates the specified context.

Parameters
NameDescription
requestUpdateContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Context

The response received from the server.

UpdateContext(UpdateContextRequest, Metadata, DateTime?, CancellationToken)

public virtual Context UpdateContext(UpdateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the specified context.

Parameters
NameDescription
requestUpdateContextRequest

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
Context

The response received from the server.

UpdateContextAsync(UpdateContextRequest, CallOptions)

public virtual AsyncUnaryCall<Context> UpdateContextAsync(UpdateContextRequest request, CallOptions options)

Updates the specified context.

Parameters
NameDescription
requestUpdateContextRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallContext

The call object.

UpdateContextAsync(UpdateContextRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Context> UpdateContextAsync(UpdateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the specified context.

Parameters
NameDescription
requestUpdateContextRequest

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
AsyncUnaryCallContext

The call object.