# Cloud Private Catalog v1beta1 API - Class PrivateCatalogClient (2.0.0-beta06)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta06 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/2.0.0-beta05/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/1.0.0-beta02/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient)

    public abstract class PrivateCatalogClient

Reference documentation and code samples for the Cloud Private Catalog v1beta1 API class PrivateCatalogClient.

PrivateCatalog client wrapper, for convenient use.

## Inheritance

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

## 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

[PrivateCatalogClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClientImpl)

## Namespace

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

## Assembly

Google.Cloud.PrivateCatalog.V1Beta1.dll

## Remarks

`PrivateCatalog` allows catalog consumers to retrieve `Catalog`, `Product`
and `Version` resources under a target resource context.

`Catalog` is computed based on the \[Association\]\[\]s linked to the target
resource and its ancestors. Each association's
\[google.cloud.privatecatalogproducer.v1beta.Catalog\]\[\] is transformed into a
`Catalog`. If multiple associations have the same parent
\[google.cloud.privatecatalogproducer.v1beta.Catalog\]\[\], they are
de-duplicated into one `Catalog`. Users must have
`cloudprivatecatalog.catalogTargets.get` IAM permission on the resource
context in order to access catalogs. `Catalog` contains the resource name and
a subset of data of the original
\[google.cloud.privatecatalogproducer.v1beta.Catalog\]\[\].

`Product` is child resource of the catalog. A `Product` contains the resource
name and a subset of the data of the original
\[google.cloud.privatecatalogproducer.v1beta.Product\]\[\].

`Version` is child resource of the product. A `Version` contains the resource
name and a subset of the data of the original
\[google.cloud.privatecatalogproducer.v1beta.Version\]\[\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the PrivateCatalog service, which is a host of "cloudprivatecatalog.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 PrivateCatalog 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 PrivateCatalog scopes are:

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

<br />

### GrpcClient

    public virtual PrivateCatalog.PrivateCatalogClient GrpcClient { get; }

The underlying gRPC PrivateCatalog client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCataloghttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalog.PrivateCatalogClient` |   |

### 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

### Create()

    public static PrivateCatalogClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient` | The task representing the created [PrivateCatalogClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient). |

### SearchCatalogs(SearchCatalogsRequest, CallSettings)

    public virtual PagedEnumerable<SearchCatalogsResponse, Catalog> SearchCatalogs(SearchCatalogsRequest request, CallSettings callSettings = null)

Search \[Catalog\]\[google.cloud.privatecatalog.v1beta1.Catalog\] resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchCatalogsRequest` 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchCatalogsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Catalog` | A pageable sequence of [Catalog](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Catalog) resources. |

**Example**

    // Create client
    gcpv::PrivateCatalogClient privateCatalogClient = gcpv::PrivateCatalogClient.Create();
    // Initialize request argument(s)
    gcpv::SearchCatalogsRequest request = new gcpv::SearchCatalogsRequest
    {
        Resource = "",
        Query = "",
    };
    // Make the request
    PagedEnumerable<gcpv::SearchCatalogsResponse, gcpv::Catalog> response = privateCatalogClient.SearchCatalogs(request);

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

### SearchCatalogsAsync(SearchCatalogsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<SearchCatalogsResponse, Catalog> SearchCatalogsAsync(SearchCatalogsRequest request, CallSettings callSettings = null)

Search \[Catalog\]\[google.cloud.privatecatalog.v1beta1.Catalog\] resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchCatalogsRequest` 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchCatalogsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Catalog` | A pageable asynchronous sequence of [Catalog](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Catalog) resources. |

**Example**

    // Create client
    gcpv::PrivateCatalogClient privateCatalogClient = await gcpv::PrivateCatalogClient.CreateAsync();
    // Initialize request argument(s)
    gcpv::SearchCatalogsRequest request = new gcpv::SearchCatalogsRequest
    {
        Resource = "",
        Query = "",
    };
    // Make the request
    PagedAsyncEnumerable<gcpv::SearchCatalogsResponse, gcpv::Catalog> response = privateCatalogClient.SearchCatalogsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((gcpv::Catalog item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((gcpv::SearchCatalogsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcpv::Catalog 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<gcpv::Catalog> 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 (gcpv::Catalog 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;

### SearchProducts(SearchProductsRequest, CallSettings)

    public virtual PagedEnumerable<SearchProductsResponse, Product> SearchProducts(SearchProductsRequest request, CallSettings callSettings = null)

Search \[Product\]\[google.cloud.privatecatalog.v1beta1.Product\] resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchProductsRequest` 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Product` | A pageable sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Product) resources. |

**Example**

    // Create client
    gcpv::PrivateCatalogClient privateCatalogClient = gcpv::PrivateCatalogClient.Create();
    // Initialize request argument(s)
    gcpv::SearchProductsRequest request = new gcpv::SearchProductsRequest
    {
        Resource = "",
        Query = "",
    };
    // Make the request
    PagedEnumerable<gcpv::SearchProductsResponse, gcpv::Product> response = privateCatalogClient.SearchProducts(request);

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

### SearchProductsAsync(SearchProductsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<SearchProductsResponse, Product> SearchProductsAsync(SearchProductsRequest request, CallSettings callSettings = null)

Search \[Product\]\[google.cloud.privatecatalog.v1beta1.Product\] resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchProductsRequest` 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Product` | A pageable asynchronous sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Product) resources. |

**Example**

    // Create client
    gcpv::PrivateCatalogClient privateCatalogClient = await gcpv::PrivateCatalogClient.CreateAsync();
    // Initialize request argument(s)
    gcpv::SearchProductsRequest request = new gcpv::SearchProductsRequest
    {
        Resource = "",
        Query = "",
    };
    // Make the request
    PagedAsyncEnumerable<gcpv::SearchProductsResponse, gcpv::Product> response = privateCatalogClient.SearchProductsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((gcpv::Product item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((gcpv::SearchProductsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcpv::Product 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<gcpv::Product> 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 (gcpv::Product 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;

### SearchVersions(SearchVersionsRequest, CallSettings)

    public virtual PagedEnumerable<SearchVersionsResponse, Version> SearchVersions(SearchVersionsRequest request, CallSettings callSettings = null)

Search \[Version\]\[google.cloud.privatecatalog.v1beta1.Version\] resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchVersionsRequest` 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Version` | A pageable sequence of [Version](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Version) resources. |

**Example**

    // Create client
    gcpv::PrivateCatalogClient privateCatalogClient = gcpv::PrivateCatalogClient.Create();
    // Initialize request argument(s)
    gcpv::SearchVersionsRequest request = new gcpv::SearchVersionsRequest
    {
        Resource = "",
        Query = "",
    };
    // Make the request
    PagedEnumerable<gcpv::SearchVersionsResponse, gcpv::Version> response = privateCatalogClient.SearchVersions(request);

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

### SearchVersionsAsync(SearchVersionsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<SearchVersionsResponse, Version> SearchVersionsAsync(SearchVersionsRequest request, CallSettings callSettings = null)

Search \[Version\]\[google.cloud.privatecatalog.v1beta1.Version\] resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchVersionsRequest` 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.SearchVersionsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Version` | A pageable asynchronous sequence of [Version](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.Version) resources. |

**Example**

    // Create client
    gcpv::PrivateCatalogClient privateCatalogClient = await gcpv::PrivateCatalogClient.CreateAsync();
    // Initialize request argument(s)
    gcpv::SearchVersionsRequest request = new gcpv::SearchVersionsRequest
    {
        Resource = "",
        Query = "",
    };
    // Make the request
    PagedAsyncEnumerable<gcpv::SearchVersionsResponse, gcpv::Version> response = privateCatalogClient.SearchVersionsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((gcpv::Version item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((gcpv::SearchVersionsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gcpv::Version 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<gcpv::Version> 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 (gcpv::Version 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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient#Google_Cloud_PrivateCatalog_V1Beta1_PrivateCatalogClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient#Google_Cloud_PrivateCatalog_V1Beta1_PrivateCatalogClient_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.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient#Google_Cloud_PrivateCatalog_V1Beta1_PrivateCatalogClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient#Google_Cloud_PrivateCatalog_V1Beta1_PrivateCatalogClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.