Google Cloud Dialogflow v2 API - Class ConversationsClientImpl (4.11.0)

public sealed class ConversationsClientImpl : ConversationsClient

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

Conversations client wrapper implementation, for convenient use.

Inheritance

object > ConversationsClient > ConversationsClientImpl

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Service for managing [Conversations][google.cloud.dialogflow.v2.Conversation].

Constructors

ConversationsClientImpl(ConversationsClient, ConversationsSettings, ILogger)

public ConversationsClientImpl(Conversations.ConversationsClient grpcClient, ConversationsSettings settings, ILogger logger)

Constructs a client wrapper for the Conversations service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientConversationsConversationsClient

The underlying gRPC client.

settingsConversationsSettings

The base ConversationsSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override Conversations.ConversationsClient GrpcClient { get; }

The underlying gRPC Conversations client

Property Value
TypeDescription
ConversationsConversationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient
Overrides

Methods

CompleteConversation(CompleteConversationRequest, CallSettings)

public override Conversation CompleteConversation(CompleteConversationRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCompleteConversationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Overrides

CompleteConversationAsync(CompleteConversationRequest, CallSettings)

public override Task<Conversation> CompleteConversationAsync(CompleteConversationRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCompleteConversationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConversation

A Task containing the RPC response.

Overrides

CreateConversation(CreateConversationRequest, CallSettings)

public override Conversation CreateConversation(CreateConversationRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Overrides

CreateConversationAsync(CreateConversationRequest, CallSettings)

public override Task<Conversation> CreateConversationAsync(CreateConversationRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConversation

A Task containing the RPC response.

Overrides

GenerateStatelessSummary(GenerateStatelessSummaryRequest, CallSettings)

public override GenerateStatelessSummaryResponse GenerateStatelessSummary(GenerateStatelessSummaryRequest request, CallSettings callSettings = null)

Generates and returns a summary for a conversation that does not have a resource created for it.

Parameters
NameDescription
requestGenerateStatelessSummaryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GenerateStatelessSummaryResponse

The RPC response.

Overrides

GenerateStatelessSummaryAsync(GenerateStatelessSummaryRequest, CallSettings)

public override Task<GenerateStatelessSummaryResponse> GenerateStatelessSummaryAsync(GenerateStatelessSummaryRequest request, CallSettings callSettings = null)

Generates and returns a summary for a conversation that does not have a resource created for it.

Parameters
NameDescription
requestGenerateStatelessSummaryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGenerateStatelessSummaryResponse

A Task containing the RPC response.

Overrides

GetConversation(GetConversationRequest, CallSettings)

public override Conversation GetConversation(GetConversationRequest request, CallSettings callSettings = null)

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Overrides

GetConversationAsync(GetConversationRequest, CallSettings)

public override Task<Conversation> GetConversationAsync(GetConversationRequest request, CallSettings callSettings = null)

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskConversation

A Task containing the RPC response.

Overrides

ListConversations(ListConversationsRequest, CallSettings)

public override PagedEnumerable<ListConversationsResponse, Conversation> ListConversations(ListConversationsRequest request, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
requestListConversationsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListConversationsResponseConversation

A pageable sequence of Conversation resources.

Overrides

ListConversationsAsync(ListConversationsRequest, CallSettings)

public override PagedAsyncEnumerable<ListConversationsResponse, Conversation> ListConversationsAsync(ListConversationsRequest request, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
requestListConversationsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListConversationsResponseConversation

A pageable asynchronous sequence of Conversation resources.

Overrides

ListMessages(ListMessagesRequest, CallSettings)

public override PagedEnumerable<ListMessagesResponse, Message> ListMessages(ListMessagesRequest request, CallSettings callSettings = null)

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's create_time of previous request] and empty page_token.

Parameters
NameDescription
requestListMessagesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListMessagesResponseMessage

A pageable sequence of Message resources.

Overrides

ListMessagesAsync(ListMessagesRequest, CallSettings)

public override PagedAsyncEnumerable<ListMessagesResponse, Message> ListMessagesAsync(ListMessagesRequest request, CallSettings callSettings = null)

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's create_time of previous request] and empty page_token.

Parameters
NameDescription
requestListMessagesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListMessagesResponseMessage

A pageable asynchronous sequence of Message resources.

Overrides

SuggestConversationSummary(SuggestConversationSummaryRequest, CallSettings)

public override SuggestConversationSummaryResponse SuggestConversationSummary(SuggestConversationSummaryRequest request, CallSettings callSettings = null)

Suggests summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.

Parameters
NameDescription
requestSuggestConversationSummaryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SuggestConversationSummaryResponse

The RPC response.

Overrides

SuggestConversationSummaryAsync(SuggestConversationSummaryRequest, CallSettings)

public override Task<SuggestConversationSummaryResponse> SuggestConversationSummaryAsync(SuggestConversationSummaryRequest request, CallSettings callSettings = null)

Suggests summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.

Parameters
NameDescription
requestSuggestConversationSummaryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskSuggestConversationSummaryResponse

A Task containing the RPC response.

Overrides