Class FeatureRegistryServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeatureRegistryServiceClient featureRegistryServiceClient =
FeatureRegistryServiceClient.create()) {
FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]");
FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(name);
}
Note: close() needs to be called on the FeatureRegistryServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateFeatureGroup |
Creates a new FeatureGroup in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetFeatureGroup |
Gets details of a single FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFeatureGroups |
Lists FeatureGroups in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFeatureGroup |
Updates the parameters of a single FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFeatureGroup |
Deletes a single FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFeature |
Creates a new Feature in a given FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchCreateFeatures |
Creates a batch of Features in a given FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetFeature |
Gets details of a single Feature. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFeatures |
Lists Features in a given FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFeature |
Updates the parameters of a single Feature. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFeature |
Deletes a single Feature. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFeatureMonitor |
Creates a new FeatureMonitor in a given project, location and FeatureGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetFeatureMonitor |
Gets details of a single FeatureMonitor. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFeatureMonitors |
Lists FeatureGroups in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFeatureMonitor |
Updates the parameters of a single FeatureMonitor. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFeatureMonitor |
Deletes a single FeatureMonitor. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFeatureMonitorJob |
Creates a new feature monitor job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetFeatureMonitorJob |
Get a feature monitor job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFeatureMonitorJobs |
List feature monitor jobs. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of FeatureRegistryServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FeatureRegistryServiceSettings featureRegistryServiceSettings =
FeatureRegistryServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
FeatureRegistryServiceClient featureRegistryServiceClient =
FeatureRegistryServiceClient.create(featureRegistryServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FeatureRegistryServiceSettings featureRegistryServiceSettings =
FeatureRegistryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
FeatureRegistryServiceClient featureRegistryServiceClient =
FeatureRegistryServiceClient.create(featureRegistryServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of FeatureRegistryServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) Creates a batch of Features in a given FeatureGroup.batchCreateFeaturesAsync(EntityTypeName parent, List<CreateFeatureRequest> requests) Creates a batch of Features in a given FeatureGroup.batchCreateFeaturesAsync(FeatureGroupName parent, List<CreateFeatureRequest> requests) Creates a batch of Features in a given FeatureGroup.batchCreateFeaturesAsync(String parent, List<CreateFeatureRequest> requests) Creates a batch of Features in a given FeatureGroup.Creates a batch of Features in a given FeatureGroup.final OperationCallable<BatchCreateFeaturesRequest,BatchCreateFeaturesResponse, BatchCreateFeaturesOperationMetadata> Creates a batch of Features in a given FeatureGroup.final voidclose()static final FeatureRegistryServiceClientcreate()Constructs an instance of FeatureRegistryServiceClient with default settings.static final FeatureRegistryServiceClientcreate(FeatureRegistryServiceSettings settings) Constructs an instance of FeatureRegistryServiceClient, using the given settings.static final FeatureRegistryServiceClientConstructs an instance of FeatureRegistryServiceClient, using the given stub for making calls.createFeatureAsync(CreateFeatureRequest request) Creates a new Feature in a given FeatureGroup.createFeatureAsync(EntityTypeName parent, Feature feature, String featureId) Creates a new Feature in a given FeatureGroup.createFeatureAsync(FeatureGroupName parent, Feature feature, String featureId) Creates a new Feature in a given FeatureGroup.createFeatureAsync(String parent, Feature feature, String featureId) Creates a new Feature in a given FeatureGroup.Creates a new Feature in a given FeatureGroup.Creates a new FeatureGroup in a given project and location.createFeatureGroupAsync(LocationName parent, FeatureGroup featureGroup, String featureGroupId) Creates a new FeatureGroup in a given project and location.createFeatureGroupAsync(String parent, FeatureGroup featureGroup, String featureGroupId) Creates a new FeatureGroup in a given project and location.Creates a new FeatureGroup in a given project and location.Creates a new FeatureGroup in a given project and location.Creates a new FeatureMonitor in a given project, location and FeatureGroup.createFeatureMonitorAsync(FeatureGroupName parent, FeatureMonitor featureMonitor, String featureMonitorId) Creates a new FeatureMonitor in a given project, location and FeatureGroup.createFeatureMonitorAsync(String parent, FeatureMonitor featureMonitor, String featureMonitorId) Creates a new FeatureMonitor in a given project, location and FeatureGroup.Creates a new FeatureMonitor in a given project, location and FeatureGroup.final FeatureMonitorJobCreates a new feature monitor job.final FeatureMonitorJobcreateFeatureMonitorJob(FeatureMonitorName parent, FeatureMonitorJob featureMonitorJob, long featureMonitorJobId) Creates a new feature monitor job.final FeatureMonitorJobcreateFeatureMonitorJob(String parent, FeatureMonitorJob featureMonitorJob, long featureMonitorJobId) Creates a new feature monitor job.Creates a new feature monitor job.final OperationCallable<CreateFeatureMonitorRequest,FeatureMonitor, CreateFeatureMonitorOperationMetadata> Creates a new FeatureMonitor in a given project, location and FeatureGroup.Creates a new Feature in a given FeatureGroup.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureAsync(DeleteFeatureRequest request) Deletes a single Feature.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a single Feature.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureAsync(String name) Deletes a single Feature.Deletes a single Feature.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a single FeatureGroup.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureGroupAsync(FeatureGroupName name, boolean force) Deletes a single FeatureGroup.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureGroupAsync(String name, boolean force) Deletes a single FeatureGroup.Deletes a single FeatureGroup.final OperationCallable<DeleteFeatureGroupRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a single FeatureGroup.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a single FeatureMonitor.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a single FeatureMonitor.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a single FeatureMonitor.Deletes a single FeatureMonitor.final OperationCallable<DeleteFeatureMonitorRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a single FeatureMonitor.final OperationCallable<DeleteFeatureRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a single Feature.final FeaturegetFeature(FeatureName name) Gets details of a single Feature.final FeaturegetFeature(GetFeatureRequest request) Gets details of a single Feature.final FeaturegetFeature(String name) Gets details of a single Feature.Gets details of a single Feature.final FeatureGroupGets details of a single FeatureGroup.final FeatureGroupgetFeatureGroup(GetFeatureGroupRequest request) Gets details of a single FeatureGroup.final FeatureGroupgetFeatureGroup(String name) Gets details of a single FeatureGroup.Gets details of a single FeatureGroup.final FeatureMonitorGets details of a single FeatureMonitor.final FeatureMonitorGets details of a single FeatureMonitor.final FeatureMonitorgetFeatureMonitor(String name) Gets details of a single FeatureMonitor.Gets details of a single FeatureMonitor.final FeatureMonitorJobGet a feature monitor job.final FeatureMonitorJobGet a feature monitor job.final FeatureMonitorJobgetFeatureMonitorJob(String name) Get a feature monitor job.Get a feature monitor job.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.getStub()booleanbooleanLists FeatureGroups in a given project and location.listFeatureGroups(LocationName parent) Lists FeatureGroups in a given project and location.listFeatureGroups(String parent) Lists FeatureGroups in a given project and location.Lists FeatureGroups in a given project and location.final UnaryCallable<ListFeatureGroupsRequest,FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse> Lists FeatureGroups in a given project and location.List feature monitor jobs.List feature monitor jobs.listFeatureMonitorJobs(String parent) List feature monitor jobs.List feature monitor jobs.final UnaryCallable<ListFeatureMonitorJobsRequest,FeatureRegistryServiceClient.ListFeatureMonitorJobsPagedResponse> List feature monitor jobs.listFeatureMonitors(FeatureGroupName parent) Lists FeatureGroups in a given project and location.Lists FeatureGroups in a given project and location.listFeatureMonitors(String parent) Lists FeatureGroups in a given project and location.Lists FeatureGroups in a given project and location.final UnaryCallable<ListFeatureMonitorsRequest,FeatureRegistryServiceClient.ListFeatureMonitorsPagedResponse> Lists FeatureGroups in a given project and location.listFeatures(EntityTypeName parent) Lists Features in a given FeatureGroup.listFeatures(FeatureGroupName parent) Lists Features in a given FeatureGroup.listFeatures(ListFeaturesRequest request) Lists Features in a given FeatureGroup.listFeatures(String parent) Lists Features in a given FeatureGroup.Lists Features in a given FeatureGroup.Lists Features in a given FeatureGroup.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateFeatureAsync(Feature feature, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Feature.updateFeatureAsync(UpdateFeatureRequest request) Updates the parameters of a single Feature.Updates the parameters of a single Feature.updateFeatureGroupAsync(FeatureGroup featureGroup, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single FeatureGroup.Updates the parameters of a single FeatureGroup.Updates the parameters of a single FeatureGroup.Updates the parameters of a single FeatureGroup.updateFeatureMonitorAsync(FeatureMonitor featureMonitor, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single FeatureMonitor.Updates the parameters of a single FeatureMonitor.Updates the parameters of a single FeatureMonitor.final OperationCallable<UpdateFeatureMonitorRequest,FeatureMonitor, UpdateFeatureMonitorOperationMetadata> Updates the parameters of a single FeatureMonitor.Updates the parameters of a single Feature.
-
Constructor Details
-
FeatureRegistryServiceClient
Constructs an instance of FeatureRegistryServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
FeatureRegistryServiceClient
-
-
Method Details
-
create
Constructs an instance of FeatureRegistryServiceClient with default settings.- Throws:
IOException
-
create
public static final FeatureRegistryServiceClient create(FeatureRegistryServiceSettings settings) throws IOException Constructs an instance of FeatureRegistryServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of FeatureRegistryServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(FeatureRegistryServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
createFeatureGroupAsync
public final OperationFuture<FeatureGroup,CreateFeatureGroupOperationMetadata> createFeatureGroupAsync(LocationName parent, FeatureGroup featureGroup, String featureGroupId) Creates a new FeatureGroup in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); String featureGroupId = "featureGroupId-1768466396"; FeatureGroup response = featureRegistryServiceClient .createFeatureGroupAsync(parent, featureGroup, featureGroupId) .get(); }- Parameters:
parent- Required. The resource name of the Location to create FeatureGroups. Format: `projects/{project}/locations/{location}`featureGroup- Required. The FeatureGroup to create.featureGroupId- Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name.This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within the project and location.
- Throws:
ApiException- if the remote call fails
-
createFeatureGroupAsync
public final OperationFuture<FeatureGroup,CreateFeatureGroupOperationMetadata> createFeatureGroupAsync(String parent, FeatureGroup featureGroup, String featureGroupId) Creates a new FeatureGroup in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); String featureGroupId = "featureGroupId-1768466396"; FeatureGroup response = featureRegistryServiceClient .createFeatureGroupAsync(parent, featureGroup, featureGroupId) .get(); }- Parameters:
parent- Required. The resource name of the Location to create FeatureGroups. Format: `projects/{project}/locations/{location}`featureGroup- Required. The FeatureGroup to create.featureGroupId- Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name.This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within the project and location.
- Throws:
ApiException- if the remote call fails
-
createFeatureGroupAsync
public final OperationFuture<FeatureGroup,CreateFeatureGroupOperationMetadata> createFeatureGroupAsync(CreateFeatureGroupRequest request) Creates a new FeatureGroup in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureGroupRequest request = CreateFeatureGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFeatureGroup(FeatureGroup.newBuilder().build()) .setFeatureGroupId("featureGroupId-1768466396") .build(); FeatureGroup response = featureRegistryServiceClient.createFeatureGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFeatureGroupOperationCallable
public final OperationCallable<CreateFeatureGroupRequest,FeatureGroup, createFeatureGroupOperationCallable()CreateFeatureGroupOperationMetadata> Creates a new FeatureGroup in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureGroupRequest request = CreateFeatureGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFeatureGroup(FeatureGroup.newBuilder().build()) .setFeatureGroupId("featureGroupId-1768466396") .build(); OperationFuture<FeatureGroup, CreateFeatureGroupOperationMetadata> future = featureRegistryServiceClient.createFeatureGroupOperationCallable().futureCall(request); // Do something. FeatureGroup response = future.get(); } -
createFeatureGroupCallable
Creates a new FeatureGroup in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureGroupRequest request = CreateFeatureGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFeatureGroup(FeatureGroup.newBuilder().build()) .setFeatureGroupId("featureGroupId-1768466396") .build(); ApiFuture<Operation> future = featureRegistryServiceClient.createFeatureGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getFeatureGroup
Gets details of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(name); }- Parameters:
name- Required. The name of the FeatureGroup resource.- Throws:
ApiException- if the remote call fails
-
getFeatureGroup
Gets details of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString(); FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(name); }- Parameters:
name- Required. The name of the FeatureGroup resource.- Throws:
ApiException- if the remote call fails
-
getFeatureGroup
Gets details of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureGroupRequest request = GetFeatureGroupRequest.newBuilder() .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .build(); FeatureGroup response = featureRegistryServiceClient.getFeatureGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getFeatureGroupCallable
Gets details of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureGroupRequest request = GetFeatureGroupRequest.newBuilder() .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .build(); ApiFuture<FeatureGroup> future = featureRegistryServiceClient.getFeatureGroupCallable().futureCall(request); // Do something. FeatureGroup response = future.get(); } -
listFeatureGroups
public final FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse listFeatureGroups(LocationName parent) Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (FeatureGroup element : featureRegistryServiceClient.listFeatureGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list FeatureGroups. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listFeatureGroups
public final FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse listFeatureGroups(String parent) Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (FeatureGroup element : featureRegistryServiceClient.listFeatureGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list FeatureGroups. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listFeatureGroups
public final FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse listFeatureGroups(ListFeatureGroupsRequest request) Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureGroupsRequest request = ListFeatureGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); for (FeatureGroup element : featureRegistryServiceClient.listFeatureGroups(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFeatureGroupsPagedCallable
public final UnaryCallable<ListFeatureGroupsRequest,FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse> listFeatureGroupsPagedCallable()Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureGroupsRequest request = ListFeatureGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<FeatureGroup> future = featureRegistryServiceClient.listFeatureGroupsPagedCallable().futureCall(request); // Do something. for (FeatureGroup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFeatureGroupsCallable
public final UnaryCallable<ListFeatureGroupsRequest,ListFeatureGroupsResponse> listFeatureGroupsCallable()Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureGroupsRequest request = ListFeatureGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListFeatureGroupsResponse response = featureRegistryServiceClient.listFeatureGroupsCallable().call(request); for (FeatureGroup element : response.getFeatureGroupsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateFeatureGroupAsync
public final OperationFuture<FeatureGroup,UpdateFeatureGroupOperationMetadata> updateFeatureGroupAsync(FeatureGroup featureGroup, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroup featureGroup = FeatureGroup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); FeatureGroup response = featureRegistryServiceClient.updateFeatureGroupAsync(featureGroup, updateMask).get(); }- Parameters:
featureGroup- Required. The FeatureGroup's `name` field is used to identify the FeatureGroup to be updated. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}`updateMask- Field mask is used to specify the fields to be overwritten in the FeatureGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields.Updatable fields:
* `labels` * `description` * `big_query` * `big_query.entity_id_columns`
- Throws:
ApiException- if the remote call fails
-
updateFeatureGroupAsync
public final OperationFuture<FeatureGroup,UpdateFeatureGroupOperationMetadata> updateFeatureGroupAsync(UpdateFeatureGroupRequest request) Updates the parameters of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureGroupRequest request = UpdateFeatureGroupRequest.newBuilder() .setFeatureGroup(FeatureGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); FeatureGroup response = featureRegistryServiceClient.updateFeatureGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFeatureGroupOperationCallable
public final OperationCallable<UpdateFeatureGroupRequest,FeatureGroup, updateFeatureGroupOperationCallable()UpdateFeatureGroupOperationMetadata> Updates the parameters of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureGroupRequest request = UpdateFeatureGroupRequest.newBuilder() .setFeatureGroup(FeatureGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<FeatureGroup, UpdateFeatureGroupOperationMetadata> future = featureRegistryServiceClient.updateFeatureGroupOperationCallable().futureCall(request); // Do something. FeatureGroup response = future.get(); } -
updateFeatureGroupCallable
Updates the parameters of a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureGroupRequest request = UpdateFeatureGroupRequest.newBuilder() .setFeatureGroup(FeatureGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.updateFeatureGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteFeatureGroupAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureGroupAsync(FeatureGroupName name, boolean force) Deletes a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); boolean force = true; featureRegistryServiceClient.deleteFeatureGroupAsync(name, force).get(); }- Parameters:
name- Required. The name of the FeatureGroup to be deleted. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}`force- If set to true, any Features under this FeatureGroup will also be deleted. (Otherwise, the request will only work if the FeatureGroup has no Features.)- Throws:
ApiException- if the remote call fails
-
deleteFeatureGroupAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureGroupAsync(String name, boolean force) Deletes a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString(); boolean force = true; featureRegistryServiceClient.deleteFeatureGroupAsync(name, force).get(); }- Parameters:
name- Required. The name of the FeatureGroup to be deleted. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}`force- If set to true, any Features under this FeatureGroup will also be deleted. (Otherwise, the request will only work if the FeatureGroup has no Features.)- Throws:
ApiException- if the remote call fails
-
deleteFeatureGroupAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureGroupAsync(DeleteFeatureGroupRequest request) Deletes a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureGroupRequest request = DeleteFeatureGroupRequest.newBuilder() .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setForce(true) .build(); featureRegistryServiceClient.deleteFeatureGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFeatureGroupOperationCallable
public final OperationCallable<DeleteFeatureGroupRequest,com.google.protobuf.Empty, deleteFeatureGroupOperationCallable()DeleteOperationMetadata> Deletes a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureGroupRequest request = DeleteFeatureGroupRequest.newBuilder() .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setForce(true) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = featureRegistryServiceClient.deleteFeatureGroupOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteFeatureGroupCallable
Deletes a single FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureGroupRequest request = DeleteFeatureGroupRequest.newBuilder() .setName(FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setForce(true) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.deleteFeatureGroupCallable().futureCall(request); // Do something. future.get(); } -
createFeatureAsync
public final OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(EntityTypeName parent, Feature feature, String featureId) Creates a new Feature in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); Feature feature = Feature.newBuilder().build(); String featureId = "featureId-420503887"; Feature response = featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get(); }- Parameters:
parent- Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`feature- Required. The Feature to create.featureId- Required. The ID to use for the Feature, which will become the final component of the Feature's resource name.This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within an EntityType/FeatureGroup.
- Throws:
ApiException- if the remote call fails
-
createFeatureAsync
public final OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(FeatureGroupName parent, Feature feature, String featureId) Creates a new Feature in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); Feature feature = Feature.newBuilder().build(); String featureId = "featureId-420503887"; Feature response = featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get(); }- Parameters:
parent- Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`feature- Required. The Feature to create.featureId- Required. The ID to use for the Feature, which will become the final component of the Feature's resource name.This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within an EntityType/FeatureGroup.
- Throws:
ApiException- if the remote call fails
-
createFeatureAsync
public final OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(String parent, Feature feature, String featureId) Creates a new Feature in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); Feature feature = Feature.newBuilder().build(); String featureId = "featureId-420503887"; Feature response = featureRegistryServiceClient.createFeatureAsync(parent, feature, featureId).get(); }- Parameters:
parent- Required. The resource name of the EntityType or FeatureGroup to create a Feature. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`feature- Required. The Feature to create.featureId- Required. The ID to use for the Feature, which will become the final component of the Feature's resource name.This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within an EntityType/FeatureGroup.
- Throws:
ApiException- if the remote call fails
-
createFeatureAsync
public final OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(CreateFeatureRequest request) Creates a new Feature in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureRequest request = CreateFeatureRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFeature(Feature.newBuilder().build()) .setFeatureId("featureId-420503887") .build(); Feature response = featureRegistryServiceClient.createFeatureAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFeatureOperationCallable
public final OperationCallable<CreateFeatureRequest,Feature, createFeatureOperationCallable()CreateFeatureOperationMetadata> Creates a new Feature in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureRequest request = CreateFeatureRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFeature(Feature.newBuilder().build()) .setFeatureId("featureId-420503887") .build(); OperationFuture<Feature, CreateFeatureOperationMetadata> future = featureRegistryServiceClient.createFeatureOperationCallable().futureCall(request); // Do something. Feature response = future.get(); } -
createFeatureCallable
Creates a new Feature in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureRequest request = CreateFeatureRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFeature(Feature.newBuilder().build()) .setFeatureId("featureId-420503887") .build(); ApiFuture<Operation> future = featureRegistryServiceClient.createFeatureCallable().futureCall(request); // Do something. Operation response = future.get(); } -
batchCreateFeaturesAsync
public final OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(EntityTypeName parent, List<CreateFeatureRequest> requests) Creates a batch of Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); List<CreateFeatureRequest> requests = new ArrayList<>(); BatchCreateFeaturesResponse response = featureRegistryServiceClient.batchCreateFeaturesAsync(parent, requests).get(); }- Parameters:
parent- Required. The resource name of the EntityType/FeatureGroup to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`requests- Required. The request message specifying the Features to create. All Features must be created under the same parent EntityType / FeatureGroup. The `parent` field in each child request message can be omitted. If `parent` is set in a child request, then the value must match the `parent` value in this request message.- Throws:
ApiException- if the remote call fails
-
batchCreateFeaturesAsync
public final OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(FeatureGroupName parent, List<CreateFeatureRequest> requests) Creates a batch of Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); List<CreateFeatureRequest> requests = new ArrayList<>(); BatchCreateFeaturesResponse response = featureRegistryServiceClient.batchCreateFeaturesAsync(parent, requests).get(); }- Parameters:
parent- Required. The resource name of the EntityType/FeatureGroup to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`requests- Required. The request message specifying the Features to create. All Features must be created under the same parent EntityType / FeatureGroup. The `parent` field in each child request message can be omitted. If `parent` is set in a child request, then the value must match the `parent` value in this request message.- Throws:
ApiException- if the remote call fails
-
batchCreateFeaturesAsync
public final OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(String parent, List<CreateFeatureRequest> requests) Creates a batch of Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); List<CreateFeatureRequest> requests = new ArrayList<>(); BatchCreateFeaturesResponse response = featureRegistryServiceClient.batchCreateFeaturesAsync(parent, requests).get(); }- Parameters:
parent- Required. The resource name of the EntityType/FeatureGroup to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` `projects/{project}/locations/{location}/featureGroups/{feature_group}`requests- Required. The request message specifying the Features to create. All Features must be created under the same parent EntityType / FeatureGroup. The `parent` field in each child request message can be omitted. If `parent` is set in a child request, then the value must match the `parent` value in this request message.- Throws:
ApiException- if the remote call fails
-
batchCreateFeaturesAsync
public final OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(BatchCreateFeaturesRequest request) Creates a batch of Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { BatchCreateFeaturesRequest request = BatchCreateFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .addAllRequests(new ArrayList<CreateFeatureRequest>()) .build(); BatchCreateFeaturesResponse response = featureRegistryServiceClient.batchCreateFeaturesAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
batchCreateFeaturesOperationCallable
public final OperationCallable<BatchCreateFeaturesRequest,BatchCreateFeaturesResponse, batchCreateFeaturesOperationCallable()BatchCreateFeaturesOperationMetadata> Creates a batch of Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { BatchCreateFeaturesRequest request = BatchCreateFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .addAllRequests(new ArrayList<CreateFeatureRequest>()) .build(); OperationFuture<BatchCreateFeaturesResponse, BatchCreateFeaturesOperationMetadata> future = featureRegistryServiceClient.batchCreateFeaturesOperationCallable().futureCall(request); // Do something. BatchCreateFeaturesResponse response = future.get(); } -
batchCreateFeaturesCallable
Creates a batch of Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { BatchCreateFeaturesRequest request = BatchCreateFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .addAllRequests(new ArrayList<CreateFeatureRequest>()) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.batchCreateFeaturesCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getFeature
Gets details of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureName name = FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); Feature response = featureRegistryServiceClient.getFeature(name); }- Parameters:
name- Required. The name of the Feature resource. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`- Throws:
ApiException- if the remote call fails
-
getFeature
Gets details of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString(); Feature response = featureRegistryServiceClient.getFeature(name); }- Parameters:
name- Required. The name of the Feature resource. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`- Throws:
ApiException- if the remote call fails
-
getFeature
Gets details of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureRequest request = GetFeatureRequest.newBuilder() .setName( FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") .toString()) .setFeatureStatsAndAnomalySpec(FeatureStatsAndAnomalySpec.newBuilder().build()) .build(); Feature response = featureRegistryServiceClient.getFeature(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getFeatureCallable
Gets details of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureRequest request = GetFeatureRequest.newBuilder() .setName( FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") .toString()) .setFeatureStatsAndAnomalySpec(FeatureStatsAndAnomalySpec.newBuilder().build()) .build(); ApiFuture<Feature> future = featureRegistryServiceClient.getFeatureCallable().futureCall(request); // Do something. Feature response = future.get(); } -
listFeatures
public final FeatureRegistryServiceClient.ListFeaturesPagedResponse listFeatures(EntityTypeName parent) Lists Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list Features. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`- Throws:
ApiException- if the remote call fails
-
listFeatures
public final FeatureRegistryServiceClient.ListFeaturesPagedResponse listFeatures(FeatureGroupName parent) Lists Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list Features. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`- Throws:
ApiException- if the remote call fails
-
listFeatures
Lists Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list Features. Format for entity_type as parent: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` Format for feature_group as parent: `projects/{project}/locations/{location}/featureGroups/{feature_group}`- Throws:
ApiException- if the remote call fails
-
listFeatures
public final FeatureRegistryServiceClient.ListFeaturesPagedResponse listFeatures(ListFeaturesRequest request) Lists Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeaturesRequest request = ListFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .setLatestStatsCount(-878108489) .build(); for (Feature element : featureRegistryServiceClient.listFeatures(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFeaturesPagedCallable
public final UnaryCallable<ListFeaturesRequest,FeatureRegistryServiceClient.ListFeaturesPagedResponse> listFeaturesPagedCallable()Lists Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeaturesRequest request = ListFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .setLatestStatsCount(-878108489) .build(); ApiFuture<Feature> future = featureRegistryServiceClient.listFeaturesPagedCallable().futureCall(request); // Do something. for (Feature element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFeaturesCallable
Lists Features in a given FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeaturesRequest request = ListFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .setLatestStatsCount(-878108489) .build(); while (true) { ListFeaturesResponse response = featureRegistryServiceClient.listFeaturesCallable().call(request); for (Feature element : response.getFeaturesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateFeatureAsync
public final OperationFuture<Feature,UpdateFeatureOperationMetadata> updateFeatureAsync(Feature feature, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { Feature feature = Feature.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Feature response = featureRegistryServiceClient.updateFeatureAsync(feature, updateMask).get(); }- Parameters:
feature- Required. The Feature's `name` field is used to identify the Feature to be updated. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`updateMask- Field mask is used to specify the fields to be overwritten in the Features resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields.Updatable fields:
* `description` * `labels` * `disable_monitoring` (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not supported for FeaturestoreService FeatureStore)
- Throws:
ApiException- if the remote call fails
-
updateFeatureAsync
public final OperationFuture<Feature,UpdateFeatureOperationMetadata> updateFeatureAsync(UpdateFeatureRequest request) Updates the parameters of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureRequest request = UpdateFeatureRequest.newBuilder() .setFeature(Feature.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Feature response = featureRegistryServiceClient.updateFeatureAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFeatureOperationCallable
public final OperationCallable<UpdateFeatureRequest,Feature, updateFeatureOperationCallable()UpdateFeatureOperationMetadata> Updates the parameters of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureRequest request = UpdateFeatureRequest.newBuilder() .setFeature(Feature.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<Feature, UpdateFeatureOperationMetadata> future = featureRegistryServiceClient.updateFeatureOperationCallable().futureCall(request); // Do something. Feature response = future.get(); } -
updateFeatureCallable
Updates the parameters of a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureRequest request = UpdateFeatureRequest.newBuilder() .setFeature(Feature.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.updateFeatureCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteFeatureAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureAsync(FeatureName name) Deletes a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureName name = FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]"); featureRegistryServiceClient.deleteFeatureAsync(name).get(); }- Parameters:
name- Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`- Throws:
ApiException- if the remote call fails
-
deleteFeatureAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureAsync(String name) Deletes a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureName.ofProjectLocationFeaturestoreEntityTypeFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString(); featureRegistryServiceClient.deleteFeatureAsync(name).get(); }- Parameters:
name- Required. The name of the Features to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`- Throws:
ApiException- if the remote call fails
-
deleteFeatureAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureAsync(DeleteFeatureRequest request) Deletes a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") .toString()) .build(); featureRegistryServiceClient.deleteFeatureAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFeatureOperationCallable
public final OperationCallable<DeleteFeatureRequest,com.google.protobuf.Empty, deleteFeatureOperationCallable()DeleteOperationMetadata> Deletes a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = featureRegistryServiceClient.deleteFeatureOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteFeatureCallable
Deletes a single Feature.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( FeatureName.ofProjectLocationFeatureGroupFeatureName( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE]") .toString()) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.deleteFeatureCallable().futureCall(request); // Do something. future.get(); } -
createFeatureMonitorAsync
public final OperationFuture<FeatureMonitor,CreateFeatureMonitorOperationMetadata> createFeatureMonitorAsync(FeatureGroupName parent, FeatureMonitor featureMonitor, String featureMonitorId) Creates a new FeatureMonitor in a given project, location and FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); FeatureMonitor featureMonitor = FeatureMonitor.newBuilder().build(); String featureMonitorId = "featureMonitorId1191342527"; FeatureMonitor response = featureRegistryServiceClient .createFeatureMonitorAsync(parent, featureMonitor, featureMonitorId) .get(); }- Parameters:
parent- Required. The resource name of FeatureGroup to create FeatureMonitor. Format: `projects/{project}/locations/{location}/featureGroups/{featuregroup}`featureMonitor- Required. The Monitor to create.featureMonitorId- Required. The ID to use for this FeatureMonitor, which will become the final component of the FeatureGroup's resource name.This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within the FeatureGroup.
- Throws:
ApiException- if the remote call fails
-
createFeatureMonitorAsync
public final OperationFuture<FeatureMonitor,CreateFeatureMonitorOperationMetadata> createFeatureMonitorAsync(String parent, FeatureMonitor featureMonitor, String featureMonitorId) Creates a new FeatureMonitor in a given project, location and FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString(); FeatureMonitor featureMonitor = FeatureMonitor.newBuilder().build(); String featureMonitorId = "featureMonitorId1191342527"; FeatureMonitor response = featureRegistryServiceClient .createFeatureMonitorAsync(parent, featureMonitor, featureMonitorId) .get(); }- Parameters:
parent- Required. The resource name of FeatureGroup to create FeatureMonitor. Format: `projects/{project}/locations/{location}/featureGroups/{featuregroup}`featureMonitor- Required. The Monitor to create.featureMonitorId- Required. The ID to use for this FeatureMonitor, which will become the final component of the FeatureGroup's resource name.This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number.
The value must be unique within the FeatureGroup.
- Throws:
ApiException- if the remote call fails
-
createFeatureMonitorAsync
public final OperationFuture<FeatureMonitor,CreateFeatureMonitorOperationMetadata> createFeatureMonitorAsync(CreateFeatureMonitorRequest request) Creates a new FeatureMonitor in a given project, location and FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureMonitorRequest request = CreateFeatureMonitorRequest.newBuilder() .setParent( FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setFeatureMonitor(FeatureMonitor.newBuilder().build()) .setFeatureMonitorId("featureMonitorId1191342527") .build(); FeatureMonitor response = featureRegistryServiceClient.createFeatureMonitorAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFeatureMonitorOperationCallable
public final OperationCallable<CreateFeatureMonitorRequest,FeatureMonitor, createFeatureMonitorOperationCallable()CreateFeatureMonitorOperationMetadata> Creates a new FeatureMonitor in a given project, location and FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureMonitorRequest request = CreateFeatureMonitorRequest.newBuilder() .setParent( FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setFeatureMonitor(FeatureMonitor.newBuilder().build()) .setFeatureMonitorId("featureMonitorId1191342527") .build(); OperationFuture<FeatureMonitor, CreateFeatureMonitorOperationMetadata> future = featureRegistryServiceClient.createFeatureMonitorOperationCallable().futureCall(request); // Do something. FeatureMonitor response = future.get(); } -
createFeatureMonitorCallable
Creates a new FeatureMonitor in a given project, location and FeatureGroup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureMonitorRequest request = CreateFeatureMonitorRequest.newBuilder() .setParent( FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setFeatureMonitor(FeatureMonitor.newBuilder().build()) .setFeatureMonitorId("featureMonitorId1191342527") .build(); ApiFuture<Operation> future = featureRegistryServiceClient.createFeatureMonitorCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getFeatureMonitor
Gets details of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureMonitorName name = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]"); FeatureMonitor response = featureRegistryServiceClient.getFeatureMonitor(name); }- Parameters:
name- Required. The name of the FeatureMonitor resource.- Throws:
ApiException- if the remote call fails
-
getFeatureMonitor
Gets details of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString(); FeatureMonitor response = featureRegistryServiceClient.getFeatureMonitor(name); }- Parameters:
name- Required. The name of the FeatureMonitor resource.- Throws:
ApiException- if the remote call fails
-
getFeatureMonitor
Gets details of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureMonitorRequest request = GetFeatureMonitorRequest.newBuilder() .setName( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .build(); FeatureMonitor response = featureRegistryServiceClient.getFeatureMonitor(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getFeatureMonitorCallable
Gets details of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureMonitorRequest request = GetFeatureMonitorRequest.newBuilder() .setName( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .build(); ApiFuture<FeatureMonitor> future = featureRegistryServiceClient.getFeatureMonitorCallable().futureCall(request); // Do something. FeatureMonitor response = future.get(); } -
listFeatureMonitors
public final FeatureRegistryServiceClient.ListFeatureMonitorsPagedResponse listFeatureMonitors(FeatureGroupName parent) Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureGroupName parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]"); for (FeatureMonitor element : featureRegistryServiceClient.listFeatureMonitors(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the FeatureGroup to list FeatureMonitors. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`- Throws:
ApiException- if the remote call fails
-
listFeatureMonitors
public final FeatureRegistryServiceClient.ListFeatureMonitorsPagedResponse listFeatureMonitors(String parent) Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString(); for (FeatureMonitor element : featureRegistryServiceClient.listFeatureMonitors(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the FeatureGroup to list FeatureMonitors. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`- Throws:
ApiException- if the remote call fails
-
listFeatureMonitors
public final FeatureRegistryServiceClient.ListFeatureMonitorsPagedResponse listFeatureMonitors(ListFeatureMonitorsRequest request) Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureMonitorsRequest request = ListFeatureMonitorsRequest.newBuilder() .setParent( FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); for (FeatureMonitor element : featureRegistryServiceClient.listFeatureMonitors(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFeatureMonitorsPagedCallable
public final UnaryCallable<ListFeatureMonitorsRequest,FeatureRegistryServiceClient.ListFeatureMonitorsPagedResponse> listFeatureMonitorsPagedCallable()Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureMonitorsRequest request = ListFeatureMonitorsRequest.newBuilder() .setParent( FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<FeatureMonitor> future = featureRegistryServiceClient.listFeatureMonitorsPagedCallable().futureCall(request); // Do something. for (FeatureMonitor element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFeatureMonitorsCallable
public final UnaryCallable<ListFeatureMonitorsRequest,ListFeatureMonitorsResponse> listFeatureMonitorsCallable()Lists FeatureGroups in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureMonitorsRequest request = ListFeatureMonitorsRequest.newBuilder() .setParent( FeatureGroupName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListFeatureMonitorsResponse response = featureRegistryServiceClient.listFeatureMonitorsCallable().call(request); for (FeatureMonitor element : response.getFeatureMonitorsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateFeatureMonitorAsync
public final OperationFuture<FeatureMonitor,UpdateFeatureMonitorOperationMetadata> updateFeatureMonitorAsync(FeatureMonitor featureMonitor, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureMonitor featureMonitor = FeatureMonitor.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); FeatureMonitor response = featureRegistryServiceClient.updateFeatureMonitorAsync(featureMonitor, updateMask).get(); }- Parameters:
featureMonitor- Required. The FeatureMonitor's `name` field is used to identify the FeatureMonitor to be updated. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`updateMask- Optional. Field mask is used to specify the fields to be overwritten in the FeatureMonitor resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields.Updatable fields:
* `labels`
- Throws:
ApiException- if the remote call fails
-
updateFeatureMonitorAsync
public final OperationFuture<FeatureMonitor,UpdateFeatureMonitorOperationMetadata> updateFeatureMonitorAsync(UpdateFeatureMonitorRequest request) Updates the parameters of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureMonitorRequest request = UpdateFeatureMonitorRequest.newBuilder() .setFeatureMonitor(FeatureMonitor.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); FeatureMonitor response = featureRegistryServiceClient.updateFeatureMonitorAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFeatureMonitorOperationCallable
public final OperationCallable<UpdateFeatureMonitorRequest,FeatureMonitor, updateFeatureMonitorOperationCallable()UpdateFeatureMonitorOperationMetadata> Updates the parameters of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureMonitorRequest request = UpdateFeatureMonitorRequest.newBuilder() .setFeatureMonitor(FeatureMonitor.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<FeatureMonitor, UpdateFeatureMonitorOperationMetadata> future = featureRegistryServiceClient.updateFeatureMonitorOperationCallable().futureCall(request); // Do something. FeatureMonitor response = future.get(); } -
updateFeatureMonitorCallable
Updates the parameters of a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { UpdateFeatureMonitorRequest request = UpdateFeatureMonitorRequest.newBuilder() .setFeatureMonitor(FeatureMonitor.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.updateFeatureMonitorCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteFeatureMonitorAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureMonitorAsync(FeatureMonitorName name) Deletes a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureMonitorName name = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]"); featureRegistryServiceClient.deleteFeatureMonitorAsync(name).get(); }- Parameters:
name- Required. The name of the FeatureMonitor to be deleted. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`- Throws:
ApiException- if the remote call fails
-
deleteFeatureMonitorAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureMonitorAsync(String name) Deletes a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString(); featureRegistryServiceClient.deleteFeatureMonitorAsync(name).get(); }- Parameters:
name- Required. The name of the FeatureMonitor to be deleted. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`- Throws:
ApiException- if the remote call fails
-
deleteFeatureMonitorAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeatureMonitorAsync(DeleteFeatureMonitorRequest request) Deletes a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureMonitorRequest request = DeleteFeatureMonitorRequest.newBuilder() .setName( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .build(); featureRegistryServiceClient.deleteFeatureMonitorAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFeatureMonitorOperationCallable
public final OperationCallable<DeleteFeatureMonitorRequest,com.google.protobuf.Empty, deleteFeatureMonitorOperationCallable()DeleteOperationMetadata> Deletes a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureMonitorRequest request = DeleteFeatureMonitorRequest.newBuilder() .setName( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = featureRegistryServiceClient.deleteFeatureMonitorOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteFeatureMonitorCallable
Deletes a single FeatureMonitor.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { DeleteFeatureMonitorRequest request = DeleteFeatureMonitorRequest.newBuilder() .setName( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .build(); ApiFuture<Operation> future = featureRegistryServiceClient.deleteFeatureMonitorCallable().futureCall(request); // Do something. future.get(); } -
createFeatureMonitorJob
public final FeatureMonitorJob createFeatureMonitorJob(FeatureMonitorName parent, FeatureMonitorJob featureMonitorJob, long featureMonitorJobId) Creates a new feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureMonitorName parent = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]"); FeatureMonitorJob featureMonitorJob = FeatureMonitorJob.newBuilder().build(); long featureMonitorJobId = 816328651; FeatureMonitorJob response = featureRegistryServiceClient.createFeatureMonitorJob( parent, featureMonitorJob, featureMonitorJobId); }- Parameters:
parent- Required. The resource name of FeatureMonitor to create FeatureMonitorJob. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`featureMonitorJob- Required. The Monitor to create.featureMonitorJobId- Optional. Output only. System-generated ID for feature monitor job.- Throws:
ApiException- if the remote call fails
-
createFeatureMonitorJob
public final FeatureMonitorJob createFeatureMonitorJob(String parent, FeatureMonitorJob featureMonitorJob, long featureMonitorJobId) Creates a new feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString(); FeatureMonitorJob featureMonitorJob = FeatureMonitorJob.newBuilder().build(); long featureMonitorJobId = 816328651; FeatureMonitorJob response = featureRegistryServiceClient.createFeatureMonitorJob( parent, featureMonitorJob, featureMonitorJobId); }- Parameters:
parent- Required. The resource name of FeatureMonitor to create FeatureMonitorJob. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`featureMonitorJob- Required. The Monitor to create.featureMonitorJobId- Optional. Output only. System-generated ID for feature monitor job.- Throws:
ApiException- if the remote call fails
-
createFeatureMonitorJob
Creates a new feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureMonitorJobRequest request = CreateFeatureMonitorJobRequest.newBuilder() .setParent( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .setFeatureMonitorJob(FeatureMonitorJob.newBuilder().build()) .setFeatureMonitorJobId(816328651) .build(); FeatureMonitorJob response = featureRegistryServiceClient.createFeatureMonitorJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFeatureMonitorJobCallable
public final UnaryCallable<CreateFeatureMonitorJobRequest,FeatureMonitorJob> createFeatureMonitorJobCallable()Creates a new feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { CreateFeatureMonitorJobRequest request = CreateFeatureMonitorJobRequest.newBuilder() .setParent( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .setFeatureMonitorJob(FeatureMonitorJob.newBuilder().build()) .setFeatureMonitorJobId(816328651) .build(); ApiFuture<FeatureMonitorJob> future = featureRegistryServiceClient.createFeatureMonitorJobCallable().futureCall(request); // Do something. FeatureMonitorJob response = future.get(); } -
getFeatureMonitorJob
Get a feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureMonitorJobName name = FeatureMonitorJobName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]", "[FEATURE_MONITOR_JOB]"); FeatureMonitorJob response = featureRegistryServiceClient.getFeatureMonitorJob(name); }- Parameters:
name- Required. The name of the FeatureMonitorJob resource. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}/featureMonitorJobs/{feature_monitor_job}`- Throws:
ApiException- if the remote call fails
-
getFeatureMonitorJob
Get a feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String name = FeatureMonitorJobName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]", "[FEATURE_MONITOR_JOB]") .toString(); FeatureMonitorJob response = featureRegistryServiceClient.getFeatureMonitorJob(name); }- Parameters:
name- Required. The name of the FeatureMonitorJob resource. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}/featureMonitorJobs/{feature_monitor_job}`- Throws:
ApiException- if the remote call fails
-
getFeatureMonitorJob
Get a feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureMonitorJobRequest request = GetFeatureMonitorJobRequest.newBuilder() .setName( FeatureMonitorJobName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]", "[FEATURE_MONITOR_JOB]") .toString()) .build(); FeatureMonitorJob response = featureRegistryServiceClient.getFeatureMonitorJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getFeatureMonitorJobCallable
public final UnaryCallable<GetFeatureMonitorJobRequest,FeatureMonitorJob> getFeatureMonitorJobCallable()Get a feature monitor job.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetFeatureMonitorJobRequest request = GetFeatureMonitorJobRequest.newBuilder() .setName( FeatureMonitorJobName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]", "[FEATURE_MONITOR_JOB]") .toString()) .build(); ApiFuture<FeatureMonitorJob> future = featureRegistryServiceClient.getFeatureMonitorJobCallable().futureCall(request); // Do something. FeatureMonitorJob response = future.get(); } -
listFeatureMonitorJobs
public final FeatureRegistryServiceClient.ListFeatureMonitorJobsPagedResponse listFeatureMonitorJobs(FeatureMonitorName parent) List feature monitor jobs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { FeatureMonitorName parent = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]"); for (FeatureMonitorJob element : featureRegistryServiceClient.listFeatureMonitorJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the FeatureMonitor to list FeatureMonitorJobs. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`- Throws:
ApiException- if the remote call fails
-
listFeatureMonitorJobs
public final FeatureRegistryServiceClient.ListFeatureMonitorJobsPagedResponse listFeatureMonitorJobs(String parent) List feature monitor jobs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { String parent = FeatureMonitorName.of("[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString(); for (FeatureMonitorJob element : featureRegistryServiceClient.listFeatureMonitorJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the FeatureMonitor to list FeatureMonitorJobs. Format: `projects/{project}/locations/{location}/featureGroups/{feature_group}/featureMonitors/{feature_monitor}`- Throws:
ApiException- if the remote call fails
-
listFeatureMonitorJobs
public final FeatureRegistryServiceClient.ListFeatureMonitorJobsPagedResponse listFeatureMonitorJobs(ListFeatureMonitorJobsRequest request) List feature monitor jobs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureMonitorJobsRequest request = ListFeatureMonitorJobsRequest.newBuilder() .setParent( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); for (FeatureMonitorJob element : featureRegistryServiceClient.listFeatureMonitorJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFeatureMonitorJobsPagedCallable
public final UnaryCallable<ListFeatureMonitorJobsRequest,FeatureRegistryServiceClient.ListFeatureMonitorJobsPagedResponse> listFeatureMonitorJobsPagedCallable()List feature monitor jobs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureMonitorJobsRequest request = ListFeatureMonitorJobsRequest.newBuilder() .setParent( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<FeatureMonitorJob> future = featureRegistryServiceClient.listFeatureMonitorJobsPagedCallable().futureCall(request); // Do something. for (FeatureMonitorJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFeatureMonitorJobsCallable
public final UnaryCallable<ListFeatureMonitorJobsRequest,ListFeatureMonitorJobsResponse> listFeatureMonitorJobsCallable()List feature monitor jobs.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListFeatureMonitorJobsRequest request = ListFeatureMonitorJobsRequest.newBuilder() .setParent( FeatureMonitorName.of( "[PROJECT]", "[LOCATION]", "[FEATURE_GROUP]", "[FEATURE_MONITOR]") .toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListFeatureMonitorJobsResponse response = featureRegistryServiceClient.listFeatureMonitorJobsCallable().call(request); for (FeatureMonitorJob element : response.getFeatureMonitorJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listLocations
public final FeatureRegistryServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : featureRegistryServiceClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,FeatureRegistryServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = featureRegistryServiceClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = featureRegistryServiceClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = featureRegistryServiceClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = featureRegistryServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = featureRegistryServiceClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = featureRegistryServiceClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = featureRegistryServiceClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = featureRegistryServiceClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = featureRegistryServiceClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (FeatureRegistryServiceClient featureRegistryServiceClient = FeatureRegistryServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = featureRegistryServiceClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-