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
Namespace
Google.Cloud.Dialogflow.V2Assembly
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 | |
|---|---|
| Name | Description |
callInvoker |
CallInvokerThe callInvoker to use to make remote calls. |
ContextsClient(ChannelBase)
public ContextsClient(ChannelBase channel)Creates a new client for Contexts
| Parameter | |
|---|---|
| Name | Description |
channel |
ChannelBaseThe 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 |
ClientBaseClientBaseConfigurationThe 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 |
CreateContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
CreateContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
CreateContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
CreateContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
DeleteAllContextsRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
DeleteAllContextsRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
DeleteAllContextsRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
DeleteAllContextsRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
DeleteContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
DeleteContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
DeleteContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
DeleteContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
GetContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
GetContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
GetContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
GetContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
ListContextsRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
ListContextsRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
ListContextsRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
ListContextsRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
|
UpdateContext(UpdateContextRequest, CallOptions)
public virtual Context UpdateContext(UpdateContextRequest request, CallOptions options)Updates the specified context.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
UpdateContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn 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 |
UpdateContextRequestThe request to send to the server. |
options |
CallOptionsThe 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 |
UpdateContextRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallContext |
The call object. |