public abstract class ConversationalSearchServiceClient
Reference documentation and code samples for the Discovery Engine v1beta API class ConversationalSearchServiceClient.
ConversationalSearchService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.DiscoveryEngine.V1BetaAssembly
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 |
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
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:
|
query | TextInput Required. Current user input. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ConverseConversationResponse | The RPC response. |
// 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. |
// 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:
|
query | TextInput Required. Current user input. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ConverseConversationResponse | The RPC response. |
// 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:
|
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. |
// 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:
|
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. |
// 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. |
// 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. |
// 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:
|
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. |
// 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:
|
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. |
// 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. |
// 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:
|
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. |
// 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:
|
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. |
// 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. |
// 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. |
// 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:
|
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. |
// 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:
|
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. |
// 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:
|
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. |
// 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:
|
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. |
// 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);
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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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. |
// 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. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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);
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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Conversation | The RPC response. |
// 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. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Conversation | The RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskConversation | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskConversation | A Task containing the RPC response. |
// 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. |
// 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. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskConversation | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskConversation | A Task containing the RPC response. |
// 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);
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:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListConversationsResponseConversation | A pageable sequence of Conversation resources. |
// 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. |
// 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:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListConversationsResponseConversation | A pageable sequence of Conversation resources. |
// 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:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListConversationsResponseConversation | A pageable asynchronous sequence of Conversation resources. |
// 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. |
// 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:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListConversationsResponseConversation | A pageable asynchronous sequence of Conversation resources. |
// 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;
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. |
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:
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. |
// 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. |
// 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:
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. |
// 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:
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. |
// 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. |
// 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. |
// 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);