Discovery Engine v1beta API - Class ConversationalSearchServiceClient (1.0.0-beta16)

public abstract class ConversationalSearchServiceClient

Reference documentation and code samples for the Discovery Engine v1beta API class ConversationalSearchServiceClient.

ConversationalSearchService client wrapper, for convenient use.

Inheritance

object > ConversationalSearchServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1Beta

Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

Remarks

Service for conversational search.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ConversationalSearchService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default ConversationalSearchService scopes are:

GrpcClient

public virtual ConversationalSearchService.ConversationalSearchServiceClient GrpcClient { get; }

The underlying gRPC ConversationalSearchService client

Property Value
Type Description
ConversationalSearchServiceConversationalSearchServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

AnswerQuery(AnswerQueryRequest, CallSettings)

public virtual AnswerQueryResponse AnswerQuery(AnswerQueryRequest request, CallSettings callSettings = null)

Answer query method.

Parameters
Name Description
request AnswerQueryRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnswerQueryResponse

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
AnswerQueryRequest request = new AnswerQueryRequest
{
    ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
    Query = new Query(),
    SessionAsSessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
    SafetySpec = new AnswerQueryRequest.Types.SafetySpec(),
    RelatedQuestionsSpec = new AnswerQueryRequest.Types.RelatedQuestionsSpec(),
    AnswerGenerationSpec = new AnswerQueryRequest.Types.AnswerGenerationSpec(),
    SearchSpec = new AnswerQueryRequest.Types.SearchSpec(),
    QueryUnderstandingSpec = new AnswerQueryRequest.Types.QueryUnderstandingSpec(),
    AsynchronousMode = false,
    UserPseudoId = "",
    UserLabels = { { "", "" }, },
};
// Make the request
AnswerQueryResponse response = conversationalSearchServiceClient.AnswerQuery(request);

AnswerQueryAsync(AnswerQueryRequest, CallSettings)

public virtual Task<AnswerQueryResponse> AnswerQueryAsync(AnswerQueryRequest request, CallSettings callSettings = null)

Answer query method.

Parameters
Name Description
request AnswerQueryRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnswerQueryResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
AnswerQueryRequest request = new AnswerQueryRequest
{
    ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
    Query = new Query(),
    SessionAsSessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
    SafetySpec = new AnswerQueryRequest.Types.SafetySpec(),
    RelatedQuestionsSpec = new AnswerQueryRequest.Types.RelatedQuestionsSpec(),
    AnswerGenerationSpec = new AnswerQueryRequest.Types.AnswerGenerationSpec(),
    SearchSpec = new AnswerQueryRequest.Types.SearchSpec(),
    QueryUnderstandingSpec = new AnswerQueryRequest.Types.QueryUnderstandingSpec(),
    AsynchronousMode = false,
    UserPseudoId = "",
    UserLabels = { { "", "" }, },
};
// Make the request
AnswerQueryResponse response = await conversationalSearchServiceClient.AnswerQueryAsync(request);

AnswerQueryAsync(AnswerQueryRequest, CancellationToken)

public virtual Task<AnswerQueryResponse> AnswerQueryAsync(AnswerQueryRequest request, CancellationToken cancellationToken)

Answer query method.

Parameters
Name Description
request AnswerQueryRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnswerQueryResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
AnswerQueryRequest request = new AnswerQueryRequest
{
    ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
    Query = new Query(),
    SessionAsSessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
    SafetySpec = new AnswerQueryRequest.Types.SafetySpec(),
    RelatedQuestionsSpec = new AnswerQueryRequest.Types.RelatedQuestionsSpec(),
    AnswerGenerationSpec = new AnswerQueryRequest.Types.AnswerGenerationSpec(),
    SearchSpec = new AnswerQueryRequest.Types.SearchSpec(),
    QueryUnderstandingSpec = new AnswerQueryRequest.Types.QueryUnderstandingSpec(),
    AsynchronousMode = false,
    UserPseudoId = "",
    UserLabels = { { "", "" }, },
};
// Make the request
AnswerQueryResponse response = await conversationalSearchServiceClient.AnswerQueryAsync(request);

ConverseConversation(ConversationName, TextInput, CallSettings)

public virtual ConverseConversationResponse ConverseConversation(ConversationName name, TextInput query, CallSettings callSettings = null)

Converses a conversation.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}. Use projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query TextInput

Required. Current user input.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ConverseConversationResponse

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
TextInput query = new TextInput();
// Make the request
ConverseConversationResponse response = conversationalSearchServiceClient.ConverseConversation(name, query);

ConverseConversation(ConverseConversationRequest, CallSettings)

public virtual ConverseConversationResponse ConverseConversation(ConverseConversationRequest request, CallSettings callSettings = null)

Converses a conversation.

Parameters
Name Description
request ConverseConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ConverseConversationResponse

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
ConverseConversationRequest request = new ConverseConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
    Query = new TextInput(),
    ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
    Conversation = new Conversation(),
    SafeSearch = false,
    UserLabels = { { "", "" }, },
    SummarySpec = new SearchRequest.Types.ContentSearchSpec.Types.SummarySpec(),
    Filter = "",
    BoostSpec = new SearchRequest.Types.BoostSpec(),
};
// Make the request
ConverseConversationResponse response = conversationalSearchServiceClient.ConverseConversation(request);

ConverseConversation(string, TextInput, CallSettings)

public virtual ConverseConversationResponse ConverseConversation(string name, TextInput query, CallSettings callSettings = null)

Converses a conversation.

Parameters
Name Description
name string

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}. Use projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query TextInput

Required. Current user input.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ConverseConversationResponse

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
TextInput query = new TextInput();
// Make the request
ConverseConversationResponse response = conversationalSearchServiceClient.ConverseConversation(name, query);

ConverseConversationAsync(ConversationName, TextInput, CallSettings)

public virtual Task<ConverseConversationResponse> ConverseConversationAsync(ConversationName name, TextInput query, CallSettings callSettings = null)

Converses a conversation.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}. Use projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query TextInput

Required. Current user input.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConverseConversationResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
TextInput query = new TextInput();
// Make the request
ConverseConversationResponse response = await conversationalSearchServiceClient.ConverseConversationAsync(name, query);

ConverseConversationAsync(ConversationName, TextInput, CancellationToken)

public virtual Task<ConverseConversationResponse> ConverseConversationAsync(ConversationName name, TextInput query, CancellationToken cancellationToken)

Converses a conversation.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}. Use projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query TextInput

Required. Current user input.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConverseConversationResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
TextInput query = new TextInput();
// Make the request
ConverseConversationResponse response = await conversationalSearchServiceClient.ConverseConversationAsync(name, query);

ConverseConversationAsync(ConverseConversationRequest, CallSettings)

public virtual Task<ConverseConversationResponse> ConverseConversationAsync(ConverseConversationRequest request, CallSettings callSettings = null)

Converses a conversation.

Parameters
Name Description
request ConverseConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConverseConversationResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConverseConversationRequest request = new ConverseConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
    Query = new TextInput(),
    ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
    Conversation = new Conversation(),
    SafeSearch = false,
    UserLabels = { { "", "" }, },
    SummarySpec = new SearchRequest.Types.ContentSearchSpec.Types.SummarySpec(),
    Filter = "",
    BoostSpec = new SearchRequest.Types.BoostSpec(),
};
// Make the request
ConverseConversationResponse response = await conversationalSearchServiceClient.ConverseConversationAsync(request);

ConverseConversationAsync(ConverseConversationRequest, CancellationToken)

public virtual Task<ConverseConversationResponse> ConverseConversationAsync(ConverseConversationRequest request, CancellationToken cancellationToken)

Converses a conversation.

Parameters
Name Description
request ConverseConversationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConverseConversationResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConverseConversationRequest request = new ConverseConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
    Query = new TextInput(),
    ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"),
    Conversation = new Conversation(),
    SafeSearch = false,
    UserLabels = { { "", "" }, },
    SummarySpec = new SearchRequest.Types.ContentSearchSpec.Types.SummarySpec(),
    Filter = "",
    BoostSpec = new SearchRequest.Types.BoostSpec(),
};
// Make the request
ConverseConversationResponse response = await conversationalSearchServiceClient.ConverseConversationAsync(request);

ConverseConversationAsync(string, TextInput, CallSettings)

public virtual Task<ConverseConversationResponse> ConverseConversationAsync(string name, TextInput query, CallSettings callSettings = null)

Converses a conversation.

Parameters
Name Description
name string

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}. Use projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query TextInput

Required. Current user input.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConverseConversationResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
TextInput query = new TextInput();
// Make the request
ConverseConversationResponse response = await conversationalSearchServiceClient.ConverseConversationAsync(name, query);

ConverseConversationAsync(string, TextInput, CancellationToken)

public virtual Task<ConverseConversationResponse> ConverseConversationAsync(string name, TextInput query, CancellationToken cancellationToken)

Converses a conversation.

Parameters
Name Description
name string

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}. Use projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query TextInput

Required. Current user input.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConverseConversationResponse

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
TextInput query = new TextInput();
// Make the request
ConverseConversationResponse response = await conversationalSearchServiceClient.ConverseConversationAsync(name, query);

Create()

public static ConversationalSearchServiceClient Create()

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

Returns
Type Description
ConversationalSearchServiceClient

The created ConversationalSearchServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskConversationalSearchServiceClient

The task representing the created ConversationalSearchServiceClient.

CreateConversation(CreateConversationRequest, CallSettings)

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

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
request CreateConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
CreateConversationRequest request = new CreateConversationRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Conversation = new Conversation(),
};
// Make the request
Conversation response = conversationalSearchServiceClient.CreateConversation(request);

CreateConversation(DataStoreName, Conversation, CallSettings)

public virtual Conversation CreateConversation(DataStoreName parent, Conversation conversation, CallSettings callSettings = null)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent DataStoreName

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

conversation Conversation

Required. The conversation to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = conversationalSearchServiceClient.CreateConversation(parent, conversation);

CreateConversation(string, Conversation, CallSettings)

public virtual Conversation CreateConversation(string parent, Conversation conversation, CallSettings callSettings = null)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent string

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

conversation Conversation

Required. The conversation to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Conversation conversation = new Conversation();
// Make the request
Conversation response = conversationalSearchServiceClient.CreateConversation(parent, conversation);

CreateConversationAsync(CreateConversationRequest, CallSettings)

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

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
request CreateConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConversationRequest request = new CreateConversationRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Conversation = new Conversation(),
};
// Make the request
Conversation response = await conversationalSearchServiceClient.CreateConversationAsync(request);

CreateConversationAsync(CreateConversationRequest, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(CreateConversationRequest request, CancellationToken cancellationToken)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
request CreateConversationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConversationRequest request = new CreateConversationRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Conversation = new Conversation(),
};
// Make the request
Conversation response = await conversationalSearchServiceClient.CreateConversationAsync(request);

CreateConversationAsync(DataStoreName, Conversation, CallSettings)

public virtual Task<Conversation> CreateConversationAsync(DataStoreName parent, Conversation conversation, CallSettings callSettings = null)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent DataStoreName

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

conversation Conversation

Required. The conversation to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationalSearchServiceClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(DataStoreName, Conversation, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(DataStoreName parent, Conversation conversation, CancellationToken cancellationToken)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent DataStoreName

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

conversation Conversation

Required. The conversation to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationalSearchServiceClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(string, Conversation, CallSettings)

public virtual Task<Conversation> CreateConversationAsync(string parent, Conversation conversation, CallSettings callSettings = null)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent string

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

conversation Conversation

Required. The conversation to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationalSearchServiceClient.CreateConversationAsync(parent, conversation);

CreateConversationAsync(string, Conversation, CancellationToken)

public virtual Task<Conversation> CreateConversationAsync(string parent, Conversation conversation, CancellationToken cancellationToken)

Creates a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent string

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

conversation Conversation

Required. The conversation to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Conversation conversation = new Conversation();
// Make the request
Conversation response = await conversationalSearchServiceClient.CreateConversationAsync(parent, conversation);

CreateSession(CreateSessionRequest, CallSettings)

public virtual Session CreateSession(CreateSessionRequest request, CallSettings callSettings = null)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
request CreateSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
CreateSessionRequest request = new CreateSessionRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Session = new Session(),
};
// Make the request
Session response = conversationalSearchServiceClient.CreateSession(request);

CreateSession(DataStoreName, Session, CallSettings)

public virtual Session CreateSession(DataStoreName parent, Session session, CallSettings callSettings = null)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent DataStoreName

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

session Session

Required. The session to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Session session = new Session();
// Make the request
Session response = conversationalSearchServiceClient.CreateSession(parent, session);

CreateSession(string, Session, CallSettings)

public virtual Session CreateSession(string parent, Session session, CallSettings callSettings = null)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent string

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

session Session

Required. The session to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Session session = new Session();
// Make the request
Session response = conversationalSearchServiceClient.CreateSession(parent, session);

CreateSessionAsync(CreateSessionRequest, CallSettings)

public virtual Task<Session> CreateSessionAsync(CreateSessionRequest request, CallSettings callSettings = null)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
request CreateSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSessionRequest request = new CreateSessionRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Session = new Session(),
};
// Make the request
Session response = await conversationalSearchServiceClient.CreateSessionAsync(request);

CreateSessionAsync(CreateSessionRequest, CancellationToken)

public virtual Task<Session> CreateSessionAsync(CreateSessionRequest request, CancellationToken cancellationToken)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
request CreateSessionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSessionRequest request = new CreateSessionRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Session = new Session(),
};
// Make the request
Session response = await conversationalSearchServiceClient.CreateSessionAsync(request);

CreateSessionAsync(DataStoreName, Session, CallSettings)

public virtual Task<Session> CreateSessionAsync(DataStoreName parent, Session session, CallSettings callSettings = null)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent DataStoreName

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

session Session

Required. The session to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Session session = new Session();
// Make the request
Session response = await conversationalSearchServiceClient.CreateSessionAsync(parent, session);

CreateSessionAsync(DataStoreName, Session, CancellationToken)

public virtual Task<Session> CreateSessionAsync(DataStoreName parent, Session session, CancellationToken cancellationToken)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent DataStoreName

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

session Session

Required. The session to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
Session session = new Session();
// Make the request
Session response = await conversationalSearchServiceClient.CreateSessionAsync(parent, session);

CreateSessionAsync(string, Session, CallSettings)

public virtual Task<Session> CreateSessionAsync(string parent, Session session, CallSettings callSettings = null)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent string

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

session Session

Required. The session to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Session session = new Session();
// Make the request
Session response = await conversationalSearchServiceClient.CreateSessionAsync(parent, session);

CreateSessionAsync(string, Session, CancellationToken)

public virtual Task<Session> CreateSessionAsync(string parent, Session session, CancellationToken cancellationToken)

Creates a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to create already exists, an ALREADY_EXISTS error is returned.

Parameters
Name Description
parent string

Required. Full resource name of parent data store. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

session Session

Required. The session to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
Session session = new Session();
// Make the request
Session response = await conversationalSearchServiceClient.CreateSessionAsync(parent, session);

DeleteConversation(ConversationName, CallSettings)

public virtual void DeleteConversation(ConversationName name, CallSettings callSettings = null)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
// Make the request
conversationalSearchServiceClient.DeleteConversation(name);

DeleteConversation(DeleteConversationRequest, CallSettings)

public virtual void DeleteConversation(DeleteConversationRequest request, CallSettings callSettings = null)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request DeleteConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
DeleteConversationRequest request = new DeleteConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
};
// Make the request
conversationalSearchServiceClient.DeleteConversation(request);

DeleteConversation(string, CallSettings)

public virtual void DeleteConversation(string name, CallSettings callSettings = null)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name string

Required. The resource name of the Conversation to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
// Make the request
conversationalSearchServiceClient.DeleteConversation(name);

DeleteConversationAsync(ConversationName, CallSettings)

public virtual Task DeleteConversationAsync(ConversationName name, CallSettings callSettings = null)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
// Make the request
await conversationalSearchServiceClient.DeleteConversationAsync(name);

DeleteConversationAsync(ConversationName, CancellationToken)

public virtual Task DeleteConversationAsync(ConversationName name, CancellationToken cancellationToken)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
// Make the request
await conversationalSearchServiceClient.DeleteConversationAsync(name);

DeleteConversationAsync(DeleteConversationRequest, CallSettings)

public virtual Task DeleteConversationAsync(DeleteConversationRequest request, CallSettings callSettings = null)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request DeleteConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConversationRequest request = new DeleteConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
};
// Make the request
await conversationalSearchServiceClient.DeleteConversationAsync(request);

DeleteConversationAsync(DeleteConversationRequest, CancellationToken)

public virtual Task DeleteConversationAsync(DeleteConversationRequest request, CancellationToken cancellationToken)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request DeleteConversationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConversationRequest request = new DeleteConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
};
// Make the request
await conversationalSearchServiceClient.DeleteConversationAsync(request);

DeleteConversationAsync(string, CallSettings)

public virtual Task DeleteConversationAsync(string name, CallSettings callSettings = null)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name string

Required. The resource name of the Conversation to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
// Make the request
await conversationalSearchServiceClient.DeleteConversationAsync(name);

DeleteConversationAsync(string, CancellationToken)

public virtual Task DeleteConversationAsync(string name, CancellationToken cancellationToken)

Deletes a Conversation.

If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name string

Required. The resource name of the Conversation to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
// Make the request
await conversationalSearchServiceClient.DeleteConversationAsync(name);

DeleteSession(DeleteSessionRequest, CallSettings)

public virtual void DeleteSession(DeleteSessionRequest request, CallSettings callSettings = null)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request DeleteSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
DeleteSessionRequest request = new DeleteSessionRequest
{
    SessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
};
// Make the request
conversationalSearchServiceClient.DeleteSession(request);

DeleteSession(SessionName, CallSettings)

public virtual void DeleteSession(SessionName name, CallSettings callSettings = null)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name SessionName

Required. The resource name of the Session to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
SessionName name = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]");
// Make the request
conversationalSearchServiceClient.DeleteSession(name);

DeleteSession(string, CallSettings)

public virtual void DeleteSession(string name, CallSettings callSettings = null)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name string

Required. The resource name of the Session to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]";
// Make the request
conversationalSearchServiceClient.DeleteSession(name);

DeleteSessionAsync(DeleteSessionRequest, CallSettings)

public virtual Task DeleteSessionAsync(DeleteSessionRequest request, CallSettings callSettings = null)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request DeleteSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSessionRequest request = new DeleteSessionRequest
{
    SessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
};
// Make the request
await conversationalSearchServiceClient.DeleteSessionAsync(request);

DeleteSessionAsync(DeleteSessionRequest, CancellationToken)

public virtual Task DeleteSessionAsync(DeleteSessionRequest request, CancellationToken cancellationToken)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request DeleteSessionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSessionRequest request = new DeleteSessionRequest
{
    SessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
};
// Make the request
await conversationalSearchServiceClient.DeleteSessionAsync(request);

DeleteSessionAsync(SessionName, CallSettings)

public virtual Task DeleteSessionAsync(SessionName name, CallSettings callSettings = null)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name SessionName

Required. The resource name of the Session to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
SessionName name = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]");
// Make the request
await conversationalSearchServiceClient.DeleteSessionAsync(name);

DeleteSessionAsync(SessionName, CancellationToken)

public virtual Task DeleteSessionAsync(SessionName name, CancellationToken cancellationToken)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name SessionName

Required. The resource name of the Session to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
SessionName name = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]");
// Make the request
await conversationalSearchServiceClient.DeleteSessionAsync(name);

DeleteSessionAsync(string, CallSettings)

public virtual Task DeleteSessionAsync(string name, CallSettings callSettings = null)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name string

Required. The resource name of the Session to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]";
// Make the request
await conversationalSearchServiceClient.DeleteSessionAsync(name);

DeleteSessionAsync(string, CancellationToken)

public virtual Task DeleteSessionAsync(string name, CancellationToken cancellationToken)

Deletes a Session.

If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
name string

Required. The resource name of the Session to delete. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]";
// Make the request
await conversationalSearchServiceClient.DeleteSessionAsync(name);

GetAnswer(AnswerName, CallSettings)

public virtual Answer GetAnswer(AnswerName name, CallSettings callSettings = null)

Gets a Answer.

Parameters
Name Description
name AnswerName

Required. The resource name of the Answer to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Answer

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
AnswerName name = AnswerName.FromProjectLocationDataStoreSessionAnswer("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]");
// Make the request
Answer response = conversationalSearchServiceClient.GetAnswer(name);

GetAnswer(GetAnswerRequest, CallSettings)

public virtual Answer GetAnswer(GetAnswerRequest request, CallSettings callSettings = null)

Gets a Answer.

Parameters
Name Description
request GetAnswerRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Answer

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
GetAnswerRequest request = new GetAnswerRequest
{
    AnswerName = AnswerName.FromProjectLocationDataStoreSessionAnswer("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]"),
};
// Make the request
Answer response = conversationalSearchServiceClient.GetAnswer(request);

GetAnswer(string, CallSettings)

public virtual Answer GetAnswer(string name, CallSettings callSettings = null)

Gets a Answer.

Parameters
Name Description
name string

Required. The resource name of the Answer to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Answer

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]/answers/[ANSWER]";
// Make the request
Answer response = conversationalSearchServiceClient.GetAnswer(name);

GetAnswerAsync(AnswerName, CallSettings)

public virtual Task<Answer> GetAnswerAsync(AnswerName name, CallSettings callSettings = null)

Gets a Answer.

Parameters
Name Description
name AnswerName

Required. The resource name of the Answer to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnswer

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
AnswerName name = AnswerName.FromProjectLocationDataStoreSessionAnswer("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]");
// Make the request
Answer response = await conversationalSearchServiceClient.GetAnswerAsync(name);

GetAnswerAsync(AnswerName, CancellationToken)

public virtual Task<Answer> GetAnswerAsync(AnswerName name, CancellationToken cancellationToken)

Gets a Answer.

Parameters
Name Description
name AnswerName

Required. The resource name of the Answer to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnswer

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
AnswerName name = AnswerName.FromProjectLocationDataStoreSessionAnswer("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]");
// Make the request
Answer response = await conversationalSearchServiceClient.GetAnswerAsync(name);

GetAnswerAsync(GetAnswerRequest, CallSettings)

public virtual Task<Answer> GetAnswerAsync(GetAnswerRequest request, CallSettings callSettings = null)

Gets a Answer.

Parameters
Name Description
request GetAnswerRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnswer

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
GetAnswerRequest request = new GetAnswerRequest
{
    AnswerName = AnswerName.FromProjectLocationDataStoreSessionAnswer("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]"),
};
// Make the request
Answer response = await conversationalSearchServiceClient.GetAnswerAsync(request);

GetAnswerAsync(GetAnswerRequest, CancellationToken)

public virtual Task<Answer> GetAnswerAsync(GetAnswerRequest request, CancellationToken cancellationToken)

Gets a Answer.

Parameters
Name Description
request GetAnswerRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnswer

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
GetAnswerRequest request = new GetAnswerRequest
{
    AnswerName = AnswerName.FromProjectLocationDataStoreSessionAnswer("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]"),
};
// Make the request
Answer response = await conversationalSearchServiceClient.GetAnswerAsync(request);

GetAnswerAsync(string, CallSettings)

public virtual Task<Answer> GetAnswerAsync(string name, CallSettings callSettings = null)

Gets a Answer.

Parameters
Name Description
name string

Required. The resource name of the Answer to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnswer

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]/answers/[ANSWER]";
// Make the request
Answer response = await conversationalSearchServiceClient.GetAnswerAsync(name);

GetAnswerAsync(string, CancellationToken)

public virtual Task<Answer> GetAnswerAsync(string name, CancellationToken cancellationToken)

Gets a Answer.

Parameters
Name Description
name string

Required. The resource name of the Answer to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnswer

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]/answers/[ANSWER]";
// Make the request
Answer response = await conversationalSearchServiceClient.GetAnswerAsync(name);

GetConversation(ConversationName, CallSettings)

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

Gets a Conversation.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
// Make the request
Conversation response = conversationalSearchServiceClient.GetConversation(name);

GetConversation(GetConversationRequest, CallSettings)

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

Gets a Conversation.

Parameters
Name Description
request GetConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
GetConversationRequest request = new GetConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
};
// Make the request
Conversation response = conversationalSearchServiceClient.GetConversation(request);

GetConversation(string, CallSettings)

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

Gets a Conversation.

Parameters
Name Description
name string

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
// Make the request
Conversation response = conversationalSearchServiceClient.GetConversation(name);

GetConversationAsync(ConversationName, CallSettings)

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

Gets a Conversation.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
// Make the request
Conversation response = await conversationalSearchServiceClient.GetConversationAsync(name);

GetConversationAsync(ConversationName, CancellationToken)

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

Gets a Conversation.

Parameters
Name Description
name ConversationName

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ConversationName name = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
// Make the request
Conversation response = await conversationalSearchServiceClient.GetConversationAsync(name);

GetConversationAsync(GetConversationRequest, CallSettings)

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

Gets a Conversation.

Parameters
Name Description
request GetConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
GetConversationRequest request = new GetConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
};
// Make the request
Conversation response = await conversationalSearchServiceClient.GetConversationAsync(request);

GetConversationAsync(GetConversationRequest, CancellationToken)

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

Gets a Conversation.

Parameters
Name Description
request GetConversationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
GetConversationRequest request = new GetConversationRequest
{
    ConversationName = ConversationName.FromProjectLocationDataStoreConversation("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"),
};
// Make the request
Conversation response = await conversationalSearchServiceClient.GetConversationAsync(request);

GetConversationAsync(string, CallSettings)

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

Gets a Conversation.

Parameters
Name Description
name string

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
// Make the request
Conversation response = await conversationalSearchServiceClient.GetConversationAsync(name);

GetConversationAsync(string, CancellationToken)

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

Gets a Conversation.

Parameters
Name Description
name string

Required. The resource name of the Conversation to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/conversations/[CONVERSATION]";
// Make the request
Conversation response = await conversationalSearchServiceClient.GetConversationAsync(name);

GetSession(GetSessionRequest, CallSettings)

public virtual Session GetSession(GetSessionRequest request, CallSettings callSettings = null)

Gets a Session.

Parameters
Name Description
request GetSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
GetSessionRequest request = new GetSessionRequest
{
    SessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
};
// Make the request
Session response = conversationalSearchServiceClient.GetSession(request);

GetSession(SessionName, CallSettings)

public virtual Session GetSession(SessionName name, CallSettings callSettings = null)

Gets a Session.

Parameters
Name Description
name SessionName

Required. The resource name of the Session to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
SessionName name = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]");
// Make the request
Session response = conversationalSearchServiceClient.GetSession(name);

GetSession(string, CallSettings)

public virtual Session GetSession(string name, CallSettings callSettings = null)

Gets a Session.

Parameters
Name Description
name string

Required. The resource name of the Session to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]";
// Make the request
Session response = conversationalSearchServiceClient.GetSession(name);

GetSessionAsync(GetSessionRequest, CallSettings)

public virtual Task<Session> GetSessionAsync(GetSessionRequest request, CallSettings callSettings = null)

Gets a Session.

Parameters
Name Description
request GetSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
GetSessionRequest request = new GetSessionRequest
{
    SessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
};
// Make the request
Session response = await conversationalSearchServiceClient.GetSessionAsync(request);

GetSessionAsync(GetSessionRequest, CancellationToken)

public virtual Task<Session> GetSessionAsync(GetSessionRequest request, CancellationToken cancellationToken)

Gets a Session.

Parameters
Name Description
request GetSessionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
GetSessionRequest request = new GetSessionRequest
{
    SessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"),
};
// Make the request
Session response = await conversationalSearchServiceClient.GetSessionAsync(request);

GetSessionAsync(SessionName, CallSettings)

public virtual Task<Session> GetSessionAsync(SessionName name, CallSettings callSettings = null)

Gets a Session.

Parameters
Name Description
name SessionName

Required. The resource name of the Session to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
SessionName name = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]");
// Make the request
Session response = await conversationalSearchServiceClient.GetSessionAsync(name);

GetSessionAsync(SessionName, CancellationToken)

public virtual Task<Session> GetSessionAsync(SessionName name, CancellationToken cancellationToken)

Gets a Session.

Parameters
Name Description
name SessionName

Required. The resource name of the Session to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
SessionName name = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]");
// Make the request
Session response = await conversationalSearchServiceClient.GetSessionAsync(name);

GetSessionAsync(string, CallSettings)

public virtual Task<Session> GetSessionAsync(string name, CallSettings callSettings = null)

Gets a Session.

Parameters
Name Description
name string

Required. The resource name of the Session to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]";
// Make the request
Session response = await conversationalSearchServiceClient.GetSessionAsync(name);

GetSessionAsync(string, CancellationToken)

public virtual Task<Session> GetSessionAsync(string name, CancellationToken cancellationToken)

Gets a Session.

Parameters
Name Description
name string

Required. The resource name of the Session to get. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/sessions/[SESSION]";
// Make the request
Session response = await conversationalSearchServiceClient.GetSessionAsync(name);

ListConversations(DataStoreName, string, int?, CallSettings)

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

Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent DataStoreName

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListConversationsResponseConversation

A pageable sequence of Conversation resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationalSearchServiceClient.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)

Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
request ListConversationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListConversationsResponseConversation

A pageable sequence of Conversation resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
ListConversationsRequest request = new ListConversationsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationalSearchServiceClient.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, int?, CallSettings)

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

Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent string

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListConversationsResponseConversation

A pageable sequence of Conversation resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
PagedEnumerable<ListConversationsResponse, Conversation> response = conversationalSearchServiceClient.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(DataStoreName, string, int?, CallSettings)

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

Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent DataStoreName

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListConversationsResponseConversation

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationalSearchServiceClient.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)

Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
request ListConversationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListConversationsResponseConversation

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ListConversationsRequest request = new ListConversationsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationalSearchServiceClient.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, int?, CallSettings)

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

Lists all Conversations by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent string

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListConversationsResponseConversation

A pageable asynchronous sequence of Conversation resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
PagedAsyncEnumerable<ListConversationsResponse, Conversation> response = conversationalSearchServiceClient.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;

ListSessions(DataStoreName, string, int?, CallSettings)

public virtual PagedEnumerable<ListSessionsResponse, Session> ListSessions(DataStoreName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Sessions by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent DataStoreName

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListSessionsResponseSession

A pageable sequence of Session resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedEnumerable<ListSessionsResponse, Session> response = conversationalSearchServiceClient.ListSessions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Session 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 (ListSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Session 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<Session> 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 (Session 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;

ListSessions(ListSessionsRequest, CallSettings)

public virtual PagedEnumerable<ListSessionsResponse, Session> ListSessions(ListSessionsRequest request, CallSettings callSettings = null)

Lists all Sessions by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
request ListSessionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListSessionsResponseSession

A pageable sequence of Session resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
ListSessionsRequest request = new ListSessionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListSessionsResponse, Session> response = conversationalSearchServiceClient.ListSessions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Session 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 (ListSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Session 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<Session> 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 (Session 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;

ListSessions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListSessionsResponse, Session> ListSessions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Sessions by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent string

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListSessionsResponseSession

A pageable sequence of Session resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
PagedEnumerable<ListSessionsResponse, Session> response = conversationalSearchServiceClient.ListSessions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Session 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 (ListSessionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Session 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<Session> 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 (Session 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;

ListSessionsAsync(DataStoreName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListSessionsResponse, Session> ListSessionsAsync(DataStoreName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Sessions by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent DataStoreName

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListSessionsResponseSession

A pageable asynchronous sequence of Session resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedAsyncEnumerable<ListSessionsResponse, Session> response = conversationalSearchServiceClient.ListSessionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Session 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((ListSessionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Session 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<Session> 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 (Session 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;

ListSessionsAsync(ListSessionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListSessionsResponse, Session> ListSessionsAsync(ListSessionsRequest request, CallSettings callSettings = null)

Lists all Sessions by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
request ListSessionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListSessionsResponseSession

A pageable asynchronous sequence of Session resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
ListSessionsRequest request = new ListSessionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListSessionsResponse, Session> response = conversationalSearchServiceClient.ListSessionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Session 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((ListSessionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Session 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<Session> 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 (Session 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;

ListSessionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListSessionsResponse, Session> ListSessionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Sessions by their parent [DataStore][google.cloud.discoveryengine.v1beta.DataStore].

Parameters
Name Description
parent string

Required. The data store resource name. Format: projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListSessionsResponseSession

A pageable asynchronous sequence of Session resources.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
PagedAsyncEnumerable<ListSessionsResponse, Session> response = conversationalSearchServiceClient.ListSessionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Session 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((ListSessionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Session 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<Session> 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 (Session 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
Type Description
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.

UpdateConversation(Conversation, FieldMask, CallSettings)

public virtual Conversation UpdateConversation(Conversation conversation, FieldMask updateMask, CallSettings callSettings = null)

Updates a Conversation.

[Conversation][google.cloud.discoveryengine.v1beta.Conversation] action type cannot be changed. If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
conversation Conversation

Required. The Conversation to update.

updateMask FieldMask

Indicates which fields in the provided [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. The following are NOT supported:

  • [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name]

If not set or empty, all supported fields are updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
Conversation conversation = new Conversation();
FieldMask updateMask = new FieldMask();
// Make the request
Conversation response = conversationalSearchServiceClient.UpdateConversation(conversation, updateMask);

UpdateConversation(UpdateConversationRequest, CallSettings)

public virtual Conversation UpdateConversation(UpdateConversationRequest request, CallSettings callSettings = null)

Updates a Conversation.

[Conversation][google.cloud.discoveryengine.v1beta.Conversation] action type cannot be changed. If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request UpdateConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Conversation

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
UpdateConversationRequest request = new UpdateConversationRequest
{
    Conversation = new Conversation(),
    UpdateMask = new FieldMask(),
};
// Make the request
Conversation response = conversationalSearchServiceClient.UpdateConversation(request);

UpdateConversationAsync(Conversation, FieldMask, CallSettings)

public virtual Task<Conversation> UpdateConversationAsync(Conversation conversation, FieldMask updateMask, CallSettings callSettings = null)

Updates a Conversation.

[Conversation][google.cloud.discoveryengine.v1beta.Conversation] action type cannot be changed. If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
conversation Conversation

Required. The Conversation to update.

updateMask FieldMask

Indicates which fields in the provided [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. The following are NOT supported:

  • [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name]

If not set or empty, all supported fields are updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
Conversation conversation = new Conversation();
FieldMask updateMask = new FieldMask();
// Make the request
Conversation response = await conversationalSearchServiceClient.UpdateConversationAsync(conversation, updateMask);

UpdateConversationAsync(Conversation, FieldMask, CancellationToken)

public virtual Task<Conversation> UpdateConversationAsync(Conversation conversation, FieldMask updateMask, CancellationToken cancellationToken)

Updates a Conversation.

[Conversation][google.cloud.discoveryengine.v1beta.Conversation] action type cannot be changed. If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
conversation Conversation

Required. The Conversation to update.

updateMask FieldMask

Indicates which fields in the provided [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update. The following are NOT supported:

  • [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name]

If not set or empty, all supported fields are updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
Conversation conversation = new Conversation();
FieldMask updateMask = new FieldMask();
// Make the request
Conversation response = await conversationalSearchServiceClient.UpdateConversationAsync(conversation, updateMask);

UpdateConversationAsync(UpdateConversationRequest, CallSettings)

public virtual Task<Conversation> UpdateConversationAsync(UpdateConversationRequest request, CallSettings callSettings = null)

Updates a Conversation.

[Conversation][google.cloud.discoveryengine.v1beta.Conversation] action type cannot be changed. If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request UpdateConversationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateConversationRequest request = new UpdateConversationRequest
{
    Conversation = new Conversation(),
    UpdateMask = new FieldMask(),
};
// Make the request
Conversation response = await conversationalSearchServiceClient.UpdateConversationAsync(request);

UpdateConversationAsync(UpdateConversationRequest, CancellationToken)

public virtual Task<Conversation> UpdateConversationAsync(UpdateConversationRequest request, CancellationToken cancellationToken)

Updates a Conversation.

[Conversation][google.cloud.discoveryengine.v1beta.Conversation] action type cannot be changed. If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request UpdateConversationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConversation

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateConversationRequest request = new UpdateConversationRequest
{
    Conversation = new Conversation(),
    UpdateMask = new FieldMask(),
};
// Make the request
Conversation response = await conversationalSearchServiceClient.UpdateConversationAsync(request);

UpdateSession(Session, FieldMask, CallSettings)

public virtual Session UpdateSession(Session session, FieldMask updateMask, CallSettings callSettings = null)

Updates a Session.

[Session][google.cloud.discoveryengine.v1beta.Session] action type cannot be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
session Session

Required. The Session to update.

updateMask FieldMask

Indicates which fields in the provided [Session][google.cloud.discoveryengine.v1beta.Session] to update. The following are NOT supported:

  • [Session.name][google.cloud.discoveryengine.v1beta.Session.name]

If not set or empty, all supported fields are updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
Session session = new Session();
FieldMask updateMask = new FieldMask();
// Make the request
Session response = conversationalSearchServiceClient.UpdateSession(session, updateMask);

UpdateSession(UpdateSessionRequest, CallSettings)

public virtual Session UpdateSession(UpdateSessionRequest request, CallSettings callSettings = null)

Updates a Session.

[Session][google.cloud.discoveryengine.v1beta.Session] action type cannot be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request UpdateSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Session

The RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create();
// Initialize request argument(s)
UpdateSessionRequest request = new UpdateSessionRequest
{
    Session = new Session(),
    UpdateMask = new FieldMask(),
};
// Make the request
Session response = conversationalSearchServiceClient.UpdateSession(request);

UpdateSessionAsync(Session, FieldMask, CallSettings)

public virtual Task<Session> UpdateSessionAsync(Session session, FieldMask updateMask, CallSettings callSettings = null)

Updates a Session.

[Session][google.cloud.discoveryengine.v1beta.Session] action type cannot be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
session Session

Required. The Session to update.

updateMask FieldMask

Indicates which fields in the provided [Session][google.cloud.discoveryengine.v1beta.Session] to update. The following are NOT supported:

  • [Session.name][google.cloud.discoveryengine.v1beta.Session.name]

If not set or empty, all supported fields are updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
Session session = new Session();
FieldMask updateMask = new FieldMask();
// Make the request
Session response = await conversationalSearchServiceClient.UpdateSessionAsync(session, updateMask);

UpdateSessionAsync(Session, FieldMask, CancellationToken)

public virtual Task<Session> UpdateSessionAsync(Session session, FieldMask updateMask, CancellationToken cancellationToken)

Updates a Session.

[Session][google.cloud.discoveryengine.v1beta.Session] action type cannot be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
session Session

Required. The Session to update.

updateMask FieldMask

Indicates which fields in the provided [Session][google.cloud.discoveryengine.v1beta.Session] to update. The following are NOT supported:

  • [Session.name][google.cloud.discoveryengine.v1beta.Session.name]

If not set or empty, all supported fields are updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
Session session = new Session();
FieldMask updateMask = new FieldMask();
// Make the request
Session response = await conversationalSearchServiceClient.UpdateSessionAsync(session, updateMask);

UpdateSessionAsync(UpdateSessionRequest, CallSettings)

public virtual Task<Session> UpdateSessionAsync(UpdateSessionRequest request, CallSettings callSettings = null)

Updates a Session.

[Session][google.cloud.discoveryengine.v1beta.Session] action type cannot be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request UpdateSessionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSessionRequest request = new UpdateSessionRequest
{
    Session = new Session(),
    UpdateMask = new FieldMask(),
};
// Make the request
Session response = await conversationalSearchServiceClient.UpdateSessionAsync(request);

UpdateSessionAsync(UpdateSessionRequest, CancellationToken)

public virtual Task<Session> UpdateSessionAsync(UpdateSessionRequest request, CancellationToken cancellationToken)

Updates a Session.

[Session][google.cloud.discoveryengine.v1beta.Session] action type cannot be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] to update does not exist, a NOT_FOUND error is returned.

Parameters
Name Description
request UpdateSessionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSession

A Task containing the RPC response.

Example
// Create client
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSessionRequest request = new UpdateSessionRequest
{
    Session = new Session(),
    UpdateMask = new FieldMask(),
};
// Make the request
Session response = await conversationalSearchServiceClient.UpdateSessionAsync(request);