Discovery Engine v1 API - Class DataStoreServiceClient (1.5.0)

public abstract class DataStoreServiceClient

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

DataStoreService client wrapper, for convenient use.

Inheritance

object > DataStoreServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Remarks

Service for managing [DataStore][google.cloud.discoveryengine.v1.DataStore] configuration.

Properties

CreateDataStoreOperationsClient

public virtual OperationsClient CreateDataStoreOperationsClient { get; }

The long-running operations client for CreateDataStore.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
IReadOnlyListstring
Remarks

The default DataStoreService scopes are:

DeleteDataStoreOperationsClient

public virtual OperationsClient DeleteDataStoreOperationsClient { get; }

The long-running operations client for DeleteDataStore.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual DataStoreService.DataStoreServiceClient GrpcClient { get; }

The underlying gRPC DataStoreService client

Property Value
Type Description
DataStoreServiceDataStoreServiceClient

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

Create()

public static DataStoreServiceClient Create()

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

Returns
Type Description
DataStoreServiceClient

The created DataStoreServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskDataStoreServiceClient

The task representing the created DataStoreServiceClient.

CreateDataStore(CollectionName, DataStore, string, CallSettings)

public virtual Operation<DataStore, CreateDataStoreMetadata> CreateDataStore(CollectionName parent, DataStore dataStore, string dataStoreId, CallSettings callSettings = null)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
parent CollectionName

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}.

dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to create.

dataStoreId string

Required. The ID to use for the [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become the final component of the [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDataStoreCreateDataStoreMetadata

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
CollectionName parent = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
DataStore dataStore = new DataStore();
string dataStoreId = "";
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = dataStoreServiceClient.CreateDataStore(parent, dataStore, dataStoreId);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = dataStoreServiceClient.PollOnceCreateDataStore(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStore(CreateDataStoreRequest, CallSettings)

public virtual Operation<DataStore, CreateDataStoreMetadata> CreateDataStore(CreateDataStoreRequest request, CallSettings callSettings = null)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
request CreateDataStoreRequest

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
OperationDataStoreCreateDataStoreMetadata

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
CreateDataStoreRequest request = new CreateDataStoreRequest
{
    ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
    DataStore = new DataStore(),
    DataStoreId = "",
    CreateAdvancedSiteSearch = false,
    SkipDefaultSchemaCreation = false,
};
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = dataStoreServiceClient.CreateDataStore(request);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = dataStoreServiceClient.PollOnceCreateDataStore(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStore(string, DataStore, string, CallSettings)

public virtual Operation<DataStore, CreateDataStoreMetadata> CreateDataStore(string parent, DataStore dataStore, string dataStoreId, CallSettings callSettings = null)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}.

dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to create.

dataStoreId string

Required. The ID to use for the [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become the final component of the [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDataStoreCreateDataStoreMetadata

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
DataStore dataStore = new DataStore();
string dataStoreId = "";
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = dataStoreServiceClient.CreateDataStore(parent, dataStore, dataStoreId);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = dataStoreServiceClient.PollOnceCreateDataStore(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStoreAsync(CollectionName, DataStore, string, CallSettings)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> CreateDataStoreAsync(CollectionName parent, DataStore dataStore, string dataStoreId, CallSettings callSettings = null)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
parent CollectionName

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}.

dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to create.

dataStoreId string

Required. The ID to use for the [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become the final component of the [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDataStoreCreateDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CollectionName parent = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
DataStore dataStore = new DataStore();
string dataStoreId = "";
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(parent, dataStore, dataStoreId);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStoreAsync(CollectionName, DataStore, string, CancellationToken)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> CreateDataStoreAsync(CollectionName parent, DataStore dataStore, string dataStoreId, CancellationToken cancellationToken)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
parent CollectionName

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}.

dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to create.

dataStoreId string

Required. The ID to use for the [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become the final component of the [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDataStoreCreateDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CollectionName parent = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
DataStore dataStore = new DataStore();
string dataStoreId = "";
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(parent, dataStore, dataStoreId);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStoreAsync(CreateDataStoreRequest, CallSettings)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> CreateDataStoreAsync(CreateDataStoreRequest request, CallSettings callSettings = null)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
request CreateDataStoreRequest

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
TaskOperationDataStoreCreateDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDataStoreRequest request = new CreateDataStoreRequest
{
    ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
    DataStore = new DataStore(),
    DataStoreId = "",
    CreateAdvancedSiteSearch = false,
    SkipDefaultSchemaCreation = false,
};
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(request);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStoreAsync(CreateDataStoreRequest, CancellationToken)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> CreateDataStoreAsync(CreateDataStoreRequest request, CancellationToken cancellationToken)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
request CreateDataStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDataStoreCreateDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDataStoreRequest request = new CreateDataStoreRequest
{
    ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
    DataStore = new DataStore(),
    DataStoreId = "",
    CreateAdvancedSiteSearch = false,
    SkipDefaultSchemaCreation = false,
};
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(request);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStoreAsync(string, DataStore, string, CallSettings)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> CreateDataStoreAsync(string parent, DataStore dataStore, string dataStoreId, CallSettings callSettings = null)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}.

dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to create.

dataStoreId string

Required. The ID to use for the [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become the final component of the [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDataStoreCreateDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
DataStore dataStore = new DataStore();
string dataStoreId = "";
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(parent, dataStore, dataStoreId);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

CreateDataStoreAsync(string, DataStore, string, CancellationToken)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> CreateDataStoreAsync(string parent, DataStore dataStore, string dataStoreId, CancellationToken cancellationToken)

Creates a [DataStore][google.cloud.discoveryengine.v1.DataStore].

DataStore is for storing [Documents][google.cloud.discoveryengine.v1.Document]. To serve these documents for Search, or Recommendation use case, an [Engine][google.cloud.discoveryengine.v1.Engine] needs to be created separately.

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}.

dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to create.

dataStoreId string

Required. The ID to use for the [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become the final component of the [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDataStoreCreateDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
DataStore dataStore = new DataStore();
string dataStoreId = "";
// Make the request
Operation<DataStore, CreateDataStoreMetadata> response = await dataStoreServiceClient.CreateDataStoreAsync(parent, dataStore, dataStoreId);

// Poll until the returned long-running operation is complete
Operation<DataStore, CreateDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DataStore 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<DataStore, CreateDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceCreateDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DataStore retrievedResult = retrievedResponse.Result;
}

DeleteDataStore(DataStoreName, CallSettings)

public virtual Operation<Empty, DeleteDataStoreMetadata> DeleteDataStore(DataStoreName name, CallSettings callSettings = null)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name DataStoreName

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to delete the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteDataStoreMetadata

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
DataStoreName name = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = dataStoreServiceClient.DeleteDataStore(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = dataStoreServiceClient.PollOnceDeleteDataStore(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStore(DeleteDataStoreRequest, CallSettings)

public virtual Operation<Empty, DeleteDataStoreMetadata> DeleteDataStore(DeleteDataStoreRequest request, CallSettings callSettings = null)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
request DeleteDataStoreRequest

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
OperationEmptyDeleteDataStoreMetadata

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
DeleteDataStoreRequest request = new DeleteDataStoreRequest
{
    DataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = dataStoreServiceClient.DeleteDataStore(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = dataStoreServiceClient.PollOnceDeleteDataStore(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStore(string, CallSettings)

public virtual Operation<Empty, DeleteDataStoreMetadata> DeleteDataStore(string name, CallSettings callSettings = null)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name string

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to delete the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteDataStoreMetadata

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = dataStoreServiceClient.DeleteDataStore(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = dataStoreServiceClient.PollOnceDeleteDataStore(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStoreAsync(DataStoreName, CallSettings)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> DeleteDataStoreAsync(DataStoreName name, CallSettings callSettings = null)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name DataStoreName

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to delete the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName name = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = await dataStoreServiceClient.DeleteDataStoreAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceDeleteDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStoreAsync(DataStoreName, CancellationToken)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> DeleteDataStoreAsync(DataStoreName name, CancellationToken cancellationToken)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name DataStoreName

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to delete the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName name = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = await dataStoreServiceClient.DeleteDataStoreAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceDeleteDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStoreAsync(DeleteDataStoreRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> DeleteDataStoreAsync(DeleteDataStoreRequest request, CallSettings callSettings = null)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
request DeleteDataStoreRequest

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
TaskOperationEmptyDeleteDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteDataStoreRequest request = new DeleteDataStoreRequest
{
    DataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = await dataStoreServiceClient.DeleteDataStoreAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceDeleteDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStoreAsync(DeleteDataStoreRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> DeleteDataStoreAsync(DeleteDataStoreRequest request, CancellationToken cancellationToken)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
request DeleteDataStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteDataStoreRequest request = new DeleteDataStoreRequest
{
    DataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = await dataStoreServiceClient.DeleteDataStoreAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceDeleteDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStoreAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> DeleteDataStoreAsync(string name, CallSettings callSettings = null)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name string

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to delete the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = await dataStoreServiceClient.DeleteDataStoreAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceDeleteDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteDataStoreAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> DeleteDataStoreAsync(string name, CancellationToken cancellationToken)

Deletes a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name string

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to delete the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteDataStoreMetadata

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
Operation<Empty, DeleteDataStoreMetadata> response = await dataStoreServiceClient.DeleteDataStoreAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteDataStoreMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteDataStoreMetadata> retrievedResponse = await dataStoreServiceClient.PollOnceDeleteDataStoreAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

GetDataStore(DataStoreName, CallSettings)

public virtual DataStore GetDataStore(DataStoreName name, CallSettings callSettings = null)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name DataStoreName

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to access the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [DataStore][google.cloud.discoveryengine.v1.DataStore] does not exist, a NOT_FOUND error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataStore

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
DataStoreName name = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
DataStore response = dataStoreServiceClient.GetDataStore(name);

GetDataStore(GetDataStoreRequest, CallSettings)

public virtual DataStore GetDataStore(GetDataStoreRequest request, CallSettings callSettings = null)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
request GetDataStoreRequest

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
DataStore

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
GetDataStoreRequest request = new GetDataStoreRequest
{
    DataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
DataStore response = dataStoreServiceClient.GetDataStore(request);

GetDataStore(string, CallSettings)

public virtual DataStore GetDataStore(string name, CallSettings callSettings = null)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name string

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to access the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [DataStore][google.cloud.discoveryengine.v1.DataStore] does not exist, a NOT_FOUND error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataStore

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
DataStore response = dataStoreServiceClient.GetDataStore(name);

GetDataStoreAsync(DataStoreName, CallSettings)

public virtual Task<DataStore> GetDataStoreAsync(DataStoreName name, CallSettings callSettings = null)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name DataStoreName

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to access the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [DataStore][google.cloud.discoveryengine.v1.DataStore] does not exist, a NOT_FOUND error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName name = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
DataStore response = await dataStoreServiceClient.GetDataStoreAsync(name);

GetDataStoreAsync(DataStoreName, CancellationToken)

public virtual Task<DataStore> GetDataStoreAsync(DataStoreName name, CancellationToken cancellationToken)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name DataStoreName

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to access the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [DataStore][google.cloud.discoveryengine.v1.DataStore] does not exist, a NOT_FOUND error is returned.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DataStoreName name = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
DataStore response = await dataStoreServiceClient.GetDataStoreAsync(name);

GetDataStoreAsync(GetDataStoreRequest, CallSettings)

public virtual Task<DataStore> GetDataStoreAsync(GetDataStoreRequest request, CallSettings callSettings = null)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
request GetDataStoreRequest

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
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
GetDataStoreRequest request = new GetDataStoreRequest
{
    DataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
DataStore response = await dataStoreServiceClient.GetDataStoreAsync(request);

GetDataStoreAsync(GetDataStoreRequest, CancellationToken)

public virtual Task<DataStore> GetDataStoreAsync(GetDataStoreRequest request, CancellationToken cancellationToken)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
request GetDataStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
GetDataStoreRequest request = new GetDataStoreRequest
{
    DataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
DataStore response = await dataStoreServiceClient.GetDataStoreAsync(request);

GetDataStoreAsync(string, CallSettings)

public virtual Task<DataStore> GetDataStoreAsync(string name, CallSettings callSettings = null)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name string

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to access the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [DataStore][google.cloud.discoveryengine.v1.DataStore] does not exist, a NOT_FOUND error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
DataStore response = await dataStoreServiceClient.GetDataStoreAsync(name);

GetDataStoreAsync(string, CancellationToken)

public virtual Task<DataStore> GetDataStoreAsync(string name, CancellationToken cancellationToken)

Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore].

Parameters
Name Description
name string

Required. Full resource name of [DataStore][google.cloud.discoveryengine.v1.DataStore], such as projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.

If the caller does not have permission to access the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [DataStore][google.cloud.discoveryengine.v1.DataStore] does not exist, a NOT_FOUND error is returned.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]";
// Make the request
DataStore response = await dataStoreServiceClient.GetDataStoreAsync(name);

ListDataStores(CollectionName, string, int?, CallSettings)

public virtual PagedEnumerable<ListDataStoresResponse, DataStore> ListDataStores(CollectionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [DataStore][google.cloud.discoveryengine.v1.DataStore]s associated with the project.

Parameters
Name Description
parent CollectionName

Required. The parent branch resource name, such as projects/{project}/locations/{location}/collections/{collection_id}.

If the caller does not have permission to list [DataStore][google.cloud.discoveryengine.v1.DataStore]s under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDataStoresResponseDataStore

A pageable sequence of DataStore resources.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
CollectionName parent = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
PagedEnumerable<ListDataStoresResponse, DataStore> response = dataStoreServiceClient.ListDataStores(parent);

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

ListDataStores(ListDataStoresRequest, CallSettings)

public virtual PagedEnumerable<ListDataStoresResponse, DataStore> ListDataStores(ListDataStoresRequest request, CallSettings callSettings = null)

Lists all the [DataStore][google.cloud.discoveryengine.v1.DataStore]s associated with the project.

Parameters
Name Description
request ListDataStoresRequest

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
PagedEnumerableListDataStoresResponseDataStore

A pageable sequence of DataStore resources.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
ListDataStoresRequest request = new ListDataStoresRequest
{
    ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListDataStoresResponse, DataStore> response = dataStoreServiceClient.ListDataStores(request);

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

ListDataStores(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListDataStoresResponse, DataStore> ListDataStores(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [DataStore][google.cloud.discoveryengine.v1.DataStore]s associated with the project.

Parameters
Name Description
parent string

Required. The parent branch resource name, such as projects/{project}/locations/{location}/collections/{collection_id}.

If the caller does not have permission to list [DataStore][google.cloud.discoveryengine.v1.DataStore]s under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDataStoresResponseDataStore

A pageable sequence of DataStore resources.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
PagedEnumerable<ListDataStoresResponse, DataStore> response = dataStoreServiceClient.ListDataStores(parent);

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

ListDataStoresAsync(CollectionName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDataStoresResponse, DataStore> ListDataStoresAsync(CollectionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [DataStore][google.cloud.discoveryengine.v1.DataStore]s associated with the project.

Parameters
Name Description
parent CollectionName

Required. The parent branch resource name, such as projects/{project}/locations/{location}/collections/{collection_id}.

If the caller does not have permission to list [DataStore][google.cloud.discoveryengine.v1.DataStore]s under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDataStoresResponseDataStore

A pageable asynchronous sequence of DataStore resources.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CollectionName parent = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
PagedAsyncEnumerable<ListDataStoresResponse, DataStore> response = dataStoreServiceClient.ListDataStoresAsync(parent);

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

ListDataStoresAsync(ListDataStoresRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListDataStoresResponse, DataStore> ListDataStoresAsync(ListDataStoresRequest request, CallSettings callSettings = null)

Lists all the [DataStore][google.cloud.discoveryengine.v1.DataStore]s associated with the project.

Parameters
Name Description
request ListDataStoresRequest

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
PagedAsyncEnumerableListDataStoresResponseDataStore

A pageable asynchronous sequence of DataStore resources.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ListDataStoresRequest request = new ListDataStoresRequest
{
    ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListDataStoresResponse, DataStore> response = dataStoreServiceClient.ListDataStoresAsync(request);

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

ListDataStoresAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDataStoresResponse, DataStore> ListDataStoresAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [DataStore][google.cloud.discoveryengine.v1.DataStore]s associated with the project.

Parameters
Name Description
parent string

Required. The parent branch resource name, such as projects/{project}/locations/{location}/collections/{collection_id}.

If the caller does not have permission to list [DataStore][google.cloud.discoveryengine.v1.DataStore]s under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDataStoresResponseDataStore

A pageable asynchronous sequence of DataStore resources.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
PagedAsyncEnumerable<ListDataStoresResponse, DataStore> response = dataStoreServiceClient.ListDataStoresAsync(parent);

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

PollOnceCreateDataStore(string, CallSettings)

public virtual Operation<DataStore, CreateDataStoreMetadata> PollOnceCreateDataStore(string operationName, CallSettings callSettings = null)

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

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
OperationDataStoreCreateDataStoreMetadata

The result of polling the operation.

PollOnceCreateDataStoreAsync(string, CallSettings)

public virtual Task<Operation<DataStore, CreateDataStoreMetadata>> PollOnceCreateDataStoreAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationDataStoreCreateDataStoreMetadata

A task representing the result of polling the operation.

PollOnceDeleteDataStore(string, CallSettings)

public virtual Operation<Empty, DeleteDataStoreMetadata> PollOnceDeleteDataStore(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyDeleteDataStoreMetadata

The result of polling the operation.

PollOnceDeleteDataStoreAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteDataStoreMetadata>> PollOnceDeleteDataStoreAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationEmptyDeleteDataStoreMetadata

A task representing the result of polling the operation.

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.

UpdateDataStore(DataStore, FieldMask, CallSettings)

public virtual DataStore UpdateDataStore(DataStore dataStore, FieldMask updateMask, CallSettings callSettings = null)

Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore]

Parameters
Name Description
dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to update.

If the caller does not have permission to update the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [DataStore][google.cloud.discoveryengine.v1.DataStore] to update does not exist, a NOT_FOUND error is returned.

updateMask FieldMask

Indicates which fields in the provided [DataStore][google.cloud.discoveryengine.v1.DataStore] to update.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataStore

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
DataStore dataStore = new DataStore();
FieldMask updateMask = new FieldMask();
// Make the request
DataStore response = dataStoreServiceClient.UpdateDataStore(dataStore, updateMask);

UpdateDataStore(UpdateDataStoreRequest, CallSettings)

public virtual DataStore UpdateDataStore(UpdateDataStoreRequest request, CallSettings callSettings = null)

Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore]

Parameters
Name Description
request UpdateDataStoreRequest

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
DataStore

The RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.Create();
// Initialize request argument(s)
UpdateDataStoreRequest request = new UpdateDataStoreRequest
{
    DataStore = new DataStore(),
    UpdateMask = new FieldMask(),
};
// Make the request
DataStore response = dataStoreServiceClient.UpdateDataStore(request);

UpdateDataStoreAsync(DataStore, FieldMask, CallSettings)

public virtual Task<DataStore> UpdateDataStoreAsync(DataStore dataStore, FieldMask updateMask, CallSettings callSettings = null)

Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore]

Parameters
Name Description
dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to update.

If the caller does not have permission to update the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [DataStore][google.cloud.discoveryengine.v1.DataStore] to update does not exist, a NOT_FOUND error is returned.

updateMask FieldMask

Indicates which fields in the provided [DataStore][google.cloud.discoveryengine.v1.DataStore] to update.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DataStore dataStore = new DataStore();
FieldMask updateMask = new FieldMask();
// Make the request
DataStore response = await dataStoreServiceClient.UpdateDataStoreAsync(dataStore, updateMask);

UpdateDataStoreAsync(DataStore, FieldMask, CancellationToken)

public virtual Task<DataStore> UpdateDataStoreAsync(DataStore dataStore, FieldMask updateMask, CancellationToken cancellationToken)

Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore]

Parameters
Name Description
dataStore DataStore

Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to update.

If the caller does not have permission to update the [DataStore][google.cloud.discoveryengine.v1.DataStore], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [DataStore][google.cloud.discoveryengine.v1.DataStore] to update does not exist, a NOT_FOUND error is returned.

updateMask FieldMask

Indicates which fields in the provided [DataStore][google.cloud.discoveryengine.v1.DataStore] to update.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DataStore dataStore = new DataStore();
FieldMask updateMask = new FieldMask();
// Make the request
DataStore response = await dataStoreServiceClient.UpdateDataStoreAsync(dataStore, updateMask);

UpdateDataStoreAsync(UpdateDataStoreRequest, CallSettings)

public virtual Task<DataStore> UpdateDataStoreAsync(UpdateDataStoreRequest request, CallSettings callSettings = null)

Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore]

Parameters
Name Description
request UpdateDataStoreRequest

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
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDataStoreRequest request = new UpdateDataStoreRequest
{
    DataStore = new DataStore(),
    UpdateMask = new FieldMask(),
};
// Make the request
DataStore response = await dataStoreServiceClient.UpdateDataStoreAsync(request);

UpdateDataStoreAsync(UpdateDataStoreRequest, CancellationToken)

public virtual Task<DataStore> UpdateDataStoreAsync(UpdateDataStoreRequest request, CancellationToken cancellationToken)

Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore]

Parameters
Name Description
request UpdateDataStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataStore

A Task containing the RPC response.

Example
// Create client
DataStoreServiceClient dataStoreServiceClient = await DataStoreServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDataStoreRequest request = new UpdateDataStoreRequest
{
    DataStore = new DataStore(),
    UpdateMask = new FieldMask(),
};
// Make the request
DataStore response = await dataStoreServiceClient.UpdateDataStoreAsync(request);