public abstract class PredictionApiKeyRegistryClient
Reference documentation and code samples for the Recommendations AI v1beta1 API class PredictionApiKeyRegistryClient.
PredictionApiKeyRegistry client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.RecommendationEngine.V1Beta1Assembly
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 |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default PredictionApiKeyRegistry scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default PredictionApiKeyRegistry scopes are:
GrpcClient
public virtual PredictionApiKeyRegistry.PredictionApiKeyRegistryClient GrpcClient { get; }
The underlying gRPC PredictionApiKeyRegistry client
Property Value | |
---|---|
Type | Description |
PredictionApiKeyRegistryPredictionApiKeyRegistryClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | CreatePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistration | The RPC response. |
// 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 | EventStoreName Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistration | The RPC response. |
// 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 | string Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistration | The RPC response. |
// 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 | CreatePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPredictionApiKeyRegistration | A Task containing the RPC response. |
// 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 | CreatePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPredictionApiKeyRegistration | A Task containing the RPC response. |
// 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 | EventStoreName Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPredictionApiKeyRegistration | A Task containing the RPC response. |
// 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 | EventStoreName Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPredictionApiKeyRegistration | A Task containing the RPC response. |
// 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 | string Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPredictionApiKeyRegistration | A Task containing the RPC response. |
// 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 | string Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPredictionApiKeyRegistration | A Task containing the RPC response. |
// 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 | DeletePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | PredictionApiKeyRegistrationName Required. The API key to unregister including full resource path.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | string Required. The API key to unregister including full resource path.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | DeletePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | DeletePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | PredictionApiKeyRegistrationName Required. The API key to unregister including full resource path.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | PredictionApiKeyRegistrationName Required. The API key to unregister including full resource path.
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | string Required. The API key to unregister including full resource path.
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | string Required. The API key to unregister including full resource path.
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | EventStoreName Required. The parent placement resource name such as
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration | A pageable sequence of PredictionApiKeyRegistration resources. |
// 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 | ListPredictionApiKeyRegistrationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration | A pageable sequence of PredictionApiKeyRegistration resources. |
// 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 | string Required. The parent placement resource name such as
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration | A pageable sequence of PredictionApiKeyRegistration resources. |
// 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 | EventStoreName Required. The parent placement resource name such as
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration | A pageable asynchronous sequence of PredictionApiKeyRegistration resources. |
// 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 | ListPredictionApiKeyRegistrationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration | A pageable asynchronous sequence of PredictionApiKeyRegistration resources. |
// 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 | string Required. The parent placement resource name such as
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListPredictionApiKeyRegistrationsResponsePredictionApiKeyRegistration | A pageable asynchronous sequence of PredictionApiKeyRegistration resources. |
// 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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.