Google Cloud Dialogflow v2beta1 API - Class Contexts.ContextsClient (1.0.0-beta18)

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

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

Client for Contexts

Inheritance

object > ClientBase > ClientBaseContextsContextsClient > Contexts.ContextsClient

Namespace

Google.Cloud.Dialogflow.V2Beta1

Assembly

Google.Cloud.Dialogflow.V2Beta1.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
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

ContextsClient(ChannelBase)

public ContextsClient(ChannelBase channel)

Creates a new client for Contexts

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

ContextsClient(ClientBaseConfiguration)

protected ContextsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

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
Name Description
request CreateContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request CreateContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request CreateContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request CreateContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Type Description
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
Name Description
request DeleteAllContextsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request DeleteAllContextsRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request DeleteAllContextsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request DeleteAllContextsRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteContext(DeleteContextRequest, CallOptions)

public virtual Empty DeleteContext(DeleteContextRequest request, CallOptions options)

Deletes the specified context.

Parameters
Name Description
request DeleteContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request DeleteContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteContextAsync(DeleteContextRequest, CallOptions)

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

Deletes the specified context.

Parameters
Name Description
request DeleteContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request DeleteContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

GetContext(GetContextRequest, CallOptions)

public virtual Context GetContext(GetContextRequest request, CallOptions options)

Retrieves the specified context.

Parameters
Name Description
request GetContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request GetContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Context

The response received from the server.

GetContextAsync(GetContextRequest, CallOptions)

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

Retrieves the specified context.

Parameters
Name Description
request GetContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request GetContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request ListContextsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request ListContextsRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request ListContextsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request ListContextsRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListContextsResponse

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
ContextsContextsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Dialogflow.V2Beta1.Contexts.ContextsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

UpdateContext(UpdateContextRequest, CallOptions)

public virtual Context UpdateContext(UpdateContextRequest request, CallOptions options)

Updates the specified context.

Parameters
Name Description
request UpdateContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request UpdateContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Context

The response received from the server.

UpdateContextAsync(UpdateContextRequest, CallOptions)

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

Updates the specified context.

Parameters
Name Description
request UpdateContextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request UpdateContextRequest

The request to send to the server.

headers Metadata

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

deadline System.DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallContext

The call object.