Google Cloud Dialogflow v2 API - Class Conversations.ConversationsClient (4.4.0)

public class ConversationsClient : ClientBase<Conversations.ConversationsClient>

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class Conversations.ConversationsClient.

Client for Conversations

Inheritance

Object > ClientBase > ClientBase<Conversations.ConversationsClient> > Conversations.ConversationsClient

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Constructors

ConversationsClient()

protected ConversationsClient()

Protected parameterless constructor to allow creation of test doubles.

ConversationsClient(CallInvoker)

public ConversationsClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ConversationsClient(ChannelBase)

public ConversationsClient(ChannelBase channel)

Creates a new client for Conversations

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ConversationsClient(ClientBase.ClientBaseConfiguration)

protected ConversationsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

CompleteConversation(CompleteConversationRequest, CallOptions)

public virtual Conversation CompleteConversation(CompleteConversationRequest request, CallOptions options)

Completes the specified conversation. Finished conversations are purged from the database after 30 days.

Parameters
NameDescription
requestCompleteConversationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Conversation

The response received from the server.

CompleteConversation(CompleteConversationRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Conversation CompleteConversation(CompleteConversationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Completes the specified conversation. Finished conversations are purged from the database after 30 days.

Parameters
NameDescription
requestCompleteConversationRequest

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
Conversation

The response received from the server.

CompleteConversationAsync(CompleteConversationRequest, CallOptions)

public virtual AsyncUnaryCall<Conversation> CompleteConversationAsync(CompleteConversationRequest request, CallOptions options)

Completes the specified conversation. Finished conversations are purged from the database after 30 days.

Parameters
NameDescription
requestCompleteConversationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Conversation>

The call object.

CompleteConversationAsync(CompleteConversationRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Conversation> CompleteConversationAsync(CompleteConversationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Completes the specified conversation. Finished conversations are purged from the database after 30 days.

Parameters
NameDescription
requestCompleteConversationRequest

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

The call object.

CreateConversation(CreateConversationRequest, CallOptions)

public virtual Conversation CreateConversation(CreateConversationRequest request, CallOptions options)

Creates a new conversation. Conversations are auto-completed after 24 hours.

Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage.

For Automated Agent Stage, there will be a dialogflow agent responding to user queries.

For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation.

If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow agent, conversation will start from Automated Agent Stage, otherwise, it will start from Assist Stage. And during Automated Agent Stage, once an [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation will transfer to Assist Stage.

Parameters
NameDescription
requestCreateConversationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Conversation

The response received from the server.

CreateConversation(CreateConversationRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Conversation CreateConversation(CreateConversationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Creates a new conversation. Conversations are auto-completed after 24 hours.

Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage.

For Automated Agent Stage, there will be a dialogflow agent responding to user queries.

For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation.

If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow agent, conversation will start from Automated Agent Stage, otherwise, it will start from Assist Stage. And during Automated Agent Stage, once an [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation will transfer to Assist Stage.

Parameters
NameDescription
requestCreateConversationRequest

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
Conversation

The response received from the server.

CreateConversationAsync(CreateConversationRequest, CallOptions)

public virtual AsyncUnaryCall<Conversation> CreateConversationAsync(CreateConversationRequest request, CallOptions options)

Creates a new conversation. Conversations are auto-completed after 24 hours.

Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage.

For Automated Agent Stage, there will be a dialogflow agent responding to user queries.

For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation.

If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow agent, conversation will start from Automated Agent Stage, otherwise, it will start from Assist Stage. And during Automated Agent Stage, once an [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation will transfer to Assist Stage.

Parameters
NameDescription
requestCreateConversationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Conversation>

The call object.

CreateConversationAsync(CreateConversationRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Conversation> CreateConversationAsync(CreateConversationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Creates a new conversation. Conversations are auto-completed after 24 hours.

Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage.

For Automated Agent Stage, there will be a dialogflow agent responding to user queries.

For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation.

If [Conversation.conversation_profile][google.cloud.dialogflow.v2.Conversation.conversation_profile] is configured for a dialogflow agent, conversation will start from Automated Agent Stage, otherwise, it will start from Assist Stage. And during Automated Agent Stage, once an [Intent][google.cloud.dialogflow.v2.Intent] with [Intent.live_agent_handoff][google.cloud.dialogflow.v2.Intent.live_agent_handoff] is triggered, conversation will transfer to Assist Stage.

Parameters
NameDescription
requestCreateConversationRequest

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

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
Locations.LocationsClient

A new Locations.LocationsClient for the same target as this client.

GetConversation(GetConversationRequest, CallOptions)

public virtual Conversation GetConversation(GetConversationRequest request, CallOptions options)

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Conversation

The response received from the server.

GetConversation(GetConversationRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Conversation GetConversation(GetConversationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

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
Conversation

The response received from the server.

GetConversationAsync(GetConversationRequest, CallOptions)

public virtual AsyncUnaryCall<Conversation> GetConversationAsync(GetConversationRequest request, CallOptions options)

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Conversation>

The call object.

GetConversationAsync(GetConversationRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Conversation> GetConversationAsync(GetConversationRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

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

The call object.

ListConversations(ListConversationsRequest, CallOptions)

public virtual ListConversationsResponse ListConversations(ListConversationsRequest request, CallOptions options)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
requestListConversationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListConversationsResponse

The response received from the server.

ListConversations(ListConversationsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListConversationsResponse ListConversations(ListConversationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Returns the list of all conversations in the specified project.

Parameters
NameDescription
requestListConversationsRequest

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
ListConversationsResponse

The response received from the server.

ListConversationsAsync(ListConversationsRequest, CallOptions)

public virtual AsyncUnaryCall<ListConversationsResponse> ListConversationsAsync(ListConversationsRequest request, CallOptions options)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
requestListConversationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListConversationsResponse>

The call object.

ListConversationsAsync(ListConversationsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListConversationsResponse> ListConversationsAsync(ListConversationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Returns the list of all conversations in the specified project.

Parameters
NameDescription
requestListConversationsRequest

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

The call object.

ListMessages(ListMessagesRequest, CallOptions)

public virtual ListMessagesResponse ListMessages(ListMessagesRequest request, CallOptions options)

Lists messages that belong to a given conversation. messages are ordered by create_time in descending order. To fetch updates without duplication, send request with filter create_time_epoch_microseconds > [first item&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
requestListMessagesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListMessagesResponse

The response received from the server.

ListMessages(ListMessagesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListMessagesResponse ListMessages(ListMessagesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Lists messages that belong to a given conversation. messages are ordered by create_time in descending order. To fetch updates without duplication, send request with filter create_time_epoch_microseconds > [first item&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
requestListMessagesRequest

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
ListMessagesResponse

The response received from the server.

ListMessagesAsync(ListMessagesRequest, CallOptions)

public virtual AsyncUnaryCall<ListMessagesResponse> ListMessagesAsync(ListMessagesRequest request, CallOptions options)

Lists messages that belong to a given conversation. messages are ordered by create_time in descending order. To fetch updates without duplication, send request with filter create_time_epoch_microseconds > [first item&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
requestListMessagesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListMessagesResponse>

The call object.

ListMessagesAsync(ListMessagesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListMessagesResponse> ListMessagesAsync(ListMessagesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Lists messages that belong to a given conversation. messages are ordered by create_time in descending order. To fetch updates without duplication, send request with filter create_time_epoch_microseconds > [first item&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
requestListMessagesRequest

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

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override Conversations.ConversationsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

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