Class FeaturestoreServiceClient
- java.lang.Object
-
- com.google.cloud.aiplatform.v1.FeaturestoreServiceClient
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@Generated("by gapic-generator-java") public class FeaturestoreServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
Service Description: The service that handles CRUD and List for resources for Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); Featurestore response = featurestoreServiceClient.getFeaturestore(name); }
Note: close() needs to be called on the FeaturestoreServiceClient 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:
- 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.
- 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.
- 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 FeaturestoreServiceSettings 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 FeaturestoreServiceSettings featurestoreServiceSettings = FeaturestoreServiceSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) .build(); FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create(featurestoreServiceSettings);
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 FeaturestoreServiceSettings featurestoreServiceSettings = FeaturestoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create(featurestoreServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
FeaturestoreServiceClient(FeaturestoreServiceSettings settings)
Constructs an instance of FeaturestoreServiceClient, using the given settings.protected
FeaturestoreServiceClient(FeaturestoreServiceStub stub)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long duration, TimeUnit unit)
com.google.api.gax.longrunning.OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata>
batchCreateFeaturesAsync(BatchCreateFeaturesRequest request)
Creates a batch of Features in a given EntityType.com.google.api.gax.longrunning.OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata>
batchCreateFeaturesAsync(EntityTypeName parent, List<CreateFeatureRequest> requests)
Creates a batch of Features in a given EntityType.com.google.api.gax.longrunning.OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata>
batchCreateFeaturesAsync(String parent, List<CreateFeatureRequest> requests)
Creates a batch of Features in a given EntityType.com.google.api.gax.rpc.UnaryCallable<BatchCreateFeaturesRequest,com.google.longrunning.Operation>
batchCreateFeaturesCallable()
Creates a batch of Features in a given EntityType.com.google.api.gax.rpc.OperationCallable<BatchCreateFeaturesRequest,BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata>
batchCreateFeaturesOperationCallable()
Creates a batch of Features in a given EntityType.com.google.api.gax.longrunning.OperationFuture<BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata>
batchReadFeatureValuesAsync(BatchReadFeatureValuesRequest request)
Batch reads Feature values from a Featurestore.com.google.api.gax.longrunning.OperationFuture<BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata>
batchReadFeatureValuesAsync(FeaturestoreName featurestore)
Batch reads Feature values from a Featurestore.com.google.api.gax.longrunning.OperationFuture<BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata>
batchReadFeatureValuesAsync(String featurestore)
Batch reads Feature values from a Featurestore.com.google.api.gax.rpc.UnaryCallable<BatchReadFeatureValuesRequest,com.google.longrunning.Operation>
batchReadFeatureValuesCallable()
Batch reads Feature values from a Featurestore.com.google.api.gax.rpc.OperationCallable<BatchReadFeatureValuesRequest,BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata>
batchReadFeatureValuesOperationCallable()
Batch reads Feature values from a Featurestore.void
close()
static FeaturestoreServiceClient
create()
Constructs an instance of FeaturestoreServiceClient with default settings.static FeaturestoreServiceClient
create(FeaturestoreServiceSettings settings)
Constructs an instance of FeaturestoreServiceClient, using the given settings.static FeaturestoreServiceClient
create(FeaturestoreServiceStub stub)
Constructs an instance of FeaturestoreServiceClient, using the given stub for making calls.com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata>
createEntityTypeAsync(CreateEntityTypeRequest request)
Creates a new EntityType in a given Featurestore.com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata>
createEntityTypeAsync(FeaturestoreName parent, EntityType entityType)
Creates a new EntityType in a given Featurestore.com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata>
createEntityTypeAsync(FeaturestoreName parent, EntityType entityType, String entityTypeId)
Creates a new EntityType in a given Featurestore.com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata>
createEntityTypeAsync(String parent, EntityType entityType)
Creates a new EntityType in a given Featurestore.com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata>
createEntityTypeAsync(String parent, EntityType entityType, String entityTypeId)
Creates a new EntityType in a given Featurestore.com.google.api.gax.rpc.UnaryCallable<CreateEntityTypeRequest,com.google.longrunning.Operation>
createEntityTypeCallable()
Creates a new EntityType in a given Featurestore.com.google.api.gax.rpc.OperationCallable<CreateEntityTypeRequest,EntityType,CreateEntityTypeOperationMetadata>
createEntityTypeOperationCallable()
Creates a new EntityType in a given Featurestore.com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata>
createFeatureAsync(CreateFeatureRequest request)
Creates a new Feature in a given EntityType.com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata>
createFeatureAsync(EntityTypeName parent, Feature feature)
Creates a new Feature in a given EntityType.com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata>
createFeatureAsync(EntityTypeName parent, Feature feature, String featureId)
Creates a new Feature in a given EntityType.com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata>
createFeatureAsync(String parent, Feature feature)
Creates a new Feature in a given EntityType.com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata>
createFeatureAsync(String parent, Feature feature, String featureId)
Creates a new Feature in a given EntityType.com.google.api.gax.rpc.UnaryCallable<CreateFeatureRequest,com.google.longrunning.Operation>
createFeatureCallable()
Creates a new Feature in a given EntityType.com.google.api.gax.rpc.OperationCallable<CreateFeatureRequest,Feature,CreateFeatureOperationMetadata>
createFeatureOperationCallable()
Creates a new Feature in a given EntityType.com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata>
createFeaturestoreAsync(CreateFeaturestoreRequest request)
Creates a new Featurestore in a given project and location.com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata>
createFeaturestoreAsync(LocationName parent, Featurestore featurestore)
Creates a new Featurestore in a given project and location.com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata>
createFeaturestoreAsync(LocationName parent, Featurestore featurestore, String featurestoreId)
Creates a new Featurestore in a given project and location.com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata>
createFeaturestoreAsync(String parent, Featurestore featurestore)
Creates a new Featurestore in a given project and location.com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata>
createFeaturestoreAsync(String parent, Featurestore featurestore, String featurestoreId)
Creates a new Featurestore in a given project and location.com.google.api.gax.rpc.UnaryCallable<CreateFeaturestoreRequest,com.google.longrunning.Operation>
createFeaturestoreCallable()
Creates a new Featurestore in a given project and location.com.google.api.gax.rpc.OperationCallable<CreateFeaturestoreRequest,Featurestore,CreateFeaturestoreOperationMetadata>
createFeaturestoreOperationCallable()
Creates a new Featurestore in a given project and location.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteEntityTypeAsync(DeleteEntityTypeRequest request)
Deletes a single EntityType.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteEntityTypeAsync(EntityTypeName name)
Deletes a single EntityType.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteEntityTypeAsync(EntityTypeName name, boolean force)
Deletes a single EntityType.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteEntityTypeAsync(String name)
Deletes a single EntityType.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteEntityTypeAsync(String name, boolean force)
Deletes a single EntityType.com.google.api.gax.rpc.UnaryCallable<DeleteEntityTypeRequest,com.google.longrunning.Operation>
deleteEntityTypeCallable()
Deletes a single EntityType.com.google.api.gax.rpc.OperationCallable<DeleteEntityTypeRequest,com.google.protobuf.Empty,DeleteOperationMetadata>
deleteEntityTypeOperationCallable()
Deletes a single EntityType.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeatureAsync(DeleteFeatureRequest request)
Deletes a single Feature.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeatureAsync(FeatureName name)
Deletes a single Feature.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeatureAsync(String name)
Deletes a single Feature.com.google.api.gax.rpc.UnaryCallable<DeleteFeatureRequest,com.google.longrunning.Operation>
deleteFeatureCallable()
Deletes a single Feature.com.google.api.gax.rpc.OperationCallable<DeleteFeatureRequest,com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeatureOperationCallable()
Deletes a single Feature.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeaturestoreAsync(DeleteFeaturestoreRequest request)
Deletes a single Featurestore.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeaturestoreAsync(FeaturestoreName name)
Deletes a single Featurestore.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeaturestoreAsync(FeaturestoreName name, boolean force)
Deletes a single Featurestore.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeaturestoreAsync(String name)
Deletes a single Featurestore.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeaturestoreAsync(String name, boolean force)
Deletes a single Featurestore.com.google.api.gax.rpc.UnaryCallable<DeleteFeaturestoreRequest,com.google.longrunning.Operation>
deleteFeaturestoreCallable()
Deletes a single Featurestore.com.google.api.gax.rpc.OperationCallable<DeleteFeaturestoreRequest,com.google.protobuf.Empty,DeleteOperationMetadata>
deleteFeaturestoreOperationCallable()
Deletes a single Featurestore.com.google.api.gax.longrunning.OperationFuture<DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata>
deleteFeatureValuesAsync(DeleteFeatureValuesRequest request)
Delete Feature values from Featurestore.com.google.api.gax.longrunning.OperationFuture<DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata>
deleteFeatureValuesAsync(EntityTypeName entityType)
Delete Feature values from Featurestore.com.google.api.gax.longrunning.OperationFuture<DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata>
deleteFeatureValuesAsync(String entityType)
Delete Feature values from Featurestore.com.google.api.gax.rpc.UnaryCallable<DeleteFeatureValuesRequest,com.google.longrunning.Operation>
deleteFeatureValuesCallable()
Delete Feature values from Featurestore.com.google.api.gax.rpc.OperationCallable<DeleteFeatureValuesRequest,DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata>
deleteFeatureValuesOperationCallable()
Delete Feature values from Featurestore.com.google.api.gax.longrunning.OperationFuture<ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata>
exportFeatureValuesAsync(EntityTypeName entityType)
Exports Feature values from all the entities of a target EntityType.com.google.api.gax.longrunning.OperationFuture<ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata>
exportFeatureValuesAsync(ExportFeatureValuesRequest request)
Exports Feature values from all the entities of a target EntityType.com.google.api.gax.longrunning.OperationFuture<ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata>
exportFeatureValuesAsync(String entityType)
Exports Feature values from all the entities of a target EntityType.com.google.api.gax.rpc.UnaryCallable<ExportFeatureValuesRequest,com.google.longrunning.Operation>
exportFeatureValuesCallable()
Exports Feature values from all the entities of a target EntityType.com.google.api.gax.rpc.OperationCallable<ExportFeatureValuesRequest,ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata>
exportFeatureValuesOperationCallable()
Exports Feature values from all the entities of a target EntityType.EntityType
getEntityType(EntityTypeName name)
Gets details of a single EntityType.EntityType
getEntityType(GetEntityTypeRequest request)
Gets details of a single EntityType.EntityType
getEntityType(String name)
Gets details of a single EntityType.com.google.api.gax.rpc.UnaryCallable<GetEntityTypeRequest,EntityType>
getEntityTypeCallable()
Gets details of a single EntityType.Feature
getFeature(FeatureName name)
Gets details of a single Feature.Feature
getFeature(GetFeatureRequest request)
Gets details of a single Feature.Feature
getFeature(String name)
Gets details of a single Feature.com.google.api.gax.rpc.UnaryCallable<GetFeatureRequest,Feature>
getFeatureCallable()
Gets details of a single Feature.Featurestore
getFeaturestore(FeaturestoreName name)
Gets details of a single Featurestore.Featurestore
getFeaturestore(GetFeaturestoreRequest request)
Gets details of a single Featurestore.Featurestore
getFeaturestore(String name)
Gets details of a single Featurestore.com.google.api.gax.rpc.UnaryCallable<GetFeaturestoreRequest,Featurestore>
getFeaturestoreCallable()
Gets details of a single Featurestore.com.google.iam.v1.Policy
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a resource.com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>
getIamPolicyCallable()
Gets the access control policy for a resource.com.google.cloud.location.Location
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>
getLocationCallable()
Gets information about a location.com.google.longrunning.OperationsClient
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.FeaturestoreServiceSettings
getSettings()
FeaturestoreServiceStub
getStub()
com.google.api.gax.longrunning.OperationFuture<ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata>
importFeatureValuesAsync(EntityTypeName entityType)
Imports Feature values into the Featurestore from a source storage.com.google.api.gax.longrunning.OperationFuture<ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata>
importFeatureValuesAsync(ImportFeatureValuesRequest request)
Imports Feature values into the Featurestore from a source storage.com.google.api.gax.longrunning.OperationFuture<ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata>
importFeatureValuesAsync(String entityType)
Imports Feature values into the Featurestore from a source storage.com.google.api.gax.rpc.UnaryCallable<ImportFeatureValuesRequest,com.google.longrunning.Operation>
importFeatureValuesCallable()
Imports Feature values into the Featurestore from a source storage.com.google.api.gax.rpc.OperationCallable<ImportFeatureValuesRequest,ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata>
importFeatureValuesOperationCallable()
Imports Feature values into the Featurestore from a source storage.boolean
isShutdown()
boolean
isTerminated()
FeaturestoreServiceClient.ListEntityTypesPagedResponse
listEntityTypes(FeaturestoreName parent)
Lists EntityTypes in a given Featurestore.FeaturestoreServiceClient.ListEntityTypesPagedResponse
listEntityTypes(ListEntityTypesRequest request)
Lists EntityTypes in a given Featurestore.FeaturestoreServiceClient.ListEntityTypesPagedResponse
listEntityTypes(String parent)
Lists EntityTypes in a given Featurestore.com.google.api.gax.rpc.UnaryCallable<ListEntityTypesRequest,ListEntityTypesResponse>
listEntityTypesCallable()
Lists EntityTypes in a given Featurestore.com.google.api.gax.rpc.UnaryCallable<ListEntityTypesRequest,FeaturestoreServiceClient.ListEntityTypesPagedResponse>
listEntityTypesPagedCallable()
Lists EntityTypes in a given Featurestore.FeaturestoreServiceClient.ListFeaturesPagedResponse
listFeatures(EntityTypeName parent)
Lists Features in a given EntityType.FeaturestoreServiceClient.ListFeaturesPagedResponse
listFeatures(ListFeaturesRequest request)
Lists Features in a given EntityType.FeaturestoreServiceClient.ListFeaturesPagedResponse
listFeatures(String parent)
Lists Features in a given EntityType.com.google.api.gax.rpc.UnaryCallable<ListFeaturesRequest,ListFeaturesResponse>
listFeaturesCallable()
Lists Features in a given EntityType.com.google.api.gax.rpc.UnaryCallable<ListFeaturesRequest,FeaturestoreServiceClient.ListFeaturesPagedResponse>
listFeaturesPagedCallable()
Lists Features in a given EntityType.FeaturestoreServiceClient.ListFeaturestoresPagedResponse
listFeaturestores(ListFeaturestoresRequest request)
Lists Featurestores in a given project and location.FeaturestoreServiceClient.ListFeaturestoresPagedResponse
listFeaturestores(LocationName parent)
Lists Featurestores in a given project and location.FeaturestoreServiceClient.ListFeaturestoresPagedResponse
listFeaturestores(String parent)
Lists Featurestores in a given project and location.com.google.api.gax.rpc.UnaryCallable<ListFeaturestoresRequest,ListFeaturestoresResponse>
listFeaturestoresCallable()
Lists Featurestores in a given project and location.com.google.api.gax.rpc.UnaryCallable<ListFeaturestoresRequest,FeaturestoreServiceClient.ListFeaturestoresPagedResponse>
listFeaturestoresPagedCallable()
Lists Featurestores in a given project and location.FeaturestoreServiceClient.ListLocationsPagedResponse
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>
listLocationsCallable()
Lists information about the supported locations for this service.com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,FeaturestoreServiceClient.ListLocationsPagedResponse>
listLocationsPagedCallable()
Lists information about the supported locations for this service.FeaturestoreServiceClient.SearchFeaturesPagedResponse
searchFeatures(LocationName location)
Searches Features matching a query in a given project.FeaturestoreServiceClient.SearchFeaturesPagedResponse
searchFeatures(LocationName location, String query)
Searches Features matching a query in a given project.FeaturestoreServiceClient.SearchFeaturesPagedResponse
searchFeatures(SearchFeaturesRequest request)
Searches Features matching a query in a given project.FeaturestoreServiceClient.SearchFeaturesPagedResponse
searchFeatures(String location)
Searches Features matching a query in a given project.FeaturestoreServiceClient.SearchFeaturesPagedResponse
searchFeatures(String location, String query)
Searches Features matching a query in a given project.com.google.api.gax.rpc.UnaryCallable<SearchFeaturesRequest,SearchFeaturesResponse>
searchFeaturesCallable()
Searches Features matching a query in a given project.com.google.api.gax.rpc.UnaryCallable<SearchFeaturesRequest,FeaturestoreServiceClient.SearchFeaturesPagedResponse>
searchFeaturesPagedCallable()
Searches Features matching a query in a given project.com.google.iam.v1.Policy
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on the specified resource.com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>
setIamPolicyCallable()
Sets the access control policy on the specified resource.void
shutdown()
void
shutdownNow()
com.google.iam.v1.TestIamPermissionsResponse
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource.com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>
testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.EntityType
updateEntityType(EntityType entityType, com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single EntityType.EntityType
updateEntityType(UpdateEntityTypeRequest request)
Updates the parameters of a single EntityType.com.google.api.gax.rpc.UnaryCallable<UpdateEntityTypeRequest,EntityType>
updateEntityTypeCallable()
Updates the parameters of a single EntityType.Feature
updateFeature(Feature feature, com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Feature.Feature
updateFeature(UpdateFeatureRequest request)
Updates the parameters of a single Feature.com.google.api.gax.rpc.UnaryCallable<UpdateFeatureRequest,Feature>
updateFeatureCallable()
Updates the parameters of a single Feature.com.google.api.gax.longrunning.OperationFuture<Featurestore,UpdateFeaturestoreOperationMetadata>
updateFeaturestoreAsync(Featurestore featurestore, com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Featurestore.com.google.api.gax.longrunning.OperationFuture<Featurestore,UpdateFeaturestoreOperationMetadata>
updateFeaturestoreAsync(UpdateFeaturestoreRequest request)
Updates the parameters of a single Featurestore.com.google.api.gax.rpc.UnaryCallable<UpdateFeaturestoreRequest,com.google.longrunning.Operation>
updateFeaturestoreCallable()
Updates the parameters of a single Featurestore.com.google.api.gax.rpc.OperationCallable<UpdateFeaturestoreRequest,Featurestore,UpdateFeaturestoreOperationMetadata>
updateFeaturestoreOperationCallable()
Updates the parameters of a single Featurestore.
-
-
-
Constructor Detail
-
FeaturestoreServiceClient
protected FeaturestoreServiceClient(FeaturestoreServiceSettings settings) throws IOException
Constructs an instance of FeaturestoreServiceClient, 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
-
FeaturestoreServiceClient
protected FeaturestoreServiceClient(FeaturestoreServiceStub stub)
-
-
Method Detail
-
create
public static final FeaturestoreServiceClient create() throws IOException
Constructs an instance of FeaturestoreServiceClient with default settings.- Throws:
IOException
-
create
public static final FeaturestoreServiceClient create(FeaturestoreServiceSettings settings) throws IOException
Constructs an instance of FeaturestoreServiceClient, 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
public static final FeaturestoreServiceClient create(FeaturestoreServiceStub stub)
Constructs an instance of FeaturestoreServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(FeaturestoreServiceSettings).
-
getSettings
public final FeaturestoreServiceSettings getSettings()
-
getStub
public FeaturestoreServiceStub getStub()
-
getOperationsClient
public final com.google.longrunning.OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
-
createFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata> createFeaturestoreAsync(LocationName parent, Featurestore featurestore)
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Featurestore featurestore = Featurestore.newBuilder().build(); Featurestore response = featurestoreServiceClient.createFeaturestoreAsync(parent, featurestore).get(); }
- Parameters:
parent
- Required. The resource name of the Location to create Featurestores. Format: `projects/{project}/locations/{location}`featurestore
- Required. The Featurestore to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata> createFeaturestoreAsync(String parent, Featurestore featurestore)
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Featurestore featurestore = Featurestore.newBuilder().build(); Featurestore response = featurestoreServiceClient.createFeaturestoreAsync(parent, featurestore).get(); }
- Parameters:
parent
- Required. The resource name of the Location to create Featurestores. Format: `projects/{project}/locations/{location}`featurestore
- Required. The Featurestore to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata> createFeaturestoreAsync(LocationName parent, Featurestore featurestore, String featurestoreId)
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Featurestore featurestore = Featurestore.newBuilder().build(); String featurestoreId = "featurestoreId-1315851738"; Featurestore response = featurestoreServiceClient .createFeaturestoreAsync(parent, featurestore, featurestoreId) .get(); }
- Parameters:
parent
- Required. The resource name of the Location to create Featurestores. Format: `projects/{project}/locations/{location}`featurestore
- Required. The Featurestore to create.featurestoreId
- Required. The ID to use for this Featurestore, which will become the final component of the Featurestore'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.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata> createFeaturestoreAsync(String parent, Featurestore featurestore, String featurestoreId)
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Featurestore featurestore = Featurestore.newBuilder().build(); String featurestoreId = "featurestoreId-1315851738"; Featurestore response = featurestoreServiceClient .createFeaturestoreAsync(parent, featurestore, featurestoreId) .get(); }
- Parameters:
parent
- Required. The resource name of the Location to create Featurestores. Format: `projects/{project}/locations/{location}`featurestore
- Required. The Featurestore to create.featurestoreId
- Required. The ID to use for this Featurestore, which will become the final component of the Featurestore'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.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,CreateFeaturestoreOperationMetadata> createFeaturestoreAsync(CreateFeaturestoreRequest request)
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateFeaturestoreRequest request = CreateFeaturestoreRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFeaturestore(Featurestore.newBuilder().build()) .setFeaturestoreId("featurestoreId-1315851738") .build(); Featurestore response = featurestoreServiceClient.createFeaturestoreAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeaturestoreOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateFeaturestoreRequest,Featurestore,CreateFeaturestoreOperationMetadata> createFeaturestoreOperationCallable()
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateFeaturestoreRequest request = CreateFeaturestoreRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFeaturestore(Featurestore.newBuilder().build()) .setFeaturestoreId("featurestoreId-1315851738") .build(); OperationFuture<Featurestore, CreateFeaturestoreOperationMetadata> future = featurestoreServiceClient.createFeaturestoreOperationCallable().futureCall(request); // Do something. Featurestore response = future.get(); }
-
createFeaturestoreCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateFeaturestoreRequest,com.google.longrunning.Operation> createFeaturestoreCallable()
Creates a new Featurestore 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateFeaturestoreRequest request = CreateFeaturestoreRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFeaturestore(Featurestore.newBuilder().build()) .setFeaturestoreId("featurestoreId-1315851738") .build(); ApiFuture<Operation> future = featurestoreServiceClient.createFeaturestoreCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
getFeaturestore
public final Featurestore getFeaturestore(FeaturestoreName name)
Gets details of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); Featurestore response = featurestoreServiceClient.getFeaturestore(name); }
- Parameters:
name
- Required. The name of the Featurestore resource.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getFeaturestore
public final Featurestore getFeaturestore(String name)
Gets details of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); Featurestore response = featurestoreServiceClient.getFeaturestore(name); }
- Parameters:
name
- Required. The name of the Featurestore resource.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getFeaturestore
public final Featurestore getFeaturestore(GetFeaturestoreRequest request)
Gets details of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetFeaturestoreRequest request = GetFeaturestoreRequest.newBuilder() .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .build(); Featurestore response = featurestoreServiceClient.getFeaturestore(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getFeaturestoreCallable
public final com.google.api.gax.rpc.UnaryCallable<GetFeaturestoreRequest,Featurestore> getFeaturestoreCallable()
Gets details of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetFeaturestoreRequest request = GetFeaturestoreRequest.newBuilder() .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .build(); ApiFuture<Featurestore> future = featurestoreServiceClient.getFeaturestoreCallable().futureCall(request); // Do something. Featurestore response = future.get(); }
-
listFeaturestores
public final FeaturestoreServiceClient.ListFeaturestoresPagedResponse listFeaturestores(LocationName parent)
Lists Featurestores 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Featurestore element : featurestoreServiceClient.listFeaturestores(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the Location to list Featurestores. Format: `projects/{project}/locations/{location}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listFeaturestores
public final FeaturestoreServiceClient.ListFeaturestoresPagedResponse listFeaturestores(String parent)
Lists Featurestores 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Featurestore element : featurestoreServiceClient.listFeaturestores(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the Location to list Featurestores. Format: `projects/{project}/locations/{location}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listFeaturestores
public final FeaturestoreServiceClient.ListFeaturestoresPagedResponse listFeaturestores(ListFeaturestoresRequest request)
Lists Featurestores 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListFeaturestoresRequest request = ListFeaturestoresRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); for (Featurestore element : featurestoreServiceClient.listFeaturestores(request).iterateAll()) { // doThingsWith(element); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listFeaturestoresPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListFeaturestoresRequest,FeaturestoreServiceClient.ListFeaturestoresPagedResponse> listFeaturestoresPagedCallable()
Lists Featurestores 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListFeaturestoresRequest request = ListFeaturestoresRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Featurestore> future = featurestoreServiceClient.listFeaturestoresPagedCallable().futureCall(request); // Do something. for (Featurestore element : future.get().iterateAll()) { // doThingsWith(element); } }
-
listFeaturestoresCallable
public final com.google.api.gax.rpc.UnaryCallable<ListFeaturestoresRequest,ListFeaturestoresResponse> listFeaturestoresCallable()
Lists Featurestores 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListFeaturestoresRequest request = ListFeaturestoresRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListFeaturestoresResponse response = featurestoreServiceClient.listFeaturestoresCallable().call(request); for (Featurestore element : response.getFeaturestoresList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } }
-
updateFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,UpdateFeaturestoreOperationMetadata> updateFeaturestoreAsync(Featurestore featurestore, com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { Featurestore featurestore = Featurestore.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Featurestore response = featurestoreServiceClient.updateFeaturestoreAsync(featurestore, updateMask).get(); }
- Parameters:
featurestore
- Required. The Featurestore's `name` field is used to identify the Featurestore to be updated. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`updateMask
- Field mask is used to specify the fields to be overwritten in the Featurestore 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` * `online_serving_config.fixed_node_count` * `online_serving_config.scaling` * `online_storage_ttl_days`
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<Featurestore,UpdateFeaturestoreOperationMetadata> updateFeaturestoreAsync(UpdateFeaturestoreRequest request)
Updates the parameters of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateFeaturestoreRequest request = UpdateFeaturestoreRequest.newBuilder() .setFeaturestore(Featurestore.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Featurestore response = featurestoreServiceClient.updateFeaturestoreAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateFeaturestoreOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateFeaturestoreRequest,Featurestore,UpdateFeaturestoreOperationMetadata> updateFeaturestoreOperationCallable()
Updates the parameters of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateFeaturestoreRequest request = UpdateFeaturestoreRequest.newBuilder() .setFeaturestore(Featurestore.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<Featurestore, UpdateFeaturestoreOperationMetadata> future = featurestoreServiceClient.updateFeaturestoreOperationCallable().futureCall(request); // Do something. Featurestore response = future.get(); }
-
updateFeaturestoreCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateFeaturestoreRequest,com.google.longrunning.Operation> updateFeaturestoreCallable()
Updates the parameters of a single Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateFeaturestoreRequest request = UpdateFeaturestoreRequest.newBuilder() .setFeaturestore(Featurestore.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = featurestoreServiceClient.updateFeaturestoreCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
deleteFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeaturestoreAsync(FeaturestoreName name)
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); featurestoreServiceClient.deleteFeaturestoreAsync(name).get(); }
- Parameters:
name
- Required. The name of the Featurestore to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeaturestoreAsync(String name)
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); featurestoreServiceClient.deleteFeaturestoreAsync(name).get(); }
- Parameters:
name
- Required. The name of the Featurestore to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeaturestoreAsync(FeaturestoreName name, boolean force)
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); boolean force = true; featurestoreServiceClient.deleteFeaturestoreAsync(name, force).get(); }
- Parameters:
name
- Required. The name of the Featurestore to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`force
- If set to true, any EntityTypes and Features for this Featurestore will also be deleted. (Otherwise, the request will only work if the Featurestore has no EntityTypes.)- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeaturestoreAsync(String name, boolean force)
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); boolean force = true; featurestoreServiceClient.deleteFeaturestoreAsync(name, force).get(); }
- Parameters:
name
- Required. The name of the Featurestore to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`force
- If set to true, any EntityTypes and Features for this Featurestore will also be deleted. (Otherwise, the request will only work if the Featurestore has no EntityTypes.)- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeaturestoreAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeaturestoreAsync(DeleteFeaturestoreRequest request)
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeaturestoreRequest request = DeleteFeaturestoreRequest.newBuilder() .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setForce(true) .build(); featurestoreServiceClient.deleteFeaturestoreAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeaturestoreOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteFeaturestoreRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteFeaturestoreOperationCallable()
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeaturestoreRequest request = DeleteFeaturestoreRequest.newBuilder() .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setForce(true) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = featurestoreServiceClient.deleteFeaturestoreOperationCallable().futureCall(request); // Do something. future.get(); }
-
deleteFeaturestoreCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteFeaturestoreRequest,com.google.longrunning.Operation> deleteFeaturestoreCallable()
Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeaturestoreRequest request = DeleteFeaturestoreRequest.newBuilder() .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setForce(true) .build(); ApiFuture<Operation> future = featurestoreServiceClient.deleteFeaturestoreCallable().futureCall(request); // Do something. future.get(); }
-
createEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata> createEntityTypeAsync(FeaturestoreName parent, EntityType entityType)
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); EntityType entityType = EntityType.newBuilder().build(); EntityType response = featurestoreServiceClient.createEntityTypeAsync(parent, entityType).get(); }
- Parameters:
parent
- Required. The resource name of the Featurestore to create EntityTypes. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`entityType
- The EntityType to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata> createEntityTypeAsync(String parent, EntityType entityType)
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); EntityType entityType = EntityType.newBuilder().build(); EntityType response = featurestoreServiceClient.createEntityTypeAsync(parent, entityType).get(); }
- Parameters:
parent
- Required. The resource name of the Featurestore to create EntityTypes. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`entityType
- The EntityType to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata> createEntityTypeAsync(FeaturestoreName parent, EntityType entityType, String entityTypeId)
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); EntityType entityType = EntityType.newBuilder().build(); String entityTypeId = "entityTypeId767740856"; EntityType response = featurestoreServiceClient.createEntityTypeAsync(parent, entityType, entityTypeId).get(); }
- Parameters:
parent
- Required. The resource name of the Featurestore to create EntityTypes. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`entityType
- The EntityType to create.entityTypeId
- Required. The ID to use for the EntityType, which will become the final component of the EntityType'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 a featurestore.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata> createEntityTypeAsync(String parent, EntityType entityType, String entityTypeId)
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); EntityType entityType = EntityType.newBuilder().build(); String entityTypeId = "entityTypeId767740856"; EntityType response = featurestoreServiceClient.createEntityTypeAsync(parent, entityType, entityTypeId).get(); }
- Parameters:
parent
- Required. The resource name of the Featurestore to create EntityTypes. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`entityType
- The EntityType to create.entityTypeId
- Required. The ID to use for the EntityType, which will become the final component of the EntityType'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 a featurestore.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<EntityType,CreateEntityTypeOperationMetadata> createEntityTypeAsync(CreateEntityTypeRequest request)
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateEntityTypeRequest request = CreateEntityTypeRequest.newBuilder() .setParent( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setEntityType(EntityType.newBuilder().build()) .setEntityTypeId("entityTypeId767740856") .build(); EntityType response = featurestoreServiceClient.createEntityTypeAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEntityTypeOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateEntityTypeRequest,EntityType,CreateEntityTypeOperationMetadata> createEntityTypeOperationCallable()
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateEntityTypeRequest request = CreateEntityTypeRequest.newBuilder() .setParent( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setEntityType(EntityType.newBuilder().build()) .setEntityTypeId("entityTypeId767740856") .build(); OperationFuture<EntityType, CreateEntityTypeOperationMetadata> future = featurestoreServiceClient.createEntityTypeOperationCallable().futureCall(request); // Do something. EntityType response = future.get(); }
-
createEntityTypeCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateEntityTypeRequest,com.google.longrunning.Operation> createEntityTypeCallable()
Creates a new EntityType in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateEntityTypeRequest request = CreateEntityTypeRequest.newBuilder() .setParent( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setEntityType(EntityType.newBuilder().build()) .setEntityTypeId("entityTypeId767740856") .build(); ApiFuture<Operation> future = featurestoreServiceClient.createEntityTypeCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
getEntityType
public final EntityType getEntityType(EntityTypeName name)
Gets details of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName name = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); EntityType response = featurestoreServiceClient.getEntityType(name); }
- Parameters:
name
- Required. The name of the EntityType resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEntityType
public final EntityType getEntityType(String name)
Gets details of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); EntityType response = featurestoreServiceClient.getEntityType(name); }
- Parameters:
name
- Required. The name of the EntityType resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEntityType
public final EntityType getEntityType(GetEntityTypeRequest request)
Gets details of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetEntityTypeRequest request = GetEntityTypeRequest.newBuilder() .setName( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .build(); EntityType response = featurestoreServiceClient.getEntityType(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEntityTypeCallable
public final com.google.api.gax.rpc.UnaryCallable<GetEntityTypeRequest,EntityType> getEntityTypeCallable()
Gets details of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetEntityTypeRequest request = GetEntityTypeRequest.newBuilder() .setName( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .build(); ApiFuture<EntityType> future = featurestoreServiceClient.getEntityTypeCallable().futureCall(request); // Do something. EntityType response = future.get(); }
-
listEntityTypes
public final FeaturestoreServiceClient.ListEntityTypesPagedResponse listEntityTypes(FeaturestoreName parent)
Lists EntityTypes in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); for (EntityType element : featurestoreServiceClient.listEntityTypes(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the Featurestore to list EntityTypes. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEntityTypes
public final FeaturestoreServiceClient.ListEntityTypesPagedResponse listEntityTypes(String parent)
Lists EntityTypes in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); for (EntityType element : featurestoreServiceClient.listEntityTypes(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the Featurestore to list EntityTypes. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEntityTypes
public final FeaturestoreServiceClient.ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request)
Lists EntityTypes in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder() .setParent( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); for (EntityType element : featurestoreServiceClient.listEntityTypes(request).iterateAll()) { // doThingsWith(element); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEntityTypesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListEntityTypesRequest,FeaturestoreServiceClient.ListEntityTypesPagedResponse> listEntityTypesPagedCallable()
Lists EntityTypes in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder() .setParent( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<EntityType> future = featurestoreServiceClient.listEntityTypesPagedCallable().futureCall(request); // Do something. for (EntityType element : future.get().iterateAll()) { // doThingsWith(element); } }
-
listEntityTypesCallable
public final com.google.api.gax.rpc.UnaryCallable<ListEntityTypesRequest,ListEntityTypesResponse> listEntityTypesCallable()
Lists EntityTypes in a given Featurestore.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder() .setParent( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListEntityTypesResponse response = featurestoreServiceClient.listEntityTypesCallable().call(request); for (EntityType element : response.getEntityTypesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } }
-
updateEntityType
public final EntityType updateEntityType(EntityType entityType, com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityType entityType = EntityType.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); EntityType response = featurestoreServiceClient.updateEntityType(entityType, updateMask); }
- Parameters:
entityType
- Required. The EntityType's `name` field is used to identify the EntityType to be updated. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`updateMask
- Field mask is used to specify the fields to be overwritten in the EntityType 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` * `monitoring_config.snapshot_analysis.disabled` * `monitoring_config.snapshot_analysis.monitoring_interval_days` * `monitoring_config.snapshot_analysis.staleness_days` * `monitoring_config.import_features_analysis.state` * `monitoring_config.import_features_analysis.anomaly_detection_baseline` * `monitoring_config.numerical_threshold_config.value` * `monitoring_config.categorical_threshold_config.value` * `offline_storage_ttl_days`
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateEntityType
public final EntityType updateEntityType(UpdateEntityTypeRequest request)
Updates the parameters of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateEntityTypeRequest request = UpdateEntityTypeRequest.newBuilder() .setEntityType(EntityType.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); EntityType response = featurestoreServiceClient.updateEntityType(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateEntityTypeCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateEntityTypeRequest,EntityType> updateEntityTypeCallable()
Updates the parameters of a single EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateEntityTypeRequest request = UpdateEntityTypeRequest.newBuilder() .setEntityType(EntityType.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<EntityType> future = featurestoreServiceClient.updateEntityTypeCallable().futureCall(request); // Do something. EntityType response = future.get(); }
-
deleteEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteEntityTypeAsync(EntityTypeName name)
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName name = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); featurestoreServiceClient.deleteEntityTypeAsync(name).get(); }
- Parameters:
name
- Required. The name of the EntityType to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteEntityTypeAsync(String name)
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); featurestoreServiceClient.deleteEntityTypeAsync(name).get(); }
- Parameters:
name
- Required. The name of the EntityType to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteEntityTypeAsync(EntityTypeName name, boolean force)
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName name = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); boolean force = true; featurestoreServiceClient.deleteEntityTypeAsync(name, force).get(); }
- Parameters:
name
- Required. The name of the EntityType to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`force
- If set to true, any Features for this EntityType will also be deleted. (Otherwise, the request will only work if the EntityType has no Features.)- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteEntityTypeAsync(String name, boolean force)
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); boolean force = true; featurestoreServiceClient.deleteEntityTypeAsync(name, force).get(); }
- Parameters:
name
- Required. The name of the EntityType to be deleted. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`force
- If set to true, any Features for this EntityType will also be deleted. (Otherwise, the request will only work if the EntityType has no Features.)- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityTypeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteEntityTypeAsync(DeleteEntityTypeRequest request)
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder() .setName( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setForce(true) .build(); featurestoreServiceClient.deleteEntityTypeAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEntityTypeOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteEntityTypeRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteEntityTypeOperationCallable()
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder() .setName( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setForce(true) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = featurestoreServiceClient.deleteEntityTypeOperationCallable().futureCall(request); // Do something. future.get(); }
-
deleteEntityTypeCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteEntityTypeRequest,com.google.longrunning.Operation> deleteEntityTypeCallable()
Deletes a single EntityType. The EntityType must not have any Features or `force` must be set to true for the request to succeed.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder() .setName( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setForce(true) .build(); ApiFuture<Operation> future = featurestoreServiceClient.deleteEntityTypeCallable().futureCall(request); // Do something. future.get(); }
-
createFeatureAsync
public final com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(EntityTypeName parent, Feature feature)
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); Feature feature = Feature.newBuilder().build(); Feature response = featurestoreServiceClient.createFeatureAsync(parent, feature).get(); }
- Parameters:
parent
- Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`feature
- Required. The Feature to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeatureAsync
public final com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(String parent, Feature feature)
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); Feature feature = Feature.newBuilder().build(); Feature response = featurestoreServiceClient.createFeatureAsync(parent, feature).get(); }
- Parameters:
parent
- Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`feature
- Required. The Feature to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeatureAsync
public final com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(EntityTypeName parent, Feature feature, String featureId)
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); Feature feature = Feature.newBuilder().build(); String featureId = "featureId-420503887"; Feature response = featurestoreServiceClient.createFeatureAsync(parent, feature, featureId).get(); }
- Parameters:
parent
- Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`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.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeatureAsync
public final com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(String parent, Feature feature, String featureId)
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); Feature feature = Feature.newBuilder().build(); String featureId = "featureId-420503887"; Feature response = featurestoreServiceClient.createFeatureAsync(parent, feature, featureId).get(); }
- Parameters:
parent
- Required. The resource name of the EntityType to create a Feature. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`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.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeatureAsync
public final com.google.api.gax.longrunning.OperationFuture<Feature,CreateFeatureOperationMetadata> createFeatureAsync(CreateFeatureRequest request)
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { CreateFeatureRequest request = CreateFeatureRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setFeature(Feature.newBuilder().build()) .setFeatureId("featureId-420503887") .build(); Feature response = featurestoreServiceClient.createFeatureAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createFeatureOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateFeatureRequest,Feature,CreateFeatureOperationMetadata> createFeatureOperationCallable()
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.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 = featurestoreServiceClient.createFeatureOperationCallable().futureCall(request); // Do something. Feature response = future.get(); }
-
createFeatureCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateFeatureRequest,com.google.longrunning.Operation> createFeatureCallable()
Creates a new Feature in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.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 = featurestoreServiceClient.createFeatureCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
batchCreateFeaturesAsync
public final com.google.api.gax.longrunning.OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(EntityTypeName parent, List<CreateFeatureRequest> requests)
Creates a batch of Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); List<CreateFeatureRequest> requests = new ArrayList<>(); BatchCreateFeaturesResponse response = featurestoreServiceClient.batchCreateFeaturesAsync(parent, requests).get(); }
- Parameters:
parent
- Required. The resource name of the EntityType to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`requests
- Required. The request message specifying the Features to create. All Features must be created under the same parent EntityType. 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:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
batchCreateFeaturesAsync
public final com.google.api.gax.longrunning.OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(String parent, List<CreateFeatureRequest> requests)
Creates a batch of Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); List<CreateFeatureRequest> requests = new ArrayList<>(); BatchCreateFeaturesResponse response = featurestoreServiceClient.batchCreateFeaturesAsync(parent, requests).get(); }
- Parameters:
parent
- Required. The resource name of the EntityType to create the batch of Features under. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`requests
- Required. The request message specifying the Features to create. All Features must be created under the same parent EntityType. 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:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
batchCreateFeaturesAsync
public final com.google.api.gax.longrunning.OperationFuture<BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesAsync(BatchCreateFeaturesRequest request)
Creates a batch of Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { BatchCreateFeaturesRequest request = BatchCreateFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .addAllRequests(new ArrayList<CreateFeatureRequest>()) .build(); BatchCreateFeaturesResponse response = featurestoreServiceClient.batchCreateFeaturesAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
batchCreateFeaturesOperationCallable
public final com.google.api.gax.rpc.OperationCallable<BatchCreateFeaturesRequest,BatchCreateFeaturesResponse,BatchCreateFeaturesOperationMetadata> batchCreateFeaturesOperationCallable()
Creates a batch of Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { BatchCreateFeaturesRequest request = BatchCreateFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .addAllRequests(new ArrayList<CreateFeatureRequest>()) .build(); OperationFuture<BatchCreateFeaturesResponse, BatchCreateFeaturesOperationMetadata> future = featurestoreServiceClient.batchCreateFeaturesOperationCallable().futureCall(request); // Do something. BatchCreateFeaturesResponse response = future.get(); }
-
batchCreateFeaturesCallable
public final com.google.api.gax.rpc.UnaryCallable<BatchCreateFeaturesRequest,com.google.longrunning.Operation> batchCreateFeaturesCallable()
Creates a batch of Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { BatchCreateFeaturesRequest request = BatchCreateFeaturesRequest.newBuilder() .setParent( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .addAllRequests(new ArrayList<CreateFeatureRequest>()) .build(); ApiFuture<Operation> future = featurestoreServiceClient.batchCreateFeaturesCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
getFeature
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); Feature response = featurestoreServiceClient.getFeature(name); }
- Parameters:
name
- Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getFeature
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString(); Feature response = featurestoreServiceClient.getFeature(name); }
- Parameters:
name
- Required. The name of the Feature resource. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getFeature
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetFeatureRequest request = GetFeatureRequest.newBuilder() .setName( FeatureName.of( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); Feature response = featurestoreServiceClient.getFeature(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getFeatureCallable
public final com.google.api.gax.rpc.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetFeatureRequest request = GetFeatureRequest.newBuilder() .setName( FeatureName.of( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); ApiFuture<Feature> future = featurestoreServiceClient.getFeatureCallable().futureCall(request); // Do something. Feature response = future.get(); }
-
listFeatures
public final FeaturestoreServiceClient.ListFeaturesPagedResponse listFeatures(EntityTypeName parent)
Lists Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); for (Feature element : featurestoreServiceClient.listFeatures(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listFeatures
public final FeaturestoreServiceClient.ListFeaturesPagedResponse listFeatures(String parent)
Lists Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String parent = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); for (Feature element : featurestoreServiceClient.listFeatures(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The resource name of the Location to list Features. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listFeatures
public final FeaturestoreServiceClient.ListFeaturesPagedResponse listFeatures(ListFeaturesRequest request)
Lists Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.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 : featurestoreServiceClient.listFeatures(request).iterateAll()) { // doThingsWith(element); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listFeaturesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListFeaturesRequest,FeaturestoreServiceClient.ListFeaturesPagedResponse> listFeaturesPagedCallable()
Lists Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.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 = featurestoreServiceClient.listFeaturesPagedCallable().futureCall(request); // Do something. for (Feature element : future.get().iterateAll()) { // doThingsWith(element); } }
-
listFeaturesCallable
public final com.google.api.gax.rpc.UnaryCallable<ListFeaturesRequest,ListFeaturesResponse> listFeaturesCallable()
Lists Features in a given EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.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 = featurestoreServiceClient.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; } } }
-
updateFeature
public final Feature updateFeature(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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { Feature feature = Feature.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Feature response = featurestoreServiceClient.updateFeature(feature, updateMask); }
- 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}`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`
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateFeature
public final Feature updateFeature(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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateFeatureRequest request = UpdateFeatureRequest.newBuilder() .setFeature(Feature.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Feature response = featurestoreServiceClient.updateFeature(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateFeatureCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateFeatureRequest,Feature> 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { UpdateFeatureRequest request = UpdateFeatureRequest.newBuilder() .setFeature(Feature.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Feature> future = featurestoreServiceClient.updateFeatureCallable().futureCall(request); // Do something. Feature response = future.get(); }
-
deleteFeatureAsync
public final com.google.api.gax.longrunning.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]"); featurestoreServiceClient.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}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeatureAsync
public final com.google.api.gax.longrunning.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString(); featurestoreServiceClient.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}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeatureAsync
public final com.google.api.gax.longrunning.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( FeatureName.of( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); featurestoreServiceClient.deleteFeatureAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeatureOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteFeatureRequest,com.google.protobuf.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( FeatureName.of( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = featurestoreServiceClient.deleteFeatureOperationCallable().futureCall(request); // Do something. future.get(); }
-
deleteFeatureCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteFeatureRequest,com.google.longrunning.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeatureRequest request = DeleteFeatureRequest.newBuilder() .setName( FeatureName.of( "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]") .toString()) .build(); ApiFuture<Operation> future = featurestoreServiceClient.deleteFeatureCallable().futureCall(request); // Do something. future.get(); }
-
importFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata> importFeatureValuesAsync(EntityTypeName entityType)
Imports Feature values into the Featurestore from a source storage.The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done.
If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done.
There are also scenarios where the caller can cause inconsistency.
- Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName entityType = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); ImportFeatureValuesResponse response = featurestoreServiceClient.importFeatureValuesAsync(entityType).get(); }
- Parameters:
entityType
- Required. The resource name of the EntityType grouping the Features for which values are being imported. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
importFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata> importFeatureValuesAsync(String entityType)
Imports Feature values into the Featurestore from a source storage.The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done.
If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done.
There are also scenarios where the caller can cause inconsistency.
- Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String entityType = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); ImportFeatureValuesResponse response = featurestoreServiceClient.importFeatureValuesAsync(entityType).get(); }
- Parameters:
entityType
- Required. The resource name of the EntityType grouping the Features for which values are being imported. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
importFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata> importFeatureValuesAsync(ImportFeatureValuesRequest request)
Imports Feature values into the Featurestore from a source storage.The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done.
If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done.
There are also scenarios where the caller can cause inconsistency.
- Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ImportFeatureValuesRequest request = ImportFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setEntityIdField("entityIdField512670524") .addAllFeatureSpecs(new ArrayList<ImportFeatureValuesRequest.FeatureSpec>()) .setDisableOnlineServing(true) .setWorkerCount(372044046) .setDisableIngestionAnalysis(true) .build(); ImportFeatureValuesResponse response = featurestoreServiceClient.importFeatureValuesAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
importFeatureValuesOperationCallable
public final com.google.api.gax.rpc.OperationCallable<ImportFeatureValuesRequest,ImportFeatureValuesResponse,ImportFeatureValuesOperationMetadata> importFeatureValuesOperationCallable()
Imports Feature values into the Featurestore from a source storage.The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done.
If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done.
There are also scenarios where the caller can cause inconsistency.
- Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ImportFeatureValuesRequest request = ImportFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setEntityIdField("entityIdField512670524") .addAllFeatureSpecs(new ArrayList<ImportFeatureValuesRequest.FeatureSpec>()) .setDisableOnlineServing(true) .setWorkerCount(372044046) .setDisableIngestionAnalysis(true) .build(); OperationFuture<ImportFeatureValuesResponse, ImportFeatureValuesOperationMetadata> future = featurestoreServiceClient.importFeatureValuesOperationCallable().futureCall(request); // Do something. ImportFeatureValuesResponse response = future.get(); }
-
importFeatureValuesCallable
public final com.google.api.gax.rpc.UnaryCallable<ImportFeatureValuesRequest,com.google.longrunning.Operation> importFeatureValuesCallable()
Imports Feature values into the Featurestore from a source storage.The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done.
If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done.
There are also scenarios where the caller can cause inconsistency.
- Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ImportFeatureValuesRequest request = ImportFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setEntityIdField("entityIdField512670524") .addAllFeatureSpecs(new ArrayList<ImportFeatureValuesRequest.FeatureSpec>()) .setDisableOnlineServing(true) .setWorkerCount(372044046) .setDisableIngestionAnalysis(true) .build(); ApiFuture<Operation> future = featurestoreServiceClient.importFeatureValuesCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
batchReadFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata> batchReadFeatureValuesAsync(FeaturestoreName featurestore)
Batch reads Feature values from a Featurestore.This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { FeaturestoreName featurestore = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); BatchReadFeatureValuesResponse response = featurestoreServiceClient.batchReadFeatureValuesAsync(featurestore).get(); }
- Parameters:
featurestore
- Required. The resource name of the Featurestore from which to query Feature values. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
batchReadFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata> batchReadFeatureValuesAsync(String featurestore)
Batch reads Feature values from a Featurestore.This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String featurestore = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString(); BatchReadFeatureValuesResponse response = featurestoreServiceClient.batchReadFeatureValuesAsync(featurestore).get(); }
- Parameters:
featurestore
- Required. The resource name of the Featurestore from which to query Feature values. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
batchReadFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata> batchReadFeatureValuesAsync(BatchReadFeatureValuesRequest request)
Batch reads Feature values from a Featurestore.This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { BatchReadFeatureValuesRequest request = BatchReadFeatureValuesRequest.newBuilder() .setFeaturestore( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setDestination(FeatureValueDestination.newBuilder().build()) .addAllPassThroughFields( new ArrayList<BatchReadFeatureValuesRequest.PassThroughField>()) .addAllEntityTypeSpecs(new ArrayList<BatchReadFeatureValuesRequest.EntityTypeSpec>()) .setStartTime(Timestamp.newBuilder().build()) .build(); BatchReadFeatureValuesResponse response = featurestoreServiceClient.batchReadFeatureValuesAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
batchReadFeatureValuesOperationCallable
public final com.google.api.gax.rpc.OperationCallable<BatchReadFeatureValuesRequest,BatchReadFeatureValuesResponse,BatchReadFeatureValuesOperationMetadata> batchReadFeatureValuesOperationCallable()
Batch reads Feature values from a Featurestore.This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { BatchReadFeatureValuesRequest request = BatchReadFeatureValuesRequest.newBuilder() .setFeaturestore( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setDestination(FeatureValueDestination.newBuilder().build()) .addAllPassThroughFields( new ArrayList<BatchReadFeatureValuesRequest.PassThroughField>()) .addAllEntityTypeSpecs(new ArrayList<BatchReadFeatureValuesRequest.EntityTypeSpec>()) .setStartTime(Timestamp.newBuilder().build()) .build(); OperationFuture<BatchReadFeatureValuesResponse, BatchReadFeatureValuesOperationMetadata> future = featurestoreServiceClient .batchReadFeatureValuesOperationCallable() .futureCall(request); // Do something. BatchReadFeatureValuesResponse response = future.get(); }
-
batchReadFeatureValuesCallable
public final com.google.api.gax.rpc.UnaryCallable<BatchReadFeatureValuesRequest,com.google.longrunning.Operation> batchReadFeatureValuesCallable()
Batch reads Feature values from a Featurestore.This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { BatchReadFeatureValuesRequest request = BatchReadFeatureValuesRequest.newBuilder() .setFeaturestore( FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString()) .setDestination(FeatureValueDestination.newBuilder().build()) .addAllPassThroughFields( new ArrayList<BatchReadFeatureValuesRequest.PassThroughField>()) .addAllEntityTypeSpecs(new ArrayList<BatchReadFeatureValuesRequest.EntityTypeSpec>()) .setStartTime(Timestamp.newBuilder().build()) .build(); ApiFuture<Operation> future = featurestoreServiceClient.batchReadFeatureValuesCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
exportFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata> exportFeatureValuesAsync(EntityTypeName entityType)
Exports Feature values from all the entities of a target EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName entityType = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); ExportFeatureValuesResponse response = featurestoreServiceClient.exportFeatureValuesAsync(entityType).get(); }
- Parameters:
entityType
- Required. The resource name of the EntityType from which to export Feature values. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
exportFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata> exportFeatureValuesAsync(String entityType)
Exports Feature values from all the entities of a target EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String entityType = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); ExportFeatureValuesResponse response = featurestoreServiceClient.exportFeatureValuesAsync(entityType).get(); }
- Parameters:
entityType
- Required. The resource name of the EntityType from which to export Feature values. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
exportFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata> exportFeatureValuesAsync(ExportFeatureValuesRequest request)
Exports Feature values from all the entities of a target EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ExportFeatureValuesRequest request = ExportFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setDestination(FeatureValueDestination.newBuilder().build()) .setFeatureSelector(FeatureSelector.newBuilder().build()) .addAllSettings(new ArrayList<DestinationFeatureSetting>()) .build(); ExportFeatureValuesResponse response = featurestoreServiceClient.exportFeatureValuesAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
exportFeatureValuesOperationCallable
public final com.google.api.gax.rpc.OperationCallable<ExportFeatureValuesRequest,ExportFeatureValuesResponse,ExportFeatureValuesOperationMetadata> exportFeatureValuesOperationCallable()
Exports Feature values from all the entities of a target EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ExportFeatureValuesRequest request = ExportFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setDestination(FeatureValueDestination.newBuilder().build()) .setFeatureSelector(FeatureSelector.newBuilder().build()) .addAllSettings(new ArrayList<DestinationFeatureSetting>()) .build(); OperationFuture<ExportFeatureValuesResponse, ExportFeatureValuesOperationMetadata> future = featurestoreServiceClient.exportFeatureValuesOperationCallable().futureCall(request); // Do something. ExportFeatureValuesResponse response = future.get(); }
-
exportFeatureValuesCallable
public final com.google.api.gax.rpc.UnaryCallable<ExportFeatureValuesRequest,com.google.longrunning.Operation> exportFeatureValuesCallable()
Exports Feature values from all the entities of a target EntityType.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ExportFeatureValuesRequest request = ExportFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .setDestination(FeatureValueDestination.newBuilder().build()) .setFeatureSelector(FeatureSelector.newBuilder().build()) .addAllSettings(new ArrayList<DestinationFeatureSetting>()) .build(); ApiFuture<Operation> future = featurestoreServiceClient.exportFeatureValuesCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
deleteFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata> deleteFeatureValuesAsync(EntityTypeName entityType)
Delete Feature values from Featurestore.The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done.
If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { EntityTypeName entityType = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); DeleteFeatureValuesResponse response = featurestoreServiceClient.deleteFeatureValuesAsync(entityType).get(); }
- Parameters:
entityType
- Required. The resource name of the EntityType grouping the Features for which values are being deleted from. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata> deleteFeatureValuesAsync(String entityType)
Delete Feature values from Featurestore.The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done.
If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String entityType = EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString(); DeleteFeatureValuesResponse response = featurestoreServiceClient.deleteFeatureValuesAsync(entityType).get(); }
- Parameters:
entityType
- Required. The resource name of the EntityType grouping the Features for which values are being deleted from. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeatureValuesAsync
public final com.google.api.gax.longrunning.OperationFuture<DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata> deleteFeatureValuesAsync(DeleteFeatureValuesRequest request)
Delete Feature values from Featurestore.The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done.
If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeatureValuesRequest request = DeleteFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .build(); DeleteFeatureValuesResponse response = featurestoreServiceClient.deleteFeatureValuesAsync(request).get(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteFeatureValuesOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteFeatureValuesRequest,DeleteFeatureValuesResponse,DeleteFeatureValuesOperationMetadata> deleteFeatureValuesOperationCallable()
Delete Feature values from Featurestore.The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done.
If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeatureValuesRequest request = DeleteFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .build(); OperationFuture<DeleteFeatureValuesResponse, DeleteFeatureValuesOperationMetadata> future = featurestoreServiceClient.deleteFeatureValuesOperationCallable().futureCall(request); // Do something. DeleteFeatureValuesResponse response = future.get(); }
-
deleteFeatureValuesCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteFeatureValuesRequest,com.google.longrunning.Operation> deleteFeatureValuesCallable()
Delete Feature values from Featurestore.The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done.
If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { DeleteFeatureValuesRequest request = DeleteFeatureValuesRequest.newBuilder() .setEntityType( EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") .toString()) .build(); ApiFuture<Operation> future = featurestoreServiceClient.deleteFeatureValuesCallable().futureCall(request); // Do something. Operation response = future.get(); }
-
searchFeatures
public final FeaturestoreServiceClient.SearchFeaturesPagedResponse searchFeatures(LocationName location)
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); for (Feature element : featurestoreServiceClient.searchFeatures(location).iterateAll()) { // doThingsWith(element); } }
- Parameters:
location
- Required. The resource name of the Location to search Features. Format: `projects/{project}/locations/{location}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchFeatures
public final FeaturestoreServiceClient.SearchFeaturesPagedResponse searchFeatures(String location)
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String location = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Feature element : featurestoreServiceClient.searchFeatures(location).iterateAll()) { // doThingsWith(element); } }
- Parameters:
location
- Required. The resource name of the Location to search Features. Format: `projects/{project}/locations/{location}`- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchFeatures
public final FeaturestoreServiceClient.SearchFeaturesPagedResponse searchFeatures(LocationName location, String query)
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); String query = "query107944136"; for (Feature element : featurestoreServiceClient.searchFeatures(location, query).iterateAll()) { // doThingsWith(element); } }
- Parameters:
location
- Required. The resource name of the Location to search Features. Format: `projects/{project}/locations/{location}`query
- Query string that is a conjunction of field-restricted queries and/or field-restricted filters. Field-restricted queries and filters can be combined using `AND` to form a conjunction.A field query is in the form FIELD:QUERY. This implicitly checks if QUERY exists as a substring within Feature's FIELD. The QUERY and the FIELD are converted to a sequence of words (i.e. tokens) for comparison. This is done by:
* Removing leading/trailing whitespace and tokenizing the search value. Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated as a wildcard that matches characters within a token. * Ignoring case. * Prepending an asterisk to the first and appending an asterisk to the last token in QUERY.
A QUERY must be either a singular token or a phrase. A phrase is one or multiple words enclosed in double quotation marks ("). With phrases, the order of the words is important. Words in the phrase must be matching in order and consecutively.
Supported FIELDs for field-restricted queries:
- `feature_id`
- `description`
- `entity_type_id`
Examples:
- `feature_id: foo` --> Matches a Feature with ID containing the substring `foo` (eg. `foo`, `foofeature`, `barfoo`).
- `feature_id: foo*feature` --> Matches a Feature with ID containing the substring `foo*feature` (eg. `foobarfeature`).
- `feature_id: foo AND description: bar` --> Matches a Feature with ID containing the substring `foo` and description containing the substring `bar`.
Besides field queries, the following exact-match filters are supported. The exact-match filters do not support wildcards. Unlike field-restricted queries, exact-match filters are case-sensitive.
- `feature_id`: Supports = comparisons.
- `description`: Supports = comparisons. Multi-token filters should be enclosed in quotes.
- `entity_type_id`: Supports = comparisons.
- `value_type`: Supports = and != comparisons.
- `labels`: Supports key-value equality as well as key presence.
- `featurestore_id`: Supports = comparisons.
Examples:
- `description = "foo bar"` --> Any Feature with description exactly equal to `foo bar`
- `value_type = DOUBLE` --> Features whose type is DOUBLE.
- `labels.active = yes AND labels.env = prod` --> Features having both (active: yes) and (env: prod) labels.
- `labels.env: *` --> Any Feature which has a label with `env` as the key.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchFeatures
public final FeaturestoreServiceClient.SearchFeaturesPagedResponse searchFeatures(String location, String query)
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { String location = LocationName.of("[PROJECT]", "[LOCATION]").toString(); String query = "query107944136"; for (Feature element : featurestoreServiceClient.searchFeatures(location, query).iterateAll()) { // doThingsWith(element); } }
- Parameters:
location
- Required. The resource name of the Location to search Features. Format: `projects/{project}/locations/{location}`query
- Query string that is a conjunction of field-restricted queries and/or field-restricted filters. Field-restricted queries and filters can be combined using `AND` to form a conjunction.A field query is in the form FIELD:QUERY. This implicitly checks if QUERY exists as a substring within Feature's FIELD. The QUERY and the FIELD are converted to a sequence of words (i.e. tokens) for comparison. This is done by:
* Removing leading/trailing whitespace and tokenizing the search value. Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated as a wildcard that matches characters within a token. * Ignoring case. * Prepending an asterisk to the first and appending an asterisk to the last token in QUERY.
A QUERY must be either a singular token or a phrase. A phrase is one or multiple words enclosed in double quotation marks ("). With phrases, the order of the words is important. Words in the phrase must be matching in order and consecutively.
Supported FIELDs for field-restricted queries:
- `feature_id`
- `description`
- `entity_type_id`
Examples:
- `feature_id: foo` --> Matches a Feature with ID containing the substring `foo` (eg. `foo`, `foofeature`, `barfoo`).
- `feature_id: foo*feature` --> Matches a Feature with ID containing the substring `foo*feature` (eg. `foobarfeature`).
- `feature_id: foo AND description: bar` --> Matches a Feature with ID containing the substring `foo` and description containing the substring `bar`.
Besides field queries, the following exact-match filters are supported. The exact-match filters do not support wildcards. Unlike field-restricted queries, exact-match filters are case-sensitive.
- `feature_id`: Supports = comparisons.
- `description`: Supports = comparisons. Multi-token filters should be enclosed in quotes.
- `entity_type_id`: Supports = comparisons.
- `value_type`: Supports = and != comparisons.
- `labels`: Supports key-value equality as well as key presence.
- `featurestore_id`: Supports = comparisons.
Examples:
- `description = "foo bar"` --> Any Feature with description exactly equal to `foo bar`
- `value_type = DOUBLE` --> Features whose type is DOUBLE.
- `labels.active = yes AND labels.env = prod` --> Features having both (active: yes) and (env: prod) labels.
- `labels.env: *` --> Any Feature which has a label with `env` as the key.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchFeatures
public final FeaturestoreServiceClient.SearchFeaturesPagedResponse searchFeatures(SearchFeaturesRequest request)
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { SearchFeaturesRequest request = SearchFeaturesRequest.newBuilder() .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Feature element : featurestoreServiceClient.searchFeatures(request).iterateAll()) { // doThingsWith(element); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
searchFeaturesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<SearchFeaturesRequest,FeaturestoreServiceClient.SearchFeaturesPagedResponse> searchFeaturesPagedCallable()
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { SearchFeaturesRequest request = SearchFeaturesRequest.newBuilder() .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Feature> future = featurestoreServiceClient.searchFeaturesPagedCallable().futureCall(request); // Do something. for (Feature element : future.get().iterateAll()) { // doThingsWith(element); } }
-
searchFeaturesCallable
public final com.google.api.gax.rpc.UnaryCallable<SearchFeaturesRequest,SearchFeaturesResponse> searchFeaturesCallable()
Searches Features matching a query in a given project.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { SearchFeaturesRequest request = SearchFeaturesRequest.newBuilder() .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setQuery("query107944136") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { SearchFeaturesResponse response = featurestoreServiceClient.searchFeaturesCallable().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; } } }
-
listLocations
public final FeaturestoreServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : featurestoreServiceClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLocationsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,FeaturestoreServiceClient.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = featurestoreServiceClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } }
-
listLocationsCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = featurestoreServiceClient.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
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = featurestoreServiceClient.getLocation(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getLocationCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = featurestoreServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); }
-
setIamPolicy
public final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = featurestoreServiceClient.setIamPolicy(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
setIamPolicyCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> 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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = featurestoreServiceClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); }
-
getIamPolicy
public final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = featurestoreServiceClient.getIamPolicy(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getIamPolicyCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = featurestoreServiceClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); }
-
testIamPermissions
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = featurestoreServiceClient.testIamPermissions(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
testIamPermissionsCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.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 (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = featurestoreServiceClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); }
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfacecom.google.api.gax.core.BackgroundResource
- Throws:
InterruptedException
-
-