1.2.0 (latest) 1.1.0 1.0.0

    public abstract class DataObjectSearchServiceClient

Reference documentation and code samples for the Vector Search v1 API class DataObjectSearchServiceClient.

DataObjectSearchService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> DataObjectSearchServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[DataObjectSearchServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClientImpl)

## Namespace

[Google.Cloud.VectorSearch.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1)

## Assembly

Google.Cloud.VectorSearch.V1.dll

## Remarks

Service for searching data objects.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default DataObjectSearchService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default DataObjectSearchService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

### GrpcClient

    public virtual DataObjectSearchService.DataObjectSearchServiceClient GrpcClient { get; }

The underlying gRPC DataObjectSearchService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchService.DataObjectSearchServiceClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### AggregateDataObjects(AggregateDataObjectsRequest, CallSettings)

    public virtual AggregateDataObjectsResponse AggregateDataObjects(AggregateDataObjectsRequest request, CallSettings callSettings = null)

Aggregates data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.AggregateDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.AggregateDataObjectsResponse` | The RPC response. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = DataObjectSearchServiceClient.Create();
    // Initialize request argument(s)
    AggregateDataObjectsRequest request = new AggregateDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Filter = new Struct(),
        Aggregate = AggregationMethod.Unspecified,
    };
    // Make the request
    AggregateDataObjectsResponse response = dataObjectSearchServiceClient.AggregateDataObjects(request);

### AggregateDataObjectsAsync(AggregateDataObjectsRequest, CallSettings)

    public virtual Task<AggregateDataObjectsResponse> AggregateDataObjectsAsync(AggregateDataObjectsRequest request, CallSettings callSettings = null)

Aggregates data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.AggregateDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.AggregateDataObjectsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = await DataObjectSearchServiceClient.CreateAsync();
    // Initialize request argument(s)
    AggregateDataObjectsRequest request = new AggregateDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Filter = new Struct(),
        Aggregate = AggregationMethod.Unspecified,
    };
    // Make the request
    AggregateDataObjectsResponse response = await dataObjectSearchServiceClient.AggregateDataObjectsAsync(request);

### AggregateDataObjectsAsync(AggregateDataObjectsRequest, CancellationToken)

    public virtual Task<AggregateDataObjectsResponse> AggregateDataObjectsAsync(AggregateDataObjectsRequest request, CancellationToken cancellationToken)

Aggregates data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.AggregateDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.AggregateDataObjectsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = await DataObjectSearchServiceClient.CreateAsync();
    // Initialize request argument(s)
    AggregateDataObjectsRequest request = new AggregateDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Filter = new Struct(),
        Aggregate = AggregationMethod.Unspecified,
    };
    // Make the request
    AggregateDataObjectsResponse response = await dataObjectSearchServiceClient.AggregateDataObjectsAsync(request);

### BatchSearchDataObjects(BatchSearchDataObjectsRequest, CallSettings)

    public virtual BatchSearchDataObjectsResponse BatchSearchDataObjects(BatchSearchDataObjectsRequest request, CallSettings callSettings = null)

Batch searches data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.BatchSearchDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.BatchSearchDataObjectsResponse` | The RPC response. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = DataObjectSearchServiceClient.Create();
    // Initialize request argument(s)
    BatchSearchDataObjectsRequest request = new BatchSearchDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Searches = { new Search(), },
        Combine = new BatchSearchDataObjectsRequest.Types.CombineResultsOptions(),
    };
    // Make the request
    BatchSearchDataObjectsResponse response = dataObjectSearchServiceClient.BatchSearchDataObjects(request);

### BatchSearchDataObjectsAsync(BatchSearchDataObjectsRequest, CallSettings)

    public virtual Task<BatchSearchDataObjectsResponse> BatchSearchDataObjectsAsync(BatchSearchDataObjectsRequest request, CallSettings callSettings = null)

Batch searches data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.BatchSearchDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.BatchSearchDataObjectsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = await DataObjectSearchServiceClient.CreateAsync();
    // Initialize request argument(s)
    BatchSearchDataObjectsRequest request = new BatchSearchDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Searches = { new Search(), },
        Combine = new BatchSearchDataObjectsRequest.Types.CombineResultsOptions(),
    };
    // Make the request
    BatchSearchDataObjectsResponse response = await dataObjectSearchServiceClient.BatchSearchDataObjectsAsync(request);

### BatchSearchDataObjectsAsync(BatchSearchDataObjectsRequest, CancellationToken)

    public virtual Task<BatchSearchDataObjectsResponse> BatchSearchDataObjectsAsync(BatchSearchDataObjectsRequest request, CancellationToken cancellationToken)

Batch searches data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.BatchSearchDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.BatchSearchDataObjectsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = await DataObjectSearchServiceClient.CreateAsync();
    // Initialize request argument(s)
    BatchSearchDataObjectsRequest request = new BatchSearchDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Searches = { new Search(), },
        Combine = new BatchSearchDataObjectsRequest.Types.CombineResultsOptions(),
    };
    // Make the request
    BatchSearchDataObjectsResponse response = await dataObjectSearchServiceClient.BatchSearchDataObjectsAsync(request);

### Create()

    public static DataObjectSearchServiceClient Create()

Synchronously creates a [DataObjectSearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[DataObjectSearchServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient` | The created [DataObjectSearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [DataObjectSearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[DataObjectSearchServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient` | The task representing the created [DataObjectSearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient). |

### QueryDataObjects(QueryDataObjectsRequest, CallSettings)

    public virtual PagedEnumerable<QueryDataObjectsResponse, DataObject> QueryDataObjects(QueryDataObjectsRequest request, CallSettings callSettings = null)

Queries data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.QueryDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.QueryDataObjectsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObject` | A pageable sequence of [DataObject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObject) resources. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = DataObjectSearchServiceClient.Create();
    // Initialize request argument(s)
    QueryDataObjectsRequest request = new QueryDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Filter = new Struct(),
        OutputFields = new OutputFields(),
    };
    // Make the request
    PagedEnumerable<QueryDataObjectsResponse, DataObject> response = dataObjectSearchServiceClient.QueryDataObjects(request);

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

### QueryDataObjectsAsync(QueryDataObjectsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<QueryDataObjectsResponse, DataObject> QueryDataObjectsAsync(QueryDataObjectsRequest request, CallSettings callSettings = null)

Queries data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.QueryDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.QueryDataObjectsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObject` | A pageable asynchronous sequence of [DataObject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObject) resources. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = await DataObjectSearchServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryDataObjectsRequest request = new QueryDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        Filter = new Struct(),
        OutputFields = new OutputFields(),
    };
    // Make the request
    PagedAsyncEnumerable<QueryDataObjectsResponse, DataObject> response = dataObjectSearchServiceClient.QueryDataObjectsAsync(request);

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

### SearchDataObjects(SearchDataObjectsRequest, CallSettings)

    public virtual PagedEnumerable<SearchDataObjectsResponse, SearchResult> SearchDataObjects(SearchDataObjectsRequest request, CallSettings callSettings = null)

Searches data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchDataObjectsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchResult` | A pageable sequence of [SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchResult) resources. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = DataObjectSearchServiceClient.Create();
    // Initialize request argument(s)
    SearchDataObjectsRequest request = new SearchDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        VectorSearch = new VectorSearch(),
    };
    // Make the request
    PagedEnumerable<SearchDataObjectsResponse, SearchResult> response = dataObjectSearchServiceClient.SearchDataObjects(request);

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

### SearchDataObjectsAsync(SearchDataObjectsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<SearchDataObjectsResponse, SearchResult> SearchDataObjectsAsync(SearchDataObjectsRequest request, CallSettings callSettings = null)

Searches data objects.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchDataObjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchDataObjectsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchResult` | A pageable asynchronous sequence of [SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.SearchResult) resources. |

**Example**

    // Create client
    DataObjectSearchServiceClient dataObjectSearchServiceClient = await DataObjectSearchServiceClient.CreateAsync();
    // Initialize request argument(s)
    SearchDataObjectsRequest request = new SearchDataObjectsRequest
    {
        ParentAsCollectionName = CollectionName.FromProjectLocationCollection("[PROJECT]", "[LOCATION]", "[COLLECTION]"),
        VectorSearch = new VectorSearch(),
    };
    // Make the request
    PagedAsyncEnumerable<SearchDataObjectsResponse, SearchResult> response = dataObjectSearchServiceClient.SearchDataObjectsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SearchResult 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 (SearchDataObjectsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SearchResult 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<SearchResult> 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 (SearchResult item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient#Google_Cloud_VectorSearch_V1_DataObjectSearchServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient#Google_Cloud_VectorSearch_V1_DataObjectSearchServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient#Google_Cloud_VectorSearch_V1_DataObjectSearchServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VectorSearch.V1/latest/Google.Cloud.VectorSearch.V1.DataObjectSearchServiceClient#Google_Cloud_VectorSearch_V1_DataObjectSearchServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.