Class FeatureRegistryServiceClient (3.30.0)

public class FeatureRegistryServiceClient implements BackgroundResource

Service Description: The service that handles CRUD and List for resources for FeatureRegistry.

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().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns 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.

Inheritance

java.lang.Object > FeatureRegistryServiceClient

Implements

BackgroundResource

Static Methods

create()

public static final FeatureRegistryServiceClient create()

Constructs an instance of FeatureRegistryServiceClient with default settings.

Returns
TypeDescription
FeatureRegistryServiceClient
Exceptions
TypeDescription
IOException

create(FeatureRegistryServiceSettings settings)

public static final FeatureRegistryServiceClient create(FeatureRegistryServiceSettings settings)

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.

Parameter
NameDescription
settingsFeatureRegistryServiceSettings
Returns
TypeDescription
FeatureRegistryServiceClient
Exceptions
TypeDescription
IOException

create(FeatureRegistryServiceStub stub)

public static final FeatureRegistryServiceClient create(FeatureRegistryServiceStub stub)

Constructs an instance of FeatureRegistryServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(FeatureRegistryServiceSettings).

Parameter
NameDescription
stubFeatureRegistryServiceStub
Returns
TypeDescription
FeatureRegistryServiceClient

Constructors

FeatureRegistryServiceClient(FeatureRegistryServiceSettings settings)

protected FeatureRegistryServiceClient(FeatureRegistryServiceSettings settings)

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.

Parameter
NameDescription
settingsFeatureRegistryServiceSettings

FeatureRegistryServiceClient(FeatureRegistryServiceStub stub)

protected FeatureRegistryServiceClient(FeatureRegistryServiceStub stub)
Parameter
NameDescription
stubFeatureRegistryServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

createFeatureAsync(CreateFeatureRequest request)

public final OperationFuture<Feature,CreateRegistryFeatureOperationMetadata> 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();
 }
 
Parameter
NameDescription
requestCreateFeatureRequest

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

Returns
TypeDescription
OperationFuture<Feature,CreateRegistryFeatureOperationMetadata>

createFeatureAsync(EntityTypeName parent, Feature feature, String featureId)

public final OperationFuture<Feature,CreateRegistryFeatureOperationMetadata> 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
NameDescription
parentEntityTypeName
featureFeature

Required. The Feature to create.

featureIdString

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.

Returns
TypeDescription
OperationFuture<Feature,CreateRegistryFeatureOperationMetadata>

createFeatureAsync(FeatureGroupName parent, Feature feature, String featureId)

public final OperationFuture<Feature,CreateRegistryFeatureOperationMetadata> 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
NameDescription
parentFeatureGroupName
featureFeature

Required. The Feature to create.

featureIdString

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.

Returns
TypeDescription
OperationFuture<Feature,CreateRegistryFeatureOperationMetadata>

createFeatureAsync(String parent, Feature feature, String featureId)

public final OperationFuture<Feature,CreateRegistryFeatureOperationMetadata> 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
NameDescription
parentString
featureFeature

Required. The Feature to create.

featureIdString

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.

Returns
TypeDescription
OperationFuture<Feature,CreateRegistryFeatureOperationMetadata>

createFeatureCallable()

public final UnaryCallable<CreateFeatureRequest,Operation> 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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateFeatureRequest,Operation>

createFeatureGroupAsync(CreateFeatureGroupRequest request)

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();
 }
 
Parameter
NameDescription
requestCreateFeatureGroupRequest

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

Returns
TypeDescription
OperationFuture<FeatureGroup,CreateFeatureGroupOperationMetadata>

createFeatureGroupAsync(LocationName parent, FeatureGroup featureGroup, String featureGroupId)

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

Required. The resource name of the Location to create FeatureGroups. Format: projects/{project}/locations/{location}'

featureGroupFeatureGroup

Required. The FeatureGroup to create.

featureGroupIdString

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 60 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.

Returns
TypeDescription
OperationFuture<FeatureGroup,CreateFeatureGroupOperationMetadata>

createFeatureGroupAsync(String parent, FeatureGroup featureGroup, String featureGroupId)

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

Required. The resource name of the Location to create FeatureGroups. Format: projects/{project}/locations/{location}'

featureGroupFeatureGroup

Required. The FeatureGroup to create.

featureGroupIdString

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 60 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.

Returns
TypeDescription
OperationFuture<FeatureGroup,CreateFeatureGroupOperationMetadata>

createFeatureGroupCallable()

public final UnaryCallable<CreateFeatureGroupRequest,Operation> 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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateFeatureGroupRequest,Operation>

createFeatureGroupOperationCallable()

public final OperationCallable<CreateFeatureGroupRequest,FeatureGroup,CreateFeatureGroupOperationMetadata> createFeatureGroupOperationCallable()

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();
 }
 
Returns
TypeDescription
OperationCallable<CreateFeatureGroupRequest,FeatureGroup,CreateFeatureGroupOperationMetadata>

createFeatureOperationCallable()

public final OperationCallable<CreateFeatureRequest,Feature,CreateRegistryFeatureOperationMetadata> createFeatureOperationCallable()

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, CreateRegistryFeatureOperationMetadata> future =
       featureRegistryServiceClient.createFeatureOperationCallable().futureCall(request);
   // Do something.
   Feature response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateFeatureRequest,Feature,CreateRegistryFeatureOperationMetadata>

deleteFeatureAsync(DeleteFeatureRequest request)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
requestDeleteFeatureRequest

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

Returns
TypeDescription
OperationFuture<Empty,DeleteOperationMetadata>

deleteFeatureAsync(FeatureName name)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
nameFeatureName

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}

Returns
TypeDescription
OperationFuture<Empty,DeleteOperationMetadata>

deleteFeatureAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
nameString

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}

Returns
TypeDescription
OperationFuture<Empty,DeleteOperationMetadata>

deleteFeatureCallable()

public final UnaryCallable<DeleteFeatureRequest,Operation> 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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteFeatureRequest,Operation>

deleteFeatureGroupAsync(DeleteFeatureGroupRequest request)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
requestDeleteFeatureGroupRequest

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

Returns
TypeDescription
OperationFuture<Empty,DeleteOperationMetadata>

deleteFeatureGroupAsync(FeatureGroupName name, boolean force)

public final OperationFuture<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
NameDescription
nameFeatureGroupName

Required. The name of the FeatureGroup to be deleted. Format: projects/{project}/locations/{location}/featureGroups/{feature_group}

forceboolean

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.)

Returns
TypeDescription
OperationFuture<Empty,DeleteOperationMetadata>

deleteFeatureGroupAsync(String name, boolean force)

public final OperationFuture<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
NameDescription
nameString

Required. The name of the FeatureGroup to be deleted. Format: projects/{project}/locations/{location}/featureGroups/{feature_group}

forceboolean

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.)

Returns
TypeDescription
OperationFuture<Empty,DeleteOperationMetadata>

deleteFeatureGroupCallable()

public final UnaryCallable<DeleteFeatureGroupRequest,Operation> 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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteFeatureGroupRequest,Operation>

deleteFeatureGroupOperationCallable()

public final OperationCallable<DeleteFeatureGroupRequest,Empty,DeleteOperationMetadata> deleteFeatureGroupOperationCallable()

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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteFeatureGroupRequest,Empty,DeleteOperationMetadata>

deleteFeatureOperationCallable()

public final OperationCallable<DeleteFeatureRequest,Empty,DeleteOperationMetadata> deleteFeatureOperationCallable()

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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteFeatureRequest,Empty,DeleteOperationMetadata>

getFeature(FeatureName name)

public final Feature getFeature(FeatureName name)

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);
 }
 
Parameter
NameDescription
nameFeatureName

Required. The name of the Feature resource. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} projects/{project}/locations/{location}/featureGroups/{feature_group}

Returns
TypeDescription
Feature

getFeature(GetFeatureRequest request)

public final Feature getFeature(GetFeatureRequest request)

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())
           .build();
   Feature response = featureRegistryServiceClient.getFeature(request);
 }
 
Parameter
NameDescription
requestGetFeatureRequest

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

Returns
TypeDescription
Feature

getFeature(String name)

public final Feature getFeature(String name)

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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the Feature resource. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} projects/{project}/locations/{location}/featureGroups/{feature_group}

Returns
TypeDescription
Feature

getFeatureCallable()

public final UnaryCallable<GetFeatureRequest,Feature> 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())
           .build();
   ApiFuture<Feature> future =
       featureRegistryServiceClient.getFeatureCallable().futureCall(request);
   // Do something.
   Feature response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetFeatureRequest,Feature>

getFeatureGroup(FeatureGroupName name)

public final FeatureGroup getFeatureGroup(FeatureGroupName name)

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);
 }
 
Parameter
NameDescription
nameFeatureGroupName

Required. The name of the FeatureGroup resource.

Returns
TypeDescription
FeatureGroup

getFeatureGroup(GetFeatureGroupRequest request)

public final FeatureGroup getFeatureGroup(GetFeatureGroupRequest request)

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);
 }
 
Parameter
NameDescription
requestGetFeatureGroupRequest

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

Returns
TypeDescription
FeatureGroup

getFeatureGroup(String name)

public final FeatureGroup getFeatureGroup(String name)

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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the FeatureGroup resource.

Returns
TypeDescription
FeatureGroup

getFeatureGroupCallable()

public final UnaryCallable<GetFeatureGroupRequest,FeatureGroup> 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();
 }
 
Returns
TypeDescription
UnaryCallable<GetFeatureGroupRequest,FeatureGroup>

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

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);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

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

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> 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();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

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);
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.GetLocationRequest

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

Returns
TypeDescription
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> 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();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getSettings()

public final FeatureRegistryServiceSettings getSettings()
Returns
TypeDescription
FeatureRegistryServiceSettings

getStub()

public FeatureRegistryServiceStub getStub()
Returns
TypeDescription
FeatureRegistryServiceStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listFeatureGroups(ListFeatureGroupsRequest request)

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);
   }
 }
 
Parameter
NameDescription
requestListFeatureGroupsRequest

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

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse

listFeatureGroups(LocationName parent)

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);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The resource name of the Location to list FeatureGroups. Format: projects/{project}/locations/{location}

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse

listFeatureGroups(String parent)

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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The resource name of the Location to list FeatureGroups. Format: projects/{project}/locations/{location}

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeatureGroupsPagedResponse

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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListFeatureGroupsRequest,ListFeatureGroupsResponse>

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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListFeatureGroupsRequest,ListFeatureGroupsPagedResponse>

listFeatures(EntityTypeName parent)

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);
   }
 }
 
Parameter
NameDescription
parentEntityTypeName

Required. The resource name of the Location to list Features. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} projects/{project}/locations/{location}/featureGroups/{feature_group}

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeaturesPagedResponse

listFeatures(FeatureGroupName parent)

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);
   }
 }
 
Parameter
NameDescription
parentFeatureGroupName

Required. The resource name of the Location to list Features. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} projects/{project}/locations/{location}/featureGroups/{feature_group}

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeaturesPagedResponse

listFeatures(ListFeaturesRequest request)

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);
   }
 }
 
Parameter
NameDescription
requestListFeaturesRequest

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

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeaturesPagedResponse

listFeatures(String parent)

public final FeatureRegistryServiceClient.ListFeaturesPagedResponse listFeatures(String 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()) {
   String parent =
       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
           .toString();
   for (Feature element : featureRegistryServiceClient.listFeatures(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The resource name of the Location to list Features. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} projects/{project}/locations/{location}/featureGroups/{feature_group}

Returns
TypeDescription
FeatureRegistryServiceClient.ListFeaturesPagedResponse

listFeaturesCallable()

public final UnaryCallable<ListFeaturesRequest,ListFeaturesResponse> 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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListFeaturesRequest,ListFeaturesResponse>

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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListFeaturesRequest,ListFeaturesPagedResponse>

listLocations(ListLocationsRequest request)

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);
   }
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.ListLocationsRequest

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

Returns
TypeDescription
FeatureRegistryServiceClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> 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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

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);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

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

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

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();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

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);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

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

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

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();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

updateFeatureAsync(Feature feature, FieldMask updateMask)

public final OperationFuture<Feature,UpdateFeatureOperationMetadata> updateFeatureAsync(Feature feature, 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
NameDescription
featureFeature

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}

updateMaskFieldMask

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

Returns
TypeDescription
OperationFuture<Feature,UpdateFeatureOperationMetadata>

updateFeatureAsync(UpdateFeatureRequest request)

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();
 }
 
Parameter
NameDescription
requestUpdateFeatureRequest

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

Returns
TypeDescription
OperationFuture<Feature,UpdateFeatureOperationMetadata>

updateFeatureCallable()

public final UnaryCallable<UpdateFeatureRequest,Operation> 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();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateFeatureRequest,Operation>

updateFeatureGroupAsync(FeatureGroup featureGroup, FieldMask updateMask)

public final OperationFuture<FeatureGroup,UpdateFeatureGroupOperationMetadata> updateFeatureGroupAsync(FeatureGroup featureGroup, 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
NameDescription
featureGroupFeatureGroup

Required. The FeatureGroup's name field is used to identify the FeatureGroup to be updated. Format: projects/{project}/locations/{location}/featureGroups/{feature_group}

updateMaskFieldMask

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

Returns
TypeDescription
OperationFuture<FeatureGroup,UpdateFeatureGroupOperationMetadata>

updateFeatureGroupAsync(UpdateFeatureGroupRequest request)

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();
 }
 
Parameter
NameDescription
requestUpdateFeatureGroupRequest

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

Returns
TypeDescription
OperationFuture<FeatureGroup,UpdateFeatureGroupOperationMetadata>

updateFeatureGroupCallable()

public final UnaryCallable<UpdateFeatureGroupRequest,Operation> 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();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateFeatureGroupRequest,Operation>

updateFeatureGroupOperationCallable()

public final OperationCallable<UpdateFeatureGroupRequest,FeatureGroup,UpdateFeatureGroupOperationMetadata> updateFeatureGroupOperationCallable()

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();
 }
 
Returns
TypeDescription
OperationCallable<UpdateFeatureGroupRequest,FeatureGroup,UpdateFeatureGroupOperationMetadata>

updateFeatureOperationCallable()

public final OperationCallable<UpdateFeatureRequest,Feature,UpdateFeatureOperationMetadata> updateFeatureOperationCallable()

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();
 }
 
Returns
TypeDescription
OperationCallable<UpdateFeatureRequest,Feature,UpdateFeatureOperationMetadata>