Class Contexts.ContextsClient (3.8.0)

public class ContextsClient : ClientBase<Contexts.ContextsClient>

Client for Contexts

Inheritance

Object > ClientBase > ClientBase<Contexts.ContextsClient> > 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(Channel)

[Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")]
public ContextsClient(Channel channel)

Creates a new client using a channel.

Parameter
NameDescription
channelGrpc.Core.Channel

The channel 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(ClientBase.ClientBaseConfiguration)

protected ContextsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

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

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

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.

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

The call object.

CreateContextAsync(CreateContextRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

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<Context>

The call object.

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

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

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.

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.

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

The call object.

DeleteAllContextsAsync(DeleteAllContextsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

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.

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

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

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.

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.

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

The call object.

DeleteContextAsync(DeleteContextRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

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.

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

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

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.

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

The call object.

GetContextAsync(GetContextRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

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<Context>

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

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

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.

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

The call object.

ListContextsAsync(ListContextsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

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<ListContextsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
Contexts.ContextsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Dialogflow.V2.Contexts.ContextsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

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

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

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.

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

The call object.

UpdateContextAsync(UpdateContextRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

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<Context>

The call object.