Google Cloud Dialogflow v2 API - Class ConversationsClient (4.6.0)

public abstract class ConversationsClient

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

Conversations client wrapper, for convenient use.

Inheritance

Object > ConversationsClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

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

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Conversations service, which is a host of "dialogflow.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Conversations scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

GrpcClient

public virtual Conversations.ConversationsClient GrpcClient { get; }

The underlying gRPC Conversations client

Property Value
TypeDescription
Conversations.ConversationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

CompleteConversation(CompleteConversationRequest, CallSettings)

public virtual 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.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
CompleteConversationRequest request = new CompleteConversationRequest
{
    ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
Conversation response = conversationsClient.CompleteConversation(request);

CompleteConversation(ConversationName, CallSettings)

public virtual Conversation CompleteConversation(ConversationName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameConversationName

Required. Resource identifier of the conversation to close. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
Conversation response = conversationsClient.CompleteConversation(name);

CompleteConversation(String, CallSettings)

public virtual Conversation CompleteConversation(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameString

Required. Resource identifier of the conversation to close. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
Conversation response = conversationsClient.CompleteConversation(name);

CompleteConversationAsync(CompleteConversationRequest, CallSettings)

public virtual 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
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
CompleteConversationRequest request = new CompleteConversationRequest
{
    ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
Conversation response = await conversationsClient.CompleteConversationAsync(request);

CompleteConversationAsync(CompleteConversationRequest, CancellationToken)

public virtual Task<Conversation> CompleteConversationAsync(CompleteConversationRequest request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
CompleteConversationRequest request = new CompleteConversationRequest
{
    ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
Conversation response = await conversationsClient.CompleteConversationAsync(request);

CompleteConversationAsync(ConversationName, CallSettings)

public virtual Task<Conversation> CompleteConversationAsync(ConversationName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameConversationName

Required. Resource identifier of the conversation to close. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
Conversation response = await conversationsClient.CompleteConversationAsync(name);

CompleteConversationAsync(ConversationName, CancellationToken)

public virtual Task<Conversation> CompleteConversationAsync(ConversationName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameConversationName

Required. Resource identifier of the conversation to close. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
Conversation response = await conversationsClient.CompleteConversationAsync(name);

CompleteConversationAsync(String, CallSettings)

public virtual Task<Conversation> CompleteConversationAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameString

Required. Resource identifier of the conversation to close. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
Conversation response = await conversationsClient.CompleteConversationAsync(name);

CompleteConversationAsync(String, CancellationToken)

public virtual Task<Conversation> CompleteConversationAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameString

Required. Resource identifier of the conversation to close. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
Conversation response = await conversationsClient.CompleteConversationAsync(name);

Create()

public static ConversationsClient Create()

Synchronously creates a ConversationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConversationsClientBuilder.

Returns
TypeDescription
ConversationsClient

The created ConversationsClient.

CreateAsync(CancellationToken)

public static Task<ConversationsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a ConversationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConversationsClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ConversationsClient>

The task representing the created ConversationsClient.

CreateConversation(LocationName, Conversation, CallSettings)

public virtual Conversation CreateConversation(LocationName parent, Conversation conversation, 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
parentLocationName

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = conversationsClient.CreateConversation(parent, conversation);

CreateConversation(ProjectName, Conversation, CallSettings)

public virtual Conversation CreateConversation(ProjectName parent, Conversation conversation, 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
parentProjectName

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = conversationsClient.CreateConversation(parent, conversation);

CreateConversation(CreateConversationRequest, CallSettings)

public virtual 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.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
CreateConversationRequest request = new CreateConversationRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Conversation = new Conversation(),
    ConversationId = "",
};
// Make the request
Conversation response = conversationsClient.CreateConversation(request);

CreateConversation(String, Conversation, CallSettings)

public virtual Conversation CreateConversation(string parent, Conversation conversation, 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
parentString

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Conversation conversation = new Conversation();
// Make the request
Conversation response = conversationsClient.CreateConversation(parent, conversation);

CreateConversationAsync(LocationName, Conversation, CallSettings)

public virtual Task<Conversation> CreateConversationAsync(LocationName parent, Conversation conversation, 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
parentLocationName

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(LocationName, Conversation, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(LocationName parent, Conversation conversation, CancellationToken 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
parentLocationName

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(ProjectName, Conversation, CallSettings)

public virtual Task<Conversation> CreateConversationAsync(ProjectName parent, Conversation conversation, 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
parentProjectName

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(ProjectName, Conversation, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(ProjectName parent, Conversation conversation, CancellationToken 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
parentProjectName

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(CreateConversationRequest, CallSettings)

public virtual 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
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
CreateConversationRequest request = new CreateConversationRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Conversation = new Conversation(),
    ConversationId = "",
};
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(request);

CreateConversationAsync(CreateConversationRequest, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(CreateConversationRequest request, CancellationToken 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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
CreateConversationRequest request = new CreateConversationRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Conversation = new Conversation(),
    ConversationId = "",
};
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(request);

CreateConversationAsync(String, Conversation, CallSettings)

public virtual Task<Conversation> CreateConversationAsync(string parent, Conversation conversation, 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
parentString

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(String, Conversation, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(string parent, Conversation conversation, CancellationToken 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
parentString

Required. Resource identifier of the project creating the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

conversationConversation

Required. The conversation to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

GetConversation(ConversationName, CallSettings)

public virtual Conversation GetConversation(ConversationName name, CallSettings callSettings = null)

Retrieves the specific conversation.

Parameters
NameDescription
nameConversationName

Required. The name of the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
Conversation response = conversationsClient.GetConversation(name);

GetConversation(GetConversationRequest, CallSettings)

public virtual 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.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
GetConversationRequest request = new GetConversationRequest
{
    ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
Conversation response = conversationsClient.GetConversation(request);

GetConversation(String, CallSettings)

public virtual Conversation GetConversation(string name, CallSettings callSettings = null)

Retrieves the specific conversation.

Parameters
NameDescription
nameString

Required. The name of the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Conversation

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
Conversation response = conversationsClient.GetConversation(name);

GetConversationAsync(ConversationName, CallSettings)

public virtual Task<Conversation> GetConversationAsync(ConversationName name, CallSettings callSettings = null)

Retrieves the specific conversation.

Parameters
NameDescription
nameConversationName

Required. The name of the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
Conversation response = await conversationsClient.GetConversationAsync(name);

GetConversationAsync(ConversationName, CancellationToken)

public virtual Task<Conversation> GetConversationAsync(ConversationName name, CancellationToken cancellationToken)

Retrieves the specific conversation.

Parameters
NameDescription
nameConversationName

Required. The name of the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
Conversation response = await conversationsClient.GetConversationAsync(name);

GetConversationAsync(GetConversationRequest, CallSettings)

public virtual 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
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
GetConversationRequest request = new GetConversationRequest
{
    ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
Conversation response = await conversationsClient.GetConversationAsync(request);

GetConversationAsync(GetConversationRequest, CancellationToken)

public virtual Task<Conversation> GetConversationAsync(GetConversationRequest request, CancellationToken cancellationToken)

Retrieves the specific conversation.

Parameters
NameDescription
requestGetConversationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
GetConversationRequest request = new GetConversationRequest
{
    ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
Conversation response = await conversationsClient.GetConversationAsync(request);

GetConversationAsync(String, CallSettings)

public virtual Task<Conversation> GetConversationAsync(string name, CallSettings callSettings = null)

Retrieves the specific conversation.

Parameters
NameDescription
nameString

Required. The name of the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
Conversation response = await conversationsClient.GetConversationAsync(name);

GetConversationAsync(String, CancellationToken)

public virtual Task<Conversation> GetConversationAsync(string name, CancellationToken cancellationToken)

Retrieves the specific conversation.

Parameters
NameDescription
nameString

Required. The name of the conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Conversation>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
Conversation response = await conversationsClient.GetConversationAsync(name);

ListConversations(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListConversationsResponse, Conversation> ListConversations(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
parentLocationName

Required. The project from which to list all conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConversationsResponse, Conversation>

A pageable sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Conversation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConversationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversations(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListConversationsResponse, Conversation> ListConversations(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
parentProjectName

Required. The project from which to list all conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConversationsResponse, Conversation>

A pageable sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Conversation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConversationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversations(ListConversationsRequest, CallSettings)

public virtual 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
PagedEnumerable<ListConversationsResponse, Conversation>

A pageable sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ListConversationsRequest request = new ListConversationsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Conversation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConversationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversations(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListConversationsResponse, Conversation> ListConversations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
parentString

Required. The project from which to list all conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConversationsResponse, Conversation>

A pageable sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Conversation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConversationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversationsAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationsResponse, Conversation> ListConversationsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
parentLocationName

Required. The project from which to list all conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConversationsResponse, Conversation>

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Conversation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConversationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversationsAsync(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationsResponse, Conversation> ListConversationsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
parentProjectName

Required. The project from which to list all conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConversationsResponse, Conversation>

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Conversation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConversationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversationsAsync(ListConversationsRequest, CallSettings)

public virtual 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
PagedAsyncEnumerable<ListConversationsResponse, Conversation>

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ListConversationsRequest request = new ListConversationsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Conversation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConversationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConversationsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationsResponse, Conversation> ListConversationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all conversations in the specified project.

Parameters
NameDescription
parentString

Required. The project from which to list all conversation. Format: projects/&lt;Project ID>/locations/&lt;Location ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConversationsResponse, Conversation>

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationsClient.ListConversationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Conversation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConversationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Conversation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Conversation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Conversation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMessages(ConversationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListMessagesResponse, Message> ListMessages(ConversationName parent, string pageToken = null, int? pageSize = null, 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&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
parentConversationName

Required. The name of the conversation to list messages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMessagesResponse, Message>

A pageable sequence of Message resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
PagedEnumerable<ListMessagesResponse, Message> response = conversationsClient.ListMessages(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Message item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMessagesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Message item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Message> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Message item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMessages(ListMessagesRequest, CallSettings)

public virtual 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&apos;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
PagedEnumerable<ListMessagesResponse, Message>

A pageable sequence of Message resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ListMessagesRequest request = new ListMessagesRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListMessagesResponse, Message> response = conversationsClient.ListMessages(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Message item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMessagesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Message item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Message> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Message item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMessages(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListMessagesResponse, Message> ListMessages(string parent, string pageToken = null, int? pageSize = null, 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&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
parentString

Required. The name of the conversation to list messages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMessagesResponse, Message>

A pageable sequence of Message resources.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
PagedEnumerable<ListMessagesResponse, Message> response = conversationsClient.ListMessages(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Message item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMessagesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Message item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Message> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Message item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMessagesAsync(ConversationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListMessagesResponse, Message> ListMessagesAsync(ConversationName parent, string pageToken = null, int? pageSize = null, 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&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
parentConversationName

Required. The name of the conversation to list messages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMessagesResponse, Message>

A pageable asynchronous sequence of Message resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
PagedAsyncEnumerable<ListMessagesResponse, Message> response = conversationsClient.ListMessagesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Message item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMessagesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Message item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Message> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Message item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMessagesAsync(ListMessagesRequest, CallSettings)

public virtual 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&apos;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
PagedAsyncEnumerable<ListMessagesResponse, Message>

A pageable asynchronous sequence of Message resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ListMessagesRequest request = new ListMessagesRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListMessagesResponse, Message> response = conversationsClient.ListMessagesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Message item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMessagesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Message item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Message> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Message item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListMessagesAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListMessagesResponse, Message> ListMessagesAsync(string parent, string pageToken = null, int? pageSize = null, 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&apos;s create_time of previous request] and empty page_token.

Parameters
NameDescription
parentString

Required. The name of the conversation to list messages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMessagesResponse, Message>

A pageable asynchronous sequence of Message resources.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
PagedAsyncEnumerable<ListMessagesResponse, Message> response = conversationsClient.ListMessagesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Message item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMessagesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Message item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Message> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Message item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

SuggestConversationSummary(ConversationName, CallSettings)

public virtual SuggestConversationSummaryResponse SuggestConversationSummary(ConversationName conversation, 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
conversationConversationName

Required. The conversation to fetch suggestion for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SuggestConversationSummaryResponse

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
ConversationName conversation = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
SuggestConversationSummaryResponse response = conversationsClient.SuggestConversationSummary(conversation);

SuggestConversationSummary(SuggestConversationSummaryRequest, CallSettings)

public virtual 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.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
SuggestConversationSummaryRequest request = new SuggestConversationSummaryRequest
{
    ConversationAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
};
// Make the request
SuggestConversationSummaryResponse response = conversationsClient.SuggestConversationSummary(request);

SuggestConversationSummary(String, CallSettings)

public virtual SuggestConversationSummaryResponse SuggestConversationSummary(string conversation, 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
conversationString

Required. The conversation to fetch suggestion for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SuggestConversationSummaryResponse

The RPC response.

Example
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
string conversation = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
SuggestConversationSummaryResponse response = conversationsClient.SuggestConversationSummary(conversation);

SuggestConversationSummaryAsync(ConversationName, CallSettings)

public virtual Task<SuggestConversationSummaryResponse> SuggestConversationSummaryAsync(ConversationName conversation, 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
conversationConversationName

Required. The conversation to fetch suggestion for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SuggestConversationSummaryResponse>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName conversation = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(conversation);

SuggestConversationSummaryAsync(ConversationName, CancellationToken)

public virtual Task<SuggestConversationSummaryResponse> SuggestConversationSummaryAsync(ConversationName conversation, CancellationToken cancellationToken)

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
conversationConversationName

Required. The conversation to fetch suggestion for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SuggestConversationSummaryResponse>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
ConversationName conversation = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(conversation);

SuggestConversationSummaryAsync(SuggestConversationSummaryRequest, CallSettings)

public virtual 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
Task<SuggestConversationSummaryResponse>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
SuggestConversationSummaryRequest request = new SuggestConversationSummaryRequest
{
    ConversationAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
};
// Make the request
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(request);

SuggestConversationSummaryAsync(SuggestConversationSummaryRequest, CancellationToken)

public virtual Task<SuggestConversationSummaryResponse> SuggestConversationSummaryAsync(SuggestConversationSummaryRequest request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SuggestConversationSummaryResponse>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
SuggestConversationSummaryRequest request = new SuggestConversationSummaryRequest
{
    ConversationAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
};
// Make the request
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(request);

SuggestConversationSummaryAsync(String, CallSettings)

public virtual Task<SuggestConversationSummaryResponse> SuggestConversationSummaryAsync(string conversation, 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
conversationString

Required. The conversation to fetch suggestion for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SuggestConversationSummaryResponse>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string conversation = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(conversation);

SuggestConversationSummaryAsync(String, CancellationToken)

public virtual Task<SuggestConversationSummaryResponse> SuggestConversationSummaryAsync(string conversation, CancellationToken cancellationToken)

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
conversationString

Required. The conversation to fetch suggestion for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/conversations/&lt;Conversation ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SuggestConversationSummaryResponse>

A Task containing the RPC response.

Example
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
string conversation = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(conversation);