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: + * + *
{@code + * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create()) { + * EntityTypeName entityType = + * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + * ReadFeatureValuesResponse response = + * featurestoreOnlineServingServiceClient.readFeatureValues(entityType); + * } + * }+ * + *
Note: close() needs to be called on the FeaturestoreOnlineServingServiceClient 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: + * + *
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 + * FeaturestoreOnlineServingServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
{@code + * FeaturestoreOnlineServingServiceSettings featurestoreOnlineServingServiceSettings = + * FeaturestoreOnlineServingServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create(featurestoreOnlineServingServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * FeaturestoreOnlineServingServiceSettings featurestoreOnlineServingServiceSettings = + * FeaturestoreOnlineServingServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create(featurestoreOnlineServingServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class FeaturestoreOnlineServingServiceClient implements BackgroundResource { + private final FeaturestoreOnlineServingServiceSettings settings; + private final FeaturestoreOnlineServingServiceStub stub; + + /** Constructs an instance of FeaturestoreOnlineServingServiceClient with default settings. */ + public static final FeaturestoreOnlineServingServiceClient create() throws IOException { + return create(FeaturestoreOnlineServingServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of FeaturestoreOnlineServingServiceClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final FeaturestoreOnlineServingServiceClient create( + FeaturestoreOnlineServingServiceSettings settings) throws IOException { + return new FeaturestoreOnlineServingServiceClient(settings); + } + + /** + * Constructs an instance of FeaturestoreOnlineServingServiceClient, using the given stub for + * making calls. This is for advanced usage - prefer using + * create(FeaturestoreOnlineServingServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final FeaturestoreOnlineServingServiceClient create( + FeaturestoreOnlineServingServiceStub stub) { + return new FeaturestoreOnlineServingServiceClient(stub); + } + + /** + * Constructs an instance of FeaturestoreOnlineServingServiceClient, 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. + */ + protected FeaturestoreOnlineServingServiceClient( + FeaturestoreOnlineServingServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = + ((FeaturestoreOnlineServingServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected FeaturestoreOnlineServingServiceClient(FeaturestoreOnlineServingServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final FeaturestoreOnlineServingServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public FeaturestoreOnlineServingServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads Feature values of a specific entity of an EntityType. For reading feature values of + * multiple entities of an EntityType, please use StreamingReadFeatureValues. + * + *
Sample code: + * + *
{@code + * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create()) { + * EntityTypeName entityType = + * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); + * ReadFeatureValuesResponse response = + * featurestoreOnlineServingServiceClient.readFeatureValues(entityType); + * } + * }+ * + * @param entityType Required. The resource name of the EntityType for the entity being read. + * Value format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`. + * For example, for a machine learning model predicting user clicks on a website, an + * EntityType ID could be `user`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReadFeatureValuesResponse readFeatureValues(EntityTypeName entityType) { + ReadFeatureValuesRequest request = + ReadFeatureValuesRequest.newBuilder() + .setEntityType(entityType == null ? null : entityType.toString()) + .build(); + return readFeatureValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads Feature values of a specific entity of an EntityType. For reading feature values of + * multiple entities of an EntityType, please use StreamingReadFeatureValues. + * + *
Sample code: + * + *
{@code + * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create()) { + * String entityType = + * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + * .toString(); + * ReadFeatureValuesResponse response = + * featurestoreOnlineServingServiceClient.readFeatureValues(entityType); + * } + * }+ * + * @param entityType Required. The resource name of the EntityType for the entity being read. + * Value format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`. + * For example, for a machine learning model predicting user clicks on a website, an + * EntityType ID could be `user`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReadFeatureValuesResponse readFeatureValues(String entityType) { + ReadFeatureValuesRequest request = + ReadFeatureValuesRequest.newBuilder().setEntityType(entityType).build(); + return readFeatureValues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads Feature values of a specific entity of an EntityType. For reading feature values of + * multiple entities of an EntityType, please use StreamingReadFeatureValues. + * + *
Sample code: + * + *
{@code + * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create()) { + * ReadFeatureValuesRequest request = + * ReadFeatureValuesRequest.newBuilder() + * .setEntityType( + * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + * .toString()) + * .setEntityId("entityId-2102099874") + * .setFeatureSelector(FeatureSelector.newBuilder().build()) + * .build(); + * ReadFeatureValuesResponse response = + * featurestoreOnlineServingServiceClient.readFeatureValues(request); + * } + * }+ * + * @param 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 + */ + public final ReadFeatureValuesResponse readFeatureValues(ReadFeatureValuesRequest request) { + return readFeatureValuesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads Feature values of a specific entity of an EntityType. For reading feature values of + * multiple entities of an EntityType, please use StreamingReadFeatureValues. + * + *
Sample code: + * + *
{@code + * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create()) { + * ReadFeatureValuesRequest request = + * ReadFeatureValuesRequest.newBuilder() + * .setEntityType( + * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + * .toString()) + * .setEntityId("entityId-2102099874") + * .setFeatureSelector(FeatureSelector.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * featurestoreOnlineServingServiceClient.readFeatureValuesCallable().futureCall(request); + * // Do something. + * ReadFeatureValuesResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = + * FeaturestoreOnlineServingServiceClient.create()) { + * StreamingReadFeatureValuesRequest request = + * StreamingReadFeatureValuesRequest.newBuilder() + * .setEntityType( + * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + * .toString()) + * .addAllEntityIds(new ArrayList+ */ + public final ServerStreamingCallable()) + * .setFeatureSelector(FeatureSelector.newBuilder().build()) + * .build(); + * ServerStream stream = + * featurestoreOnlineServingServiceClient.streamingReadFeatureValuesCallable().call(request); + * for (ReadFeatureValuesResponse response : stream) { + * // Do something when a response is received. + * } + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of readFeatureValues to 30 seconds: + * + *
{@code + * FeaturestoreOnlineServingServiceSettings.Builder + * featurestoreOnlineServingServiceSettingsBuilder = + * FeaturestoreOnlineServingServiceSettings.newBuilder(); + * featurestoreOnlineServingServiceSettingsBuilder + * .readFeatureValuesSettings() + * .setRetrySettings( + * featurestoreOnlineServingServiceSettingsBuilder + * .readFeatureValuesSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * FeaturestoreOnlineServingServiceSettings featurestoreOnlineServingServiceSettings = + * featurestoreOnlineServingServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class FeaturestoreOnlineServingServiceSettings + extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class FeaturestoreServiceClient implements BackgroundResource {
+ private final FeaturestoreServiceSettings settings;
+ private final FeaturestoreServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of FeaturestoreServiceClient with default settings. */
+ public static final FeaturestoreServiceClient create() throws IOException {
+ return create(FeaturestoreServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * 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.
+ */
+ public static final FeaturestoreServiceClient create(FeaturestoreServiceSettings settings)
+ throws IOException {
+ return new FeaturestoreServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of FeaturestoreServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(FeaturestoreServiceSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final FeaturestoreServiceClient create(FeaturestoreServiceStub stub) {
+ return new FeaturestoreServiceClient(stub);
+ }
+
+ /**
+ * 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.
+ */
+ protected FeaturestoreServiceClient(FeaturestoreServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((FeaturestoreServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected FeaturestoreServiceClient(FeaturestoreServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final FeaturestoreServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public FeaturestoreServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new Featurestore in a given project and location.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Updatable fields:
+ * * `labels` * `online_serving_config.fixed_node_count`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Updatable fields:
+ * * `description` * `labels` * `monitoring_config.snapshot_analysis.disabled`
+ * * `monitoring_config.snapshot_analysis.monitoring_interval`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntityType updateEntityType(EntityType entityType, FieldMask updateMask) {
+ UpdateEntityTypeRequest request =
+ UpdateEntityTypeRequest.newBuilder()
+ .setEntityType(entityType)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateEntityType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single EntityType.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Updatable fields:
+ * * `description` * `labels` * `monitoring_config.snapshot_analysis.disabled`
+ * * `monitoring_config.snapshot_analysis.monitoring_interval`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Feature updateFeature(Feature feature, FieldMask updateMask) {
+ UpdateFeatureRequest request =
+ UpdateFeatureRequest.newBuilder().setFeature(feature).setUpdateMask(updateMask).build();
+ return updateFeature(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single Feature.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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 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 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 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 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 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:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ * Examples:
+ * 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.
+ * Examples:
+ * Sample code:
+ *
+ * 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:
+ * Examples:
+ * 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.
+ * Examples:
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getFeaturestore to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the MetadataServiceClient 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:
+ *
+ * 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 MetadataServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class MetadataServiceClient implements BackgroundResource {
+ private final MetadataServiceSettings settings;
+ private final MetadataServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of MetadataServiceClient with default settings. */
+ public static final MetadataServiceClient create() throws IOException {
+ return create(MetadataServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of MetadataServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final MetadataServiceClient create(MetadataServiceSettings settings)
+ throws IOException {
+ return new MetadataServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of MetadataServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(MetadataServiceSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final MetadataServiceClient create(MetadataServiceStub stub) {
+ return new MetadataServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of MetadataServiceClient, 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.
+ */
+ protected MetadataServiceClient(MetadataServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((MetadataServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected MetadataServiceClient(MetadataServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final MetadataServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public MetadataServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Initializes a MetadataStore, including allocation of resources.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @param executions The resource names of the Executions to associate with the Context.
+ * Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AddContextArtifactsAndExecutionsResponse addContextArtifactsAndExecutions(
+ ContextName context, List Sample code:
+ *
+ * Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @param executions The resource names of the Executions to associate with the Context.
+ * Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AddContextArtifactsAndExecutionsResponse addContextArtifactsAndExecutions(
+ String context, List Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @param childContexts The resource names of the child Contexts.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AddContextChildrenResponse addContextChildren(
+ ContextName context, List Sample code:
+ *
+ * Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @param childContexts The resource names of the child Contexts.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AddContextChildrenResponse addContextChildren(
+ String context, List Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of
+ * Executions, or the number of Events that would be returned for the Context exceeds 1000.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final LineageSubgraph queryContextLineageSubgraph(ContextName context) {
+ QueryContextLineageSubgraphRequest request =
+ QueryContextLineageSubgraphRequest.newBuilder()
+ .setContext(context == null ? null : context.toString())
+ .build();
+ return queryContextLineageSubgraph(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and
+ * returned as a LineageSubgraph.
+ *
+ * Sample code:
+ *
+ * The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of
+ * Executions, or the number of Events that would be returned for the Context exceeds 1000.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final LineageSubgraph queryContextLineageSubgraph(String context) {
+ QueryContextLineageSubgraphRequest request =
+ QueryContextLineageSubgraphRequest.newBuilder().setContext(context).build();
+ return queryContextLineageSubgraph(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and
+ * returned as a LineageSubgraph.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of
+ * Executions, or the number of Events that would be returned for the Context exceeds 1000.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final LineageSubgraph queryArtifactLineageSubgraph(ArtifactName artifact) {
+ QueryArtifactLineageSubgraphRequest request =
+ QueryArtifactLineageSubgraphRequest.newBuilder()
+ .setArtifact(artifact == null ? null : artifact.toString())
+ .build();
+ return queryArtifactLineageSubgraph(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by
+ * Event edges and returned as a LineageSubgraph.
+ *
+ * Sample code:
+ *
+ * The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of
+ * Executions, or the number of Events that would be returned for the Context exceeds 1000.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final LineageSubgraph queryArtifactLineageSubgraph(String artifact) {
+ QueryArtifactLineageSubgraphRequest request =
+ QueryArtifactLineageSubgraphRequest.newBuilder().setArtifact(artifact).build();
+ return queryArtifactLineageSubgraph(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by
+ * Event edges and returned as a LineageSubgraph.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * Featurestore response = featurestoreServiceClient.getFeaturestore(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * FeaturestoreServiceSettings featurestoreServiceSettings =
+ * FeaturestoreServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * FeaturestoreServiceClient featurestoreServiceClient =
+ * FeaturestoreServiceClient.create(featurestoreServiceSettings);
+ * }
+ *
+ * {@code
+ * FeaturestoreServiceSettings featurestoreServiceSettings =
+ * FeaturestoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FeaturestoreServiceClient featurestoreServiceClient =
+ * FeaturestoreServiceClient.create(featurestoreServiceSettings);
+ * }
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Featurestore featurestore = Featurestore.newBuilder().build();
+ * Featurestore response =
+ * featurestoreServiceClient.createFeaturestoreAsync(parent, featurestore).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create Featurestores. Format:
+ * `projects/{project}/locations/{location}'`
+ * @param featurestore Required. The Featurestore to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString();
+ * Featurestore featurestore = Featurestore.newBuilder().build();
+ * Featurestore response =
+ * featurestoreServiceClient.createFeaturestoreAsync(parent, featurestore).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create Featurestores. Format:
+ * `projects/{project}/locations/{location}'`
+ * @param featurestore Required. The Featurestore to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * CreateFeaturestoreRequest request =
+ * CreateFeaturestoreRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setFeaturestore(Featurestore.newBuilder().build())
+ * .setFeaturestoreId("featurestoreId-1315851738")
+ * .build();
+ * Featurestore response = featurestoreServiceClient.createFeaturestoreAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * CreateFeaturestoreRequest request =
+ * CreateFeaturestoreRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setFeaturestore(Featurestore.newBuilder().build())
+ * .setFeaturestoreId("featurestoreId-1315851738")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CreateFeaturestoreRequest, Featurestore, CreateFeaturestoreOperationMetadata>
+ createFeaturestoreOperationCallable() {
+ return stub.createFeaturestoreOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new Featurestore in a given project and location.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * CreateFeaturestoreRequest request =
+ * CreateFeaturestoreRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setFeaturestore(Featurestore.newBuilder().build())
+ * .setFeaturestoreId("featurestoreId-1315851738")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * Featurestore response = featurestoreServiceClient.getFeaturestore(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Featurestore resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Featurestore getFeaturestore(FeaturestoreName name) {
+ GetFeaturestoreRequest request =
+ GetFeaturestoreRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getFeaturestore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString();
+ * Featurestore response = featurestoreServiceClient.getFeaturestore(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Featurestore resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Featurestore getFeaturestore(String name) {
+ GetFeaturestoreRequest request = GetFeaturestoreRequest.newBuilder().setName(name).build();
+ return getFeaturestore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * GetFeaturestoreRequest request =
+ * GetFeaturestoreRequest.newBuilder()
+ * .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .build();
+ * Featurestore response = featurestoreServiceClient.getFeaturestore(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Featurestore getFeaturestore(GetFeaturestoreRequest request) {
+ return getFeaturestoreCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * GetFeaturestoreRequest request =
+ * GetFeaturestoreRequest.newBuilder()
+ * .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Featurestore element :
+ * featurestoreServiceClient.listFeaturestores(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListFeaturestoresPagedResponse listFeaturestores(LocationName parent) {
+ ListFeaturestoresRequest request =
+ ListFeaturestoresRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listFeaturestores(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Featurestores in a given project and location.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString();
+ * for (Featurestore element :
+ * featurestoreServiceClient.listFeaturestores(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListFeaturestoresPagedResponse listFeaturestores(String parent) {
+ ListFeaturestoresRequest request =
+ ListFeaturestoresRequest.newBuilder().setParent(parent).build();
+ return listFeaturestores(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Featurestores in a given project and location.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListFeaturestoresRequest request =
+ * ListFeaturestoresRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").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);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListFeaturestoresPagedResponse listFeaturestores(ListFeaturestoresRequest request) {
+ return listFeaturestoresPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Featurestores in a given project and location.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListFeaturestoresRequest request =
+ * ListFeaturestoresRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListFeaturestoresRequest request =
+ * ListFeaturestoresRequest.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) {
+ * ListFeaturestoresResponse response =
+ * featurestoreServiceClient.listFeaturestoresCallable().call(request);
+ * for (Featurestore element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * Featurestore featurestore = Featurestore.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Featurestore response =
+ * featurestoreServiceClient.updateFeaturestoreAsync(featurestore, updateMask).get();
+ * }
+ * }
+ *
+ * @param featurestore Required. The Featurestore's `name` field is used to identify the
+ * Featurestore to be updated. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}`
+ * @param 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.
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateFeaturestoreRequest request =
+ * UpdateFeaturestoreRequest.newBuilder()
+ * .setFeaturestore(Featurestore.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Featurestore response = featurestoreServiceClient.updateFeaturestoreAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateFeaturestoreRequest request =
+ * UpdateFeaturestoreRequest.newBuilder()
+ * .setFeaturestore(Featurestore.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ UpdateFeaturestoreRequest, Featurestore, UpdateFeaturestoreOperationMetadata>
+ updateFeaturestoreOperationCallable() {
+ return stub.updateFeaturestoreOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateFeaturestoreRequest request =
+ * UpdateFeaturestoreRequest.newBuilder()
+ * .setFeaturestore(Featurestore.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * featurestoreServiceClient.deleteFeaturestoreAsync(name).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString();
+ * featurestoreServiceClient.deleteFeaturestoreAsync(name).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * boolean force = true;
+ * featurestoreServiceClient.deleteFeaturestoreAsync(name, force).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Featurestore to be deleted. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}`
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString();
+ * boolean force = true;
+ * featurestoreServiceClient.deleteFeaturestoreAsync(name, force).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Featurestore to be deleted. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}`
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteFeaturestoreRequest request =
+ * DeleteFeaturestoreRequest.newBuilder()
+ * .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setForce(true)
+ * .build();
+ * featurestoreServiceClient.deleteFeaturestoreAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteFeaturestoreRequest request =
+ * DeleteFeaturestoreRequest.newBuilder()
+ * .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteFeaturestoreRequest request =
+ * DeleteFeaturestoreRequest.newBuilder()
+ * .setName(FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * EntityType entityType = EntityType.newBuilder().build();
+ * EntityType response =
+ * featurestoreServiceClient.createEntityTypeAsync(parent, entityType).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Featurestore to create EntityTypes. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}`
+ * @param entityType The EntityType to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * 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();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Featurestore to create EntityTypes. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}`
+ * @param entityType The EntityType to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * 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();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * CreateEntityTypeRequest request =
+ * CreateEntityTypeRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setEntityType(EntityType.newBuilder().build())
+ * .setEntityTypeId("entityTypeId767740856")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CreateEntityTypeRequest, EntityType, CreateEntityTypeOperationMetadata>
+ createEntityTypeOperationCallable() {
+ return stub.createEntityTypeOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new EntityType in a given Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * CreateEntityTypeRequest request =
+ * CreateEntityTypeRequest.newBuilder()
+ * .setParent(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setEntityType(EntityType.newBuilder().build())
+ * .setEntityTypeId("entityTypeId767740856")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName name =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * EntityType response = featurestoreServiceClient.getEntityType(name);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final EntityType getEntityType(EntityTypeName name) {
+ GetEntityTypeRequest request =
+ GetEntityTypeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEntityType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * EntityType response = featurestoreServiceClient.getEntityType(name);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final EntityType getEntityType(String name) {
+ GetEntityTypeRequest request = GetEntityTypeRequest.newBuilder().setName(name).build();
+ return getEntityType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * GetEntityTypeRequest request =
+ * GetEntityTypeRequest.newBuilder()
+ * .setName(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .build();
+ * EntityType response = featurestoreServiceClient.getEntityType(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final EntityType getEntityType(GetEntityTypeRequest request) {
+ return getEntityTypeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * GetEntityTypeRequest request =
+ * GetEntityTypeRequest.newBuilder()
+ * .setName(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName parent = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * for (EntityType element : featurestoreServiceClient.listEntityTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListEntityTypesPagedResponse listEntityTypes(FeaturestoreName parent) {
+ ListEntityTypesRequest request =
+ ListEntityTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEntityTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntityTypes in a given Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String parent =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * for (EntityType element : featurestoreServiceClient.listEntityTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListEntityTypesPagedResponse listEntityTypes(String parent) {
+ ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder().setParent(parent).build();
+ return listEntityTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntityTypes in a given Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListEntityTypesRequest request =
+ * ListEntityTypesRequest.newBuilder()
+ * .setParent(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .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);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest request) {
+ return listEntityTypesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntityTypes in a given Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListEntityTypesRequest request =
+ * ListEntityTypesRequest.newBuilder()
+ * .setParent(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListEntityTypesRequest request =
+ * ListEntityTypesRequest.newBuilder()
+ * .setParent(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .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.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityType entityType = EntityType.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * EntityType response = featurestoreServiceClient.updateEntityType(entityType, updateMask);
+ * }
+ * }
+ *
+ * @param 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}`
+ * @param 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.
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateEntityTypeRequest request =
+ * UpdateEntityTypeRequest.newBuilder()
+ * .setEntityType(EntityType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * EntityType response = featurestoreServiceClient.updateEntityType(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final EntityType updateEntityType(UpdateEntityTypeRequest request) {
+ return updateEntityTypeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateEntityTypeRequest request =
+ * UpdateEntityTypeRequest.newBuilder()
+ * .setEntityType(EntityType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName name =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * featurestoreServiceClient.deleteEntityTypeAsync(name).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * featurestoreServiceClient.deleteEntityTypeAsync(name).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName name =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * boolean force = true;
+ * featurestoreServiceClient.deleteEntityTypeAsync(name, force).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the EntityType to be deleted. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * boolean force = true;
+ * featurestoreServiceClient.deleteEntityTypeAsync(name, force).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the EntityType to be deleted. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * 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();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteEntityTypeRequest request =
+ * DeleteEntityTypeRequest.newBuilder()
+ * .setName(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteEntityTypeRequest request =
+ * DeleteEntityTypeRequest.newBuilder()
+ * .setName(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * 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();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the EntityType to create a Feature. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+ * @param feature Required. The Feature to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * 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();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the EntityType to create a Feature. Format:
+ * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
+ * @param feature Required. The Feature to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * 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();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * 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
+ */
+ public final OperationCallable{@code
+ * 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
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName parent =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * List
+ *
+ * @param 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}`
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String parent =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * List
+ *
+ * @param 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}`
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * BatchCreateFeaturesRequest request =
+ * BatchCreateFeaturesRequest.newBuilder()
+ * .setParent(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .addAllRequests(new ArrayList
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * BatchCreateFeaturesRequest request =
+ * BatchCreateFeaturesRequest.newBuilder()
+ * .setParent(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .addAllRequests(new ArrayList
+ */
+ public final OperationCallable<
+ BatchCreateFeaturesRequest,
+ BatchCreateFeaturesResponse,
+ BatchCreateFeaturesOperationMetadata>
+ batchCreateFeaturesOperationCallable() {
+ return stub.batchCreateFeaturesOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a batch of Features in a given EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * BatchCreateFeaturesRequest request =
+ * BatchCreateFeaturesRequest.newBuilder()
+ * .setParent(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .addAllRequests(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeatureName name =
+ * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]");
+ * Feature response = featurestoreServiceClient.getFeature(name);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Feature getFeature(FeatureName name) {
+ GetFeatureRequest request =
+ GetFeatureRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getFeature(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Feature.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name =
+ * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString();
+ * Feature response = featurestoreServiceClient.getFeature(name);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Feature getFeature(String name) {
+ GetFeatureRequest request = GetFeatureRequest.newBuilder().setName(name).build();
+ return getFeature(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Feature.
+ *
+ * {@code
+ * 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);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Feature getFeature(GetFeatureRequest request) {
+ return getFeatureCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Feature.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * GetFeatureRequest request =
+ * GetFeatureRequest.newBuilder()
+ * .setName(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName parent =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * for (Feature element : featurestoreServiceClient.listFeatures(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListFeaturesPagedResponse listFeatures(EntityTypeName parent) {
+ ListFeaturesRequest request =
+ ListFeaturesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Features in a given EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String parent =
+ * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString();
+ * for (Feature element : featurestoreServiceClient.listFeatures(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListFeaturesPagedResponse listFeatures(String parent) {
+ ListFeaturesRequest request = ListFeaturesRequest.newBuilder().setParent(parent).build();
+ return listFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Features in a given EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListFeaturesRequest request =
+ * ListFeaturesRequest.newBuilder()
+ * .setParent(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .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);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListFeaturesPagedResponse listFeatures(ListFeaturesRequest request) {
+ return listFeaturesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Features in a given EntityType.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListFeaturesRequest request =
+ * ListFeaturesRequest.newBuilder()
+ * .setParent(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .setLatestStatsCount(-878108489)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ListFeaturesRequest request =
+ * ListFeaturesRequest.newBuilder()
+ * .setParent(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .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.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * Feature feature = Feature.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Feature response = featurestoreServiceClient.updateFeature(feature, updateMask);
+ * }
+ * }
+ *
+ * @param 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}`
+ * @param 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.
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateFeatureRequest request =
+ * UpdateFeatureRequest.newBuilder()
+ * .setFeature(Feature.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Feature response = featurestoreServiceClient.updateFeature(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Feature updateFeature(UpdateFeatureRequest request) {
+ return updateFeatureCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single Feature.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * UpdateFeatureRequest request =
+ * UpdateFeatureRequest.newBuilder()
+ * .setFeature(Feature.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeatureName name =
+ * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]");
+ * featurestoreServiceClient.deleteFeatureAsync(name).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String name =
+ * FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString();
+ * featurestoreServiceClient.deleteFeatureAsync(name).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteFeatureRequest request =
+ * DeleteFeatureRequest.newBuilder()
+ * .setName(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString())
+ * .build();
+ * featurestoreServiceClient.deleteFeatureAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteFeatureRequest request =
+ * DeleteFeatureRequest.newBuilder()
+ * .setName(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * DeleteFeatureRequest request =
+ * DeleteFeatureRequest.newBuilder()
+ * .setName(
+ * FeatureName.of(
+ * "[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]", "[FEATURE]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName entityType =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * ImportFeatureValuesResponse response =
+ * featurestoreServiceClient.importFeatureValuesAsync(entityType).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String entityType =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * ImportFeatureValuesResponse response =
+ * featurestoreServiceClient.importFeatureValuesAsync(entityType).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ImportFeatureValuesRequest request =
+ * ImportFeatureValuesRequest.newBuilder()
+ * .setEntityType(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .setEntityIdField("entityIdField512670524")
+ * .addAllFeatureSpecs(new ArrayList
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ImportFeatureValuesRequest request =
+ * ImportFeatureValuesRequest.newBuilder()
+ * .setEntityType(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .setEntityIdField("entityIdField512670524")
+ * .addAllFeatureSpecs(new ArrayList
+ */
+ public final OperationCallable<
+ ImportFeatureValuesRequest,
+ ImportFeatureValuesResponse,
+ ImportFeatureValuesOperationMetadata>
+ importFeatureValuesOperationCallable() {
+ return stub.importFeatureValuesOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports Feature values into the Featurestore from a source storage.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * ImportFeatureValuesRequest request =
+ * ImportFeatureValuesRequest.newBuilder()
+ * .setEntityType(
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString())
+ * .setEntityIdField("entityIdField512670524")
+ * .addAllFeatureSpecs(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * FeaturestoreName featurestore =
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
+ * BatchReadFeatureValuesResponse response =
+ * featurestoreServiceClient.batchReadFeatureValuesAsync(featurestore).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture<
+ BatchReadFeatureValuesResponse, BatchReadFeatureValuesOperationMetadata>
+ batchReadFeatureValuesAsync(FeaturestoreName featurestore) {
+ BatchReadFeatureValuesRequest request =
+ BatchReadFeatureValuesRequest.newBuilder()
+ .setFeaturestore(featurestore == null ? null : featurestore.toString())
+ .build();
+ return batchReadFeatureValuesAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Batch reads Feature values from a Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String featurestore =
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString();
+ * BatchReadFeatureValuesResponse response =
+ * featurestoreServiceClient.batchReadFeatureValuesAsync(featurestore).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture<
+ BatchReadFeatureValuesResponse, BatchReadFeatureValuesOperationMetadata>
+ batchReadFeatureValuesAsync(String featurestore) {
+ BatchReadFeatureValuesRequest request =
+ BatchReadFeatureValuesRequest.newBuilder().setFeaturestore(featurestore).build();
+ return batchReadFeatureValuesAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Batch reads Feature values from a Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * BatchReadFeatureValuesRequest request =
+ * BatchReadFeatureValuesRequest.newBuilder()
+ * .setFeaturestore(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setDestination(FeatureValueDestination.newBuilder().build())
+ * .addAllPassThroughFields(
+ * new ArrayList
+ *
+ * @param 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
+ */
+ public final OperationFuture<
+ BatchReadFeatureValuesResponse, BatchReadFeatureValuesOperationMetadata>
+ batchReadFeatureValuesAsync(BatchReadFeatureValuesRequest request) {
+ return batchReadFeatureValuesOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Batch reads Feature values from a Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * BatchReadFeatureValuesRequest request =
+ * BatchReadFeatureValuesRequest.newBuilder()
+ * .setFeaturestore(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setDestination(FeatureValueDestination.newBuilder().build())
+ * .addAllPassThroughFields(
+ * new ArrayList
+ */
+ public final OperationCallable<
+ BatchReadFeatureValuesRequest,
+ BatchReadFeatureValuesResponse,
+ BatchReadFeatureValuesOperationMetadata>
+ batchReadFeatureValuesOperationCallable() {
+ return stub.batchReadFeatureValuesOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Batch reads Feature values from a Featurestore.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * BatchReadFeatureValuesRequest request =
+ * BatchReadFeatureValuesRequest.newBuilder()
+ * .setFeaturestore(
+ * FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]").toString())
+ * .setDestination(FeatureValueDestination.newBuilder().build())
+ * .addAllPassThroughFields(
+ * new ArrayList
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * EntityTypeName entityType =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
+ * ExportFeatureValuesResponse response =
+ * featurestoreServiceClient.exportFeatureValuesAsync(entityType).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String entityType =
+ * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+ * .toString();
+ * ExportFeatureValuesResponse response =
+ * featurestoreServiceClient.exportFeatureValuesAsync(entityType).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * 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
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * 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
+ */
+ public final OperationCallable<
+ ExportFeatureValuesRequest,
+ ExportFeatureValuesResponse,
+ ExportFeatureValuesOperationMetadata>
+ exportFeatureValuesOperationCallable() {
+ return stub.exportFeatureValuesOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports Feature values from all the entities of a target EntityType.
+ *
+ * {@code
+ * 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
+ */
+ public final UnaryCallable{@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Feature element : featurestoreServiceClient.searchFeatures(location).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final SearchFeaturesPagedResponse searchFeatures(LocationName location) {
+ SearchFeaturesRequest request =
+ SearchFeaturesRequest.newBuilder()
+ .setLocation(location == null ? null : location.toString())
+ .build();
+ return searchFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Features matching a query in a given project.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * String location = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Feature element : featurestoreServiceClient.searchFeatures(location).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final SearchFeaturesPagedResponse searchFeatures(String location) {
+ SearchFeaturesRequest request =
+ SearchFeaturesRequest.newBuilder().setLocation(location).build();
+ return searchFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Features matching a query in a given project.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String query = "query107944136";
+ * for (Feature element :
+ * featurestoreServiceClient.searchFeatures(location, query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param location Required. The resource name of the Location to search Features. Format:
+ * `projects/{project}/locations/{location}`
+ * @param 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.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchFeaturesPagedResponse searchFeatures(LocationName location, String query) {
+ SearchFeaturesRequest request =
+ SearchFeaturesRequest.newBuilder()
+ .setLocation(location == null ? null : location.toString())
+ .setQuery(query)
+ .build();
+ return searchFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Features matching a query in a given project.
+ *
+ * {@code
+ * 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);
+ * }
+ * }
+ * }
+ *
+ * @param location Required. The resource name of the Location to search Features. Format:
+ * `projects/{project}/locations/{location}`
+ * @param 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.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchFeaturesPagedResponse searchFeatures(String location, String query) {
+ SearchFeaturesRequest request =
+ SearchFeaturesRequest.newBuilder().setLocation(location).setQuery(query).build();
+ return searchFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Features matching a query in a given project.
+ *
+ * {@code
+ * 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);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final SearchFeaturesPagedResponse searchFeatures(SearchFeaturesRequest request) {
+ return searchFeaturesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Features matching a query in a given project.
+ *
+ * {@code
+ * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
+ * SearchFeaturesRequest request =
+ * SearchFeaturesRequest.newBuilder()
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * 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.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * FeaturestoreServiceSettings.Builder featurestoreServiceSettingsBuilder =
+ * FeaturestoreServiceSettings.newBuilder();
+ * featurestoreServiceSettingsBuilder
+ * .getFeaturestoreSettings()
+ * .setRetrySettings(
+ * featurestoreServiceSettingsBuilder
+ * .getFeaturestoreSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * FeaturestoreServiceSettings featurestoreServiceSettings =
+ * featurestoreServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class FeaturestoreServiceSettings extends ClientSettings{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * MetadataStore response = metadataServiceClient.getMetadataStore(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * MetadataServiceSettings metadataServiceSettings =
+ * MetadataServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * MetadataServiceClient metadataServiceClient =
+ * MetadataServiceClient.create(metadataServiceSettings);
+ * }
+ *
+ * {@code
+ * MetadataServiceSettings metadataServiceSettings =
+ * MetadataServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * MetadataServiceClient metadataServiceClient =
+ * MetadataServiceClient.create(metadataServiceSettings);
+ * }
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * MetadataStore metadataStore = MetadataStore.newBuilder().build();
+ * String metadataStoreId = "metadataStoreId-1811789907";
+ * MetadataStore response =
+ * metadataServiceClient
+ * .createMetadataStoreAsync(parent, metadataStore, metadataStoreId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location where the MetadataStore should be
+ * created. Format: `projects/{project}/locations/{location}/`
+ * @param metadataStore Required. The MetadataStore to create.
+ * @param metadataStoreId The {metadatastore} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided,
+ * the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in
+ * length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all MetadataStores in
+ * the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or
+ * PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * MetadataStore metadataStore = MetadataStore.newBuilder().build();
+ * String metadataStoreId = "metadataStoreId-1811789907";
+ * MetadataStore response =
+ * metadataServiceClient
+ * .createMetadataStoreAsync(parent, metadataStore, metadataStoreId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location where the MetadataStore should be
+ * created. Format: `projects/{project}/locations/{location}/`
+ * @param metadataStore Required. The MetadataStore to create.
+ * @param metadataStoreId The {metadatastore} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided,
+ * the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in
+ * length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all MetadataStores in
+ * the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or
+ * PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateMetadataStoreRequest request =
+ * CreateMetadataStoreRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setMetadataStore(MetadataStore.newBuilder().build())
+ * .setMetadataStoreId("metadataStoreId-1811789907")
+ * .build();
+ * MetadataStore response = metadataServiceClient.createMetadataStoreAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateMetadataStoreRequest request =
+ * CreateMetadataStoreRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setMetadataStore(MetadataStore.newBuilder().build())
+ * .setMetadataStoreId("metadataStoreId-1811789907")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CreateMetadataStoreRequest, MetadataStore, CreateMetadataStoreOperationMetadata>
+ createMetadataStoreOperationCallable() {
+ return stub.createMetadataStoreOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Initializes a MetadataStore, including allocation of resources.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateMetadataStoreRequest request =
+ * CreateMetadataStoreRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setMetadataStore(MetadataStore.newBuilder().build())
+ * .setMetadataStoreId("metadataStoreId-1811789907")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * MetadataStore response = metadataServiceClient.getMetadataStore(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MetadataStore to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataStore getMetadataStore(MetadataStoreName name) {
+ GetMetadataStoreRequest request =
+ GetMetadataStoreRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getMetadataStore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
+ * MetadataStore response = metadataServiceClient.getMetadataStore(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MetadataStore to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataStore getMetadataStore(String name) {
+ GetMetadataStoreRequest request = GetMetadataStoreRequest.newBuilder().setName(name).build();
+ return getMetadataStore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetMetadataStoreRequest request =
+ * GetMetadataStoreRequest.newBuilder()
+ * .setName(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .build();
+ * MetadataStore response = metadataServiceClient.getMetadataStore(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final MetadataStore getMetadataStore(GetMetadataStoreRequest request) {
+ return getMetadataStoreCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetMetadataStoreRequest request =
+ * GetMetadataStoreRequest.newBuilder()
+ * .setName(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (MetadataStore element : metadataServiceClient.listMetadataStores(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The Location whose MetadataStores should be listed. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMetadataStoresPagedResponse listMetadataStores(LocationName parent) {
+ ListMetadataStoresRequest request =
+ ListMetadataStoresRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMetadataStores(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MetadataStores for a Location.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (MetadataStore element : metadataServiceClient.listMetadataStores(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The Location whose MetadataStores should be listed. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMetadataStoresPagedResponse listMetadataStores(String parent) {
+ ListMetadataStoresRequest request =
+ ListMetadataStoresRequest.newBuilder().setParent(parent).build();
+ return listMetadataStores(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MetadataStores for a Location.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListMetadataStoresRequest request =
+ * ListMetadataStoresRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (MetadataStore element : metadataServiceClient.listMetadataStores(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListMetadataStoresPagedResponse listMetadataStores(
+ ListMetadataStoresRequest request) {
+ return listMetadataStoresPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MetadataStores for a Location.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListMetadataStoresRequest request =
+ * ListMetadataStoresRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListMetadataStoresRequest request =
+ * ListMetadataStoresRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListMetadataStoresResponse response =
+ * metadataServiceClient.listMetadataStoresCallable().call(request);
+ * for (MetadataStore element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * metadataServiceClient.deleteMetadataStoreAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MetadataStore to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
+ * metadataServiceClient.deleteMetadataStoreAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MetadataStore to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteMetadataStoreRequest request =
+ * DeleteMetadataStoreRequest.newBuilder()
+ * .setName(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setForce(true)
+ * .build();
+ * metadataServiceClient.deleteMetadataStoreAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteMetadataStoreRequest request =
+ * DeleteMetadataStoreRequest.newBuilder()
+ * .setName(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ DeleteMetadataStoreRequest, Empty, DeleteMetadataStoreOperationMetadata>
+ deleteMetadataStoreOperationCallable() {
+ return stub.deleteMetadataStoreOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and
+ * Contexts).
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteMetadataStoreRequest request =
+ * DeleteMetadataStoreRequest.newBuilder()
+ * .setName(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * Artifact artifact = Artifact.newBuilder().build();
+ * String artifactId = "artifactId240640653";
+ * Artifact response = metadataServiceClient.createArtifact(parent, artifact, artifactId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the Artifact should be
+ * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param artifact Required. The Artifact to create.
+ * @param artifactId The {artifact} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * If not provided, the Artifact's ID will be a UUID generated by the service. Must be 4-128
+ * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * Artifacts in the parent MetadataStore. (Otherwise the request will fail with
+ * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Artifact.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Artifact createArtifact(
+ MetadataStoreName parent, Artifact artifact, String artifactId) {
+ CreateArtifactRequest request =
+ CreateArtifactRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setArtifact(artifact)
+ .setArtifactId(artifactId)
+ .build();
+ return createArtifact(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Artifact associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
+ * Artifact artifact = Artifact.newBuilder().build();
+ * String artifactId = "artifactId240640653";
+ * Artifact response = metadataServiceClient.createArtifact(parent, artifact, artifactId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the Artifact should be
+ * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param artifact Required. The Artifact to create.
+ * @param artifactId The {artifact} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * If not provided, the Artifact's ID will be a UUID generated by the service. Must be 4-128
+ * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * Artifacts in the parent MetadataStore. (Otherwise the request will fail with
+ * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Artifact.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Artifact createArtifact(String parent, Artifact artifact, String artifactId) {
+ CreateArtifactRequest request =
+ CreateArtifactRequest.newBuilder()
+ .setParent(parent)
+ .setArtifact(artifact)
+ .setArtifactId(artifactId)
+ .build();
+ return createArtifact(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Artifact associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateArtifactRequest request =
+ * CreateArtifactRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setArtifact(Artifact.newBuilder().build())
+ * .setArtifactId("artifactId240640653")
+ * .build();
+ * Artifact response = metadataServiceClient.createArtifact(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Artifact createArtifact(CreateArtifactRequest request) {
+ return createArtifactCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Artifact associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateArtifactRequest request =
+ * CreateArtifactRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setArtifact(Artifact.newBuilder().build())
+ * .setArtifactId("artifactId240640653")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ArtifactName name =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]");
+ * Artifact response = metadataServiceClient.getArtifact(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Artifact to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Artifact getArtifact(ArtifactName name) {
+ GetArtifactRequest request =
+ GetArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getArtifact(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Artifact.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
+ * Artifact response = metadataServiceClient.getArtifact(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Artifact to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Artifact getArtifact(String name) {
+ GetArtifactRequest request = GetArtifactRequest.newBuilder().setName(name).build();
+ return getArtifact(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Artifact.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetArtifactRequest request =
+ * GetArtifactRequest.newBuilder()
+ * .setName(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .build();
+ * Artifact response = metadataServiceClient.getArtifact(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Artifact getArtifact(GetArtifactRequest request) {
+ return getArtifactCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Artifact.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetArtifactRequest request =
+ * GetArtifactRequest.newBuilder()
+ * .setName(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * for (Artifact element : metadataServiceClient.listArtifacts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose Artifacts should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListArtifactsPagedResponse listArtifacts(MetadataStoreName parent) {
+ ListArtifactsRequest request =
+ ListArtifactsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listArtifacts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Artifacts in the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
+ * for (Artifact element : metadataServiceClient.listArtifacts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose Artifacts should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListArtifactsPagedResponse listArtifacts(String parent) {
+ ListArtifactsRequest request = ListArtifactsRequest.newBuilder().setParent(parent).build();
+ return listArtifacts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Artifacts in the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListArtifactsRequest request =
+ * ListArtifactsRequest.newBuilder()
+ * .setParent(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Artifact element : metadataServiceClient.listArtifacts(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListArtifactsPagedResponse listArtifacts(ListArtifactsRequest request) {
+ return listArtifactsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Artifacts in the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListArtifactsRequest request =
+ * ListArtifactsRequest.newBuilder()
+ * .setParent(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListArtifactsRequest request =
+ * ListArtifactsRequest.newBuilder()
+ * .setParent(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListArtifactsResponse response =
+ * metadataServiceClient.listArtifactsCallable().call(request);
+ * for (Artifact element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * Artifact artifact = Artifact.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Artifact response = metadataServiceClient.updateArtifact(artifact, updateMask);
+ * }
+ * }
+ *
+ * @param artifact Required. The Artifact containing updates. The Artifact's
+ * [Artifact.name][google.cloud.aiplatform.v1.Artifact.name] field is used to identify the
+ * Artifact to be updated. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @param updateMask Required. A FieldMask indicating which fields should be updated.
+ * Functionality of this field is not yet supported.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Artifact updateArtifact(Artifact artifact, FieldMask updateMask) {
+ UpdateArtifactRequest request =
+ UpdateArtifactRequest.newBuilder().setArtifact(artifact).setUpdateMask(updateMask).build();
+ return updateArtifact(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a stored Artifact.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateArtifactRequest request =
+ * UpdateArtifactRequest.newBuilder()
+ * .setArtifact(Artifact.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * Artifact response = metadataServiceClient.updateArtifact(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Artifact updateArtifact(UpdateArtifactRequest request) {
+ return updateArtifactCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a stored Artifact.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateArtifactRequest request =
+ * UpdateArtifactRequest.newBuilder()
+ * .setArtifact(Artifact.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ArtifactName name =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]");
+ * metadataServiceClient.deleteArtifactAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Artifact to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
+ * metadataServiceClient.deleteArtifactAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Artifact to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteArtifactRequest request =
+ * DeleteArtifactRequest.newBuilder()
+ * .setName(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * metadataServiceClient.deleteArtifactAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteArtifactRequest request =
+ * DeleteArtifactRequest.newBuilder()
+ * .setName(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteArtifactRequest request =
+ * DeleteArtifactRequest.newBuilder()
+ * .setName(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * PurgeArtifactsResponse response = metadataServiceClient.purgeArtifactsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The metadata store to purge Artifacts from. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
+ * PurgeArtifactsResponse response = metadataServiceClient.purgeArtifactsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The metadata store to purge Artifacts from. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeArtifactsRequest request =
+ * PurgeArtifactsRequest.newBuilder()
+ * .setParent(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * PurgeArtifactsResponse response = metadataServiceClient.purgeArtifactsAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeArtifactsRequest request =
+ * PurgeArtifactsRequest.newBuilder()
+ * .setParent(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ PurgeArtifactsRequest, PurgeArtifactsResponse, PurgeArtifactsMetadata>
+ purgeArtifactsOperationCallable() {
+ return stub.purgeArtifactsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Purges Artifacts.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeArtifactsRequest request =
+ * PurgeArtifactsRequest.newBuilder()
+ * .setParent(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * Context context = Context.newBuilder().build();
+ * String contextId = "contextId-406810838";
+ * Context response = metadataServiceClient.createContext(parent, context, contextId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the Context should be
+ * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param context Required. The Context to create.
+ * @param contextId The {context} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`.
+ * If not provided, the Context's ID will be a UUID generated by the service. Must be 4-128
+ * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * Contexts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS,
+ * or PERMISSION_DENIED if the caller can't view the preexisting Context.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Context createContext(MetadataStoreName parent, Context context, String contextId) {
+ CreateContextRequest request =
+ CreateContextRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setContext(context)
+ .setContextId(contextId)
+ .build();
+ return createContext(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Context associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
+ * Context context = Context.newBuilder().build();
+ * String contextId = "contextId-406810838";
+ * Context response = metadataServiceClient.createContext(parent, context, contextId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the Context should be
+ * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param context Required. The Context to create.
+ * @param contextId The {context} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`.
+ * If not provided, the Context's ID will be a UUID generated by the service. Must be 4-128
+ * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * Contexts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS,
+ * or PERMISSION_DENIED if the caller can't view the preexisting Context.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Context createContext(String parent, Context context, String contextId) {
+ CreateContextRequest request =
+ CreateContextRequest.newBuilder()
+ .setParent(parent)
+ .setContext(context)
+ .setContextId(contextId)
+ .build();
+ return createContext(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Context associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateContextRequest request =
+ * CreateContextRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setContext(Context.newBuilder().build())
+ * .setContextId("contextId-406810838")
+ * .build();
+ * Context response = metadataServiceClient.createContext(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Context createContext(CreateContextRequest request) {
+ return createContextCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Context associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateContextRequest request =
+ * CreateContextRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setContext(Context.newBuilder().build())
+ * .setContextId("contextId-406810838")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ContextName name = ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
+ * Context response = metadataServiceClient.getContext(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Context to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Context getContext(ContextName name) {
+ GetContextRequest request =
+ GetContextRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getContext(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Context.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * Context response = metadataServiceClient.getContext(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Context to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Context getContext(String name) {
+ GetContextRequest request = GetContextRequest.newBuilder().setName(name).build();
+ return getContext(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Context.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetContextRequest request =
+ * GetContextRequest.newBuilder()
+ * .setName(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .build();
+ * Context response = metadataServiceClient.getContext(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Context getContext(GetContextRequest request) {
+ return getContextCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Context.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetContextRequest request =
+ * GetContextRequest.newBuilder()
+ * .setName(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * for (Context element : metadataServiceClient.listContexts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose Contexts should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListContextsPagedResponse listContexts(MetadataStoreName parent) {
+ ListContextsRequest request =
+ ListContextsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listContexts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Contexts on the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * for (Context element : metadataServiceClient.listContexts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose Contexts should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListContextsPagedResponse listContexts(String parent) {
+ ListContextsRequest request = ListContextsRequest.newBuilder().setParent(parent).build();
+ return listContexts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Contexts on the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListContextsRequest request =
+ * ListContextsRequest.newBuilder()
+ * .setParent(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Context element : metadataServiceClient.listContexts(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListContextsPagedResponse listContexts(ListContextsRequest request) {
+ return listContextsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Contexts on the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListContextsRequest request =
+ * ListContextsRequest.newBuilder()
+ * .setParent(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListContextsRequest request =
+ * ListContextsRequest.newBuilder()
+ * .setParent(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListContextsResponse response = metadataServiceClient.listContextsCallable().call(request);
+ * for (Context element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * Context context = Context.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Context response = metadataServiceClient.updateContext(context, updateMask);
+ * }
+ * }
+ *
+ * @param context Required. The Context containing updates. The Context's
+ * [Context.name][google.cloud.aiplatform.v1.Context.name] field is used to identify the
+ * Context to be updated. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @param updateMask Required. A FieldMask indicating which fields should be updated.
+ * Functionality of this field is not yet supported.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Context updateContext(Context context, FieldMask updateMask) {
+ UpdateContextRequest request =
+ UpdateContextRequest.newBuilder().setContext(context).setUpdateMask(updateMask).build();
+ return updateContext(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a stored Context.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateContextRequest request =
+ * UpdateContextRequest.newBuilder()
+ * .setContext(Context.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * Context response = metadataServiceClient.updateContext(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Context updateContext(UpdateContextRequest request) {
+ return updateContextCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a stored Context.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateContextRequest request =
+ * UpdateContextRequest.newBuilder()
+ * .setContext(Context.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ContextName name = ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
+ * metadataServiceClient.deleteContextAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Context to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * metadataServiceClient.deleteContextAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Context to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteContextRequest request =
+ * DeleteContextRequest.newBuilder()
+ * .setName(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setForce(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * metadataServiceClient.deleteContextAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteContextRequest request =
+ * DeleteContextRequest.newBuilder()
+ * .setName(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setForce(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteContextRequest request =
+ * DeleteContextRequest.newBuilder()
+ * .setName(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setForce(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * PurgeContextsResponse response = metadataServiceClient.purgeContextsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The metadata store to purge Contexts from. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * PurgeContextsResponse response = metadataServiceClient.purgeContextsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The metadata store to purge Contexts from. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeContextsRequest request =
+ * PurgeContextsRequest.newBuilder()
+ * .setParent(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * PurgeContextsResponse response = metadataServiceClient.purgeContextsAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeContextsRequest request =
+ * PurgeContextsRequest.newBuilder()
+ * .setParent(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeContextsRequest request =
+ * PurgeContextsRequest.newBuilder()
+ * .setParent(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ContextName context =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
+ * List
+ *
+ * @param context Required. The resource name of the Context that the Artifacts and Executions
+ * belong to. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @param artifacts The resource names of the Artifacts to attribute to the Context.
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String context =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * List
+ *
+ * @param context Required. The resource name of the Context that the Artifacts and Executions
+ * belong to. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * @param artifacts The resource names of the Artifacts to attribute to the Context.
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * AddContextArtifactsAndExecutionsRequest request =
+ * AddContextArtifactsAndExecutionsRequest.newBuilder()
+ * .setContext(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .addAllArtifacts(new ArrayList
+ *
+ * @param 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
+ */
+ public final AddContextArtifactsAndExecutionsResponse addContextArtifactsAndExecutions(
+ AddContextArtifactsAndExecutionsRequest request) {
+ return addContextArtifactsAndExecutionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have
+ * already been added to a Context, they are simply skipped.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * AddContextArtifactsAndExecutionsRequest request =
+ * AddContextArtifactsAndExecutionsRequest.newBuilder()
+ * .setContext(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .addAllArtifacts(new ArrayList
+ */
+ public final UnaryCallable<
+ AddContextArtifactsAndExecutionsRequest, AddContextArtifactsAndExecutionsResponse>
+ addContextArtifactsAndExecutionsCallable() {
+ return stub.addContextArtifactsAndExecutionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a set of Contexts as children to a parent Context. If any of the child Contexts have
+ * already been added to the parent Context, they are simply skipped. If this call would create a
+ * cycle or cause any Context to have more than 10 parents, the request will fail with an
+ * INVALID_ARGUMENT error.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ContextName context =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
+ * List
+ *
+ * @param context Required. The resource name of the parent Context.
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String context =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * List
+ *
+ * @param context Required. The resource name of the parent Context.
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * AddContextChildrenRequest request =
+ * AddContextChildrenRequest.newBuilder()
+ * .setContext(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .addAllChildContexts(new ArrayList
+ *
+ * @param 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
+ */
+ public final AddContextChildrenResponse addContextChildren(AddContextChildrenRequest request) {
+ return addContextChildrenCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a set of Contexts as children to a parent Context. If any of the child Contexts have
+ * already been added to the parent Context, they are simply skipped. If this call would create a
+ * cycle or cause any Context to have more than 10 parents, the request will fail with an
+ * INVALID_ARGUMENT error.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * AddContextChildrenRequest request =
+ * AddContextChildrenRequest.newBuilder()
+ * .setContext(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .addAllChildContexts(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ContextName context =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
+ * LineageSubgraph response = metadataServiceClient.queryContextLineageSubgraph(context);
+ * }
+ * }
+ *
+ * @param context Required. The resource name of the Context whose Artifacts and Executions should
+ * be retrieved as a LineageSubgraph. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String context =
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
+ * LineageSubgraph response = metadataServiceClient.queryContextLineageSubgraph(context);
+ * }
+ * }
+ *
+ * @param context Required. The resource name of the Context whose Artifacts and Executions should
+ * be retrieved as a LineageSubgraph. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * QueryContextLineageSubgraphRequest request =
+ * QueryContextLineageSubgraphRequest.newBuilder()
+ * .setContext(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .build();
+ * LineageSubgraph response = metadataServiceClient.queryContextLineageSubgraph(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final LineageSubgraph queryContextLineageSubgraph(
+ QueryContextLineageSubgraphRequest request) {
+ return queryContextLineageSubgraphCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and
+ * returned as a LineageSubgraph.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * QueryContextLineageSubgraphRequest request =
+ * QueryContextLineageSubgraphRequest.newBuilder()
+ * .setContext(
+ * ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * Execution execution = Execution.newBuilder().build();
+ * String executionId = "executionId-454906285";
+ * Execution response = metadataServiceClient.createExecution(parent, execution, executionId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the Execution should be
+ * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param execution Required. The Execution to create.
+ * @param executionId The {execution} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * If not provided, the Execution's ID will be a UUID generated by the service. Must be 4-128
+ * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * Executions in the parent MetadataStore. (Otherwise the request will fail with
+ * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Execution.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution createExecution(
+ MetadataStoreName parent, Execution execution, String executionId) {
+ CreateExecutionRequest request =
+ CreateExecutionRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setExecution(execution)
+ .setExecutionId(executionId)
+ .build();
+ return createExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Execution associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
+ * Execution execution = Execution.newBuilder().build();
+ * String executionId = "executionId-454906285";
+ * Execution response = metadataServiceClient.createExecution(parent, execution, executionId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the Execution should be
+ * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param execution Required. The Execution to create.
+ * @param executionId The {execution} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * If not provided, the Execution's ID will be a UUID generated by the service. Must be 4-128
+ * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * Executions in the parent MetadataStore. (Otherwise the request will fail with
+ * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Execution.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution createExecution(String parent, Execution execution, String executionId) {
+ CreateExecutionRequest request =
+ CreateExecutionRequest.newBuilder()
+ .setParent(parent)
+ .setExecution(execution)
+ .setExecutionId(executionId)
+ .build();
+ return createExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Execution associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setExecution(Execution.newBuilder().build())
+ * .setExecutionId("executionId-454906285")
+ * .build();
+ * Execution response = metadataServiceClient.createExecution(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Execution createExecution(CreateExecutionRequest request) {
+ return createExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Execution associated with a MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setExecution(Execution.newBuilder().build())
+ * .setExecutionId("executionId-454906285")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ExecutionName name =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
+ * Execution response = metadataServiceClient.getExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Execution to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(ExecutionName name) {
+ GetExecutionRequest request =
+ GetExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Execution.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
+ * Execution response = metadataServiceClient.getExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Execution to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(String name) {
+ GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name).build();
+ return getExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Execution.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetExecutionRequest request =
+ * GetExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .build();
+ * Execution response = metadataServiceClient.getExecution(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Execution getExecution(GetExecutionRequest request) {
+ return getExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific Execution.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetExecutionRequest request =
+ * GetExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * for (Execution element : metadataServiceClient.listExecutions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose Executions should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(MetadataStoreName parent) {
+ ListExecutionsRequest request =
+ ListExecutionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listExecutions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Executions in the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
+ * for (Execution element : metadataServiceClient.listExecutions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose Executions should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(String parent) {
+ ListExecutionsRequest request = ListExecutionsRequest.newBuilder().setParent(parent).build();
+ return listExecutions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Executions in the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Execution element : metadataServiceClient.listExecutions(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request) {
+ return listExecutionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Executions in the MetadataStore.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListExecutionsResponse response =
+ * metadataServiceClient.listExecutionsCallable().call(request);
+ * for (Execution element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * Execution execution = Execution.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Execution response = metadataServiceClient.updateExecution(execution, updateMask);
+ * }
+ * }
+ *
+ * @param execution Required. The Execution containing updates. The Execution's
+ * [Execution.name][google.cloud.aiplatform.v1.Execution.name] field is used to identify the
+ * Execution to be updated. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @param updateMask Required. A FieldMask indicating which fields should be updated.
+ * Functionality of this field is not yet supported.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution updateExecution(Execution execution, FieldMask updateMask) {
+ UpdateExecutionRequest request =
+ UpdateExecutionRequest.newBuilder()
+ .setExecution(execution)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a stored Execution.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateExecutionRequest request =
+ * UpdateExecutionRequest.newBuilder()
+ * .setExecution(Execution.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * Execution response = metadataServiceClient.updateExecution(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final Execution updateExecution(UpdateExecutionRequest request) {
+ return updateExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a stored Execution.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateExecutionRequest request =
+ * UpdateExecutionRequest.newBuilder()
+ * .setExecution(Execution.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ExecutionName name =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
+ * metadataServiceClient.deleteExecutionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Execution to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
+ * metadataServiceClient.deleteExecutionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Execution to delete. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteExecutionRequest request =
+ * DeleteExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * metadataServiceClient.deleteExecutionAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteExecutionRequest request =
+ * DeleteExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteExecutionRequest request =
+ * DeleteExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * PurgeExecutionsResponse response = metadataServiceClient.purgeExecutionsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The metadata store to purge Executions from. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
+ * PurgeExecutionsResponse response = metadataServiceClient.purgeExecutionsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The metadata store to purge Executions from. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeExecutionsRequest request =
+ * PurgeExecutionsRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * PurgeExecutionsResponse response = metadataServiceClient.purgeExecutionsAsync(request).get();
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final OperationFuture{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeExecutionsRequest request =
+ * PurgeExecutionsRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ PurgeExecutionsRequest, PurgeExecutionsResponse, PurgeExecutionsMetadata>
+ purgeExecutionsOperationCallable() {
+ return stub.purgeExecutionsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Purges Executions.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PurgeExecutionsRequest request =
+ * PurgeExecutionsRequest.newBuilder()
+ * .setParent(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ExecutionName execution =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
+ * List
+ *
+ * @param execution Required. The resource name of the Execution that the Events connect Artifacts
+ * with. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @param events The Events to create and add.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AddExecutionEventsResponse addExecutionEvents(
+ ExecutionName execution, List{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String execution =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
+ * List
+ *
+ * @param execution Required. The resource name of the Execution that the Events connect Artifacts
+ * with. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @param events The Events to create and add.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AddExecutionEventsResponse addExecutionEvents(String execution, List{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * AddExecutionEventsRequest request =
+ * AddExecutionEventsRequest.newBuilder()
+ * .setExecution(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .addAllEvents(new ArrayList
+ *
+ * @param 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
+ */
+ public final AddExecutionEventsResponse addExecutionEvents(AddExecutionEventsRequest request) {
+ return addExecutionEventsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an
+ * input or output for an Execution. If an Event already exists between the Execution and the
+ * Artifact, the Event is skipped.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * AddExecutionEventsRequest request =
+ * AddExecutionEventsRequest.newBuilder()
+ * .setExecution(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .addAllEvents(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ExecutionName execution =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
+ * LineageSubgraph response = metadataServiceClient.queryExecutionInputsAndOutputs(execution);
+ * }
+ * }
+ *
+ * @param execution Required. The resource name of the Execution whose input and output Artifacts
+ * should be retrieved as a LineageSubgraph. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final LineageSubgraph queryExecutionInputsAndOutputs(ExecutionName execution) {
+ QueryExecutionInputsAndOutputsRequest request =
+ QueryExecutionInputsAndOutputsRequest.newBuilder()
+ .setExecution(execution == null ? null : execution.toString())
+ .build();
+ return queryExecutionInputsAndOutputs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Obtains the set of input and output Artifacts for this Execution, in the form of
+ * LineageSubgraph that also contains the Execution and connecting Events.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String execution =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
+ * LineageSubgraph response = metadataServiceClient.queryExecutionInputsAndOutputs(execution);
+ * }
+ * }
+ *
+ * @param execution Required. The resource name of the Execution whose input and output Artifacts
+ * should be retrieved as a LineageSubgraph. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final LineageSubgraph queryExecutionInputsAndOutputs(String execution) {
+ QueryExecutionInputsAndOutputsRequest request =
+ QueryExecutionInputsAndOutputsRequest.newBuilder().setExecution(execution).build();
+ return queryExecutionInputsAndOutputs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Obtains the set of input and output Artifacts for this Execution, in the form of
+ * LineageSubgraph that also contains the Execution and connecting Events.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * QueryExecutionInputsAndOutputsRequest request =
+ * QueryExecutionInputsAndOutputsRequest.newBuilder()
+ * .setExecution(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .build();
+ * LineageSubgraph response = metadataServiceClient.queryExecutionInputsAndOutputs(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final LineageSubgraph queryExecutionInputsAndOutputs(
+ QueryExecutionInputsAndOutputsRequest request) {
+ return queryExecutionInputsAndOutputsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Obtains the set of input and output Artifacts for this Execution, in the form of
+ * LineageSubgraph that also contains the Execution and connecting Events.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * QueryExecutionInputsAndOutputsRequest request =
+ * QueryExecutionInputsAndOutputsRequest.newBuilder()
+ * .setExecution(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * MetadataSchema metadataSchema = MetadataSchema.newBuilder().build();
+ * String metadataSchemaId = "metadataSchemaId1549245163";
+ * MetadataSchema response =
+ * metadataServiceClient.createMetadataSchema(parent, metadataSchema, metadataSchemaId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the MetadataSchema should
+ * be created. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param metadataSchema Required. The MetadataSchema to create.
+ * @param metadataSchemaId The {metadata_schema} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
+ * If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be
+ * 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * MetadataSchemas in the parent Location. (Otherwise the request will fail with
+ * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting
+ * MetadataSchema.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataSchema createMetadataSchema(
+ MetadataStoreName parent, MetadataSchema metadataSchema, String metadataSchemaId) {
+ CreateMetadataSchemaRequest request =
+ CreateMetadataSchemaRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setMetadataSchema(metadataSchema)
+ .setMetadataSchemaId(metadataSchemaId)
+ .build();
+ return createMetadataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MetadataSchema.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
+ * MetadataSchema metadataSchema = MetadataSchema.newBuilder().build();
+ * String metadataSchemaId = "metadataSchemaId1549245163";
+ * MetadataSchema response =
+ * metadataServiceClient.createMetadataSchema(parent, metadataSchema, metadataSchemaId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the MetadataStore where the MetadataSchema should
+ * be created. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @param metadataSchema Required. The MetadataSchema to create.
+ * @param metadataSchemaId The {metadata_schema} portion of the resource name with the format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
+ * If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be
+ * 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all
+ * MetadataSchemas in the parent Location. (Otherwise the request will fail with
+ * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting
+ * MetadataSchema.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataSchema createMetadataSchema(
+ String parent, MetadataSchema metadataSchema, String metadataSchemaId) {
+ CreateMetadataSchemaRequest request =
+ CreateMetadataSchemaRequest.newBuilder()
+ .setParent(parent)
+ .setMetadataSchema(metadataSchema)
+ .setMetadataSchemaId(metadataSchemaId)
+ .build();
+ return createMetadataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MetadataSchema.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateMetadataSchemaRequest request =
+ * CreateMetadataSchemaRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setMetadataSchema(MetadataSchema.newBuilder().build())
+ * .setMetadataSchemaId("metadataSchemaId1549245163")
+ * .build();
+ * MetadataSchema response = metadataServiceClient.createMetadataSchema(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final MetadataSchema createMetadataSchema(CreateMetadataSchemaRequest request) {
+ return createMetadataSchemaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MetadataSchema.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateMetadataSchemaRequest request =
+ * CreateMetadataSchemaRequest.newBuilder()
+ * .setParent(
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
+ * .setMetadataSchema(MetadataSchema.newBuilder().build())
+ * .setMetadataSchemaId("metadataSchemaId1549245163")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataSchemaName name =
+ * MetadataSchemaName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]");
+ * MetadataSchema response = metadataServiceClient.getMetadataSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MetadataSchema to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataSchema getMetadataSchema(MetadataSchemaName name) {
+ GetMetadataSchemaRequest request =
+ GetMetadataSchemaRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getMetadataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific MetadataSchema.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * MetadataSchemaName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString();
+ * MetadataSchema response = metadataServiceClient.getMetadataSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MetadataSchema to retrieve. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataSchema getMetadataSchema(String name) {
+ GetMetadataSchemaRequest request = GetMetadataSchemaRequest.newBuilder().setName(name).build();
+ return getMetadataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific MetadataSchema.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetMetadataSchemaRequest request =
+ * GetMetadataSchemaRequest.newBuilder()
+ * .setName(
+ * MetadataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString())
+ * .build();
+ * MetadataSchema response = metadataServiceClient.getMetadataSchema(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final MetadataSchema getMetadataSchema(GetMetadataSchemaRequest request) {
+ return getMetadataSchemaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a specific MetadataSchema.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetMetadataSchemaRequest request =
+ * GetMetadataSchemaRequest.newBuilder()
+ * .setName(
+ * MetadataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * MetadataStoreName parent =
+ * MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
+ * for (MetadataSchema element :
+ * metadataServiceClient.listMetadataSchemas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose MetadataSchemas should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMetadataSchemasPagedResponse listMetadataSchemas(MetadataStoreName parent) {
+ ListMetadataSchemasRequest request =
+ ListMetadataSchemasRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMetadataSchemas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MetadataSchemas.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * MetadataSchemaName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString();
+ * for (MetadataSchema element :
+ * metadataServiceClient.listMetadataSchemas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The MetadataStore whose MetadataSchemas should be listed. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMetadataSchemasPagedResponse listMetadataSchemas(String parent) {
+ ListMetadataSchemasRequest request =
+ ListMetadataSchemasRequest.newBuilder().setParent(parent).build();
+ return listMetadataSchemas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MetadataSchemas.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListMetadataSchemasRequest request =
+ * ListMetadataSchemasRequest.newBuilder()
+ * .setParent(
+ * MetadataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (MetadataSchema element :
+ * metadataServiceClient.listMetadataSchemas(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final ListMetadataSchemasPagedResponse listMetadataSchemas(
+ ListMetadataSchemasRequest request) {
+ return listMetadataSchemasPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MetadataSchemas.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListMetadataSchemasRequest request =
+ * ListMetadataSchemasRequest.newBuilder()
+ * .setParent(
+ * MetadataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListMetadataSchemasRequest request =
+ * ListMetadataSchemasRequest.newBuilder()
+ * .setParent(
+ * MetadataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListMetadataSchemasResponse response =
+ * metadataServiceClient.listMetadataSchemasCallable().call(request);
+ * for (MetadataSchema element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ArtifactName artifact =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]");
+ * LineageSubgraph response = metadataServiceClient.queryArtifactLineageSubgraph(artifact);
+ * }
+ * }
+ *
+ * @param artifact Required. The resource name of the Artifact whose Lineage needs to be retrieved
+ * as a LineageSubgraph. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String artifact =
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
+ * LineageSubgraph response = metadataServiceClient.queryArtifactLineageSubgraph(artifact);
+ * }
+ * }
+ *
+ * @param artifact Required. The resource name of the Artifact whose Lineage needs to be retrieved
+ * as a LineageSubgraph. Format:
+ * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * QueryArtifactLineageSubgraphRequest request =
+ * QueryArtifactLineageSubgraphRequest.newBuilder()
+ * .setArtifact(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setMaxHops(407750469)
+ * .setFilter("filter-1274492040")
+ * .build();
+ * LineageSubgraph response = metadataServiceClient.queryArtifactLineageSubgraph(request);
+ * }
+ * }
+ *
+ * @param 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
+ */
+ public final LineageSubgraph queryArtifactLineageSubgraph(
+ QueryArtifactLineageSubgraphRequest request) {
+ return queryArtifactLineageSubgraphCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by
+ * Event edges and returned as a LineageSubgraph.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * QueryArtifactLineageSubgraphRequest request =
+ * QueryArtifactLineageSubgraphRequest.newBuilder()
+ * .setArtifact(
+ * ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
+ * .toString())
+ * .setMaxHops(407750469)
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable