Recommendations AI v1beta1 API - Class PredictionApiKeyRegistryClient (2.0.0-beta05)

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

Namespace

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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default PredictionApiKeyRegistry scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default PredictionApiKeyRegistry scopes are:

GrpcClient

public virtual PredictionApiKeyRegistry.PredictionApiKeyRegistryClient GrpcClient { get; }

The underlying gRPC PredictionApiKeyRegistry client

Property Value
TypeDescription
PredictionApiKeyRegistryPredictionApiKeyRegistryClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static PredictionApiKeyRegistryClient Create()

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

Returns
TypeDescription
PredictionApiKeyRegistryClient

The created PredictionApiKeyRegistryClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskPredictionApiKeyRegistryClient

The task representing the created PredictionApiKeyRegistryClient.

CreatePredictionApiKeyRegistration(CreatePredictionApiKeyRegistrationRequest, CallSettings)

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

Register an API key for use with predict method.

Parameters
NameDescription
requestCreatePredictionApiKeyRegistrationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentEventStoreName

Required. The parent resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store.

predictionApiKeyRegistrationPredictionApiKeyRegistration

Required. The prediction API key registration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. The parent resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store.

predictionApiKeyRegistrationPredictionApiKeyRegistration

Required. The prediction API key registration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreatePredictionApiKeyRegistrationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPredictionApiKeyRegistration

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
NameDescription
requestCreatePredictionApiKeyRegistrationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPredictionApiKeyRegistration

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
NameDescription
parentEventStoreName

Required. The parent resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store.

predictionApiKeyRegistrationPredictionApiKeyRegistration

Required. The prediction API key registration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPredictionApiKeyRegistration

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
NameDescription
parentEventStoreName

Required. The parent resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store.

predictionApiKeyRegistrationPredictionApiKeyRegistration

Required. The prediction API key registration.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPredictionApiKeyRegistration

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
NameDescription
parentstring

Required. The parent resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store.

predictionApiKeyRegistrationPredictionApiKeyRegistration

Required. The prediction API key registration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPredictionApiKeyRegistration

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
NameDescription
parentstring

Required. The parent resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store.

predictionApiKeyRegistrationPredictionApiKeyRegistration

Required. The prediction API key registration.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPredictionApiKeyRegistration

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
NameDescription
requestDeletePredictionApiKeyRegistrationRequest

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

callSettingsCallSettings

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
NameDescription
namePredictionApiKeyRegistrationName

Required. The API key to unregister including full resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>

callSettingsCallSettings

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
NameDescription
namestring

Required. The API key to unregister including full resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>

callSettingsCallSettings

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
NameDescription
requestDeletePredictionApiKeyRegistrationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDeletePredictionApiKeyRegistrationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
namePredictionApiKeyRegistrationName

Required. The API key to unregister including full resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namePredictionApiKeyRegistrationName

Required. The API key to unregister including full resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
namestring

Required. The API key to unregister including full resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. The API key to unregister including full resource path. projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentEventStoreName

Required. The parent placement resource name such as projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration

A pageable sequence of 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
NameDescription
requestListPredictionApiKeyRegistrationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration

A pageable sequence of 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
NameDescription
parentstring

Required. The parent placement resource name such as projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration

A pageable sequence of 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
NameDescription
parentEventStoreName

Required. The parent placement resource name such as projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration

A pageable asynchronous sequence of 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
NameDescription
requestListPredictionApiKeyRegistrationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration

A pageable asynchronous sequence of 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
NameDescription
parentstring

Required. The parent placement resource name such as projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration

A pageable asynchronous sequence of 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.