Discovery Engine v1 API - Class CompletionServiceClient (1.4.0)

public abstract class CompletionServiceClient

Reference documentation and code samples for the Discovery Engine v1 API class CompletionServiceClient.

CompletionService client wrapper, for convenient use.

Inheritance

object > CompletionServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Remarks

Service for Auto-Completion.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the CompletionService 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 CompletionService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default CompletionService scopes are:

GrpcClient

public virtual CompletionService.CompletionServiceClient GrpcClient { get; }

The underlying gRPC CompletionService client

Property Value
Type Description
CompletionServiceCompletionServiceClient

ImportCompletionSuggestionsOperationsClient

public virtual OperationsClient ImportCompletionSuggestionsOperationsClient { get; }

The long-running operations client for ImportCompletionSuggestions.

Property Value
Type Description
OperationsClient

ImportSuggestionDenyListEntriesOperationsClient

public virtual OperationsClient ImportSuggestionDenyListEntriesOperationsClient { get; }

The long-running operations client for ImportSuggestionDenyListEntries.

Property Value
Type Description
OperationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

PurgeCompletionSuggestionsOperationsClient

public virtual OperationsClient PurgeCompletionSuggestionsOperationsClient { get; }

The long-running operations client for PurgeCompletionSuggestions.

Property Value
Type Description
OperationsClient

PurgeSuggestionDenyListEntriesOperationsClient

public virtual OperationsClient PurgeSuggestionDenyListEntriesOperationsClient { get; }

The long-running operations client for PurgeSuggestionDenyListEntries.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

CompleteQuery(CompleteQueryRequest, CallSettings)

public virtual CompleteQueryResponse CompleteQuery(CompleteQueryRequest request, CallSettings callSettings = null)

Completes the specified user input with keyword suggestions.

Parameters
Name Description
request CompleteQueryRequest

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
CompleteQueryResponse

The RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
// Initialize request argument(s)
CompleteQueryRequest request = new CompleteQueryRequest
{
    DataStoreAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Query = "",
    QueryModel = "",
    UserPseudoId = "",
    IncludeTailSuggestions = false,
};
// Make the request
CompleteQueryResponse response = completionServiceClient.CompleteQuery(request);

CompleteQueryAsync(CompleteQueryRequest, CallSettings)

public virtual Task<CompleteQueryResponse> CompleteQueryAsync(CompleteQueryRequest request, CallSettings callSettings = null)

Completes the specified user input with keyword suggestions.

Parameters
Name Description
request CompleteQueryRequest

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
TaskCompleteQueryResponse

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
CompleteQueryRequest request = new CompleteQueryRequest
{
    DataStoreAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Query = "",
    QueryModel = "",
    UserPseudoId = "",
    IncludeTailSuggestions = false,
};
// Make the request
CompleteQueryResponse response = await completionServiceClient.CompleteQueryAsync(request);

CompleteQueryAsync(CompleteQueryRequest, CancellationToken)

public virtual Task<CompleteQueryResponse> CompleteQueryAsync(CompleteQueryRequest request, CancellationToken cancellationToken)

Completes the specified user input with keyword suggestions.

Parameters
Name Description
request CompleteQueryRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCompleteQueryResponse

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
CompleteQueryRequest request = new CompleteQueryRequest
{
    DataStoreAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Query = "",
    QueryModel = "",
    UserPseudoId = "",
    IncludeTailSuggestions = false,
};
// Make the request
CompleteQueryResponse response = await completionServiceClient.CompleteQueryAsync(request);

Create()

public static CompletionServiceClient Create()

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

Returns
Type Description
CompletionServiceClient

The created CompletionServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskCompletionServiceClient

The task representing the created CompletionServiceClient.

ImportCompletionSuggestions(ImportCompletionSuggestionsRequest, CallSettings)

public virtual Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> ImportCompletionSuggestions(ImportCompletionSuggestionsRequest request, CallSettings callSettings = null)

Imports [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.

Parameters
Name Description
request ImportCompletionSuggestionsRequest

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
OperationImportCompletionSuggestionsResponseImportCompletionSuggestionsMetadata

The RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
// Initialize request argument(s)
ImportCompletionSuggestionsRequest request = new ImportCompletionSuggestionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    InlineSource = new ImportCompletionSuggestionsRequest.Types.InlineSource(),
    ErrorConfig = new ImportErrorConfig(),
};
// Make the request
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> response = completionServiceClient.ImportCompletionSuggestions(request);

// Poll until the returned long-running operation is complete
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportCompletionSuggestionsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> retrievedResponse = completionServiceClient.PollOnceImportCompletionSuggestions(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
}

ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest, CallSettings)

public virtual Task<Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata>> ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest request, CallSettings callSettings = null)

Imports [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.

Parameters
Name Description
request ImportCompletionSuggestionsRequest

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
TaskOperationImportCompletionSuggestionsResponseImportCompletionSuggestionsMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
ImportCompletionSuggestionsRequest request = new ImportCompletionSuggestionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    InlineSource = new ImportCompletionSuggestionsRequest.Types.InlineSource(),
    ErrorConfig = new ImportErrorConfig(),
};
// Make the request
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> response = await completionServiceClient.ImportCompletionSuggestionsAsync(request);

// Poll until the returned long-running operation is complete
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportCompletionSuggestionsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOnceImportCompletionSuggestionsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
}

ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest, CancellationToken)

public virtual Task<Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata>> ImportCompletionSuggestionsAsync(ImportCompletionSuggestionsRequest request, CancellationToken cancellationToken)

Imports [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.

Parameters
Name Description
request ImportCompletionSuggestionsRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationImportCompletionSuggestionsResponseImportCompletionSuggestionsMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
ImportCompletionSuggestionsRequest request = new ImportCompletionSuggestionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    InlineSource = new ImportCompletionSuggestionsRequest.Types.InlineSource(),
    ErrorConfig = new ImportErrorConfig(),
};
// Make the request
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> response = await completionServiceClient.ImportCompletionSuggestionsAsync(request);

// Poll until the returned long-running operation is complete
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportCompletionSuggestionsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOnceImportCompletionSuggestionsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
}

ImportSuggestionDenyListEntries(ImportSuggestionDenyListEntriesRequest, CallSettings)

public virtual Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> ImportSuggestionDenyListEntries(ImportSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Imports all [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] for a DataStore.

Parameters
Name Description
request ImportSuggestionDenyListEntriesRequest

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
OperationImportSuggestionDenyListEntriesResponseImportSuggestionDenyListEntriesMetadata

The RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
// Initialize request argument(s)
ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(),
};
// Make the request
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = completionServiceClient.ImportSuggestionDenyListEntries(request);

// Poll until the returned long-running operation is complete
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportSuggestionDenyListEntriesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = completionServiceClient.PollOnceImportSuggestionDenyListEntries(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
}

ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest, CallSettings)

public virtual Task<Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata>> ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Imports all [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] for a DataStore.

Parameters
Name Description
request ImportSuggestionDenyListEntriesRequest

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
TaskOperationImportSuggestionDenyListEntriesResponseImportSuggestionDenyListEntriesMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(),
};
// Make the request
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = await completionServiceClient.ImportSuggestionDenyListEntriesAsync(request);

// Poll until the returned long-running operation is complete
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportSuggestionDenyListEntriesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOnceImportSuggestionDenyListEntriesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
}

ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest, CancellationToken)

public virtual Task<Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata>> ImportSuggestionDenyListEntriesAsync(ImportSuggestionDenyListEntriesRequest request, CancellationToken cancellationToken)

Imports all [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] for a DataStore.

Parameters
Name Description
request ImportSuggestionDenyListEntriesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationImportSuggestionDenyListEntriesResponseImportSuggestionDenyListEntriesMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
ImportSuggestionDenyListEntriesRequest request = new ImportSuggestionDenyListEntriesRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    InlineSource = new ImportSuggestionDenyListEntriesRequest.Types.InlineSource(),
};
// Make the request
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> response = await completionServiceClient.ImportSuggestionDenyListEntriesAsync(request);

// Poll until the returned long-running operation is complete
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportSuggestionDenyListEntriesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOnceImportSuggestionDenyListEntriesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
}

PollOnceImportCompletionSuggestions(string, CallSettings)

public virtual Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata> PollOnceImportCompletionSuggestions(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ImportCompletionSuggestions.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationImportCompletionSuggestionsResponseImportCompletionSuggestionsMetadata

The result of polling the operation.

PollOnceImportCompletionSuggestionsAsync(string, CallSettings)

public virtual Task<Operation<ImportCompletionSuggestionsResponse, ImportCompletionSuggestionsMetadata>> PollOnceImportCompletionSuggestionsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ImportCompletionSuggestions.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationImportCompletionSuggestionsResponseImportCompletionSuggestionsMetadata

A task representing the result of polling the operation.

PollOnceImportSuggestionDenyListEntries(string, CallSettings)

public virtual Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata> PollOnceImportSuggestionDenyListEntries(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ImportSuggestionDenyListEntries.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationImportSuggestionDenyListEntriesResponseImportSuggestionDenyListEntriesMetadata

The result of polling the operation.

PollOnceImportSuggestionDenyListEntriesAsync(string, CallSettings)

public virtual Task<Operation<ImportSuggestionDenyListEntriesResponse, ImportSuggestionDenyListEntriesMetadata>> PollOnceImportSuggestionDenyListEntriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ImportSuggestionDenyListEntries.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationImportSuggestionDenyListEntriesResponseImportSuggestionDenyListEntriesMetadata

A task representing the result of polling the operation.

PollOncePurgeCompletionSuggestions(string, CallSettings)

public virtual Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> PollOncePurgeCompletionSuggestions(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of PurgeCompletionSuggestions.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationPurgeCompletionSuggestionsResponsePurgeCompletionSuggestionsMetadata

The result of polling the operation.

PollOncePurgeCompletionSuggestionsAsync(string, CallSettings)

public virtual Task<Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata>> PollOncePurgeCompletionSuggestionsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of PurgeCompletionSuggestions.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationPurgeCompletionSuggestionsResponsePurgeCompletionSuggestionsMetadata

A task representing the result of polling the operation.

PollOncePurgeSuggestionDenyListEntries(string, CallSettings)

public virtual Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> PollOncePurgeSuggestionDenyListEntries(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of PurgeSuggestionDenyListEntries.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationPurgeSuggestionDenyListEntriesResponsePurgeSuggestionDenyListEntriesMetadata

The result of polling the operation.

PollOncePurgeSuggestionDenyListEntriesAsync(string, CallSettings)

public virtual Task<Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata>> PollOncePurgeSuggestionDenyListEntriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of PurgeSuggestionDenyListEntries.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationPurgeSuggestionDenyListEntriesResponsePurgeSuggestionDenyListEntriesMetadata

A task representing the result of polling the operation.

PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest, CallSettings)

public virtual Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest request, CallSettings callSettings = null)

Permanently deletes all [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.

Parameters
Name Description
request PurgeCompletionSuggestionsRequest

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
OperationPurgeCompletionSuggestionsResponsePurgeCompletionSuggestionsMetadata

The RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
// Initialize request argument(s)
PurgeCompletionSuggestionsRequest request = new PurgeCompletionSuggestionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> response = completionServiceClient.PurgeCompletionSuggestions(request);

// Poll until the returned long-running operation is complete
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PurgeCompletionSuggestionsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> retrievedResponse = completionServiceClient.PollOncePurgeCompletionSuggestions(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PurgeCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
}

PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest, CallSettings)

public virtual Task<Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata>> PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest request, CallSettings callSettings = null)

Permanently deletes all [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.

Parameters
Name Description
request PurgeCompletionSuggestionsRequest

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
TaskOperationPurgeCompletionSuggestionsResponsePurgeCompletionSuggestionsMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
PurgeCompletionSuggestionsRequest request = new PurgeCompletionSuggestionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> response = await completionServiceClient.PurgeCompletionSuggestionsAsync(request);

// Poll until the returned long-running operation is complete
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PurgeCompletionSuggestionsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeCompletionSuggestionsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PurgeCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
}

PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest, CancellationToken)

public virtual Task<Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata>> PurgeCompletionSuggestionsAsync(PurgeCompletionSuggestionsRequest request, CancellationToken cancellationToken)

Permanently deletes all [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.

Parameters
Name Description
request PurgeCompletionSuggestionsRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationPurgeCompletionSuggestionsResponsePurgeCompletionSuggestionsMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
PurgeCompletionSuggestionsRequest request = new PurgeCompletionSuggestionsRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> response = await completionServiceClient.PurgeCompletionSuggestionsAsync(request);

// Poll until the returned long-running operation is complete
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PurgeCompletionSuggestionsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeCompletionSuggestionsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PurgeCompletionSuggestionsResponse retrievedResult = retrievedResponse.Result;
}

PurgeSuggestionDenyListEntries(PurgeSuggestionDenyListEntriesRequest, CallSettings)

public virtual Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> PurgeSuggestionDenyListEntries(PurgeSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Permanently deletes all [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] for a DataStore.

Parameters
Name Description
request PurgeSuggestionDenyListEntriesRequest

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
OperationPurgeSuggestionDenyListEntriesResponsePurgeSuggestionDenyListEntriesMetadata

The RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = CompletionServiceClient.Create();
// Initialize request argument(s)
PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = completionServiceClient.PurgeSuggestionDenyListEntries(request);

// Poll until the returned long-running operation is complete
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
PurgeSuggestionDenyListEntriesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = completionServiceClient.PollOncePurgeSuggestionDenyListEntries(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
}

PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest, CallSettings)

public virtual Task<Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata>> PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest request, CallSettings callSettings = null)

Permanently deletes all [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] for a DataStore.

Parameters
Name Description
request PurgeSuggestionDenyListEntriesRequest

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
TaskOperationPurgeSuggestionDenyListEntriesResponsePurgeSuggestionDenyListEntriesMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = await completionServiceClient.PurgeSuggestionDenyListEntriesAsync(request);

// Poll until the returned long-running operation is complete
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PurgeSuggestionDenyListEntriesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeSuggestionDenyListEntriesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
}

PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest, CancellationToken)

public virtual Task<Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata>> PurgeSuggestionDenyListEntriesAsync(PurgeSuggestionDenyListEntriesRequest request, CancellationToken cancellationToken)

Permanently deletes all [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] for a DataStore.

Parameters
Name Description
request PurgeSuggestionDenyListEntriesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationPurgeSuggestionDenyListEntriesResponsePurgeSuggestionDenyListEntriesMetadata

A Task containing the RPC response.

Example
// Create client
CompletionServiceClient completionServiceClient = await CompletionServiceClient.CreateAsync();
// Initialize request argument(s)
PurgeSuggestionDenyListEntriesRequest request = new PurgeSuggestionDenyListEntriesRequest
{
    ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> response = await completionServiceClient.PurgeSuggestionDenyListEntriesAsync(request);

// Poll until the returned long-running operation is complete
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
PurgeSuggestionDenyListEntriesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<PurgeSuggestionDenyListEntriesResponse, PurgeSuggestionDenyListEntriesMetadata> retrievedResponse = await completionServiceClient.PollOncePurgeSuggestionDenyListEntriesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    PurgeSuggestionDenyListEntriesResponse retrievedResult = retrievedResponse.Result;
}

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.