diff --git a/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java b/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java index bc14da3e..a4f670eb 100644 --- a/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java +++ b/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java @@ -42,10 +42,10 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** * 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. + * managed, highly available, autoscaled, autohealing, 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:
*
@@ -1416,6 +1416,725 @@ public final UnaryCallable 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:
+ *
+ * ======================= 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.
+ * managed, highly available, autoscaled, autohealing, 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:
*
diff --git a/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java b/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java
index b5b06b77..c6593c83 100644
--- a/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java
+++ b/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java
@@ -16,18 +16,25 @@
package com.google.cloud.metastore.v1.stub;
+import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse;
import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse;
import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse;
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.v1.Backup;
+import com.google.cloud.metastore.v1.CreateBackupRequest;
import com.google.cloud.metastore.v1.CreateMetadataImportRequest;
import com.google.cloud.metastore.v1.CreateServiceRequest;
+import com.google.cloud.metastore.v1.DeleteBackupRequest;
import com.google.cloud.metastore.v1.DeleteServiceRequest;
import com.google.cloud.metastore.v1.ExportMetadataRequest;
+import com.google.cloud.metastore.v1.GetBackupRequest;
import com.google.cloud.metastore.v1.GetMetadataImportRequest;
import com.google.cloud.metastore.v1.GetServiceRequest;
+import com.google.cloud.metastore.v1.ListBackupsRequest;
+import com.google.cloud.metastore.v1.ListBackupsResponse;
import com.google.cloud.metastore.v1.ListMetadataImportsRequest;
import com.google.cloud.metastore.v1.ListMetadataImportsResponse;
import com.google.cloud.metastore.v1.ListServicesRequest;
@@ -35,6 +42,8 @@
import com.google.cloud.metastore.v1.MetadataExport;
import com.google.cloud.metastore.v1.MetadataImport;
import com.google.cloud.metastore.v1.OperationMetadata;
+import com.google.cloud.metastore.v1.Restore;
+import com.google.cloud.metastore.v1.RestoreServiceRequest;
import com.google.cloud.metastore.v1.Service;
import com.google.cloud.metastore.v1.UpdateMetadataImportRequest;
import com.google.cloud.metastore.v1.UpdateServiceRequest;
@@ -138,6 +147,45 @@ public 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
* Configures and manages metastore services.
- * Metastore services are fully managed, highly available, auto-scaled,
- * auto-healing, OSS-native deployments of technical metadata management
+ * Metastore services are fully managed, highly available, autoscaled,
+ * autohealing, 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.
@@ -503,6 +503,224 @@ private DataprocMetastoreGrpc() {}
return getExportMetadataMethod;
}
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.cloud.metastore.v1.RestoreServiceRequest, com.google.longrunning.Operation>
+ getRestoreServiceMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "RestoreService",
+ requestType = com.google.cloud.metastore.v1.RestoreServiceRequest.class,
+ responseType = com.google.longrunning.Operation.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.cloud.metastore.v1.RestoreServiceRequest, com.google.longrunning.Operation>
+ getRestoreServiceMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.cloud.metastore.v1.RestoreServiceRequest, com.google.longrunning.Operation>
+ getRestoreServiceMethod;
+ if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) {
+ synchronized (DataprocMetastoreGrpc.class) {
+ if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) {
+ DataprocMetastoreGrpc.getRestoreServiceMethod =
+ getRestoreServiceMethod =
+ io.grpc.MethodDescriptor
+ .
* Configures and manages metastore services.
- * Metastore services are fully managed, highly available, auto-scaled,
- * auto-healing, OSS-native deployments of technical metadata management
+ * Metastore services are fully managed, highly available, autoscaled,
+ * autohealing, 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.
@@ -709,6 +927,76 @@ public void exportMetadata(
getExportMetadataMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Restores a service from a backup.
+ *
+ */
+ public void restoreService(
+ com.google.cloud.metastore.v1.RestoreServiceRequest request,
+ io.grpc.stub.StreamObserver
+ * Lists backups in a service.
+ *
+ */
+ public void listBackups(
+ com.google.cloud.metastore.v1.ListBackupsRequest request,
+ io.grpc.stub.StreamObserver
+ * Gets details of a single backup.
+ *
+ */
+ public void getBackup(
+ com.google.cloud.metastore.v1.GetBackupRequest request,
+ io.grpc.stub.StreamObserver
+ * Creates a new backup in a given project and location.
+ *
+ */
+ public void createBackup(
+ com.google.cloud.metastore.v1.CreateBackupRequest request,
+ io.grpc.stub.StreamObserver
+ * Deletes a single backup.
+ *
+ */
+ public void deleteBackup(
+ com.google.cloud.metastore.v1.DeleteBackupRequest request,
+ io.grpc.stub.StreamObserver
* Configures and manages metastore services.
- * Metastore services are fully managed, highly available, auto-scaled,
- * auto-healing, OSS-native deployments of technical metadata management
+ * Metastore services are fully managed, highly available, autoscaled,
+ * autohealing, 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.
@@ -972,6 +1291,85 @@ public void exportMetadata(
request,
responseObserver);
}
+
+ /**
+ *
+ *
+ *
+ * Restores a service from a backup.
+ *
+ */
+ public void restoreService(
+ com.google.cloud.metastore.v1.RestoreServiceRequest request,
+ io.grpc.stub.StreamObserver
+ * Lists backups in a service.
+ *
+ */
+ public void listBackups(
+ com.google.cloud.metastore.v1.ListBackupsRequest request,
+ io.grpc.stub.StreamObserver
+ * Gets details of a single backup.
+ *
+ */
+ public void getBackup(
+ com.google.cloud.metastore.v1.GetBackupRequest request,
+ io.grpc.stub.StreamObserver
+ * Creates a new backup in a given project and location.
+ *
+ */
+ public void createBackup(
+ com.google.cloud.metastore.v1.CreateBackupRequest request,
+ io.grpc.stub.StreamObserver
+ * Deletes a single backup.
+ *
+ */
+ public void deleteBackup(
+ com.google.cloud.metastore.v1.DeleteBackupRequest request,
+ io.grpc.stub.StreamObserver
* Configures and manages metastore services.
- * Metastore services are fully managed, highly available, auto-scaled,
- * auto-healing, OSS-native deployments of technical metadata management
+ * Metastore services are fully managed, highly available, autoscaled,
+ * autohealing, 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.
@@ -1137,6 +1535,71 @@ public com.google.longrunning.Operation exportMetadata(
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExportMetadataMethod(), getCallOptions(), request);
}
+
+ /**
+ *
+ *
+ *
+ * Restores a service from a backup.
+ *
+ */
+ public com.google.longrunning.Operation restoreService(
+ com.google.cloud.metastore.v1.RestoreServiceRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getRestoreServiceMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Lists backups in a service.
+ *
+ */
+ public com.google.cloud.metastore.v1.ListBackupsResponse listBackups(
+ com.google.cloud.metastore.v1.ListBackupsRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getListBackupsMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets details of a single backup.
+ *
+ */
+ public com.google.cloud.metastore.v1.Backup getBackup(
+ com.google.cloud.metastore.v1.GetBackupRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetBackupMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Creates a new backup in a given project and location.
+ *
+ */
+ public com.google.longrunning.Operation createBackup(
+ com.google.cloud.metastore.v1.CreateBackupRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getCreateBackupMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Deletes a single backup.
+ *
+ */
+ public com.google.longrunning.Operation deleteBackup(
+ com.google.cloud.metastore.v1.DeleteBackupRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getDeleteBackupMethod(), getCallOptions(), request);
+ }
}
/**
@@ -1144,8 +1607,8 @@ public com.google.longrunning.Operation exportMetadata(
*
*
* Configures and manages metastore services.
- * Metastore services are fully managed, highly available, auto-scaled,
- * auto-healing, OSS-native deployments of technical metadata management
+ * Metastore services are fully managed, highly available, autoscaled,
+ * autohealing, 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.
@@ -1304,6 +1767,72 @@ protected DataprocMetastoreFutureStub build(
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request);
}
+
+ /**
+ *
+ *
+ *
+ * Restores a service from a backup.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Lists backups in a service.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.cloud.metastore.v1.ListBackupsResponse>
+ listBackups(com.google.cloud.metastore.v1.ListBackupsRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getListBackupsMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets details of a single backup.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Creates a new backup in a given project and location.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Deletes a single backup.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * The details of a backup resource.
+ *
+ *
+ * Protobuf type {@code google.cloud.metastore.v1.Backup}
+ */
+public final class Backup extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Backup)
+ BackupOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Backup.newBuilder() to construct.
+ private Backup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Backup() {
+ name_ = "";
+ state_ = 0;
+ description_ = "";
+ restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new Backup();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Backup(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (createTime_ != null) {
+ subBuilder = createTime_.toBuilder();
+ }
+ createTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(createTime_);
+ createTime_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 26:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (endTime_ != null) {
+ subBuilder = endTime_.toBuilder();
+ }
+ endTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(endTime_);
+ endTime_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 32:
+ {
+ int rawValue = input.readEnum();
+
+ state_ = rawValue;
+ break;
+ }
+ case 42:
+ {
+ com.google.cloud.metastore.v1.Service.Builder subBuilder = null;
+ if (serviceRevision_ != null) {
+ subBuilder = serviceRevision_.toBuilder();
+ }
+ serviceRevision_ =
+ input.readMessage(
+ com.google.cloud.metastore.v1.Service.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serviceRevision_);
+ serviceRevision_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 50:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ description_ = s;
+ break;
+ }
+ case 58:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ restoringServices_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ restoringServices_.add(s);
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
+ restoringServices_ = restoringServices_.getUnmodifiableView();
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.metastore.v1.MetastoreProto
+ .internal_static_google_cloud_metastore_v1_Backup_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.metastore.v1.MetastoreProto
+ .internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.metastore.v1.Backup.class,
+ com.google.cloud.metastore.v1.Backup.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * The current state of the backup.
+ *
+ *
+ * Protobuf enum {@code google.cloud.metastore.v1.Backup.State}
+ */
+ public enum State implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * The state of the backup is unknown.
+ *
+ *
+ * STATE_UNSPECIFIED = 0;
+ */
+ STATE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * The backup is being created.
+ *
+ *
+ * CREATING = 1;
+ */
+ CREATING(1),
+ /**
+ *
+ *
+ *
+ * The backup is being deleted.
+ *
+ *
+ * DELETING = 2;
+ */
+ DELETING(2),
+ /**
+ *
+ *
+ *
+ * The backup is active and ready to use.
+ *
+ *
+ * ACTIVE = 3;
+ */
+ ACTIVE(3),
+ /**
+ *
+ *
+ *
+ * The backup failed.
+ *
+ *
+ * FAILED = 4;
+ */
+ FAILED(4),
+ /**
+ *
+ *
+ *
+ * The backup is being restored.
+ *
+ *
+ * RESTORING = 5;
+ */
+ RESTORING(5),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * The state of the backup is unknown.
+ *
+ *
+ * STATE_UNSPECIFIED = 0;
+ */
+ public static final int STATE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * The backup is being created.
+ *
+ *
+ * CREATING = 1;
+ */
+ public static final int CREATING_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * The backup is being deleted.
+ *
+ *
+ * DELETING = 2;
+ */
+ public static final int DELETING_VALUE = 2;
+ /**
+ *
+ *
+ *
+ * The backup is active and ready to use.
+ *
+ *
+ * ACTIVE = 3;
+ */
+ public static final int ACTIVE_VALUE = 3;
+ /**
+ *
+ *
+ *
+ * The backup failed.
+ *
+ *
+ * FAILED = 4;
+ */
+ public static final int FAILED_VALUE = 4;
+ /**
+ *
+ *
+ *
+ * The backup is being restored.
+ *
+ *
+ * RESTORING = 5;
+ */
+ public static final int RESTORING_VALUE = 5;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static State forNumber(int value) {
+ switch (value) {
+ case 0:
+ return STATE_UNSPECIFIED;
+ case 1:
+ return CREATING;
+ case 2:
+ return DELETING;
+ case 3:
+ return ACTIVE;
+ case 4:
+ return FAILED;
+ case 5:
+ return RESTORING;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CREATE_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp createTime_;
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the createTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasCreateTime() {
+ return createTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The createTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getCreateTime() {
+ return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ return getCreateTime();
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp endTime_;
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the endTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasEndTime() {
+ return endTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The endTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getEndTime() {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ return getEndTime();
+ }
+
+ public static final int STATE_FIELD_NUMBER = 4;
+ private int state_;
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.metastore.v1.Backup.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.metastore.v1.Backup.State result =
+ com.google.cloud.metastore.v1.Backup.State.valueOf(state_);
+ return result == null ? com.google.cloud.metastore.v1.Backup.State.UNRECOGNIZED : result;
+ }
+
+ public static final int SERVICE_REVISION_FIELD_NUMBER = 5;
+ private com.google.cloud.metastore.v1.Service serviceRevision_;
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the serviceRevision field is set.
+ */
+ @java.lang.Override
+ public boolean hasServiceRevision() {
+ return serviceRevision_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The serviceRevision.
+ */
+ @java.lang.Override
+ public com.google.cloud.metastore.v1.Service getServiceRevision() {
+ return serviceRevision_ == null
+ ? com.google.cloud.metastore.v1.Service.getDefaultInstance()
+ : serviceRevision_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder() {
+ return getServiceRevision();
+ }
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 6;
+ private volatile java.lang.Object description_;
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return The description.
+ */
+ @java.lang.Override
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return The bytes for description.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESTORING_SERVICES_FIELD_NUMBER = 7;
+ private com.google.protobuf.LazyStringList restoringServices_;
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return A list containing the restoringServices.
+ */
+ public com.google.protobuf.ProtocolStringList getRestoringServicesList() {
+ return restoringServices_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The count of restoringServices.
+ */
+ public int getRestoringServicesCount() {
+ return restoringServices_.size();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The restoringServices at the given index.
+ */
+ public java.lang.String getRestoringServices(int index) {
+ return restoringServices_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the restoringServices at the given index.
+ */
+ public com.google.protobuf.ByteString getRestoringServicesBytes(int index) {
+ return restoringServices_.getByteString(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (createTime_ != null) {
+ output.writeMessage(2, getCreateTime());
+ }
+ if (endTime_ != null) {
+ output.writeMessage(3, getEndTime());
+ }
+ if (state_ != com.google.cloud.metastore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) {
+ output.writeEnum(4, state_);
+ }
+ if (serviceRevision_ != null) {
+ output.writeMessage(5, getServiceRevision());
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
+ }
+ for (int i = 0; i < restoringServices_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (createTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime());
+ }
+ if (endTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime());
+ }
+ if (state_ != com.google.cloud.metastore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_);
+ }
+ if (serviceRevision_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getServiceRevision());
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < restoringServices_.size(); i++) {
+ dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getRestoringServicesList().size();
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.metastore.v1.Backup)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.metastore.v1.Backup other = (com.google.cloud.metastore.v1.Backup) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (hasCreateTime() != other.hasCreateTime()) return false;
+ if (hasCreateTime()) {
+ if (!getCreateTime().equals(other.getCreateTime())) return false;
+ }
+ if (hasEndTime() != other.hasEndTime()) return false;
+ if (hasEndTime()) {
+ if (!getEndTime().equals(other.getEndTime())) return false;
+ }
+ if (state_ != other.state_) return false;
+ if (hasServiceRevision() != other.hasServiceRevision()) return false;
+ if (hasServiceRevision()) {
+ if (!getServiceRevision().equals(other.getServiceRevision())) return false;
+ }
+ if (!getDescription().equals(other.getDescription())) return false;
+ if (!getRestoringServicesList().equals(other.getRestoringServicesList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (hasCreateTime()) {
+ hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getCreateTime().hashCode();
+ }
+ if (hasEndTime()) {
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ }
+ hash = (37 * hash) + STATE_FIELD_NUMBER;
+ hash = (53 * hash) + state_;
+ if (hasServiceRevision()) {
+ hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceRevision().hashCode();
+ }
+ hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ if (getRestoringServicesCount() > 0) {
+ hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER;
+ hash = (53 * hash) + getRestoringServicesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.Backup parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.metastore.v1.Backup prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * The details of a backup resource.
+ *
+ *
+ * Protobuf type {@code google.cloud.metastore.v1.Backup}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp createTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ createTimeBuilder_;
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the createTime field is set.
+ */
+ public boolean hasCreateTime() {
+ return createTimeBuilder_ != null || createTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The createTime.
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ if (createTimeBuilder_ == null) {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ } else {
+ return createTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ createTime_ = value;
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (createTimeBuilder_ == null) {
+ createTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (createTime_ != null) {
+ createTime_ =
+ com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
+ } else {
+ createTime_ = value;
+ }
+ onChanged();
+ } else {
+ createTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearCreateTime() {
+ if (createTimeBuilder_ == null) {
+ createTime_ = null;
+ onChanged();
+ } else {
+ createTime_ = null;
+ createTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
+
+ onChanged();
+ return getCreateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ if (createTimeBuilder_ != null) {
+ return createTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCreateTimeFieldBuilder() {
+ if (createTimeBuilder_ == null) {
+ createTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCreateTime(), getParentForChildren(), isClean());
+ createTime_ = null;
+ }
+ return createTimeBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp endTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ endTimeBuilder_;
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the endTime field is set.
+ */
+ public boolean hasEndTime() {
+ return endTimeBuilder_ != null || endTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The endTime.
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ if (endTimeBuilder_ == null) {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ } else {
+ return endTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTime_ = value;
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimeBuilder_ == null) {
+ endTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (endTime_ != null) {
+ endTime_ =
+ com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
+ } else {
+ endTime_ = value;
+ }
+ onChanged();
+ } else {
+ endTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearEndTime() {
+ if (endTimeBuilder_ == null) {
+ endTime_ = null;
+ onChanged();
+ } else {
+ endTime_ = null;
+ endTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
+
+ onChanged();
+ return getEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ if (endTimeBuilder_ != null) {
+ return endTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimeFieldBuilder() {
+ if (endTimeBuilder_ == null) {
+ endTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTime(), getParentForChildren(), isClean());
+ endTime_ = null;
+ }
+ return endTimeBuilder_;
+ }
+
+ private int state_ = 0;
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param value The enum numeric value on the wire for state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStateValue(int value) {
+
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.metastore.v1.Backup.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.metastore.v1.Backup.State result =
+ com.google.cloud.metastore.v1.Backup.State.valueOf(state_);
+ return result == null ? com.google.cloud.metastore.v1.Backup.State.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param value The state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setState(com.google.cloud.metastore.v1.Backup.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.metastore.v1.Service serviceRevision_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.metastore.v1.Service,
+ com.google.cloud.metastore.v1.Service.Builder,
+ com.google.cloud.metastore.v1.ServiceOrBuilder>
+ serviceRevisionBuilder_;
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the serviceRevision field is set.
+ */
+ public boolean hasServiceRevision() {
+ return serviceRevisionBuilder_ != null || serviceRevision_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The serviceRevision.
+ */
+ public com.google.cloud.metastore.v1.Service getServiceRevision() {
+ if (serviceRevisionBuilder_ == null) {
+ return serviceRevision_ == null
+ ? com.google.cloud.metastore.v1.Service.getDefaultInstance()
+ : serviceRevision_;
+ } else {
+ return serviceRevisionBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setServiceRevision(com.google.cloud.metastore.v1.Service value) {
+ if (serviceRevisionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serviceRevision_ = value;
+ onChanged();
+ } else {
+ serviceRevisionBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setServiceRevision(
+ com.google.cloud.metastore.v1.Service.Builder builderForValue) {
+ if (serviceRevisionBuilder_ == null) {
+ serviceRevision_ = builderForValue.build();
+ onChanged();
+ } else {
+ serviceRevisionBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeServiceRevision(com.google.cloud.metastore.v1.Service value) {
+ if (serviceRevisionBuilder_ == null) {
+ if (serviceRevision_ != null) {
+ serviceRevision_ =
+ com.google.cloud.metastore.v1.Service.newBuilder(serviceRevision_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ serviceRevision_ = value;
+ }
+ onChanged();
+ } else {
+ serviceRevisionBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearServiceRevision() {
+ if (serviceRevisionBuilder_ == null) {
+ serviceRevision_ = null;
+ onChanged();
+ } else {
+ serviceRevision_ = null;
+ serviceRevisionBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.metastore.v1.Service.Builder getServiceRevisionBuilder() {
+
+ onChanged();
+ return getServiceRevisionFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder() {
+ if (serviceRevisionBuilder_ != null) {
+ return serviceRevisionBuilder_.getMessageOrBuilder();
+ } else {
+ return serviceRevision_ == null
+ ? com.google.cloud.metastore.v1.Service.getDefaultInstance()
+ : serviceRevision_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.metastore.v1.Service,
+ com.google.cloud.metastore.v1.Service.Builder,
+ com.google.cloud.metastore.v1.ServiceOrBuilder>
+ getServiceRevisionFieldBuilder() {
+ if (serviceRevisionBuilder_ == null) {
+ serviceRevisionBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.metastore.v1.Service,
+ com.google.cloud.metastore.v1.Service.Builder,
+ com.google.cloud.metastore.v1.ServiceOrBuilder>(
+ getServiceRevision(), getParentForChildren(), isClean());
+ serviceRevision_ = null;
+ }
+ return serviceRevisionBuilder_;
+ }
+
+ private java.lang.Object description_ = "";
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return The description.
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return The bytes for description.
+ */
+ public com.google.protobuf.ByteString getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @param value The description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescription(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDescription() {
+
+ description_ = getDefaultInstance().getDescription();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @param value The bytes for description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList restoringServices_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureRestoringServicesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return A list containing the restoringServices.
+ */
+ public com.google.protobuf.ProtocolStringList getRestoringServicesList() {
+ return restoringServices_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The count of restoringServices.
+ */
+ public int getRestoringServicesCount() {
+ return restoringServices_.size();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The restoringServices at the given index.
+ */
+ public java.lang.String getRestoringServices(int index) {
+ return restoringServices_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the restoringServices at the given index.
+ */
+ public com.google.protobuf.ByteString getRestoringServicesBytes(int index) {
+ return restoringServices_.getByteString(index);
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The restoringServices to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRestoringServices(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRestoringServicesIsMutable();
+ restoringServices_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param value The restoringServices to add.
+ * @return This builder for chaining.
+ */
+ public Builder addRestoringServices(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRestoringServicesIsMutable();
+ restoringServices_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param values The restoringServices to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllRestoringServices(java.lang.Iterable
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRestoringServices() {
+ restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param value The bytes of the restoringServices to add.
+ * @return This builder for chaining.
+ */
+ public Builder addRestoringServicesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureRestoringServicesIsMutable();
+ restoringServices_.add(value);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Backup)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Backup)
+ private static final com.google.cloud.metastore.v1.Backup DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Backup();
+ }
+
+ public static com.google.cloud.metastore.v1.Backup getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Immutable. The relative resource name of the backup, in the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the createTime field is set.
+ */
+ boolean hasCreateTime();
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The createTime.
+ */
+ com.google.protobuf.Timestamp getCreateTime();
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup was started.
+ *
+ *
+ * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the endTime field is set.
+ */
+ boolean hasEndTime();
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The endTime.
+ */
+ com.google.protobuf.Timestamp getEndTime();
+ /**
+ *
+ *
+ *
+ * Output only. The time when the backup finished creating.
+ *
+ *
+ * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ *
+ * Output only. The current state of the backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The state.
+ */
+ com.google.cloud.metastore.v1.Backup.State getState();
+
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the serviceRevision field is set.
+ */
+ boolean hasServiceRevision();
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The serviceRevision.
+ */
+ com.google.cloud.metastore.v1.Service getServiceRevision();
+ /**
+ *
+ *
+ *
+ * Output only. The revision of the service at the time of backup.
+ *
+ *
+ *
+ * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return The description.
+ */
+ java.lang.String getDescription();
+ /**
+ *
+ *
+ *
+ * The description of the backup.
+ *
+ *
+ * string description = 6;
+ *
+ * @return The bytes for description.
+ */
+ com.google.protobuf.ByteString getDescriptionBytes();
+
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return A list containing the restoringServices.
+ */
+ java.util.List
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The count of restoringServices.
+ */
+ int getRestoringServicesCount();
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The restoringServices at the given index.
+ */
+ java.lang.String getRestoringServices(int index);
+ /**
+ *
+ *
+ *
+ * Output only. Services that are restoring from the backup.
+ *
+ *
+ * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the restoringServices at the given index.
+ */
+ com.google.protobuf.ByteString getRestoringServicesBytes(int index);
+}
diff --git a/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java b/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java
new file mode 100644
index 00000000..e1be258b
--- /dev/null
+++ b/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java
@@ -0,0 +1,1412 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/metastore/v1/metastore.proto
+
+package com.google.cloud.metastore.v1;
+
+/**
+ *
+ *
+ *
+ * Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
+ *
+ *
+ * Protobuf type {@code google.cloud.metastore.v1.CreateBackupRequest}
+ */
+public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateBackupRequest)
+ CreateBackupRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use CreateBackupRequest.newBuilder() to construct.
+ private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private CreateBackupRequest() {
+ parent_ = "";
+ backupId_ = "";
+ requestId_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new CreateBackupRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private CreateBackupRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ parent_ = s;
+ break;
+ }
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ backupId_ = s;
+ break;
+ }
+ case 26:
+ {
+ com.google.cloud.metastore.v1.Backup.Builder subBuilder = null;
+ if (backup_ != null) {
+ subBuilder = backup_.toBuilder();
+ }
+ backup_ =
+ input.readMessage(
+ com.google.cloud.metastore.v1.Backup.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(backup_);
+ backup_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 34:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ requestId_ = s;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.metastore.v1.MetastoreProto
+ .internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.metastore.v1.MetastoreProto
+ .internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.metastore.v1.CreateBackupRequest.class,
+ com.google.cloud.metastore.v1.CreateBackupRequest.Builder.class);
+ }
+
+ public static final int PARENT_FIELD_NUMBER = 1;
+ private volatile java.lang.Object parent_;
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BACKUP_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The backupId.
+ */
+ @java.lang.Override
+ public java.lang.String getBackupId() {
+ java.lang.Object ref = backupId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ backupId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for backupId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBackupIdBytes() {
+ java.lang.Object ref = backupId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ backupId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BACKUP_FIELD_NUMBER = 3;
+ private com.google.cloud.metastore.v1.Backup 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the backup field is set.
+ */
+ @java.lang.Override
+ public boolean hasBackup() {
+ return backup_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The backup.
+ */
+ @java.lang.Override
+ public com.google.cloud.metastore.v1.Backup getBackup() {
+ return backup_ == null ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() : 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder() {
+ return getBackup();
+ }
+
+ public static final int REQUEST_ID_FIELD_NUMBER = 4;
+ private volatile java.lang.Object requestId_;
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The requestId.
+ */
+ @java.lang.Override
+ public java.lang.String getRequestId() {
+ java.lang.Object ref = requestId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ requestId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for requestId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRequestIdBytes() {
+ java.lang.Object ref = requestId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ requestId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getBackupIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_);
+ }
+ if (backup_ != null) {
+ output.writeMessage(3, getBackup());
+ }
+ if (!getRequestIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getBackupIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_);
+ }
+ if (backup_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup());
+ }
+ if (!getRequestIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.metastore.v1.CreateBackupRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.metastore.v1.CreateBackupRequest other =
+ (com.google.cloud.metastore.v1.CreateBackupRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (!getBackupId().equals(other.getBackupId())) return false;
+ if (hasBackup() != other.hasBackup()) return false;
+ if (hasBackup()) {
+ if (!getBackup().equals(other.getBackup())) return false;
+ }
+ if (!getRequestId().equals(other.getRequestId())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getBackupId().hashCode();
+ if (hasBackup()) {
+ hash = (37 * hash) + BACKUP_FIELD_NUMBER;
+ hash = (53 * hash) + getBackup().hashCode();
+ }
+ hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getRequestId().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.metastore.v1.CreateBackupRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
+ *
+ *
+ * Protobuf type {@code google.cloud.metastore.v1.CreateBackupRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The backupId.
+ */
+ public java.lang.String getBackupId() {
+ java.lang.Object ref = backupId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ backupId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for backupId.
+ */
+ public com.google.protobuf.ByteString getBackupIdBytes() {
+ java.lang.Object ref = backupId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ backupId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The backupId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBackupId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ backupId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearBackupId() {
+
+ backupId_ = getDefaultInstance().getBackupId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for backupId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ backupId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.metastore.v1.Backup backup_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.metastore.v1.Backup,
+ com.google.cloud.metastore.v1.Backup.Builder,
+ com.google.cloud.metastore.v1.BackupOrBuilder>
+ backupBuilder_;
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the backup field is set.
+ */
+ public boolean hasBackup() {
+ return backupBuilder_ != null || backup_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The backup.
+ */
+ public com.google.cloud.metastore.v1.Backup getBackup() {
+ if (backupBuilder_ == null) {
+ return backup_ == null
+ ? com.google.cloud.metastore.v1.Backup.getDefaultInstance()
+ : backup_;
+ } else {
+ return backupBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setBackup(com.google.cloud.metastore.v1.Backup value) {
+ if (backupBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ backup_ = value;
+ onChanged();
+ } else {
+ backupBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setBackup(com.google.cloud.metastore.v1.Backup.Builder builderForValue) {
+ if (backupBuilder_ == null) {
+ backup_ = builderForValue.build();
+ onChanged();
+ } else {
+ backupBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeBackup(com.google.cloud.metastore.v1.Backup value) {
+ if (backupBuilder_ == null) {
+ if (backup_ != null) {
+ backup_ =
+ com.google.cloud.metastore.v1.Backup.newBuilder(backup_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ backup_ = value;
+ }
+ onChanged();
+ } else {
+ backupBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearBackup() {
+ if (backupBuilder_ == null) {
+ backup_ = null;
+ onChanged();
+ } else {
+ backup_ = null;
+ backupBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.metastore.v1.Backup.Builder getBackupBuilder() {
+
+ onChanged();
+ return getBackupFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder() {
+ if (backupBuilder_ != null) {
+ return backupBuilder_.getMessageOrBuilder();
+ } else {
+ return backup_ == null
+ ? com.google.cloud.metastore.v1.Backup.getDefaultInstance()
+ : 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.metastore.v1.Backup,
+ com.google.cloud.metastore.v1.Backup.Builder,
+ com.google.cloud.metastore.v1.BackupOrBuilder>
+ getBackupFieldBuilder() {
+ if (backupBuilder_ == null) {
+ backupBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.metastore.v1.Backup,
+ com.google.cloud.metastore.v1.Backup.Builder,
+ com.google.cloud.metastore.v1.BackupOrBuilder>(
+ getBackup(), getParentForChildren(), isClean());
+ backup_ = null;
+ }
+ return backupBuilder_;
+ }
+
+ private java.lang.Object requestId_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The requestId.
+ */
+ public java.lang.String getRequestId() {
+ java.lang.Object ref = requestId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ requestId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for requestId.
+ */
+ public com.google.protobuf.ByteString getRequestIdBytes() {
+ java.lang.Object ref = requestId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ requestId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The requestId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRequestId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ requestId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRequestId() {
+
+ requestId_ = getDefaultInstance().getRequestId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for requestId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ requestId_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateBackupRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateBackupRequest)
+ private static final com.google.cloud.metastore.v1.CreateBackupRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateBackupRequest();
+ }
+
+ public static com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the service in which to create a backup
+ * of the following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The backupId.
+ */
+ java.lang.String getBackupId();
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for backupId.
+ */
+ com.google.protobuf.ByteString getBackupIdBytes();
+
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the backup field is set.
+ */
+ boolean hasBackup();
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The backup.
+ */
+ com.google.cloud.metastore.v1.Backup getBackup();
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The requestId.
+ */
+ java.lang.String getRequestId();
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for requestId.
+ */
+ com.google.protobuf.ByteString getRequestIdBytes();
+}
diff --git a/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java b/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java
index 22a2c5e0..58cdb416 100644
--- a/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java
+++ b/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java
@@ -132,6 +132,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum {
* MYSQL = 1;
*/
MYSQL(1),
+ /**
+ *
+ *
+ *
+ * Database dump contains Avro files.
+ *
+ *
+ * AVRO = 2;
+ */
+ AVRO(2),
UNRECOGNIZED(-1),
;
@@ -155,6 +165,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum {
* MYSQL = 1;
*/
public static final int MYSQL_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * Database dump contains Avro files.
+ *
+ *
+ * AVRO = 2;
+ */
+ public static final int AVRO_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
@@ -184,6 +204,8 @@ public static Type forNumber(int value) {
return TYPE_UNSPECIFIED;
case 1:
return MYSQL;
+ case 2:
+ return AVRO;
default:
return null;
}
diff --git a/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java b/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java
new file mode 100644
index 00000000..b20844aa
--- /dev/null
+++ b/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java
@@ -0,0 +1,906 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/metastore/v1/metastore.proto
+
+package com.google.cloud.metastore.v1;
+
+/**
+ *
+ *
+ *
+ * Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
+ *
+ *
+ * Protobuf type {@code google.cloud.metastore.v1.DeleteBackupRequest}
+ */
+public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteBackupRequest)
+ DeleteBackupRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use DeleteBackupRequest.newBuilder() to construct.
+ private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private DeleteBackupRequest() {
+ name_ = "";
+ requestId_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new DeleteBackupRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private DeleteBackupRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ requestId_ = s;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.metastore.v1.MetastoreProto
+ .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.metastore.v1.MetastoreProto
+ .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.metastore.v1.DeleteBackupRequest.class,
+ com.google.cloud.metastore.v1.DeleteBackupRequest.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int REQUEST_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object requestId_;
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The requestId.
+ */
+ @java.lang.Override
+ public java.lang.String getRequestId() {
+ java.lang.Object ref = requestId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ requestId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for requestId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRequestIdBytes() {
+ java.lang.Object ref = requestId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ requestId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!getRequestIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!getRequestIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.metastore.v1.DeleteBackupRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.metastore.v1.DeleteBackupRequest other =
+ (com.google.cloud.metastore.v1.DeleteBackupRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getRequestId().equals(other.getRequestId())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getRequestId().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.metastore.v1.DeleteBackupRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
+ *
+ *
+ * Protobuf type {@code google.cloud.metastore.v1.DeleteBackupRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The relative resource name of the backup to delete, in the
+ * following form:
+ * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+ *
+ *
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object requestId_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The requestId.
+ */
+ public java.lang.String getRequestId() {
+ java.lang.Object ref = requestId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ requestId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for requestId.
+ */
+ public com.google.protobuf.ByteString getRequestIdBytes() {
+ java.lang.Object ref = requestId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ requestId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The requestId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRequestId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ requestId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRequestId() {
+
+ requestId_ = getDefaultInstance().getRequestId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
+ * request if it has completed. The server will ignore subsequent requests
+ * that provide a duplicate request ID for at least 60 minutes after the first
+ * request.
+ * For example, if an initial request times out, followed by another request
+ * with the same request ID, the server ignores the second request to prevent
+ * the creation of duplicate commitments.
+ * The request ID must be a valid
+ * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+ * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+ *
+ *
+ * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for requestId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ requestId_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteBackupRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteBackupRequest)
+ private static final com.google.cloud.metastore.v1.DeleteBackupRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteBackupRequest();
+ }
+
+ public static com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser