diff --git a/google-cloud-dataproc-metastore-bom/pom.xml b/google-cloud-dataproc-metastore-bom/pom.xml
index eb2b77e4..0651acb5 100644
--- a/google-cloud-dataproc-metastore-bom/pom.xml
+++ b/google-cloud-dataproc-metastore-bom/pom.xml
@@ -1,4 +1,4 @@
-
+
The Dataproc Metastore API defines the following resource model: + * + *
`/projects/{project_number}/locations/{location_id}/services/{service_id}`. + * + *
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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + * Service response = dataprocMetastoreClient.getService(name); + * } + * }+ * + *
Note: close() needs to be called on the DataprocMetastoreClient 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 DataprocMetastoreSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * DataprocMetastoreSettings dataprocMetastoreSettings = + * DataprocMetastoreSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * DataprocMetastoreClient dataprocMetastoreClient = + * DataprocMetastoreClient.create(dataprocMetastoreSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * DataprocMetastoreSettings dataprocMetastoreSettings = + * DataprocMetastoreSettings.newBuilder().setEndpoint(myEndpoint).build(); + * DataprocMetastoreClient dataprocMetastoreClient = + * DataprocMetastoreClient.create(dataprocMetastoreSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreClient implements BackgroundResource { + private final DataprocMetastoreSettings settings; + private final DataprocMetastoreStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DataprocMetastoreClient with default settings. */ + public static final DataprocMetastoreClient create() throws IOException { + return create(DataprocMetastoreSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataprocMetastoreClient, 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 DataprocMetastoreClient create(DataprocMetastoreSettings settings) + throws IOException { + return new DataprocMetastoreClient(settings); + } + + /** + * Constructs an instance of DataprocMetastoreClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(DataprocMetastoreSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataprocMetastoreClient create(DataprocMetastoreStub stub) { + return new DataprocMetastoreClient(stub); + } + + /** + * Constructs an instance of DataprocMetastoreClient, 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 DataprocMetastoreClient(DataprocMetastoreSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataprocMetastoreStubSettings) 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 DataprocMetastoreClient(DataprocMetastoreStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataprocMetastoreSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataprocMetastoreStub 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. + /** + * Lists services in a project and location. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Service element : dataprocMetastoreClient.listServices(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The relative resource name of the location of metastore services to + * list, in the following form: + *
`projects/{project_number}/locations/{location_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServicesPagedResponse listServices(LocationName parent) { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists services in a project and location. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Service element : dataprocMetastoreClient.listServices(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The relative resource name of the location of metastore services to + * list, in the following form: + *
`projects/{project_number}/locations/{location_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServicesPagedResponse listServices(String parent) { + ListServicesRequest request = ListServicesRequest.newBuilder().setParent(parent).build(); + return listServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists services in a project and location. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * ListServicesRequest request = + * ListServicesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Service element : dataprocMetastoreClient.listServices(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 ListServicesPagedResponse listServices(ListServicesRequest request) { + return listServicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists services in a project and location. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * ListServicesRequest request = + * ListServicesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * dataprocMetastoreClient.listServicesPagedCallable().futureCall(request); + * // Do something. + * for (Service element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * ListServicesRequest request = + * ListServicesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListServicesResponse response = + * dataprocMetastoreClient.listServicesCallable().call(request); + * for (Service element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + * Service response = dataprocMetastoreClient.getService(name); + * } + * }+ * + * @param name Required. The relative resource name of the metastore service to retrieve, in the + * following form: + *
`projects/{project_number}/locations/{location_id}/services/{service_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service getService(ServiceName name) { + GetServiceRequest request = + GetServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single service. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString(); + * Service response = dataprocMetastoreClient.getService(name); + * } + * }+ * + * @param name Required. The relative resource name of the metastore service to retrieve, in the + * following form: + *
`projects/{project_number}/locations/{location_id}/services/{service_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service getService(String name) { + GetServiceRequest request = GetServiceRequest.newBuilder().setName(name).build(); + return getService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single service. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * GetServiceRequest request = + * GetServiceRequest.newBuilder() + * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + * .build(); + * Service response = dataprocMetastoreClient.getService(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 Service getService(GetServiceRequest request) { + return getServiceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single service. + * + *
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * GetServiceRequest request = + * GetServiceRequest.newBuilder() + * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = dataprocMetastoreClient.getServiceCallable().futureCall(request); + * // Do something. + * Service response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Service service = Service.newBuilder().build(); + * String serviceId = "serviceId-194185552"; + * Service response = + * dataprocMetastoreClient.createServiceAsync(parent, service, serviceId).get(); + * } + * }+ * + * @param parent Required. The relative resource name of the location in which to create a + * metastore service, in the following form: + *
`projects/{project_number}/locations/{location_id}`. + * @param service Required. The Metastore service to create. The `name` field is ignored. The ID + * of the created metastore service must be provided in the request's `service_id` field. + * @param serviceId Required. The ID of the metastore service, which is used as the final + * component of the metastore service's name. + *
This value must be between 2 and 63 characters long inclusive, begin with a letter, end
+ * with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}`.
+ * @param service Required. The Metastore service to create. The `name` field is ignored. The ID
+ * of the created metastore service must be provided in the request's `service_id` field.
+ * @param serviceId Required. The ID of the metastore service, which is used as the final
+ * component of the metastore service's name.
+ * This value must be between 2 and 63 characters long inclusive, begin with a letter, end
+ * with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The metastore service's `name` field is used to identify the metastore service to be
+ * updated.
+ * @param updateMask Required. A field mask used to specify the fields to be overwritten in the
+ * metastore service resource by the update. Fields specified in the `update_mask` are
+ * relative to the resource (not to the full request). A field is overwritten if it is in the
+ * mask.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMetadataImportsPagedResponse listMetadataImports(ServiceName parent) {
+ ListMetadataImportsRequest request =
+ ListMetadataImportsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMetadataImports(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists imports in a service.
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMetadataImportsPagedResponse listMetadataImports(String parent) {
+ ListMetadataImportsRequest request =
+ ListMetadataImportsRequest.newBuilder().setParent(parent).build();
+ return listMetadataImports(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists imports in a service.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataImport getMetadataImport(MetadataImportName name) {
+ GetMetadataImportRequest request =
+ GetMetadataImportRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getMetadataImport(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single import.
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MetadataImport getMetadataImport(String name) {
+ GetMetadataImportRequest request = GetMetadataImportRequest.newBuilder().setName(name).build();
+ return getMetadataImport(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single import.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`
+ * @param metadataImport Required. The metadata import to create. The `name` field is ignored. The
+ * ID of the created metadata import must be provided in the request's `metadata_import_id`
+ * field.
+ * @param metadataImportId Required. The ID of the metadata import, which is used as the final
+ * component of the metadata import's name.
+ * This value must be between 1 and 64 characters long, begin with a letter, end with a
+ * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`
+ * @param metadataImport Required. The metadata import to create. The `name` field is ignored. The
+ * ID of the created metadata import must be provided in the request's `metadata_import_id`
+ * field.
+ * @param metadataImportId Required. The ID of the metadata import, which is used as the final
+ * component of the metadata import's name.
+ * This value must be between 1 and 64 characters long, begin with a letter, end with a
+ * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The metadata import's `name` field is used to identify the metastore import to be
+ * updated.
+ * @param updateMask Required. A field mask used to specify the fields to be overwritten in the
+ * metadata import resource by the update. Fields specified in the `update_mask` are relative
+ * to the resource (not to the full request). A field is overwritten if it is in the mask.
+ * @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:
+ *
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}`
+ * @param backup Required. The relative resource name of the metastore service backup to restore
+ * from, in the following form:
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}`
+ * @param backup Required. The relative resource name of the metastore service backup to restore
+ * from, in the following form:
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}`
+ * @param backup Required. The relative resource name of the metastore service backup to restore
+ * from, in the following form:
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}`
+ * @param backup Required. The relative resource name of the metastore service backup to restore
+ * from, in the following form:
+ * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(ServiceName parent) {
+ ListBackupsRequest request =
+ ListBackupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists backups in a service.
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(String parent) {
+ ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists backups in a service.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(BackupName name) {
+ GetBackupRequest request =
+ GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single backup.
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(String name) {
+ GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single backup.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`
+ * @param backup Required. The backup to create. The `name` field is ignored. The ID of the
+ * created backup must be provided in the request's `backup_id` field.
+ * @param backupId Required. The ID of the backup, which is used as the final component of the
+ * backup's name.
+ * This value must be between 1 and 64 characters long, begin with a letter, end with a
+ * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`
+ * @param backup Required. The backup to create. The `name` field is ignored. The ID of the
+ * created backup must be provided in the request's `backup_id` field.
+ * @param backupId Required. The ID of the backup, which is used as the final component of the
+ * backup's name.
+ * This value must be between 1 and 64 characters long, begin with a letter, end with a
+ * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture 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 getService to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= DataprocMetastoreClient =======================
+ *
+ * Service Description: Configures and manages metastore services. Metastore services are fully
+ * managed, highly available, auto-scaled, auto-healing, OSS-native deployments of technical
+ * metadata management software. Each metastore service exposes a network endpoint through which
+ * metadata queries are served. Metadata queries can originate from a variety of sources, including
+ * Apache Hive, Apache Presto, and Apache Spark.
+ *
+ * The Dataproc Metastore API defines the following resource model:
+ *
+ * `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ * Sample for DataprocMetastoreClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class DataprocMetastoreStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ }
+
+ public UnaryCallable 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 getService to 30 seconds:
+ *
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Service service = Service.newBuilder().build();
+ * String serviceId = "serviceId-194185552";
+ * Service response =
+ * dataprocMetastoreClient.createServiceAsync(parent, service, serviceId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the location in which to create a
+ * metastore service, in the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Service response = dataprocMetastoreClient.createServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * Service service = Service.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Service response = dataprocMetastoreClient.updateServiceAsync(service, updateMask).get();
+ * }
+ * }
+ *
+ * @param service Required. The metastore service to update. The server only merges fields in the
+ * service if they are specified in `update_mask`.
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Service response = dataprocMetastoreClient.updateServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * dataprocMetastoreClient.deleteServiceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the metastore service to delete, in the
+ * following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * dataprocMetastoreClient.deleteServiceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the metastore service to delete, in the
+ * following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * dataprocMetastoreClient.deleteServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * for (MetadataImport element :
+ * dataprocMetastoreClient.listMetadataImports(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service whose metadata imports to
+ * list, in the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * for (MetadataImport element :
+ * dataprocMetastoreClient.listMetadataImports(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service whose metadata imports to
+ * list, in the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ListMetadataImportsRequest request =
+ * ListMetadataImportsRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (MetadataImport element :
+ * dataprocMetastoreClient.listMetadataImports(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 ListMetadataImportsPagedResponse listMetadataImports(
+ ListMetadataImportsRequest request) {
+ return listMetadataImportsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists imports in a service.
+ *
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ListMetadataImportsRequest request =
+ * ListMetadataImportsRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ListMetadataImportsRequest request =
+ * ListMetadataImportsRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListMetadataImportsResponse response =
+ * dataprocMetastoreClient.listMetadataImportsCallable().call(request);
+ * for (MetadataImport 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * MetadataImportName name =
+ * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]");
+ * MetadataImport response = dataprocMetastoreClient.getMetadataImport(name);
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the metadata import to retrieve, in the
+ * following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String name =
+ * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
+ * .toString();
+ * MetadataImport response = dataprocMetastoreClient.getMetadataImport(name);
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the metadata import to retrieve, in the
+ * following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * GetMetadataImportRequest request =
+ * GetMetadataImportRequest.newBuilder()
+ * .setName(
+ * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
+ * .toString())
+ * .build();
+ * MetadataImport response = dataprocMetastoreClient.getMetadataImport(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 MetadataImport getMetadataImport(GetMetadataImportRequest request) {
+ return getMetadataImportCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single import.
+ *
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * GetMetadataImportRequest request =
+ * GetMetadataImportRequest.newBuilder()
+ * .setName(
+ * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * MetadataImport metadataImport = MetadataImport.newBuilder().build();
+ * String metadataImportId = "metadataImportId1824548847";
+ * MetadataImport response =
+ * dataprocMetastoreClient
+ * .createMetadataImportAsync(parent, metadataImport, metadataImportId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service in which to create a
+ * metastore import, in the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * MetadataImport metadataImport = MetadataImport.newBuilder().build();
+ * String metadataImportId = "metadataImportId1824548847";
+ * MetadataImport response =
+ * dataprocMetastoreClient
+ * .createMetadataImportAsync(parent, metadataImport, metadataImportId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service in which to create a
+ * metastore import, in the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateMetadataImportRequest request =
+ * CreateMetadataImportRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setMetadataImportId("metadataImportId1824548847")
+ * .setMetadataImport(MetadataImport.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * MetadataImport response = dataprocMetastoreClient.createMetadataImportAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateMetadataImportRequest request =
+ * CreateMetadataImportRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setMetadataImportId("metadataImportId1824548847")
+ * .setMetadataImport(MetadataImport.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateMetadataImportRequest request =
+ * CreateMetadataImportRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setMetadataImportId("metadataImportId1824548847")
+ * .setMetadataImport(MetadataImport.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * MetadataImport metadataImport = MetadataImport.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * MetadataImport response =
+ * dataprocMetastoreClient.updateMetadataImportAsync(metadataImport, updateMask).get();
+ * }
+ * }
+ *
+ * @param metadataImport Required. The metadata import to update. The server only merges fields in
+ * the import if they are specified in `update_mask`.
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * UpdateMetadataImportRequest request =
+ * UpdateMetadataImportRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setMetadataImport(MetadataImport.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * MetadataImport response = dataprocMetastoreClient.updateMetadataImportAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * UpdateMetadataImportRequest request =
+ * UpdateMetadataImportRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setMetadataImport(MetadataImport.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * UpdateMetadataImportRequest request =
+ * UpdateMetadataImportRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setMetadataImport(MetadataImport.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ExportMetadataRequest request =
+ * ExportMetadataRequest.newBuilder()
+ * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * MetadataExport response = dataprocMetastoreClient.exportMetadataAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ExportMetadataRequest request =
+ * ExportMetadataRequest.newBuilder()
+ * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ExportMetadataRequest request =
+ * ExportMetadataRequest.newBuilder()
+ * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
+ * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
+ * }
+ * }
+ *
+ * @param service Required. The relative resource name of the metastore service to run restore, in
+ * the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * String backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
+ * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
+ * }
+ * }
+ *
+ * @param service Required. The relative resource name of the metastore service to run restore, in
+ * the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
+ * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
+ * }
+ * }
+ *
+ * @param service Required. The relative resource name of the metastore service to run restore, in
+ * the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * String backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
+ * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
+ * }
+ * }
+ *
+ * @param service Required. The relative resource name of the metastore service to run restore, in
+ * the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * RestoreServiceRequest request =
+ * RestoreServiceRequest.newBuilder()
+ * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setBackup(
+ * BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Restore response = dataprocMetastoreClient.restoreServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * RestoreServiceRequest request =
+ * RestoreServiceRequest.newBuilder()
+ * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setBackup(
+ * BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * RestoreServiceRequest request =
+ * RestoreServiceRequest.newBuilder()
+ * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setBackup(
+ * BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * for (Backup element : dataprocMetastoreClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service whose backups to list, in the
+ * following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * for (Backup element : dataprocMetastoreClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service whose backups to list, in the
+ * following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Backup element : dataprocMetastoreClient.listBackups(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 ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
+ return listBackupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists backups in a service.
+ *
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListBackupsResponse response = dataprocMetastoreClient.listBackupsCallable().call(request);
+ * for (Backup 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
+ * Backup response = dataprocMetastoreClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the backup to retrieve, in the following
+ * form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
+ * Backup response = dataprocMetastoreClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the backup to retrieve, in the following
+ * form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .build();
+ * Backup response = dataprocMetastoreClient.getBackup(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 Backup getBackup(GetBackupRequest request) {
+ return getBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single backup.
+ *
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * Backup backup = Backup.newBuilder().build();
+ * String backupId = "backupId2121930365";
+ * Backup response = dataprocMetastoreClient.createBackupAsync(parent, backup, backupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * Backup backup = Backup.newBuilder().build();
+ * String backupId = "backupId2121930365";
+ * Backup response = dataprocMetastoreClient.createBackupAsync(parent, backup, backupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setBackupId("backupId2121930365")
+ * .setBackup(Backup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Backup response = dataprocMetastoreClient.createBackupAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setBackupId("backupId2121930365")
+ * .setBackup(Backup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setBackupId("backupId2121930365")
+ * .setBackup(Backup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
+ * dataprocMetastoreClient.deleteBackupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the backup to delete, in the following
+ * form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
+ * dataprocMetastoreClient.deleteBackupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The relative resource name of the backup to delete, in the following
+ * form:
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * dataprocMetastoreClient.deleteBackupAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * DataprocMetastoreSettings.Builder dataprocMetastoreSettingsBuilder =
+ * DataprocMetastoreSettings.newBuilder();
+ * dataprocMetastoreSettingsBuilder
+ * .getServiceSettings()
+ * .setRetrySettings(
+ * dataprocMetastoreSettingsBuilder
+ * .getServiceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DataprocMetastoreSettings dataprocMetastoreSettings = dataprocMetastoreSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DataprocMetastoreSettings extends ClientSettings
+ *
+ *
+ * {@code
+ * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * Service response = dataprocMetastoreClient.getService(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.metastore.v1alpha;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java b/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java
new file mode 100644
index 00000000..c563e16a
--- /dev/null
+++ b/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.metastore.v1alpha.stub;
+
+import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse;
+import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse;
+import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.metastore.v1alpha.Backup;
+import com.google.cloud.metastore.v1alpha.CreateBackupRequest;
+import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest;
+import com.google.cloud.metastore.v1alpha.CreateServiceRequest;
+import com.google.cloud.metastore.v1alpha.DeleteBackupRequest;
+import com.google.cloud.metastore.v1alpha.DeleteServiceRequest;
+import com.google.cloud.metastore.v1alpha.ExportMetadataRequest;
+import com.google.cloud.metastore.v1alpha.GetBackupRequest;
+import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest;
+import com.google.cloud.metastore.v1alpha.GetServiceRequest;
+import com.google.cloud.metastore.v1alpha.ListBackupsRequest;
+import com.google.cloud.metastore.v1alpha.ListBackupsResponse;
+import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest;
+import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse;
+import com.google.cloud.metastore.v1alpha.ListServicesRequest;
+import com.google.cloud.metastore.v1alpha.ListServicesResponse;
+import com.google.cloud.metastore.v1alpha.MetadataExport;
+import com.google.cloud.metastore.v1alpha.MetadataImport;
+import com.google.cloud.metastore.v1alpha.OperationMetadata;
+import com.google.cloud.metastore.v1alpha.Restore;
+import com.google.cloud.metastore.v1alpha.RestoreServiceRequest;
+import com.google.cloud.metastore.v1alpha.Service;
+import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest;
+import com.google.cloud.metastore.v1alpha.UpdateServiceRequest;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the DataprocMetastore service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
+ * DataprocMetastoreStubSettings.newBuilder();
+ * dataprocMetastoreSettingsBuilder
+ * .getServiceSettings()
+ * .setRetrySettings(
+ * dataprocMetastoreSettingsBuilder
+ * .getServiceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DataprocMetastoreStubSettings dataprocMetastoreSettings =
+ * dataprocMetastoreSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DataprocMetastoreStubSettings extends StubSettings