Class Contexts.ContextsClient
Client for Contexts
Inherited Members
Namespace: Google.Cloud.Dialogflow.V2
Assembly: Google.Cloud.Dialogflow.V2.dll
Syntax
public class Contexts.ContextsClient : ClientBase<Contexts.ContextsClient>
Constructors
ContextsClient()
Protected parameterless constructor to allow creation of test doubles.
Declaration
protected ContextsClient()
ContextsClient(CallInvoker)
Creates a new client for Contexts that uses a custom CallInvoker
.
Declaration
public ContextsClient(CallInvoker callInvoker)
Parameters
Type | Name | Description |
---|---|---|
CallInvoker | callInvoker | The callInvoker to use to make remote calls. |
ContextsClient(ChannelBase)
Creates a new client for Contexts
Declaration
public ContextsClient(ChannelBase channel)
Parameters
Type | Name | Description |
---|---|---|
ChannelBase | channel | The channel to use to make remote calls. |
ContextsClient(ClientBaseConfiguration)
Protected constructor to allow creation of configured clients.
Declaration
protected ContextsClient(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ClientBase.ClientBaseConfiguration | configuration | The client configuration. |
Methods
CreateContext(CreateContextRequest, CallOptions)
Creates a context.
If the specified context already exists, overrides the context.
Declaration
public virtual Context CreateContext(CreateContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
CreateContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
Context | The response received from the server. |
CreateContext(CreateContextRequest, Metadata, DateTime?, CancellationToken)
Creates a context.
If the specified context already exists, overrides the context.
Declaration
public virtual Context CreateContext(CreateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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)
Creates a context.
If the specified context already exists, overrides the context.
Declaration
public virtual AsyncUnaryCall<Context> CreateContextAsync(CreateContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
CreateContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<Context> | The call object. |
CreateContextAsync(CreateContextRequest, Metadata, DateTime?, CancellationToken)
Creates a context.
If the specified context already exists, overrides the context.
Declaration
public virtual AsyncUnaryCall<Context> CreateContextAsync(CreateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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 |
---|---|
AsyncUnaryCall<Context> | The call object. |
CreateLocationsClient()
Creates a new instance of Google.Cloud.Location.Locations.LocationsClient using the same call invoker as this client.
Declaration
public virtual Locations.LocationsClient CreateLocationsClient()
Returns
Type | Description |
---|---|
Locations.LocationsClient | A new Google.Cloud.Location.Locations.LocationsClient for the same target as this client. |
DeleteAllContexts(DeleteAllContextsRequest, CallOptions)
Deletes all active contexts in the specified session.
Declaration
public virtual Empty DeleteAllContexts(DeleteAllContextsRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
DeleteAllContextsRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
Empty | The response received from the server. |
DeleteAllContexts(DeleteAllContextsRequest, Metadata, DateTime?, CancellationToken)
Deletes all active contexts in the specified session.
Declaration
public virtual Empty DeleteAllContexts(DeleteAllContextsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
DeleteAllContextsRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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)
Deletes all active contexts in the specified session.
Declaration
public virtual AsyncUnaryCall<Empty> DeleteAllContextsAsync(DeleteAllContextsRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
DeleteAllContextsRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<Empty> | The call object. |
DeleteAllContextsAsync(DeleteAllContextsRequest, Metadata, DateTime?, CancellationToken)
Deletes all active contexts in the specified session.
Declaration
public virtual AsyncUnaryCall<Empty> DeleteAllContextsAsync(DeleteAllContextsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
DeleteAllContextsRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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 |
---|---|
AsyncUnaryCall<Empty> | The call object. |
DeleteContext(DeleteContextRequest, CallOptions)
Deletes the specified context.
Declaration
public virtual Empty DeleteContext(DeleteContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
DeleteContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
Empty | The response received from the server. |
DeleteContext(DeleteContextRequest, Metadata, DateTime?, CancellationToken)
Deletes the specified context.
Declaration
public virtual Empty DeleteContext(DeleteContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
DeleteContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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)
Deletes the specified context.
Declaration
public virtual AsyncUnaryCall<Empty> DeleteContextAsync(DeleteContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
DeleteContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<Empty> | The call object. |
DeleteContextAsync(DeleteContextRequest, Metadata, DateTime?, CancellationToken)
Deletes the specified context.
Declaration
public virtual AsyncUnaryCall<Empty> DeleteContextAsync(DeleteContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
DeleteContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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 |
---|---|
AsyncUnaryCall<Empty> | The call object. |
GetContext(GetContextRequest, CallOptions)
Retrieves the specified context.
Declaration
public virtual Context GetContext(GetContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
GetContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
Context | The response received from the server. |
GetContext(GetContextRequest, Metadata, DateTime?, CancellationToken)
Retrieves the specified context.
Declaration
public virtual Context GetContext(GetContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
GetContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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)
Retrieves the specified context.
Declaration
public virtual AsyncUnaryCall<Context> GetContextAsync(GetContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
GetContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<Context> | The call object. |
GetContextAsync(GetContextRequest, Metadata, DateTime?, CancellationToken)
Retrieves the specified context.
Declaration
public virtual AsyncUnaryCall<Context> GetContextAsync(GetContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
GetContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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 |
---|---|
AsyncUnaryCall<Context> | The call object. |
ListContexts(ListContextsRequest, CallOptions)
Returns the list of all contexts in the specified session.
Declaration
public virtual ListContextsResponse ListContexts(ListContextsRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
ListContextsRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
ListContextsResponse | The response received from the server. |
ListContexts(ListContextsRequest, Metadata, DateTime?, CancellationToken)
Returns the list of all contexts in the specified session.
Declaration
public virtual ListContextsResponse ListContexts(ListContextsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ListContextsRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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)
Returns the list of all contexts in the specified session.
Declaration
public virtual AsyncUnaryCall<ListContextsResponse> ListContextsAsync(ListContextsRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
ListContextsRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<ListContextsResponse> | The call object. |
ListContextsAsync(ListContextsRequest, Metadata, DateTime?, CancellationToken)
Returns the list of all contexts in the specified session.
Declaration
public virtual AsyncUnaryCall<ListContextsResponse> ListContextsAsync(ListContextsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ListContextsRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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 |
---|---|
AsyncUnaryCall<ListContextsResponse> | The call object. |
NewInstance(ClientBaseConfiguration)
Creates a new instance of client from given ClientBaseConfiguration
.
Declaration
protected override Contexts.ContextsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ClientBase.ClientBaseConfiguration | configuration |
Returns
Type | Description |
---|---|
Contexts.ContextsClient |
Overrides
UpdateContext(UpdateContextRequest, CallOptions)
Updates the specified context.
Declaration
public virtual Context UpdateContext(UpdateContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
UpdateContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
Context | The response received from the server. |
UpdateContext(UpdateContextRequest, Metadata, DateTime?, CancellationToken)
Updates the specified context.
Declaration
public virtual Context UpdateContext(UpdateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UpdateContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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)
Updates the specified context.
Declaration
public virtual AsyncUnaryCall<Context> UpdateContextAsync(UpdateContextRequest request, CallOptions options)
Parameters
Type | Name | Description |
---|---|---|
UpdateContextRequest | request | The request to send to the server. |
CallOptions | options | The options for the call. |
Returns
Type | Description |
---|---|
AsyncUnaryCall<Context> | The call object. |
UpdateContextAsync(UpdateContextRequest, Metadata, DateTime?, CancellationToken)
Updates the specified context.
Declaration
public virtual AsyncUnaryCall<Context> UpdateContextAsync(UpdateContextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UpdateContextRequest | request | The request to send to the server. |
Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
DateTime? | deadline | 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 |
---|---|
AsyncUnaryCall<Context> | The call object. |