While the operation is pending: + * + *
* The database's [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. * Cancelling the operation is best-effort. If the cancellation + * succeeds, the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] is set, the + * updates are reverted, and the operation terminates with a `CANCELLED` status. * New + * UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation + * is done (returns successfully or with error). * Reading the database via the API continues + * to give the pre-request values. + * + *
Upon completion of the returned operation: + * + *
* The new values are in effect and readable via the API. * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] field becomes false. + * + *
The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+ * Database database = Database.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Database response = databaseAdminClient.updateDatabaseAsync(database, updateMask).get();
+ * }
+ * }
+ *
+ * @param database Required. The database to update. The `name` field of the database is of the
+ * form `projects/<project>/instances/<instance>/databases/<database>`.
+ * @param updateMask Required. The list of fields to update. Currently, only
+ * `enable_drop_protection` field can be updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureWhile the operation is pending: + * + *
* The database's [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. * Cancelling the operation is best-effort. If the cancellation + * succeeds, the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] is set, the + * updates are reverted, and the operation terminates with a `CANCELLED` status. * New + * UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation + * is done (returns successfully or with error). * Reading the database via the API continues + * to give the pre-request values. + * + *
Upon completion of the returned operation: + * + *
* The new values are in effect and readable via the API. * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] field becomes false. + * + *
The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+ * UpdateDatabaseRequest request =
+ * UpdateDatabaseRequest.newBuilder()
+ * .setDatabase(Database.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Database response = databaseAdminClient.updateDatabaseAsync(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 OperationFutureWhile the operation is pending: + * + *
* The database's [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. * Cancelling the operation is best-effort. If the cancellation + * succeeds, the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] is set, the + * updates are reverted, and the operation terminates with a `CANCELLED` status. * New + * UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation + * is done (returns successfully or with error). * Reading the database via the API continues + * to give the pre-request values. + * + *
Upon completion of the returned operation: + * + *
* The new values are in effect and readable via the API. * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] field becomes false. + * + *
The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+ * UpdateDatabaseRequest request =
+ * UpdateDatabaseRequest.newBuilder()
+ * .setDatabase(Database.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * databaseAdminClient.updateDatabaseOperationCallable().futureCall(request);
+ * // Do something.
+ * Database response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableWhile the operation is pending: + * + *
* The database's [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. * Cancelling the operation is best-effort. If the cancellation + * succeeds, the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] is set, the + * updates are reverted, and the operation terminates with a `CANCELLED` status. * New + * UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation + * is done (returns successfully or with error). * Reading the database via the API continues + * to give the pre-request values. + * + *
Upon completion of the returned operation: + * + *
* The new values are in effect and readable via the API. * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] field becomes false. + * + *
The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+ * UpdateDatabaseRequest request =
+ * UpdateDatabaseRequest.newBuilder()
+ * .setDatabase(Database.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * databaseAdminClient.updateDatabaseCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable+ * Updates a Cloud Spanner database. The returned + * [long-running operation][google.longrunning.Operation] can be used to track + * the progress of updating the database. If the named database does not + * exist, returns `NOT_FOUND`. + * While the operation is pending: + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. + * * Cancelling the operation is best-effort. If the cancellation succeeds, + * the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] + * is set, the updates are reverted, and the operation terminates with a + * `CANCELLED` status. + * * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + * until the pending operation is done (returns successfully or with + * error). + * * Reading the database via the API continues to give the pre-request + * values. + * Upon completion of the returned operation: + * * The new values are in effect and readable via the API. + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field becomes false. + * The returned [long-running operation][google.longrunning.Operation] will + * have a name of the format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + *+ */ + default void updateDatabase( + com.google.spanner.admin.database.v1.UpdateDatabaseRequest request, + io.grpc.stub.StreamObserver
+ * Updates a Cloud Spanner database. The returned + * [long-running operation][google.longrunning.Operation] can be used to track + * the progress of updating the database. If the named database does not + * exist, returns `NOT_FOUND`. + * While the operation is pending: + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. + * * Cancelling the operation is best-effort. If the cancellation succeeds, + * the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] + * is set, the updates are reverted, and the operation terminates with a + * `CANCELLED` status. + * * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + * until the pending operation is done (returns successfully or with + * error). + * * Reading the database via the API continues to give the pre-request + * values. + * Upon completion of the returned operation: + * * The new values are in effect and readable via the API. + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field becomes false. + * The returned [long-running operation][google.longrunning.Operation] will + * have a name of the format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + *+ */ + public void updateDatabase( + com.google.spanner.admin.database.v1.UpdateDatabaseRequest request, + io.grpc.stub.StreamObserver
+ * Updates a Cloud Spanner database. The returned + * [long-running operation][google.longrunning.Operation] can be used to track + * the progress of updating the database. If the named database does not + * exist, returns `NOT_FOUND`. + * While the operation is pending: + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. + * * Cancelling the operation is best-effort. If the cancellation succeeds, + * the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] + * is set, the updates are reverted, and the operation terminates with a + * `CANCELLED` status. + * * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + * until the pending operation is done (returns successfully or with + * error). + * * Reading the database via the API continues to give the pre-request + * values. + * Upon completion of the returned operation: + * * The new values are in effect and readable via the API. + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field becomes false. + * The returned [long-running operation][google.longrunning.Operation] will + * have a name of the format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + *+ */ + public com.google.longrunning.Operation updateDatabase( + com.google.spanner.admin.database.v1.UpdateDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDatabaseMethod(), getCallOptions(), request); + } + /** * * @@ -2206,6 +2385,49 @@ protected DatabaseAdminFutureStub build( getChannel().newCall(getGetDatabaseMethod(), getCallOptions()), request); } + /** + * + * + *
+ * Updates a Cloud Spanner database. The returned + * [long-running operation][google.longrunning.Operation] can be used to track + * the progress of updating the database. If the named database does not + * exist, returns `NOT_FOUND`. + * While the operation is pending: + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field is set to true. + * * Cancelling the operation is best-effort. If the cancellation succeeds, + * the operation metadata's + * [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] + * is set, the updates are reverted, and the operation terminates with a + * `CANCELLED` status. + * * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + * until the pending operation is done (returns successfully or with + * error). + * * Reading the database via the API continues to give the pre-request + * values. + * Upon completion of the returned operation: + * * The new values are in effect and readable via the API. + * * The database's + * [reconciling][google.spanner.admin.database.v1.Database.reconciling] + * field becomes false. + * The returned [long-running operation][google.longrunning.Operation] will + * have a name of the format + * `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>` + * and can be used to track the database modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [Database][google.spanner.admin.database.v1.Database], if successful. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Whether drop protection is enabled for this database. Defaults to false, + * if not set. + *+ * + *
bool enable_drop_protection = 11;
+ *
+ * @return The enableDropProtection.
+ */
+ @java.lang.Override
+ public boolean getEnableDropProtection() {
+ return enableDropProtection_;
+ }
+
+ public static final int RECONCILING_FIELD_NUMBER = 12;
+ private boolean reconciling_ = false;
+ /**
+ *
+ *
+ * + * Output only. If true, the database is being updated. If false, there are no + * ongoing update operations for the database. + *+ * + *
bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The reconciling.
+ */
+ @java.lang.Override
+ public boolean getReconciling() {
+ return reconciling_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -926,6 +964,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
.getNumber()) {
output.writeEnum(10, databaseDialect_);
}
+ if (enableDropProtection_ != false) {
+ output.writeBool(11, enableDropProtection_);
+ }
+ if (reconciling_ != false) {
+ output.writeBool(12, reconciling_);
+ }
getUnknownFields().writeTo(output);
}
@@ -968,6 +1012,12 @@ public int getSerializedSize() {
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, databaseDialect_);
}
+ if (enableDropProtection_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, enableDropProtection_);
+ }
+ if (reconciling_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, reconciling_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -1006,6 +1056,8 @@ public boolean equals(final java.lang.Object obj) {
}
if (!getDefaultLeader().equals(other.getDefaultLeader())) return false;
if (databaseDialect_ != other.databaseDialect_) return false;
+ if (getEnableDropProtection() != other.getEnableDropProtection()) return false;
+ if (getReconciling() != other.getReconciling()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1047,6 +1099,10 @@ public int hashCode() {
hash = (53 * hash) + getDefaultLeader().hashCode();
hash = (37 * hash) + DATABASE_DIALECT_FIELD_NUMBER;
hash = (53 * hash) + databaseDialect_;
+ hash = (37 * hash) + ENABLE_DROP_PROTECTION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDropProtection());
+ hash = (37 * hash) + RECONCILING_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -1218,6 +1274,8 @@ public Builder clear() {
}
defaultLeader_ = "";
databaseDialect_ = 0;
+ enableDropProtection_ = false;
+ reconciling_ = false;
return this;
}
@@ -1299,6 +1357,12 @@ private void buildPartial0(com.google.spanner.admin.database.v1.Database result)
if (((from_bitField0_ & 0x00000200) != 0)) {
result.databaseDialect_ = databaseDialect_;
}
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ result.enableDropProtection_ = enableDropProtection_;
+ }
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.reconciling_ = reconciling_;
+ }
}
@java.lang.Override
@@ -1406,6 +1470,12 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Database other) {
if (other.databaseDialect_ != 0) {
setDatabaseDialectValue(other.getDatabaseDialectValue());
}
+ if (other.getEnableDropProtection() != false) {
+ setEnableDropProtection(other.getEnableDropProtection());
+ }
+ if (other.getReconciling() != false) {
+ setReconciling(other.getReconciling());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -1502,6 +1572,18 @@ public Builder mergeFrom(
bitField0_ |= 0x00000200;
break;
} // case 80
+ case 88:
+ {
+ enableDropProtection_ = input.readBool();
+ bitField0_ |= 0x00000400;
+ break;
+ } // case 88
+ case 96:
+ {
+ reconciling_ = input.readBool();
+ bitField0_ |= 0x00000800;
+ break;
+ } // case 96
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -3498,6 +3580,118 @@ public Builder clearDatabaseDialect() {
return this;
}
+ private boolean enableDropProtection_;
+ /**
+ *
+ *
+ * + * Whether drop protection is enabled for this database. Defaults to false, + * if not set. + *+ * + *
bool enable_drop_protection = 11;
+ *
+ * @return The enableDropProtection.
+ */
+ @java.lang.Override
+ public boolean getEnableDropProtection() {
+ return enableDropProtection_;
+ }
+ /**
+ *
+ *
+ * + * Whether drop protection is enabled for this database. Defaults to false, + * if not set. + *+ * + *
bool enable_drop_protection = 11;
+ *
+ * @param value The enableDropProtection to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEnableDropProtection(boolean value) {
+
+ enableDropProtection_ = value;
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Whether drop protection is enabled for this database. Defaults to false, + * if not set. + *+ * + *
bool enable_drop_protection = 11;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEnableDropProtection() {
+ bitField0_ = (bitField0_ & ~0x00000400);
+ enableDropProtection_ = false;
+ onChanged();
+ return this;
+ }
+
+ private boolean reconciling_;
+ /**
+ *
+ *
+ * + * Output only. If true, the database is being updated. If false, there are no + * ongoing update operations for the database. + *+ * + *
bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The reconciling.
+ */
+ @java.lang.Override
+ public boolean getReconciling() {
+ return reconciling_;
+ }
+ /**
+ *
+ *
+ * + * Output only. If true, the database is being updated. If false, there are no + * ongoing update operations for the database. + *+ * + *
bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The reconciling to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReconciling(boolean value) {
+
+ reconciling_ = value;
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. If true, the database is being updated. If false, there are no + * ongoing update operations for the database. + *+ * + *
bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearReconciling() {
+ bitField0_ = (bitField0_ & ~0x00000800);
+ reconciling_ = false;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java
index de9373a0f9e..0252781fe91 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java
@@ -457,4 +457,32 @@ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInfoOr
* @return The databaseDialect.
*/
com.google.spanner.admin.database.v1.DatabaseDialect getDatabaseDialect();
+
+ /**
+ *
+ *
+ * + * Whether drop protection is enabled for this database. Defaults to false, + * if not set. + *+ * + *
bool enable_drop_protection = 11;
+ *
+ * @return The enableDropProtection.
+ */
+ boolean getEnableDropProtection();
+
+ /**
+ *
+ *
+ * + * Output only. If true, the database is being updated. If false, there are no + * ongoing update operations for the database. + *+ * + *
bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The reconciling.
+ */
+ boolean getReconciling();
}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java
index e91f9a65717..0045ee30f35 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java
@@ -55,6 +55,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -128,239 +136,257 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "source.proto\032\036google/iam/v1/iam_policy.p"
+ "roto\032\032google/iam/v1/policy.proto\032#google"
+ "/longrunning/operations.proto\032\033google/pr"
- + "otobuf/empty.proto\032\037google/protobuf/time"
- + "stamp.proto\032-google/spanner/admin/databa"
- + "se/v1/backup.proto\032-google/spanner/admin"
- + "/database/v1/common.proto\"\253\001\n\013RestoreInf"
- + "o\022H\n\013source_type\030\001 \001(\01623.google.spanner."
- + "admin.database.v1.RestoreSourceType\022C\n\013b"
- + "ackup_info\030\002 \001(\0132,.google.spanner.admin."
- + "database.v1.BackupInfoH\000B\r\n\013source_info\""
- + "\220\006\n\010Database\022\021\n\004name\030\001 \001(\tB\003\340A\002\022D\n\005state"
- + "\030\002 \001(\01620.google.spanner.admin.database.v"
- + "1.Database.StateB\003\340A\003\0224\n\013create_time\030\003 \001"
- + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022H\n\014r"
- + "estore_info\030\004 \001(\0132-.google.spanner.admin"
- + ".database.v1.RestoreInfoB\003\340A\003\022R\n\021encrypt"
- + "ion_config\030\005 \001(\01322.google.spanner.admin."
- + "database.v1.EncryptionConfigB\003\340A\003\022N\n\017enc"
- + "ryption_info\030\010 \003(\01320.google.spanner.admi"
- + "n.database.v1.EncryptionInfoB\003\340A\003\022%\n\030ver"
- + "sion_retention_period\030\006 \001(\tB\003\340A\003\022>\n\025earl"
- + "iest_version_time\030\007 \001(\0132\032.google.protobu"
- + "f.TimestampB\003\340A\003\022\033\n\016default_leader\030\t \001(\t"
- + "B\003\340A\003\022P\n\020database_dialect\030\n \001(\01621.google"
- + ".spanner.admin.database.v1.DatabaseDiale"
- + "ctB\003\340A\003\"M\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022"
- + "\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\024\n\020READY_OPTIMI"
- + "ZING\020\003:b\352A_\n\037spanner.googleapis.com/Data"
- + "base\022+ * Metadata type for the operation returned by + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseMetadata} + */ +public final class UpdateDatabaseMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateDatabaseMetadata) + UpdateDatabaseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDatabaseMetadata.newBuilder() to construct. + private UpdateDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private UpdateDatabaseMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDatabaseMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.UpdateDatabaseMetadata.class, + com.google.spanner.admin.database.v1.UpdateDatabaseMetadata.Builder.class); + } + + public static final int REQUEST_FIELD_NUMBER = 1; + private com.google.spanner.admin.database.v1.UpdateDatabaseRequest request_; + /** + * + * + *
+ * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ *
+ * @return Whether the request field is set.
+ */
+ @java.lang.Override
+ public boolean hasRequest() {
+ return request_ != null;
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ *
+ * @return The request.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.UpdateDatabaseRequest getRequest() {
+ return request_ == null
+ ? com.google.spanner.admin.database.v1.UpdateDatabaseRequest.getDefaultInstance()
+ : request_;
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder getRequestOrBuilder() {
+ return request_ == null
+ ? com.google.spanner.admin.database.v1.UpdateDatabaseRequest.getDefaultInstance()
+ : request_;
+ }
+
+ public static final int PROGRESS_FIELD_NUMBER = 2;
+ private com.google.spanner.admin.database.v1.OperationProgress progress_;
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ *
+ * @return Whether the progress field is set.
+ */
+ @java.lang.Override
+ public boolean hasProgress() {
+ return progress_ != null;
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ *
+ * @return The progress.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.OperationProgress getProgress() {
+ return progress_ == null
+ ? com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()
+ : progress_;
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgressOrBuilder() {
+ return progress_ == null
+ ? com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()
+ : progress_;
+ }
+
+ public static final int CANCEL_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp cancelTime_;
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ *
+ * @return Whether the cancelTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasCancelTime() {
+ return cancelTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ *
+ * @return The cancelTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getCancelTime() {
+ return cancelTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : cancelTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() {
+ return cancelTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : cancelTime_;
+ }
+
+ 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 (request_ != null) {
+ output.writeMessage(1, getRequest());
+ }
+ if (progress_ != null) {
+ output.writeMessage(2, getProgress());
+ }
+ if (cancelTime_ != null) {
+ output.writeMessage(3, getCancelTime());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (request_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRequest());
+ }
+ if (progress_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProgress());
+ }
+ if (cancelTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCancelTime());
+ }
+ size += getUnknownFields().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.spanner.admin.database.v1.UpdateDatabaseMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.admin.database.v1.UpdateDatabaseMetadata other =
+ (com.google.spanner.admin.database.v1.UpdateDatabaseMetadata) obj;
+
+ if (hasRequest() != other.hasRequest()) return false;
+ if (hasRequest()) {
+ if (!getRequest().equals(other.getRequest())) return false;
+ }
+ if (hasProgress() != other.hasProgress()) return false;
+ if (hasProgress()) {
+ if (!getProgress().equals(other.getProgress())) return false;
+ }
+ if (hasCancelTime() != other.hasCancelTime()) return false;
+ if (hasCancelTime()) {
+ if (!getCancelTime().equals(other.getCancelTime())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasRequest()) {
+ hash = (37 * hash) + REQUEST_FIELD_NUMBER;
+ hash = (53 * hash) + getRequest().hashCode();
+ }
+ if (hasProgress()) {
+ hash = (37 * hash) + PROGRESS_FIELD_NUMBER;
+ hash = (53 * hash) + getProgress().hashCode();
+ }
+ if (hasCancelTime()) {
+ hash = (37 * hash) + CANCEL_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getCancelTime().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata 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.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata 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.spanner.admin.database.v1.UpdateDatabaseMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata 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.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata 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.spanner.admin.database.v1.UpdateDatabaseMetadata 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;
+ }
+ /**
+ *
+ *
+ * + * Metadata type for the operation returned by + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ *
+ * @return Whether the request field is set.
+ */
+ public boolean hasRequest() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ *
+ * @return The request.
+ */
+ public com.google.spanner.admin.database.v1.UpdateDatabaseRequest getRequest() {
+ if (requestBuilder_ == null) {
+ return request_ == null
+ ? com.google.spanner.admin.database.v1.UpdateDatabaseRequest.getDefaultInstance()
+ : request_;
+ } else {
+ return requestBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ public Builder setRequest(com.google.spanner.admin.database.v1.UpdateDatabaseRequest value) {
+ if (requestBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ request_ = value;
+ } else {
+ requestBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ public Builder setRequest(
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder builderForValue) {
+ if (requestBuilder_ == null) {
+ request_ = builderForValue.build();
+ } else {
+ requestBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ public Builder mergeRequest(com.google.spanner.admin.database.v1.UpdateDatabaseRequest value) {
+ if (requestBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && request_ != null
+ && request_
+ != com.google.spanner.admin.database.v1.UpdateDatabaseRequest
+ .getDefaultInstance()) {
+ getRequestBuilder().mergeFrom(value);
+ } else {
+ request_ = value;
+ }
+ } else {
+ requestBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ public Builder clearRequest() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ request_ = null;
+ if (requestBuilder_ != null) {
+ requestBuilder_.dispose();
+ requestBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ public com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder getRequestBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getRequestFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ public com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder
+ getRequestOrBuilder() {
+ if (requestBuilder_ != null) {
+ return requestBuilder_.getMessageOrBuilder();
+ } else {
+ return request_ == null
+ ? com.google.spanner.admin.database.v1.UpdateDatabaseRequest.getDefaultInstance()
+ : request_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest,
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder,
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder>
+ getRequestFieldBuilder() {
+ if (requestBuilder_ == null) {
+ requestBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest,
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder,
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder>(
+ getRequest(), getParentForChildren(), isClean());
+ request_ = null;
+ }
+ return requestBuilder_;
+ }
+
+ private com.google.spanner.admin.database.v1.OperationProgress progress_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.OperationProgress,
+ com.google.spanner.admin.database.v1.OperationProgress.Builder,
+ com.google.spanner.admin.database.v1.OperationProgressOrBuilder>
+ progressBuilder_;
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ *
+ * @return Whether the progress field is set.
+ */
+ public boolean hasProgress() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ *
+ * @return The progress.
+ */
+ public com.google.spanner.admin.database.v1.OperationProgress getProgress() {
+ if (progressBuilder_ == null) {
+ return progress_ == null
+ ? com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()
+ : progress_;
+ } else {
+ return progressBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ public Builder setProgress(com.google.spanner.admin.database.v1.OperationProgress value) {
+ if (progressBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ progress_ = value;
+ } else {
+ progressBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ public Builder setProgress(
+ com.google.spanner.admin.database.v1.OperationProgress.Builder builderForValue) {
+ if (progressBuilder_ == null) {
+ progress_ = builderForValue.build();
+ } else {
+ progressBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ public Builder mergeProgress(com.google.spanner.admin.database.v1.OperationProgress value) {
+ if (progressBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && progress_ != null
+ && progress_
+ != com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()) {
+ getProgressBuilder().mergeFrom(value);
+ } else {
+ progress_ = value;
+ }
+ } else {
+ progressBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ public Builder clearProgress() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ progress_ = null;
+ if (progressBuilder_ != null) {
+ progressBuilder_.dispose();
+ progressBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getProgressFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgressOrBuilder() {
+ if (progressBuilder_ != null) {
+ return progressBuilder_.getMessageOrBuilder();
+ } else {
+ return progress_ == null
+ ? com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()
+ : progress_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.OperationProgress,
+ com.google.spanner.admin.database.v1.OperationProgress.Builder,
+ com.google.spanner.admin.database.v1.OperationProgressOrBuilder>
+ getProgressFieldBuilder() {
+ if (progressBuilder_ == null) {
+ progressBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.OperationProgress,
+ com.google.spanner.admin.database.v1.OperationProgress.Builder,
+ com.google.spanner.admin.database.v1.OperationProgressOrBuilder>(
+ getProgress(), getParentForChildren(), isClean());
+ progress_ = null;
+ }
+ return progressBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp cancelTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ cancelTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ *
+ * @return Whether the cancelTime field is set.
+ */
+ public boolean hasCancelTime() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ *
+ * @return The cancelTime.
+ */
+ public com.google.protobuf.Timestamp getCancelTime() {
+ if (cancelTimeBuilder_ == null) {
+ return cancelTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : cancelTime_;
+ } else {
+ return cancelTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ public Builder setCancelTime(com.google.protobuf.Timestamp value) {
+ if (cancelTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ cancelTime_ = value;
+ } else {
+ cancelTimeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ public Builder setCancelTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (cancelTimeBuilder_ == null) {
+ cancelTime_ = builderForValue.build();
+ } else {
+ cancelTimeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ public Builder mergeCancelTime(com.google.protobuf.Timestamp value) {
+ if (cancelTimeBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0)
+ && cancelTime_ != null
+ && cancelTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getCancelTimeBuilder().mergeFrom(value);
+ } else {
+ cancelTime_ = value;
+ }
+ } else {
+ cancelTimeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ public Builder clearCancelTime() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ cancelTime_ = null;
+ if (cancelTimeBuilder_ != null) {
+ cancelTimeBuilder_.dispose();
+ cancelTimeBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return getCancelTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() {
+ if (cancelTimeBuilder_ != null) {
+ return cancelTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return cancelTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : cancelTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCancelTimeFieldBuilder() {
+ if (cancelTimeBuilder_ == null) {
+ cancelTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCancelTime(), getParentForChildren(), isClean());
+ cancelTime_ = null;
+ }
+ return cancelTimeBuilder_;
+ }
+
+ @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.spanner.admin.database.v1.UpdateDatabaseMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.UpdateDatabaseMetadata)
+ private static final com.google.spanner.admin.database.v1.UpdateDatabaseMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.UpdateDatabaseMetadata();
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ *
+ * @return Whether the request field is set.
+ */
+ boolean hasRequest();
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ *
+ * @return The request.
+ */
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest getRequest();
+ /**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + *
.google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1;
+ */
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder getRequestOrBuilder();
+
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ *
+ * @return Whether the progress field is set.
+ */
+ boolean hasProgress();
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ *
+ * @return The progress.
+ */
+ com.google.spanner.admin.database.v1.OperationProgress getProgress();
+ /**
+ *
+ *
+ * + * The progress of the + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] + * operation. + *+ * + *
.google.spanner.admin.database.v1.OperationProgress progress = 2;
+ */
+ com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgressOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ *
+ * @return Whether the cancelTime field is set.
+ */
+ boolean hasCancelTime();
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ *
+ * @return The cancelTime.
+ */
+ com.google.protobuf.Timestamp getCancelTime();
+ /**
+ *
+ *
+ * + * The time at which this operation was cancelled. If set, this operation is + * in the process of undoing itself (which is best-effort). + *+ * + *
.google.protobuf.Timestamp cancel_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder();
+}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java
new file mode 100644
index 00000000000..c496653a2fd
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java
@@ -0,0 +1,1046 @@
+/*
+ * 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/spanner/admin/database/v1/spanner_database_admin.proto
+
+package com.google.spanner.admin.database.v1;
+
+/**
+ *
+ *
+ * + * The request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseRequest} + */ +public final class UpdateDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateDatabaseRequest) + UpdateDatabaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDatabaseRequest.newBuilder() to construct. + private UpdateDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private UpdateDatabaseRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDatabaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.UpdateDatabaseRequest.class, + com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + private com.google.spanner.admin.database.v1.Database database_; + /** + * + * + *
+ * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the database field is set.
+ */
+ @java.lang.Override
+ public boolean hasDatabase() {
+ return database_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The database.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.Database getDatabase() {
+ return database_ == null
+ ? com.google.spanner.admin.database.v1.Database.getDefaultInstance()
+ : database_;
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuilder() {
+ return database_ == null
+ ? com.google.spanner.admin.database.v1.Database.getDefaultInstance()
+ : database_;
+ }
+
+ public static final int UPDATE_MASK_FIELD_NUMBER = 2;
+ private com.google.protobuf.FieldMask updateMask_;
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the updateMask field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpdateMask() {
+ return updateMask_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The updateMask.
+ */
+ @java.lang.Override
+ public com.google.protobuf.FieldMask getUpdateMask() {
+ return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
+ return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
+ }
+
+ 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 (database_ != null) {
+ output.writeMessage(1, getDatabase());
+ }
+ if (updateMask_ != null) {
+ output.writeMessage(2, getUpdateMask());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (database_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDatabase());
+ }
+ if (updateMask_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask());
+ }
+ size += getUnknownFields().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.spanner.admin.database.v1.UpdateDatabaseRequest)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.admin.database.v1.UpdateDatabaseRequest other =
+ (com.google.spanner.admin.database.v1.UpdateDatabaseRequest) obj;
+
+ if (hasDatabase() != other.hasDatabase()) return false;
+ if (hasDatabase()) {
+ if (!getDatabase().equals(other.getDatabase())) return false;
+ }
+ if (hasUpdateMask() != other.hasUpdateMask()) return false;
+ if (hasUpdateMask()) {
+ if (!getUpdateMask().equals(other.getUpdateMask())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasDatabase()) {
+ hash = (37 * hash) + DATABASE_FIELD_NUMBER;
+ hash = (53 * hash) + getDatabase().hashCode();
+ }
+ if (hasUpdateMask()) {
+ hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER;
+ hash = (53 * hash) + getUpdateMask().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest 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.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest 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.spanner.admin.database.v1.UpdateDatabaseRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest 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.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest 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.spanner.admin.database.v1.UpdateDatabaseRequest 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 request for + * [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase]. + *+ * + * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the database field is set.
+ */
+ public boolean hasDatabase() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The database.
+ */
+ public com.google.spanner.admin.database.v1.Database getDatabase() {
+ if (databaseBuilder_ == null) {
+ return database_ == null
+ ? com.google.spanner.admin.database.v1.Database.getDefaultInstance()
+ : database_;
+ } else {
+ return databaseBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setDatabase(com.google.spanner.admin.database.v1.Database value) {
+ if (databaseBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ database_ = value;
+ } else {
+ databaseBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setDatabase(
+ com.google.spanner.admin.database.v1.Database.Builder builderForValue) {
+ if (databaseBuilder_ == null) {
+ database_ = builderForValue.build();
+ } else {
+ databaseBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeDatabase(com.google.spanner.admin.database.v1.Database value) {
+ if (databaseBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && database_ != null
+ && database_ != com.google.spanner.admin.database.v1.Database.getDefaultInstance()) {
+ getDatabaseBuilder().mergeFrom(value);
+ } else {
+ database_ = value;
+ }
+ } else {
+ databaseBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearDatabase() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ database_ = null;
+ if (databaseBuilder_ != null) {
+ databaseBuilder_.dispose();
+ databaseBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.spanner.admin.database.v1.Database.Builder getDatabaseBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getDatabaseFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuilder() {
+ if (databaseBuilder_ != null) {
+ return databaseBuilder_.getMessageOrBuilder();
+ } else {
+ return database_ == null
+ ? com.google.spanner.admin.database.v1.Database.getDefaultInstance()
+ : database_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.Database,
+ com.google.spanner.admin.database.v1.Database.Builder,
+ com.google.spanner.admin.database.v1.DatabaseOrBuilder>
+ getDatabaseFieldBuilder() {
+ if (databaseBuilder_ == null) {
+ databaseBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.Database,
+ com.google.spanner.admin.database.v1.Database.Builder,
+ com.google.spanner.admin.database.v1.DatabaseOrBuilder>(
+ getDatabase(), getParentForChildren(), isClean());
+ database_ = null;
+ }
+ return databaseBuilder_;
+ }
+
+ private com.google.protobuf.FieldMask updateMask_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.FieldMask,
+ com.google.protobuf.FieldMask.Builder,
+ com.google.protobuf.FieldMaskOrBuilder>
+ updateMaskBuilder_;
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the updateMask field is set.
+ */
+ public boolean hasUpdateMask() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The updateMask.
+ */
+ public com.google.protobuf.FieldMask getUpdateMask() {
+ if (updateMaskBuilder_ == null) {
+ return updateMask_ == null
+ ? com.google.protobuf.FieldMask.getDefaultInstance()
+ : updateMask_;
+ } else {
+ return updateMaskBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
+ if (updateMaskBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ updateMask_ = value;
+ } else {
+ updateMaskBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) {
+ if (updateMaskBuilder_ == null) {
+ updateMask_ = builderForValue.build();
+ } else {
+ updateMaskBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
+ if (updateMaskBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && updateMask_ != null
+ && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) {
+ getUpdateMaskBuilder().mergeFrom(value);
+ } else {
+ updateMask_ = value;
+ }
+ } else {
+ updateMaskBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearUpdateMask() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ updateMask_ = null;
+ if (updateMaskBuilder_ != null) {
+ updateMaskBuilder_.dispose();
+ updateMaskBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getUpdateMaskFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
+ if (updateMaskBuilder_ != null) {
+ return updateMaskBuilder_.getMessageOrBuilder();
+ } else {
+ return updateMask_ == null
+ ? com.google.protobuf.FieldMask.getDefaultInstance()
+ : updateMask_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.FieldMask,
+ com.google.protobuf.FieldMask.Builder,
+ com.google.protobuf.FieldMaskOrBuilder>
+ getUpdateMaskFieldBuilder() {
+ if (updateMaskBuilder_ == null) {
+ updateMaskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.FieldMask,
+ com.google.protobuf.FieldMask.Builder,
+ com.google.protobuf.FieldMaskOrBuilder>(
+ getUpdateMask(), getParentForChildren(), isClean());
+ updateMask_ = null;
+ }
+ return updateMaskBuilder_;
+ }
+
+ @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.spanner.admin.database.v1.UpdateDatabaseRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.UpdateDatabaseRequest)
+ private static final com.google.spanner.admin.database.v1.UpdateDatabaseRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.UpdateDatabaseRequest();
+ }
+
+ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the database field is set.
+ */
+ boolean hasDatabase();
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The database.
+ */
+ com.google.spanner.admin.database.v1.Database getDatabase();
+ /**
+ *
+ *
+ * + * Required. The database to update. + * The `name` field of the database is of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + *+ * + *
+ * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuilder();
+
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the updateMask field is set.
+ */
+ boolean hasUpdateMask();
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The updateMask.
+ */
+ com.google.protobuf.FieldMask getUpdateMask();
+ /**
+ *
+ *
+ * + * Required. The list of fields to update. Currently, only + * `enable_drop_protection` field can be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder();
+}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto
index 4d98fa1313f..f45bb932fda 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ import "google/iam/v1/iam_policy.proto";
import "google/iam/v1/policy.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/spanner/admin/database/v1/backup.proto";
import "google/spanner/admin/database/v1/common.proto";
@@ -89,6 +90,55 @@ service DatabaseAdmin {
option (google.api.method_signature) = "name";
}
+ // Updates a Cloud Spanner database. The returned
+ // [long-running operation][google.longrunning.Operation] can be used to track
+ // the progress of updating the database. If the named database does not
+ // exist, returns `NOT_FOUND`.
+ //
+ // While the operation is pending:
+ //
+ // * The database's
+ // [reconciling][google.spanner.admin.database.v1.Database.reconciling]
+ // field is set to true.
+ // * Cancelling the operation is best-effort. If the cancellation succeeds,
+ // the operation metadata's
+ // [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time]
+ // is set, the updates are reverted, and the operation terminates with a
+ // `CANCELLED` status.
+ // * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error
+ // until the pending operation is done (returns successfully or with
+ // error).
+ // * Reading the database via the API continues to give the pre-request
+ // values.
+ //
+ // Upon completion of the returned operation:
+ //
+ // * The new values are in effect and readable via the API.
+ // * The database's
+ // [reconciling][google.spanner.admin.database.v1.Database.reconciling]
+ // field becomes false.
+ //
+ // The returned [long-running operation][google.longrunning.Operation] will
+ // have a name of the format
+ // `projects/Until completion of the returned operation: + * + *
Example of updating a database. + * + *
{@code
+ * String projectId = my_project_id;
+ * String instanceId = my_instance_id;
+ * String databaseId = my_database_id;
+ * Database databaseToUpdate = databaseAdminClient.newDatabaseBuilder(
+ * DatabaseId.of(projectId, instanceId, databaseId))
+ * .enableDropProtection().build();
+ * OperationFuture op = databaseAdminClient.updateDatabase(
+ * databaseToUpdate, DatabaseField.DROP_PROTECTION);
+ * Database updateDatabase = op.get(5, TimeUnit.MINUTES);
+ * }
+ *
+ * @param database The database to update to. The current field values of the database will be
+ * updated to the values specified in this parameter.
+ * @param fieldsToUpdate The fields that should be updated. Only these fields will have their
+ * values updated to the values specified in {@param database}, even if there are other fields
+ * specified in {@param database}.
+ */
+ OperationFuture