# Recommendations AI v1beta1 API - Class PredictionApiKeyRegistryClient (2.0.0-beta07)

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

- [2.0.0-beta07 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient)
- [2.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta06/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient)

    public abstract class PredictionApiKeyRegistryClient

Reference documentation and code samples for the Recommendations AI v1beta1 API class PredictionApiKeyRegistryClient.

PredictionApiKeyRegistry client wrapper, for convenient use.

## Inheritance

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

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

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

## Namespace

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

## Assembly

Google.Cloud.RecommendationEngine.V1Beta1.dll

## Remarks

Service for registering API keys for use with the `predict` method. If you
use an API key to request predictions, you must first register the API key.
Otherwise, your prediction request is rejected. If you use OAuth to
authenticate your `predict` method call, you do not need to register an API
key. You can register up to 20 API keys per project.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

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

<br />

### GrpcClient

    public virtual PredictionApiKeyRegistry.PredictionApiKeyRegistryClient GrpcClient { get; }

The underlying gRPC PredictionApiKeyRegistry client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistry.PredictionApiKeyRegistryClient` |   |

### 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 PredictionApiKeyRegistryClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

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

### CreatePredictionApiKeyRegistration(CreatePredictionApiKeyRegistrationRequest, CallSettings)

    public virtual PredictionApiKeyRegistration CreatePredictionApiKeyRegistration(CreatePredictionApiKeyRegistrationRequest request, CallSettings callSettings = null)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.CreatePredictionApiKeyRegistrationRequest` 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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | The RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    CreatePredictionApiKeyRegistrationRequest request = new CreatePredictionApiKeyRegistrationRequest
    {
        ParentAsEventStoreName = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]"),
        PredictionApiKeyRegistration = new PredictionApiKeyRegistration(),
    };
    // Make the request
    PredictionApiKeyRegistration response = predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistration(request);

### CreatePredictionApiKeyRegistration(EventStoreName, PredictionApiKeyRegistration, CallSettings)

    public virtual PredictionApiKeyRegistration CreatePredictionApiKeyRegistration(EventStoreName parent, PredictionApiKeyRegistration predictionApiKeyRegistration, CallSettings callSettings = null)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.EventStoreName` Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `predictionApiKeyRegistration` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` Required. The prediction API key registration. |
| `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | The RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    EventStoreName parent = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
    PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
    // Make the request
    PredictionApiKeyRegistration response = predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistration(parent, predictionApiKeyRegistration);

### CreatePredictionApiKeyRegistration(string, PredictionApiKeyRegistration, CallSettings)

    public virtual PredictionApiKeyRegistration CreatePredictionApiKeyRegistration(string parent, PredictionApiKeyRegistration predictionApiKeyRegistration, CallSettings callSettings = null)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `predictionApiKeyRegistration` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` Required. The prediction API key registration. |
| `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | The RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]";
    PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
    // Make the request
    PredictionApiKeyRegistration response = predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistration(parent, predictionApiKeyRegistration);

### CreatePredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest, CallSettings)

    public virtual Task<PredictionApiKeyRegistration> CreatePredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest request, CallSettings callSettings = null)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.CreatePredictionApiKeyRegistrationRequest` 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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    CreatePredictionApiKeyRegistrationRequest request = new CreatePredictionApiKeyRegistrationRequest
    {
        ParentAsEventStoreName = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]"),
        PredictionApiKeyRegistration = new PredictionApiKeyRegistration(),
    };
    // Make the request
    PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(request);

### CreatePredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest, CancellationToken)

    public virtual Task<PredictionApiKeyRegistration> CreatePredictionApiKeyRegistrationAsync(CreatePredictionApiKeyRegistrationRequest request, CancellationToken cancellationToken)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.CreatePredictionApiKeyRegistrationRequest` 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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    CreatePredictionApiKeyRegistrationRequest request = new CreatePredictionApiKeyRegistrationRequest
    {
        ParentAsEventStoreName = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]"),
        PredictionApiKeyRegistration = new PredictionApiKeyRegistration(),
    };
    // Make the request
    PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(request);

### CreatePredictionApiKeyRegistrationAsync(EventStoreName, PredictionApiKeyRegistration, CallSettings)

    public virtual Task<PredictionApiKeyRegistration> CreatePredictionApiKeyRegistrationAsync(EventStoreName parent, PredictionApiKeyRegistration predictionApiKeyRegistration, CallSettings callSettings = null)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.EventStoreName` Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `predictionApiKeyRegistration` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` Required. The prediction API key registration. |
| `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    EventStoreName parent = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
    PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
    // Make the request
    PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(parent, predictionApiKeyRegistration);

### CreatePredictionApiKeyRegistrationAsync(EventStoreName, PredictionApiKeyRegistration, CancellationToken)

    public virtual Task<PredictionApiKeyRegistration> CreatePredictionApiKeyRegistrationAsync(EventStoreName parent, PredictionApiKeyRegistration predictionApiKeyRegistration, CancellationToken cancellationToken)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.EventStoreName` Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `predictionApiKeyRegistration` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` Required. The prediction API key registration. |
| `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    EventStoreName parent = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
    PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
    // Make the request
    PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(parent, predictionApiKeyRegistration);

### CreatePredictionApiKeyRegistrationAsync(string, PredictionApiKeyRegistration, CallSettings)

    public virtual Task<PredictionApiKeyRegistration> CreatePredictionApiKeyRegistrationAsync(string parent, PredictionApiKeyRegistration predictionApiKeyRegistration, CallSettings callSettings = null)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `predictionApiKeyRegistration` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` Required. The prediction API key registration. |
| `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]";
    PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
    // Make the request
    PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(parent, predictionApiKeyRegistration);

### CreatePredictionApiKeyRegistrationAsync(string, PredictionApiKeyRegistration, CancellationToken)

    public virtual Task<PredictionApiKeyRegistration> CreatePredictionApiKeyRegistrationAsync(string parent, PredictionApiKeyRegistration predictionApiKeyRegistration, CancellationToken cancellationToken)

Register an API key for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `predictionApiKeyRegistration` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` Required. The prediction API key registration. |
| `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]";
    PredictionApiKeyRegistration predictionApiKeyRegistration = new PredictionApiKeyRegistration();
    // Make the request
    PredictionApiKeyRegistration response = await predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistrationAsync(parent, predictionApiKeyRegistration);

### DeletePredictionApiKeyRegistration(DeletePredictionApiKeyRegistrationRequest, CallSettings)

    public virtual void DeletePredictionApiKeyRegistration(DeletePredictionApiKeyRegistrationRequest request, CallSettings callSettings = null)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.DeletePredictionApiKeyRegistrationRequest` 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. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    DeletePredictionApiKeyRegistrationRequest request = new DeletePredictionApiKeyRegistrationRequest
    {
        PredictionApiKeyRegistrationName = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]"),
    };
    // Make the request
    predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistration(request);

### DeletePredictionApiKeyRegistration(PredictionApiKeyRegistrationName, CallSettings)

    public virtual void DeletePredictionApiKeyRegistration(PredictionApiKeyRegistrationName name, CallSettings callSettings = null)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistrationName` Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>` |
| `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. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    PredictionApiKeyRegistrationName name = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]");
    // Make the request
    predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistration(name);

### DeletePredictionApiKeyRegistration(string, CallSettings)

    public virtual void DeletePredictionApiKeyRegistration(string name, CallSettings callSettings = null)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>` |
| `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. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]/predictionApiKeyRegistrations/[PREDICTION_API_KEY_REGISTRATION]";
    // Make the request
    predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistration(name);

### DeletePredictionApiKeyRegistrationAsync(DeletePredictionApiKeyRegistrationRequest, CallSettings)

    public virtual Task DeletePredictionApiKeyRegistrationAsync(DeletePredictionApiKeyRegistrationRequest request, CallSettings callSettings = null)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.DeletePredictionApiKeyRegistrationRequest` 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` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    DeletePredictionApiKeyRegistrationRequest request = new DeletePredictionApiKeyRegistrationRequest
    {
        PredictionApiKeyRegistrationName = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]"),
    };
    // Make the request
    await predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistrationAsync(request);

### DeletePredictionApiKeyRegistrationAsync(DeletePredictionApiKeyRegistrationRequest, CancellationToken)

    public virtual Task DeletePredictionApiKeyRegistrationAsync(DeletePredictionApiKeyRegistrationRequest request, CancellationToken cancellationToken)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.DeletePredictionApiKeyRegistrationRequest` 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` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    DeletePredictionApiKeyRegistrationRequest request = new DeletePredictionApiKeyRegistrationRequest
    {
        PredictionApiKeyRegistrationName = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]"),
    };
    // Make the request
    await predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistrationAsync(request);

### DeletePredictionApiKeyRegistrationAsync(PredictionApiKeyRegistrationName, CallSettings)

    public virtual Task DeletePredictionApiKeyRegistrationAsync(PredictionApiKeyRegistrationName name, CallSettings callSettings = null)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistrationName` Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>` |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    PredictionApiKeyRegistrationName name = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]");
    // Make the request
    await predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistrationAsync(name);

### DeletePredictionApiKeyRegistrationAsync(PredictionApiKeyRegistrationName, CancellationToken)

    public virtual Task DeletePredictionApiKeyRegistrationAsync(PredictionApiKeyRegistrationName name, CancellationToken cancellationToken)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistrationName` Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>` |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    PredictionApiKeyRegistrationName name = PredictionApiKeyRegistrationName.FromProjectLocationCatalogEventStorePredictionApiKeyRegistration("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]", "[PREDICTION_API_KEY_REGISTRATION]");
    // Make the request
    await predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistrationAsync(name);

### DeletePredictionApiKeyRegistrationAsync(string, CallSettings)

    public virtual Task DeletePredictionApiKeyRegistrationAsync(string name, CallSettings callSettings = null)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>` |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]/predictionApiKeyRegistrations/[PREDICTION_API_KEY_REGISTRATION]";
    // Make the request
    await predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistrationAsync(name);

### DeletePredictionApiKeyRegistrationAsync(string, CancellationToken)

    public virtual Task DeletePredictionApiKeyRegistrationAsync(string name, CancellationToken cancellationToken)

Unregister an apiKey from using for predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>` |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]/predictionApiKeyRegistrations/[PREDICTION_API_KEY_REGISTRATION]";
    // Make the request
    await predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistrationAsync(name);

### ListPredictionApiKeyRegistrations(EventStoreName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> ListPredictionApiKeyRegistrations(EventStoreName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List the registered apiKeys for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.EventStoreName` Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ListPredictionApiKeyRegistrationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A pageable sequence of [PredictionApiKeyRegistration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration) resources. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    EventStoreName parent = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
    // Make the request
    PagedEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> response = predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrations(parent);

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

### ListPredictionApiKeyRegistrations(ListPredictionApiKeyRegistrationsRequest, CallSettings)

    public virtual PagedEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> ListPredictionApiKeyRegistrations(ListPredictionApiKeyRegistrationsRequest request, CallSettings callSettings = null)

List the registered apiKeys for use with predict method.

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

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    ListPredictionApiKeyRegistrationsRequest request = new ListPredictionApiKeyRegistrationsRequest
    {
        ParentAsEventStoreName = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]"),
    };
    // Make the request
    PagedEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> response = predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrations(request);

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

### ListPredictionApiKeyRegistrations(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> ListPredictionApiKeyRegistrations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List the registered apiKeys for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ListPredictionApiKeyRegistrationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A pageable sequence of [PredictionApiKeyRegistration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration) resources. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = PredictionApiKeyRegistryClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]";
    // Make the request
    PagedEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> response = predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrations(parent);

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

### ListPredictionApiKeyRegistrationsAsync(EventStoreName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> ListPredictionApiKeyRegistrationsAsync(EventStoreName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List the registered apiKeys for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.EventStoreName` Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ListPredictionApiKeyRegistrationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A pageable asynchronous sequence of [PredictionApiKeyRegistration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration) resources. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    EventStoreName parent = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
    // Make the request
    PagedAsyncEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> response = predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsAsync(parent);

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

### ListPredictionApiKeyRegistrationsAsync(ListPredictionApiKeyRegistrationsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> ListPredictionApiKeyRegistrationsAsync(ListPredictionApiKeyRegistrationsRequest request, CallSettings callSettings = null)

List the registered apiKeys for use with predict method.

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

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    ListPredictionApiKeyRegistrationsRequest request = new ListPredictionApiKeyRegistrationsRequest
    {
        ParentAsEventStoreName = EventStoreName.FromProjectLocationCatalogEventStore("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> response = predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsAsync(request);

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

### ListPredictionApiKeyRegistrationsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> ListPredictionApiKeyRegistrationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List the registered apiKeys for use with predict method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ListPredictionApiKeyRegistrationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration` | A pageable asynchronous sequence of [PredictionApiKeyRegistration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistration) resources. |

**Example**

    // Create client
    PredictionApiKeyRegistryClient predictionApiKeyRegistryClient = await PredictionApiKeyRegistryClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/eventStores/[EVENT_STORE]";
    // Make the request
    PagedAsyncEnumerable<ListPredictionApiKeyRegistrationsResponse, PredictionApiKeyRegistration> response = predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((PredictionApiKeyRegistration 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((ListPredictionApiKeyRegistrationsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PredictionApiKeyRegistration 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<PredictionApiKeyRegistration> 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 (PredictionApiKeyRegistration 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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient#Google_Cloud_RecommendationEngine_V1Beta1_PredictionApiKeyRegistryClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient#Google_Cloud_RecommendationEngine_V1Beta1_PredictionApiKeyRegistryClient_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.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient#Google_Cloud_RecommendationEngine_V1Beta1_PredictionApiKeyRegistryClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionApiKeyRegistryClient#Google_Cloud_RecommendationEngine_V1Beta1_PredictionApiKeyRegistryClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.