public abstract class VectorSearchServiceClientReference documentation and code samples for the Vector Search v1 API class VectorSearchServiceClient.
VectorSearchService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.VectorSearch.V1Assembly
Google.Cloud.VectorSearch.V1.dll
Remarks
VectorSearchService provides methods for managing Collection resources, and Collection Index resources. The primary resources offered by this service are Collections which are a container for a set of related JSON data objects, and Collection Indexes which enable efficient ANN search across data objects within a Collection.
Properties
CreateCollectionOperationsClient
public virtual OperationsClient CreateCollectionOperationsClient { get; }The long-running operations client for CreateCollection.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
CreateIndexOperationsClient
public virtual OperationsClient CreateIndexOperationsClient { get; }The long-running operations client for CreateIndex.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the VectorSearchService service, which is a host of "vectorsearch.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default VectorSearchService scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default VectorSearchService scopes are:
DeleteCollectionOperationsClient
public virtual OperationsClient DeleteCollectionOperationsClient { get; }The long-running operations client for DeleteCollection.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DeleteIndexOperationsClient
public virtual OperationsClient DeleteIndexOperationsClient { get; }The long-running operations client for DeleteIndex.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual VectorSearchService.VectorSearchServiceClient GrpcClient { get; }The underlying gRPC VectorSearchService client
| Property Value | |
|---|---|
| Type | Description |
VectorSearchServiceVectorSearchServiceClient |
|
ImportDataObjectsOperationsClient
public virtual OperationsClient ImportDataObjectsOperationsClient { get; }The long-running operations client for ImportDataObjects.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
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 |
|
UpdateCollectionOperationsClient
public virtual OperationsClient UpdateCollectionOperationsClient { get; }The long-running operations client for UpdateCollection.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
Methods
Create()
public static VectorSearchServiceClient Create()Synchronously creates a VectorSearchServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VectorSearchServiceClientBuilder.
| Returns | |
|---|---|
| Type | Description |
VectorSearchServiceClient |
The created VectorSearchServiceClient. |
CreateAsync(CancellationToken)
public static Task<VectorSearchServiceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a VectorSearchServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VectorSearchServiceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskVectorSearchServiceClient |
The task representing the created VectorSearchServiceClient. |
CreateCollection(LocationName, Collection, string, CallSettings)
public virtual Operation<Collection, OperationMetadata> CreateCollection(LocationName parent, Collection collection, string collectionId, CallSettings callSettings = null)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Value for parent. |
collection |
CollectionRequired. The resource being created |
collectionId |
stringRequired. ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcvv::Collection collection = new gcvv::Collection();
string collectionId = "";
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = vectorSearchServiceClient.CreateCollection(parent, collection, collectionId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceCreateCollection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollection(CreateCollectionRequest, CallSettings)
public virtual Operation<Collection, OperationMetadata> CreateCollection(CreateCollectionRequest request, CallSettings callSettings = null)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::CreateCollectionRequest request = new gcvv::CreateCollectionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
CollectionId = "",
Collection = new gcvv::Collection(),
RequestId = "",
};
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = vectorSearchServiceClient.CreateCollection(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceCreateCollection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollection(string, Collection, string, CallSettings)
public virtual Operation<Collection, OperationMetadata> CreateCollection(string parent, Collection collection, string collectionId, CallSettings callSettings = null)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Value for parent. |
collection |
CollectionRequired. The resource being created |
collectionId |
stringRequired. ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcvv::Collection collection = new gcvv::Collection();
string collectionId = "";
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = vectorSearchServiceClient.CreateCollection(parent, collection, collectionId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceCreateCollection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollectionAsync(LocationName, Collection, string, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> CreateCollectionAsync(LocationName parent, Collection collection, string collectionId, CallSettings callSettings = null)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Value for parent. |
collection |
CollectionRequired. The resource being created |
collectionId |
stringRequired. ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcvv::Collection collection = new gcvv::Collection();
string collectionId = "";
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateCollectionAsync(parent, collection, collectionId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollectionAsync(LocationName, Collection, string, CancellationToken)
public virtual Task<Operation<Collection, OperationMetadata>> CreateCollectionAsync(LocationName parent, Collection collection, string collectionId, CancellationToken cancellationToken)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Value for parent. |
collection |
CollectionRequired. The resource being created |
collectionId |
stringRequired. ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcvv::Collection collection = new gcvv::Collection();
string collectionId = "";
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateCollectionAsync(parent, collection, collectionId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollectionAsync(CreateCollectionRequest, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> CreateCollectionAsync(CreateCollectionRequest request, CallSettings callSettings = null)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CreateCollectionRequest request = new gcvv::CreateCollectionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
CollectionId = "",
Collection = new gcvv::Collection(),
RequestId = "",
};
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateCollectionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollectionAsync(CreateCollectionRequest, CancellationToken)
public virtual Task<Operation<Collection, OperationMetadata>> CreateCollectionAsync(CreateCollectionRequest request, CancellationToken cancellationToken)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateCollectionRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CreateCollectionRequest request = new gcvv::CreateCollectionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
CollectionId = "",
Collection = new gcvv::Collection(),
RequestId = "",
};
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateCollectionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollectionAsync(string, Collection, string, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> CreateCollectionAsync(string parent, Collection collection, string collectionId, CallSettings callSettings = null)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Value for parent. |
collection |
CollectionRequired. The resource being created |
collectionId |
stringRequired. ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcvv::Collection collection = new gcvv::Collection();
string collectionId = "";
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateCollectionAsync(parent, collection, collectionId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateCollectionAsync(string, Collection, string, CancellationToken)
public virtual Task<Operation<Collection, OperationMetadata>> CreateCollectionAsync(string parent, Collection collection, string collectionId, CancellationToken cancellationToken)Creates a new Collection in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Value for parent. |
collection |
CollectionRequired. The resource being created |
collectionId |
stringRequired. ID of the Collection to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcvv::Collection collection = new gcvv::Collection();
string collectionId = "";
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateCollectionAsync(parent, collection, collectionId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
CreateIndex(CollectionName, Index, string, CallSettings)
public virtual Operation<Index, OperationMetadata> CreateIndex(CollectionName parent, Index index, string indexId, CallSettings callSettings = null)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
CollectionNameRequired. The resource name of the Collection for which to create the
Index. Format:
|
index |
IndexRequired. The resource being created |
indexId |
stringRequired. ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationIndexOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::CollectionName parent = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
gcvv::Index index = new gcvv::Index();
string indexId = "";
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = vectorSearchServiceClient.CreateIndex(parent, index, indexId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceCreateIndex(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndex(CreateIndexRequest, CallSettings)
public virtual Operation<Index, OperationMetadata> CreateIndex(CreateIndexRequest request, CallSettings callSettings = null)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateIndexRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationIndexOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::CreateIndexRequest request = new gcvv::CreateIndexRequest
{
ParentAsCollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
IndexId = "",
Index = new gcvv::Index(),
RequestId = "",
};
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = vectorSearchServiceClient.CreateIndex(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceCreateIndex(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndex(string, Index, string, CallSettings)
public virtual Operation<Index, OperationMetadata> CreateIndex(string parent, Index index, string indexId, CallSettings callSettings = null)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The resource name of the Collection for which to create the
Index. Format:
|
index |
IndexRequired. The resource being created |
indexId |
stringRequired. ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationIndexOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
gcvv::Index index = new gcvv::Index();
string indexId = "";
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = vectorSearchServiceClient.CreateIndex(parent, index, indexId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceCreateIndex(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CollectionName, Index, string, CallSettings)
public virtual Task<Operation<Index, OperationMetadata>> CreateIndexAsync(CollectionName parent, Index index, string indexId, CallSettings callSettings = null)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
CollectionNameRequired. The resource name of the Collection for which to create the
Index. Format:
|
index |
IndexRequired. The resource being created |
indexId |
stringRequired. ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName parent = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
gcvv::Index index = new gcvv::Index();
string indexId = "";
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateIndexAsync(parent, index, indexId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CollectionName, Index, string, CancellationToken)
public virtual Task<Operation<Index, OperationMetadata>> CreateIndexAsync(CollectionName parent, Index index, string indexId, CancellationToken cancellationToken)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
CollectionNameRequired. The resource name of the Collection for which to create the
Index. Format:
|
index |
IndexRequired. The resource being created |
indexId |
stringRequired. ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName parent = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
gcvv::Index index = new gcvv::Index();
string indexId = "";
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateIndexAsync(parent, index, indexId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CreateIndexRequest, CallSettings)
public virtual Task<Operation<Index, OperationMetadata>> CreateIndexAsync(CreateIndexRequest request, CallSettings callSettings = null)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateIndexRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CreateIndexRequest request = new gcvv::CreateIndexRequest
{
ParentAsCollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
IndexId = "",
Index = new gcvv::Index(),
RequestId = "",
};
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateIndexAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(CreateIndexRequest, CancellationToken)
public virtual Task<Operation<Index, OperationMetadata>> CreateIndexAsync(CreateIndexRequest request, CancellationToken cancellationToken)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateIndexRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CreateIndexRequest request = new gcvv::CreateIndexRequest
{
ParentAsCollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
IndexId = "",
Index = new gcvv::Index(),
RequestId = "",
};
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateIndexAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(string, Index, string, CallSettings)
public virtual Task<Operation<Index, OperationMetadata>> CreateIndexAsync(string parent, Index index, string indexId, CallSettings callSettings = null)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The resource name of the Collection for which to create the
Index. Format:
|
index |
IndexRequired. The resource being created |
indexId |
stringRequired. ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
gcvv::Index index = new gcvv::Index();
string indexId = "";
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateIndexAsync(parent, index, indexId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
CreateIndexAsync(string, Index, string, CancellationToken)
public virtual Task<Operation<Index, OperationMetadata>> CreateIndexAsync(string parent, Index index, string indexId, CancellationToken cancellationToken)Creates a new Index in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The resource name of the Collection for which to create the
Index. Format:
|
index |
IndexRequired. The resource being created |
indexId |
stringRequired. ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
gcvv::Index index = new gcvv::Index();
string indexId = "";
// Make the request
Operation<gcvv::Index, gcvv::OperationMetadata> response = await vectorSearchServiceClient.CreateIndexAsync(parent, index, indexId);
// Poll until the returned long-running operation is complete
Operation<gcvv::Index, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Index 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<gcvv::Index, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceCreateIndexAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Index retrievedResult = retrievedResponse.Result;
}
DeleteCollection(CollectionName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteCollection(CollectionName name, CallSettings callSettings = null)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
CollectionNameRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::CollectionName name = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = vectorSearchServiceClient.DeleteCollection(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceDeleteCollection(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;
}
DeleteCollection(DeleteCollectionRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteCollection(DeleteCollectionRequest request, CallSettings callSettings = null)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::DeleteCollectionRequest request = new gcvv::DeleteCollectionRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
RequestId = "",
};
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = vectorSearchServiceClient.DeleteCollection(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceDeleteCollection(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;
}
DeleteCollection(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteCollection(string name, CallSettings callSettings = null)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = vectorSearchServiceClient.DeleteCollection(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceDeleteCollection(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;
}
DeleteCollectionAsync(CollectionName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteCollectionAsync(CollectionName name, CallSettings callSettings = null)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
CollectionNameRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName name = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteCollectionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteCollectionAsync(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;
}
DeleteCollectionAsync(CollectionName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteCollectionAsync(CollectionName name, CancellationToken cancellationToken)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
CollectionNameRequired. Name of the resource |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName name = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteCollectionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteCollectionAsync(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;
}
DeleteCollectionAsync(DeleteCollectionRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteCollectionAsync(DeleteCollectionRequest request, CallSettings callSettings = null)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::DeleteCollectionRequest request = new gcvv::DeleteCollectionRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
RequestId = "",
};
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteCollectionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteCollectionAsync(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;
}
DeleteCollectionAsync(DeleteCollectionRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteCollectionAsync(DeleteCollectionRequest request, CancellationToken cancellationToken)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::DeleteCollectionRequest request = new gcvv::DeleteCollectionRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
RequestId = "",
};
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteCollectionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteCollectionAsync(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;
}
DeleteCollectionAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteCollectionAsync(string name, CallSettings callSettings = null)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteCollectionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteCollectionAsync(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;
}
DeleteCollectionAsync(string, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteCollectionAsync(string name, CancellationToken cancellationToken)Deletes a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteCollectionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteCollectionAsync(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;
}
DeleteIndex(DeleteIndexRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteIndex(DeleteIndexRequest request, CallSettings callSettings = null)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteIndexRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::DeleteIndexRequest request = new gcvv::DeleteIndexRequest
{
IndexName = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]"),
RequestId = "",
};
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = vectorSearchServiceClient.DeleteIndex(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceDeleteIndex(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;
}
DeleteIndex(IndexName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteIndex(IndexName name, CallSettings callSettings = null)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
IndexNameRequired. The resource name of the Index to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::IndexName name = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]");
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = vectorSearchServiceClient.DeleteIndex(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceDeleteIndex(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;
}
DeleteIndex(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteIndex(string name, CallSettings callSettings = null)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The resource name of the Index to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/indexes/[INDEX]";
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = vectorSearchServiceClient.DeleteIndex(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceDeleteIndex(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;
}
DeleteIndexAsync(DeleteIndexRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteIndexAsync(DeleteIndexRequest request, CallSettings callSettings = null)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteIndexRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::DeleteIndexRequest request = new gcvv::DeleteIndexRequest
{
IndexName = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]"),
RequestId = "",
};
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteIndexAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteIndexAsync(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;
}
DeleteIndexAsync(DeleteIndexRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteIndexAsync(DeleteIndexRequest request, CancellationToken cancellationToken)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteIndexRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::DeleteIndexRequest request = new gcvv::DeleteIndexRequest
{
IndexName = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]"),
RequestId = "",
};
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteIndexAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteIndexAsync(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;
}
DeleteIndexAsync(IndexName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteIndexAsync(IndexName name, CallSettings callSettings = null)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
IndexNameRequired. The resource name of the Index to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::IndexName name = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]");
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteIndexAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteIndexAsync(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;
}
DeleteIndexAsync(IndexName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteIndexAsync(IndexName name, CancellationToken cancellationToken)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
IndexNameRequired. The resource name of the Index to delete.
Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::IndexName name = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]");
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteIndexAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteIndexAsync(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;
}
DeleteIndexAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteIndexAsync(string name, CallSettings callSettings = null)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The resource name of the Index to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/indexes/[INDEX]";
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteIndexAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteIndexAsync(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;
}
DeleteIndexAsync(string, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteIndexAsync(string name, CancellationToken cancellationToken)Deletes a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The resource name of the Index to delete.
Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/indexes/[INDEX]";
// Make the request
Operation<Empty, gcvv::OperationMetadata> response = await vectorSearchServiceClient.DeleteIndexAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, gcvv::OperationMetadata> 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, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceDeleteIndexAsync(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;
}
GetCollection(CollectionName, CallSettings)
public virtual Collection GetCollection(CollectionName name, CallSettings callSettings = null)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
CollectionNameRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Collection |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::CollectionName name = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
gcvv::Collection response = vectorSearchServiceClient.GetCollection(name);
GetCollection(GetCollectionRequest, CallSettings)
public virtual Collection GetCollection(GetCollectionRequest request, CallSettings callSettings = null)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
GetCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Collection |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::GetCollectionRequest request = new gcvv::GetCollectionRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
};
// Make the request
gcvv::Collection response = vectorSearchServiceClient.GetCollection(request);
GetCollection(string, CallSettings)
public virtual Collection GetCollection(string name, CallSettings callSettings = null)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Collection |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
gcvv::Collection response = vectorSearchServiceClient.GetCollection(name);
GetCollectionAsync(CollectionName, CallSettings)
public virtual Task<Collection> GetCollectionAsync(CollectionName name, CallSettings callSettings = null)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
CollectionNameRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskCollection |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName name = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
gcvv::Collection response = await vectorSearchServiceClient.GetCollectionAsync(name);
GetCollectionAsync(CollectionName, CancellationToken)
public virtual Task<Collection> GetCollectionAsync(CollectionName name, CancellationToken cancellationToken)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
CollectionNameRequired. Name of the resource |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskCollection |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName name = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
gcvv::Collection response = await vectorSearchServiceClient.GetCollectionAsync(name);
GetCollectionAsync(GetCollectionRequest, CallSettings)
public virtual Task<Collection> GetCollectionAsync(GetCollectionRequest request, CallSettings callSettings = null)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
GetCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskCollection |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::GetCollectionRequest request = new gcvv::GetCollectionRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
};
// Make the request
gcvv::Collection response = await vectorSearchServiceClient.GetCollectionAsync(request);
GetCollectionAsync(GetCollectionRequest, CancellationToken)
public virtual Task<Collection> GetCollectionAsync(GetCollectionRequest request, CancellationToken cancellationToken)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
GetCollectionRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskCollection |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::GetCollectionRequest request = new gcvv::GetCollectionRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
};
// Make the request
gcvv::Collection response = await vectorSearchServiceClient.GetCollectionAsync(request);
GetCollectionAsync(string, CallSettings)
public virtual Task<Collection> GetCollectionAsync(string name, CallSettings callSettings = null)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskCollection |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
gcvv::Collection response = await vectorSearchServiceClient.GetCollectionAsync(name);
GetCollectionAsync(string, CancellationToken)
public virtual Task<Collection> GetCollectionAsync(string name, CancellationToken cancellationToken)Gets details of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskCollection |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
gcvv::Collection response = await vectorSearchServiceClient.GetCollectionAsync(name);
GetIndex(GetIndexRequest, CallSettings)
public virtual Index GetIndex(GetIndexRequest request, CallSettings callSettings = null)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIndexRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Index |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::GetIndexRequest request = new gcvv::GetIndexRequest
{
IndexName = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
gcvv::Index response = vectorSearchServiceClient.GetIndex(request);
GetIndex(IndexName, CallSettings)
public virtual Index GetIndex(IndexName name, CallSettings callSettings = null)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
IndexNameRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Index |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::IndexName name = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]");
// Make the request
gcvv::Index response = vectorSearchServiceClient.GetIndex(name);
GetIndex(string, CallSettings)
public virtual Index GetIndex(string name, CallSettings callSettings = null)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Index |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/indexes/[INDEX]";
// Make the request
gcvv::Index response = vectorSearchServiceClient.GetIndex(name);
GetIndexAsync(GetIndexRequest, CallSettings)
public virtual Task<Index> GetIndexAsync(GetIndexRequest request, CallSettings callSettings = null)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIndexRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskIndex |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::GetIndexRequest request = new gcvv::GetIndexRequest
{
IndexName = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
gcvv::Index response = await vectorSearchServiceClient.GetIndexAsync(request);
GetIndexAsync(GetIndexRequest, CancellationToken)
public virtual Task<Index> GetIndexAsync(GetIndexRequest request, CancellationToken cancellationToken)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIndexRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskIndex |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::GetIndexRequest request = new gcvv::GetIndexRequest
{
IndexName = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]"),
};
// Make the request
gcvv::Index response = await vectorSearchServiceClient.GetIndexAsync(request);
GetIndexAsync(IndexName, CallSettings)
public virtual Task<Index> GetIndexAsync(IndexName name, CallSettings callSettings = null)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
IndexNameRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskIndex |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::IndexName name = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]");
// Make the request
gcvv::Index response = await vectorSearchServiceClient.GetIndexAsync(name);
GetIndexAsync(IndexName, CancellationToken)
public virtual Task<Index> GetIndexAsync(IndexName name, CancellationToken cancellationToken)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
IndexNameRequired. Name of the resource |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskIndex |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::IndexName name = gcvv::IndexName.FromProjectLocationCollectionIndex("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[INDEX]");
// Make the request
gcvv::Index response = await vectorSearchServiceClient.GetIndexAsync(name);
GetIndexAsync(string, CallSettings)
public virtual Task<Index> GetIndexAsync(string name, CallSettings callSettings = null)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskIndex |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/indexes/[INDEX]";
// Make the request
gcvv::Index response = await vectorSearchServiceClient.GetIndexAsync(name);
GetIndexAsync(string, CancellationToken)
public virtual Task<Index> GetIndexAsync(string name, CancellationToken cancellationToken)Gets details of a single Index.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the resource |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskIndex |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]/indexes/[INDEX]";
// Make the request
gcvv::Index response = await vectorSearchServiceClient.GetIndexAsync(name);
ImportDataObjects(ImportDataObjectsRequest, CallSettings)
public virtual Operation<ImportDataObjectsResponse, ImportDataObjectsMetadata> ImportDataObjects(ImportDataObjectsRequest request, CallSettings callSettings = null)Initiates a Long-Running Operation to import DataObjects into a Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
ImportDataObjectsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationImportDataObjectsResponseImportDataObjectsMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::ImportDataObjectsRequest request = new gcvv::ImportDataObjectsRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
GcsImport = new gcvv::ImportDataObjectsRequest.Types.GcsImportConfig(),
};
// Make the request
Operation<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> response = vectorSearchServiceClient.ImportDataObjects(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::ImportDataObjectsResponse 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<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceImportDataObjects(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::ImportDataObjectsResponse retrievedResult = retrievedResponse.Result;
}
ImportDataObjectsAsync(ImportDataObjectsRequest, CallSettings)
public virtual Task<Operation<ImportDataObjectsResponse, ImportDataObjectsMetadata>> ImportDataObjectsAsync(ImportDataObjectsRequest request, CallSettings callSettings = null)Initiates a Long-Running Operation to import DataObjects into a Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
ImportDataObjectsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationImportDataObjectsResponseImportDataObjectsMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::ImportDataObjectsRequest request = new gcvv::ImportDataObjectsRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
GcsImport = new gcvv::ImportDataObjectsRequest.Types.GcsImportConfig(),
};
// Make the request
Operation<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> response = await vectorSearchServiceClient.ImportDataObjectsAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::ImportDataObjectsResponse 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<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceImportDataObjectsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::ImportDataObjectsResponse retrievedResult = retrievedResponse.Result;
}
ImportDataObjectsAsync(ImportDataObjectsRequest, CancellationToken)
public virtual Task<Operation<ImportDataObjectsResponse, ImportDataObjectsMetadata>> ImportDataObjectsAsync(ImportDataObjectsRequest request, CancellationToken cancellationToken)Initiates a Long-Running Operation to import DataObjects into a Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
ImportDataObjectsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationImportDataObjectsResponseImportDataObjectsMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::ImportDataObjectsRequest request = new gcvv::ImportDataObjectsRequest
{
CollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
GcsImport = new gcvv::ImportDataObjectsRequest.Types.GcsImportConfig(),
};
// Make the request
Operation<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> response = await vectorSearchServiceClient.ImportDataObjectsAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::ImportDataObjectsResponse 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<gcvv::ImportDataObjectsResponse, gcvv::ImportDataObjectsMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceImportDataObjectsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::ImportDataObjectsResponse retrievedResult = retrievedResponse.Result;
}
ListCollections(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListCollectionsResponse, Collection> ListCollections(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Collections in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Parent value for ListCollectionsRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListCollectionsResponseCollection |
A pageable sequence of Collection resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<gcvv::ListCollectionsResponse, gcvv::Collection> response = vectorSearchServiceClient.ListCollections(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcvv::Collection 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 (gcvv::ListCollectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Collection 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<gcvv::Collection> 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 (gcvv::Collection 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;
ListCollections(ListCollectionsRequest, CallSettings)
public virtual PagedEnumerable<ListCollectionsResponse, Collection> ListCollections(ListCollectionsRequest request, CallSettings callSettings = null)Lists Collections in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListCollectionsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListCollectionsResponseCollection |
A pageable sequence of Collection resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::ListCollectionsRequest request = new gcvv::ListCollectionsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedEnumerable<gcvv::ListCollectionsResponse, gcvv::Collection> response = vectorSearchServiceClient.ListCollections(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcvv::Collection 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 (gcvv::ListCollectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Collection 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<gcvv::Collection> 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 (gcvv::Collection 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;
ListCollections(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListCollectionsResponse, Collection> ListCollections(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Collections in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Parent value for ListCollectionsRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListCollectionsResponseCollection |
A pageable sequence of Collection resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<gcvv::ListCollectionsResponse, gcvv::Collection> response = vectorSearchServiceClient.ListCollections(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcvv::Collection 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 (gcvv::ListCollectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Collection 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<gcvv::Collection> 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 (gcvv::Collection 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;
ListCollectionsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListCollectionsResponse, Collection> ListCollectionsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Collections in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Parent value for ListCollectionsRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListCollectionsResponseCollection |
A pageable asynchronous sequence of Collection resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<gcvv::ListCollectionsResponse, gcvv::Collection> response = vectorSearchServiceClient.ListCollectionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (gcvv::Collection item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (gcvv::ListCollectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Collection 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<gcvv::Collection> 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 (gcvv::Collection 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;
ListCollectionsAsync(ListCollectionsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListCollectionsResponse, Collection> ListCollectionsAsync(ListCollectionsRequest request, CallSettings callSettings = null)Lists Collections in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListCollectionsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListCollectionsResponseCollection |
A pageable asynchronous sequence of Collection resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::ListCollectionsRequest request = new gcvv::ListCollectionsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<gcvv::ListCollectionsResponse, gcvv::Collection> response = vectorSearchServiceClient.ListCollectionsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (gcvv::Collection item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (gcvv::ListCollectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Collection 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<gcvv::Collection> 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 (gcvv::Collection 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;
ListCollectionsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListCollectionsResponse, Collection> ListCollectionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Collections in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Parent value for ListCollectionsRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListCollectionsResponseCollection |
A pageable asynchronous sequence of Collection resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<gcvv::ListCollectionsResponse, gcvv::Collection> response = vectorSearchServiceClient.ListCollectionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (gcvv::Collection item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (gcvv::ListCollectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Collection 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<gcvv::Collection> 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 (gcvv::Collection 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;
ListIndexes(CollectionName, string, int?, CallSettings)
public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(CollectionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Indexes in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
CollectionNameRequired. Parent value for ListIndexesRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListIndexesResponseIndex |
A pageable sequence of Index resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::CollectionName parent = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
PagedEnumerable<gcvv::ListIndexesResponse, gcvv::Index> response = vectorSearchServiceClient.ListIndexes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcvv::Index 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 (gcvv::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Index 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<gcvv::Index> 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 (gcvv::Index 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;
ListIndexes(ListIndexesRequest, CallSettings)
public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(ListIndexesRequest request, CallSettings callSettings = null)Lists Indexes in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListIndexesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListIndexesResponseIndex |
A pageable sequence of Index resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::ListIndexesRequest request = new gcvv::ListIndexesRequest
{
ParentAsCollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedEnumerable<gcvv::ListIndexesResponse, gcvv::Index> response = vectorSearchServiceClient.ListIndexes(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcvv::Index 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 (gcvv::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Index 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<gcvv::Index> 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 (gcvv::Index 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;
ListIndexes(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListIndexesResponse, Index> ListIndexes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Indexes in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Parent value for ListIndexesRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListIndexesResponseIndex |
A pageable sequence of Index resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
PagedEnumerable<gcvv::ListIndexesResponse, gcvv::Index> response = vectorSearchServiceClient.ListIndexes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcvv::Index 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 (gcvv::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Index 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<gcvv::Index> 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 (gcvv::Index 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;
ListIndexesAsync(CollectionName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(CollectionName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Indexes in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
CollectionNameRequired. Parent value for ListIndexesRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListIndexesResponseIndex |
A pageable asynchronous sequence of Index resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::CollectionName parent = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]");
// Make the request
PagedAsyncEnumerable<gcvv::ListIndexesResponse, gcvv::Index> response = vectorSearchServiceClient.ListIndexesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (gcvv::Index item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (gcvv::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Index 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<gcvv::Index> 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 (gcvv::Index 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;
ListIndexesAsync(ListIndexesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(ListIndexesRequest request, CallSettings callSettings = null)Lists Indexes in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ListIndexesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListIndexesResponseIndex |
A pageable asynchronous sequence of Index resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::ListIndexesRequest request = new gcvv::ListIndexesRequest
{
ParentAsCollectionName = gcvv::CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<gcvv::ListIndexesResponse, gcvv::Index> response = vectorSearchServiceClient.ListIndexesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (gcvv::Index item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (gcvv::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Index 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<gcvv::Index> 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 (gcvv::Index 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;
ListIndexesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListIndexesResponse, Index> ListIndexesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists Indexes in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. Parent value for ListIndexesRequest |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListIndexesResponseIndex |
A pageable asynchronous sequence of Index resources. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/collections/[COLLECTION]";
// Make the request
PagedAsyncEnumerable<gcvv::ListIndexesResponse, gcvv::Index> response = vectorSearchServiceClient.ListIndexesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (gcvv::Index item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (gcvv::ListIndexesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcvv::Index 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<gcvv::Index> 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 (gcvv::Index 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;
PollOnceCreateCollection(string, CallSettings)
public virtual Operation<Collection, OperationMetadata> PollOnceCreateCollection(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of CreateCollection.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The result of polling the operation. |
PollOnceCreateCollectionAsync(string, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> PollOnceCreateCollectionAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
CreateCollection.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A task representing the result of polling the operation. |
PollOnceCreateIndex(string, CallSettings)
public virtual Operation<Index, OperationMetadata> PollOnceCreateIndex(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of CreateIndex.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationIndexOperationMetadata |
The result of polling the operation. |
PollOnceCreateIndexAsync(string, CallSettings)
public virtual Task<Operation<Index, OperationMetadata>> PollOnceCreateIndexAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
CreateIndex.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationIndexOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteCollection(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteCollection(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of DeleteCollection.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The result of polling the operation. |
PollOnceDeleteCollectionAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteCollectionAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
DeleteCollection.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteIndex(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteIndex(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of DeleteIndex.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The result of polling the operation. |
PollOnceDeleteIndexAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteIndexAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
DeleteIndex.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A task representing the result of polling the operation. |
PollOnceImportDataObjects(string, CallSettings)
public virtual Operation<ImportDataObjectsResponse, ImportDataObjectsMetadata> PollOnceImportDataObjects(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of ImportDataObjects
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationImportDataObjectsResponseImportDataObjectsMetadata |
The result of polling the operation. |
PollOnceImportDataObjectsAsync(string, CallSettings)
public virtual Task<Operation<ImportDataObjectsResponse, ImportDataObjectsMetadata>> PollOnceImportDataObjectsAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
ImportDataObjects.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationImportDataObjectsResponseImportDataObjectsMetadata |
A task representing the result of polling the operation. |
PollOnceUpdateCollection(string, CallSettings)
public virtual Operation<Collection, OperationMetadata> PollOnceUpdateCollection(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of UpdateCollection.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The result of polling the operation. |
PollOnceUpdateCollectionAsync(string, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> PollOnceUpdateCollectionAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
UpdateCollection.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
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. |
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.
UpdateCollection(Collection, FieldMask, CallSettings)
public virtual Operation<Collection, OperationMetadata> UpdateCollection(Collection collection, FieldMask updateMask, CallSettings callSettings = null)Updates the parameters of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
collection |
CollectionRequired. The resource being updated |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the Collection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten. The following fields support update: If |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::Collection collection = new gcvv::Collection();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = vectorSearchServiceClient.UpdateCollection(collection, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceUpdateCollection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
UpdateCollection(UpdateCollectionRequest, CallSettings)
public virtual Operation<Collection, OperationMetadata> UpdateCollection(UpdateCollectionRequest request, CallSettings callSettings = null)Updates the parameters of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationCollectionOperationMetadata |
The RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = gcvv::VectorSearchServiceClient.Create();
// Initialize request argument(s)
gcvv::UpdateCollectionRequest request = new gcvv::UpdateCollectionRequest
{
UpdateMask = new FieldMask(),
Collection = new gcvv::Collection(),
RequestId = "",
};
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = vectorSearchServiceClient.UpdateCollection(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = vectorSearchServiceClient.PollOnceUpdateCollection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
UpdateCollectionAsync(Collection, FieldMask, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> UpdateCollectionAsync(Collection collection, FieldMask updateMask, CallSettings callSettings = null)Updates the parameters of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
collection |
CollectionRequired. The resource being updated |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the Collection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten. The following fields support update: If |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::Collection collection = new gcvv::Collection();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.UpdateCollectionAsync(collection, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceUpdateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
UpdateCollectionAsync(Collection, FieldMask, CancellationToken)
public virtual Task<Operation<Collection, OperationMetadata>> UpdateCollectionAsync(Collection collection, FieldMask updateMask, CancellationToken cancellationToken)Updates the parameters of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
collection |
CollectionRequired. The resource being updated |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the Collection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten. The following fields support update: If |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::Collection collection = new gcvv::Collection();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.UpdateCollectionAsync(collection, updateMask);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceUpdateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
UpdateCollectionAsync(UpdateCollectionRequest, CallSettings)
public virtual Task<Operation<Collection, OperationMetadata>> UpdateCollectionAsync(UpdateCollectionRequest request, CallSettings callSettings = null)Updates the parameters of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateCollectionRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::UpdateCollectionRequest request = new gcvv::UpdateCollectionRequest
{
UpdateMask = new FieldMask(),
Collection = new gcvv::Collection(),
RequestId = "",
};
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.UpdateCollectionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceUpdateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}
UpdateCollectionAsync(UpdateCollectionRequest, CancellationToken)
public virtual Task<Operation<Collection, OperationMetadata>> UpdateCollectionAsync(UpdateCollectionRequest request, CancellationToken cancellationToken)Updates the parameters of a single Collection.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateCollectionRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationCollectionOperationMetadata |
A Task containing the RPC response. |
// Create client
gcvv::VectorSearchServiceClient vectorSearchServiceClient = await gcvv::VectorSearchServiceClient.CreateAsync();
// Initialize request argument(s)
gcvv::UpdateCollectionRequest request = new gcvv::UpdateCollectionRequest
{
UpdateMask = new FieldMask(),
Collection = new gcvv::Collection(),
RequestId = "",
};
// Make the request
Operation<gcvv::Collection, gcvv::OperationMetadata> response = await vectorSearchServiceClient.UpdateCollectionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcvv::Collection, gcvv::OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcvv::Collection 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<gcvv::Collection, gcvv::OperationMetadata> retrievedResponse = await vectorSearchServiceClient.PollOnceUpdateCollectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcvv::Collection retrievedResult = retrievedResponse.Result;
}