diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java index ac602861ce0..d8110bd947c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java @@ -40,8 +40,11 @@ import com.google.longrunning.OperationsClient; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupName; +import com.google.spanner.admin.database.v1.CopyBackupMetadata; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupMetadata; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseMetadata; @@ -1548,6 +1551,327 @@ public final UnaryCallable createBackupCallable( return stub.createBackupCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   String backupId = "backupId2121930365";
+   *   BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]");
+   *   Timestamp expireTime = Timestamp.newBuilder().build();
+   *   Backup response =
+   *       databaseAdminClient.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the destination instance that will contain the backup copy. + * Values are of the form: `projects/<project>/instances/<instance>`. + * @param backupId Required. The id of the backup copy. The `backup_id` appended to `parent` forms + * the full backup_uri of the form + * `projects/<project>/instances/<instance>/backups/<backup>`. + * @param sourceBackup Required. The source backup to be copied. The source backup needs to be in + * READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot + * be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the + * form: `projects/<project>/instances/<instance>/backups/<backup>`. + * @param expireTime Required. The expiration time of the backup in microsecond granularity. The + * expiration time must be at least 6 hours and at most 366 days from the `create_time` of the + * source backup. Once the `expire_time` has passed, the backup is eligible to be + * automatically deleted by Cloud Spanner to free the resources used by the backup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyBackupAsync( + InstanceName parent, String backupId, BackupName sourceBackup, Timestamp expireTime) { + CopyBackupRequest request = + CopyBackupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackupId(backupId) + .setSourceBackup(sourceBackup == null ? null : sourceBackup.toString()) + .setExpireTime(expireTime) + .build(); + return copyBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   String backupId = "backupId2121930365";
+   *   String sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString();
+   *   Timestamp expireTime = Timestamp.newBuilder().build();
+   *   Backup response =
+   *       databaseAdminClient.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the destination instance that will contain the backup copy. + * Values are of the form: `projects/<project>/instances/<instance>`. + * @param backupId Required. The id of the backup copy. The `backup_id` appended to `parent` forms + * the full backup_uri of the form + * `projects/<project>/instances/<instance>/backups/<backup>`. + * @param sourceBackup Required. The source backup to be copied. The source backup needs to be in + * READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot + * be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the + * form: `projects/<project>/instances/<instance>/backups/<backup>`. + * @param expireTime Required. The expiration time of the backup in microsecond granularity. The + * expiration time must be at least 6 hours and at most 366 days from the `create_time` of the + * source backup. Once the `expire_time` has passed, the backup is eligible to be + * automatically deleted by Cloud Spanner to free the resources used by the backup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyBackupAsync( + InstanceName parent, String backupId, String sourceBackup, Timestamp expireTime) { + CopyBackupRequest request = + CopyBackupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackupId(backupId) + .setSourceBackup(sourceBackup) + .setExpireTime(expireTime) + .build(); + return copyBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   String backupId = "backupId2121930365";
+   *   BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]");
+   *   Timestamp expireTime = Timestamp.newBuilder().build();
+   *   Backup response =
+   *       databaseAdminClient.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the destination instance that will contain the backup copy. + * Values are of the form: `projects/<project>/instances/<instance>`. + * @param backupId Required. The id of the backup copy. The `backup_id` appended to `parent` forms + * the full backup_uri of the form + * `projects/<project>/instances/<instance>/backups/<backup>`. + * @param sourceBackup Required. The source backup to be copied. The source backup needs to be in + * READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot + * be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the + * form: `projects/<project>/instances/<instance>/backups/<backup>`. + * @param expireTime Required. The expiration time of the backup in microsecond granularity. The + * expiration time must be at least 6 hours and at most 366 days from the `create_time` of the + * source backup. Once the `expire_time` has passed, the backup is eligible to be + * automatically deleted by Cloud Spanner to free the resources used by the backup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyBackupAsync( + String parent, String backupId, BackupName sourceBackup, Timestamp expireTime) { + CopyBackupRequest request = + CopyBackupRequest.newBuilder() + .setParent(parent) + .setBackupId(backupId) + .setSourceBackup(sourceBackup == null ? null : sourceBackup.toString()) + .setExpireTime(expireTime) + .build(); + return copyBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   String backupId = "backupId2121930365";
+   *   String sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString();
+   *   Timestamp expireTime = Timestamp.newBuilder().build();
+   *   Backup response =
+   *       databaseAdminClient.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the destination instance that will contain the backup copy. + * Values are of the form: `projects/<project>/instances/<instance>`. + * @param backupId Required. The id of the backup copy. The `backup_id` appended to `parent` forms + * the full backup_uri of the form + * `projects/<project>/instances/<instance>/backups/<backup>`. + * @param sourceBackup Required. The source backup to be copied. The source backup needs to be in + * READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot + * be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the + * form: `projects/<project>/instances/<instance>/backups/<backup>`. + * @param expireTime Required. The expiration time of the backup in microsecond granularity. The + * expiration time must be at least 6 hours and at most 366 days from the `create_time` of the + * source backup. Once the `expire_time` has passed, the backup is eligible to be + * automatically deleted by Cloud Spanner to free the resources used by the backup. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyBackupAsync( + String parent, String backupId, String sourceBackup, Timestamp expireTime) { + CopyBackupRequest request = + CopyBackupRequest.newBuilder() + .setParent(parent) + .setBackupId(backupId) + .setSourceBackup(sourceBackup) + .setExpireTime(expireTime) + .build(); + return copyBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   CopyBackupRequest request =
+   *       CopyBackupRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setBackupId("backupId2121930365")
+   *           .setSourceBackup(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString())
+   *           .setExpireTime(Timestamp.newBuilder().build())
+   *           .setEncryptionConfig(CopyBackupEncryptionConfig.newBuilder().build())
+   *           .build();
+   *   Backup response = databaseAdminClient.copyBackupAsync(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 copyBackupAsync( + CopyBackupRequest request) { + return copyBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   CopyBackupRequest request =
+   *       CopyBackupRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setBackupId("backupId2121930365")
+   *           .setSourceBackup(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString())
+   *           .setExpireTime(Timestamp.newBuilder().build())
+   *           .setEncryptionConfig(CopyBackupEncryptionConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       databaseAdminClient.copyBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + copyBackupOperationCallable() { + return stub.copyBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts copying a Cloud Spanner Backup. The returned backup [long-running + * operation][google.longrunning.Operation] will have a name of the format + * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` + * and can be used to track copying of the backup. The operation is associated with the + * destination backup. The [metadata][google.longrunning.Operation.metadata] field type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The + * [response][google.longrunning.Operation.response] field type is + * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned + * operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run + * on the same source backup. + * + *

Sample code: + * + *

{@code
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   CopyBackupRequest request =
+   *       CopyBackupRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setBackupId("backupId2121930365")
+   *           .setSourceBackup(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString())
+   *           .setExpireTime(Timestamp.newBuilder().build())
+   *           .setEncryptionConfig(CopyBackupEncryptionConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = databaseAdminClient.copyBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable copyBackupCallable() { + return stub.copyBackupCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java index 358be3bde42..5d924f60ed6 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java @@ -42,6 +42,8 @@ import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.spanner.admin.database.v1.Backup; +import com.google.spanner.admin.database.v1.CopyBackupMetadata; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupMetadata; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseMetadata; @@ -174,6 +176,17 @@ public UnaryCallSettings createBackupSettings() return ((DatabaseAdminStubSettings) getStubSettings()).createBackupOperationSettings(); } + /** Returns the object with the settings used for calls to copyBackup. */ + public UnaryCallSettings copyBackupSettings() { + return ((DatabaseAdminStubSettings) getStubSettings()).copyBackupSettings(); + } + + /** Returns the object with the settings used for calls to copyBackup. */ + public OperationCallSettings + copyBackupOperationSettings() { + return ((DatabaseAdminStubSettings) getStubSettings()).copyBackupOperationSettings(); + } + /** Returns the object with the settings used for calls to getBackup. */ public UnaryCallSettings getBackupSettings() { return ((DatabaseAdminStubSettings) getStubSettings()).getBackupSettings(); @@ -394,6 +407,17 @@ public UnaryCallSettings.Builder createBackupSet return getStubSettingsBuilder().createBackupOperationSettings(); } + /** Returns the builder for the settings used for calls to copyBackup. */ + public UnaryCallSettings.Builder copyBackupSettings() { + return getStubSettingsBuilder().copyBackupSettings(); + } + + /** Returns the builder for the settings used for calls to copyBackup. */ + public OperationCallSettings.Builder + copyBackupOperationSettings() { + return getStubSettingsBuilder().copyBackupOperationSettings(); + } + /** Returns the builder for the settings used for calls to getBackup. */ public UnaryCallSettings.Builder getBackupSettings() { return getStubSettingsBuilder().getBackupSettings(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json index bb689f4c8d4..db77a349075 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "DatabaseAdminClient", "rpcs": { + "CopyBackup": { + "methods": ["copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupOperationCallable", "copyBackupCallable"] + }, "CreateBackup": { "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] }, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java index cf873601ef7..5572033a6ae 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java @@ -33,6 +33,8 @@ import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; import com.google.spanner.admin.database.v1.Backup; +import com.google.spanner.admin.database.v1.CopyBackupMetadata; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupMetadata; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseMetadata; @@ -134,6 +136,15 @@ public UnaryCallable createBackupCallable() { throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); } + public OperationCallable + copyBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: copyBackupOperationCallable()"); + } + + public UnaryCallable copyBackupCallable() { + throw new UnsupportedOperationException("Not implemented: copyBackupCallable()"); + } + public UnaryCallable getBackupCallable() { throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java index aea9b512a1c..992e5a79d2b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java @@ -59,6 +59,8 @@ import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.spanner.admin.database.v1.Backup; +import com.google.spanner.admin.database.v1.CopyBackupMetadata; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupMetadata; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseMetadata; @@ -149,6 +151,9 @@ public class DatabaseAdminStubSettings extends StubSettings createBackupSettings; private final OperationCallSettings createBackupOperationSettings; + private final UnaryCallSettings copyBackupSettings; + private final OperationCallSettings + copyBackupOperationSettings; private final UnaryCallSettings getBackupSettings; private final UnaryCallSettings updateBackupSettings; private final UnaryCallSettings deleteBackupSettings; @@ -473,6 +478,17 @@ public UnaryCallSettings createBackupSettings() return createBackupOperationSettings; } + /** Returns the object with the settings used for calls to copyBackup. */ + public UnaryCallSettings copyBackupSettings() { + return copyBackupSettings; + } + + /** Returns the object with the settings used for calls to copyBackup. */ + public OperationCallSettings + copyBackupOperationSettings() { + return copyBackupOperationSettings; + } + /** Returns the object with the settings used for calls to getBackup. */ public UnaryCallSettings getBackupSettings() { return getBackupSettings; @@ -613,6 +629,8 @@ protected DatabaseAdminStubSettings(Builder settingsBuilder) throws IOException testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); createBackupSettings = settingsBuilder.createBackupSettings().build(); createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); + copyBackupSettings = settingsBuilder.copyBackupSettings().build(); + copyBackupOperationSettings = settingsBuilder.copyBackupOperationSettings().build(); getBackupSettings = settingsBuilder.getBackupSettings().build(); updateBackupSettings = settingsBuilder.updateBackupSettings().build(); deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); @@ -650,6 +668,9 @@ public static class Builder extends StubSettings.Builder createBackupSettings; private final OperationCallSettings.Builder createBackupOperationSettings; + private final UnaryCallSettings.Builder copyBackupSettings; + private final OperationCallSettings.Builder + copyBackupOperationSettings; private final UnaryCallSettings.Builder getBackupSettings; private final UnaryCallSettings.Builder updateBackupSettings; private final UnaryCallSettings.Builder deleteBackupSettings; @@ -760,6 +781,8 @@ protected Builder(ClientContext clientContext) { testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createBackupOperationSettings = OperationCallSettings.newBuilder(); + copyBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + copyBackupOperationSettings = OperationCallSettings.newBuilder(); getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -783,6 +806,7 @@ protected Builder(ClientContext clientContext) { getIamPolicySettings, testIamPermissionsSettings, createBackupSettings, + copyBackupSettings, getBackupSettings, updateBackupSettings, deleteBackupSettings, @@ -809,6 +833,8 @@ protected Builder(DatabaseAdminStubSettings settings) { testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); createBackupSettings = settings.createBackupSettings.toBuilder(); createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); + copyBackupSettings = settings.copyBackupSettings.toBuilder(); + copyBackupOperationSettings = settings.copyBackupOperationSettings.toBuilder(); getBackupSettings = settings.getBackupSettings.toBuilder(); updateBackupSettings = settings.updateBackupSettings.toBuilder(); deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); @@ -830,6 +856,7 @@ protected Builder(DatabaseAdminStubSettings settings) { getIamPolicySettings, testIamPermissionsSettings, createBackupSettings, + copyBackupSettings, getBackupSettings, updateBackupSettings, deleteBackupSettings, @@ -903,6 +930,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + builder + .copyBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + builder .getBackupSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -1011,6 +1043,29 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(172800000L)) .build())); + builder + .copyBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CopyBackupMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .restoreDatabaseOperationSettings() .setInitialCallSettings( @@ -1132,6 +1187,19 @@ public UnaryCallSettings.Builder createBackupSet return createBackupOperationSettings; } + /** Returns the builder for the settings used for calls to copyBackup. */ + public UnaryCallSettings.Builder copyBackupSettings() { + return copyBackupSettings; + } + + /** Returns the builder for the settings used for calls to copyBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + copyBackupOperationSettings() { + return copyBackupOperationSettings; + } + /** Returns the builder for the settings used for calls to getBackup. */ public UnaryCallSettings.Builder getBackupSettings() { return getBackupSettings; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java index 46cdccdbbcc..0df16f344e9 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java @@ -38,6 +38,8 @@ import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import com.google.spanner.admin.database.v1.Backup; +import com.google.spanner.admin.database.v1.CopyBackupMetadata; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupMetadata; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseMetadata; @@ -171,6 +173,14 @@ public class GrpcDatabaseAdminStub extends DatabaseAdminStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor copyBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.spanner.admin.database.v1.DatabaseAdmin/CopyBackup") + .setRequestMarshaller(ProtoUtils.marshaller(CopyBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getBackupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -260,6 +270,9 @@ public class GrpcDatabaseAdminStub extends DatabaseAdminStub { private final UnaryCallable createBackupCallable; private final OperationCallable createBackupOperationCallable; + private final UnaryCallable copyBackupCallable; + private final OperationCallable + copyBackupOperationCallable; private final UnaryCallable getBackupCallable; private final UnaryCallable updateBackupCallable; private final UnaryCallable deleteBackupCallable; @@ -422,6 +435,16 @@ protected GrpcDatabaseAdminStub( return params.build(); }) .build(); + GrpcCallSettings copyBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(copyBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings getBackupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getBackupMethodDescriptor) @@ -551,6 +574,15 @@ protected GrpcDatabaseAdminStub( settings.createBackupOperationSettings(), clientContext, operationsStub); + this.copyBackupCallable = + callableFactory.createUnaryCallable( + copyBackupTransportSettings, settings.copyBackupSettings(), clientContext); + this.copyBackupOperationCallable = + callableFactory.createOperationCallable( + copyBackupTransportSettings, + settings.copyBackupOperationSettings(), + clientContext, + operationsStub); this.getBackupCallable = callableFactory.createUnaryCallable( getBackupTransportSettings, settings.getBackupSettings(), clientContext); @@ -679,6 +711,17 @@ public UnaryCallable createBackupCallable() { return createBackupOperationCallable; } + @Override + public UnaryCallable copyBackupCallable() { + return copyBackupCallable; + } + + @Override + public OperationCallable + copyBackupOperationCallable() { + return copyBackupOperationCallable; + } + @Override public UnaryCallable getBackupCallable() { return getBackupCallable; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java index ef43a4b44c2..4f6d204035f 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java @@ -46,6 +46,7 @@ import com.google.protobuf.Timestamp; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupName; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseRequest; import com.google.spanner.admin.database.v1.Database; @@ -906,6 +907,8 @@ public void createBackupTest() throws Exception { .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -966,6 +969,8 @@ public void createBackupTest2() throws Exception { .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1013,6 +1018,270 @@ public void createBackupExceptionTest2() throws Exception { } } + @Test + public void copyBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + .setVersionTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSizeBytes(-1796325715) + .addAllReferencingDatabases(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatabaseAdmin.addResponse(resultOperation); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + String backupId = "backupId2121930365"; + BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]"); + Timestamp expireTime = Timestamp.newBuilder().build(); + + Backup actualResponse = + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatabaseAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyBackupRequest actualRequest = ((CopyBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertEquals(sourceBackup.toString(), actualRequest.getSourceBackup()); + Assert.assertEquals(expireTime, actualRequest.getExpireTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatabaseAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + String backupId = "backupId2121930365"; + BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]"); + Timestamp expireTime = Timestamp.newBuilder().build(); + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void copyBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + .setVersionTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSizeBytes(-1796325715) + .addAllReferencingDatabases(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatabaseAdmin.addResponse(resultOperation); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + String backupId = "backupId2121930365"; + String sourceBackup = "sourceBackup823134653"; + Timestamp expireTime = Timestamp.newBuilder().build(); + + Backup actualResponse = + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatabaseAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyBackupRequest actualRequest = ((CopyBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertEquals(sourceBackup, actualRequest.getSourceBackup()); + Assert.assertEquals(expireTime, actualRequest.getExpireTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatabaseAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + String backupId = "backupId2121930365"; + String sourceBackup = "sourceBackup823134653"; + Timestamp expireTime = Timestamp.newBuilder().build(); + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void copyBackupTest3() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + .setVersionTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSizeBytes(-1796325715) + .addAllReferencingDatabases(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatabaseAdmin.addResponse(resultOperation); + + String parent = "parent-995424086"; + String backupId = "backupId2121930365"; + BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]"); + Timestamp expireTime = Timestamp.newBuilder().build(); + + Backup actualResponse = + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatabaseAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyBackupRequest actualRequest = ((CopyBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertEquals(sourceBackup.toString(), actualRequest.getSourceBackup()); + Assert.assertEquals(expireTime, actualRequest.getExpireTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyBackupExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatabaseAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + String backupId = "backupId2121930365"; + BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]"); + Timestamp expireTime = Timestamp.newBuilder().build(); + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void copyBackupTest4() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + .setVersionTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setSizeBytes(-1796325715) + .addAllReferencingDatabases(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatabaseAdmin.addResponse(resultOperation); + + String parent = "parent-995424086"; + String backupId = "backupId2121930365"; + String sourceBackup = "sourceBackup823134653"; + Timestamp expireTime = Timestamp.newBuilder().build(); + + Backup actualResponse = + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatabaseAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyBackupRequest actualRequest = ((CopyBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertEquals(sourceBackup, actualRequest.getSourceBackup()); + Assert.assertEquals(expireTime, actualRequest.getExpireTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyBackupExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatabaseAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + String backupId = "backupId2121930365"; + String sourceBackup = "sourceBackup823134653"; + Timestamp expireTime = Timestamp.newBuilder().build(); + client.copyBackupAsync(parent, backupId, sourceBackup, expireTime).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void getBackupTest() throws Exception { Backup expectedResponse = @@ -1026,6 +1295,8 @@ public void getBackupTest() throws Exception { .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1072,6 +1343,8 @@ public void getBackupTest2() throws Exception { .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1118,6 +1391,8 @@ public void updateBackupTest() throws Exception { .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .setDatabaseDialect(DatabaseDialect.forNumber(0)) + .addAllReferencingBackups(new ArrayList()) + .setMaxExpireTime(Timestamp.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java index a0b87516293..ce169fef29f 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java @@ -26,6 +26,7 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import com.google.spanner.admin.database.v1.Backup; +import com.google.spanner.admin.database.v1.CopyBackupRequest; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseRequest; import com.google.spanner.admin.database.v1.Database; @@ -293,6 +294,26 @@ public void createBackup( } } + @Override + public void copyBackup(CopyBackupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CopyBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getBackup(GetBackupRequest request, StreamObserver responseObserver) { Object response = responses.poll(); diff --git a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java index 55afe37254c..184bc2de624 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java @@ -481,6 +481,49 @@ private DatabaseAdminGrpc() {} return getCreateBackupMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.database.v1.CopyBackupRequest, com.google.longrunning.Operation> + getCopyBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CopyBackup", + requestType = com.google.spanner.admin.database.v1.CopyBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.database.v1.CopyBackupRequest, com.google.longrunning.Operation> + getCopyBackupMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.database.v1.CopyBackupRequest, + com.google.longrunning.Operation> + getCopyBackupMethod; + if ((getCopyBackupMethod = DatabaseAdminGrpc.getCopyBackupMethod) == null) { + synchronized (DatabaseAdminGrpc.class) { + if ((getCopyBackupMethod = DatabaseAdminGrpc.getCopyBackupMethod) == null) { + DatabaseAdminGrpc.getCopyBackupMethod = + getCopyBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CopyBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.database.v1.CopyBackupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DatabaseAdminMethodDescriptorSupplier("CopyBackup")) + .build(); + } + } + } + return getCopyBackupMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.spanner.admin.database.v1.GetBackupRequest, com.google.spanner.admin.database.v1.Backup> @@ -1054,6 +1097,30 @@ public void createBackup( getCreateBackupMethod(), responseObserver); } + /** + * + * + *
+     * Starts copying a Cloud Spanner Backup.
+     * The returned backup [long-running operation][google.longrunning.Operation]
+     * will have a name of the format
+     * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
+     * and can be used to track copying of the backup. The operation is associated
+     * with the destination backup.
+     * The [metadata][google.longrunning.Operation.metadata] field type is
+     * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
+     * copying and delete the backup.
+     * Concurrent CopyBackup requests can run on the same source backup.
+     * 
+ */ + public void copyBackup( + com.google.spanner.admin.database.v1.CopyBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCopyBackupMethod(), responseObserver); + } + /** * * @@ -1256,6 +1323,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.spanner.admin.database.v1.CreateBackupRequest, com.google.longrunning.Operation>(this, METHODID_CREATE_BACKUP))) + .addMethod( + getCopyBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.database.v1.CopyBackupRequest, + com.google.longrunning.Operation>(this, METHODID_COPY_BACKUP))) .addMethod( getGetBackupMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1541,6 +1614,31 @@ public void createBackup( responseObserver); } + /** + * + * + *
+     * Starts copying a Cloud Spanner Backup.
+     * The returned backup [long-running operation][google.longrunning.Operation]
+     * will have a name of the format
+     * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
+     * and can be used to track copying of the backup. The operation is associated
+     * with the destination backup.
+     * The [metadata][google.longrunning.Operation.metadata] field type is
+     * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
+     * copying and delete the backup.
+     * Concurrent CopyBackup requests can run on the same source backup.
+     * 
+ */ + public void copyBackup( + com.google.spanner.admin.database.v1.CopyBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCopyBackupMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1892,6 +1990,30 @@ public com.google.longrunning.Operation createBackup( getChannel(), getCreateBackupMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Starts copying a Cloud Spanner Backup.
+     * The returned backup [long-running operation][google.longrunning.Operation]
+     * will have a name of the format
+     * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
+     * and can be used to track copying of the backup. The operation is associated
+     * with the destination backup.
+     * The [metadata][google.longrunning.Operation.metadata] field type is
+     * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
+     * copying and delete the backup.
+     * Concurrent CopyBackup requests can run on the same source backup.
+     * 
+ */ + public com.google.longrunning.Operation copyBackup( + com.google.spanner.admin.database.v1.CopyBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCopyBackupMethod(), getCallOptions(), request); + } + /** * * @@ -2226,6 +2348,30 @@ protected DatabaseAdminFutureStub build( getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Starts copying a Cloud Spanner Backup.
+     * The returned backup [long-running operation][google.longrunning.Operation]
+     * will have a name of the format
+     * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
+     * and can be used to track copying of the backup. The operation is associated
+     * with the destination backup.
+     * The [metadata][google.longrunning.Operation.metadata] field type is
+     * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
+     * copying and delete the backup.
+     * Concurrent CopyBackup requests can run on the same source backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + copyBackup(com.google.spanner.admin.database.v1.CopyBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCopyBackupMethod(), getCallOptions()), request); + } + /** * * @@ -2369,13 +2515,14 @@ protected DatabaseAdminFutureStub build( private static final int METHODID_GET_IAM_POLICY = 7; private static final int METHODID_TEST_IAM_PERMISSIONS = 8; private static final int METHODID_CREATE_BACKUP = 9; - private static final int METHODID_GET_BACKUP = 10; - private static final int METHODID_UPDATE_BACKUP = 11; - private static final int METHODID_DELETE_BACKUP = 12; - private static final int METHODID_LIST_BACKUPS = 13; - private static final int METHODID_RESTORE_DATABASE = 14; - private static final int METHODID_LIST_DATABASE_OPERATIONS = 15; - private static final int METHODID_LIST_BACKUP_OPERATIONS = 16; + private static final int METHODID_COPY_BACKUP = 10; + private static final int METHODID_GET_BACKUP = 11; + private static final int METHODID_UPDATE_BACKUP = 12; + private static final int METHODID_DELETE_BACKUP = 13; + private static final int METHODID_LIST_BACKUPS = 14; + private static final int METHODID_RESTORE_DATABASE = 15; + private static final int METHODID_LIST_DATABASE_OPERATIONS = 16; + private static final int METHODID_LIST_BACKUP_OPERATIONS = 17; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2450,6 +2597,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.spanner.admin.database.v1.CreateBackupRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_COPY_BACKUP: + serviceImpl.copyBackup( + (com.google.spanner.admin.database.v1.CopyBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_BACKUP: serviceImpl.getBackup( (com.google.spanner.admin.database.v1.GetBackupRequest) request, @@ -2567,6 +2719,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) .addMethod(getCreateBackupMethod()) + .addMethod(getCopyBackupMethod()) .addMethod(getGetBackupMethod()) .addMethod(getUpdateBackupMethod()) .addMethod(getDeleteBackupMethod()) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java index 3a974718685..ff197cea3fb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java @@ -43,6 +43,7 @@ private Backup() { state_ = 0; referencingDatabases_ = com.google.protobuf.LazyStringArrayList.EMPTY; databaseDialect_ = 0; + referencingBackups_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -178,6 +179,31 @@ private Backup( int rawValue = input.readEnum(); databaseDialect_ = rawValue; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + referencingBackups_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + referencingBackups_.add(s); + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (maxExpireTime_ != null) { + subBuilder = maxExpireTime_.toBuilder(); + } + maxExpireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxExpireTime_); + maxExpireTime_ = subBuilder.buildPartial(); + } + break; } default: @@ -197,6 +223,9 @@ private Backup( if (((mutable_bitField0_ & 0x00000001) != 0)) { referencingDatabases_ = referencingDatabases_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + referencingBackups_ = referencingBackups_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -920,6 +949,165 @@ public com.google.spanner.admin.database.v1.DatabaseDialect getDatabaseDialect() : result; } + public static final int REFERENCING_BACKUPS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList referencingBackups_; + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencingBackups. + */ + public com.google.protobuf.ProtocolStringList getReferencingBackupsList() { + return referencingBackups_; + } + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencingBackups. + */ + public int getReferencingBackupsCount() { + return referencingBackups_.size(); + } + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencingBackups at the given index. + */ + public java.lang.String getReferencingBackups(int index) { + return referencingBackups_.get(index); + } + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingBackups at the given index. + */ + public com.google.protobuf.ByteString getReferencingBackupsBytes(int index) { + return referencingBackups_.getByteString(index); + } + + public static final int MAX_EXPIRE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp maxExpireTime_; + /** + * + * + *
+   * Output only. The max allowed expiration time of the backup, with
+   * microseconds granularity. A backup's expiration time can be configured in
+   * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+   * copying an existing backup, the expiration time specified must be
+   * less than `Backup.max_expire_time`.
+   * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the maxExpireTime field is set. + */ + @java.lang.Override + public boolean hasMaxExpireTime() { + return maxExpireTime_ != null; + } + /** + * + * + *
+   * Output only. The max allowed expiration time of the backup, with
+   * microseconds granularity. A backup's expiration time can be configured in
+   * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+   * copying an existing backup, the expiration time specified must be
+   * less than `Backup.max_expire_time`.
+   * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The maxExpireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getMaxExpireTime() { + return maxExpireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : maxExpireTime_; + } + /** + * + * + *
+   * Output only. The max allowed expiration time of the backup, with
+   * microseconds granularity. A backup's expiration time can be configured in
+   * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+   * copying an existing backup, the expiration time specified must be
+   * less than `Backup.max_expire_time`.
+   * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getMaxExpireTimeOrBuilder() { + return getMaxExpireTime(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -967,6 +1155,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(10, databaseDialect_); } + for (int i = 0; i < referencingBackups_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, referencingBackups_.getRaw(i)); + } + if (maxExpireTime_ != null) { + output.writeMessage(12, getMaxExpireTime()); + } unknownFields.writeTo(output); } @@ -1013,6 +1207,17 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, databaseDialect_); } + { + int dataSize = 0; + for (int i = 0; i < referencingBackups_.size(); i++) { + dataSize += computeStringSizeNoTag(referencingBackups_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencingBackupsList().size(); + } + if (maxExpireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getMaxExpireTime()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1051,6 +1256,11 @@ public boolean equals(final java.lang.Object obj) { if (!getEncryptionInfo().equals(other.getEncryptionInfo())) return false; } if (databaseDialect_ != other.databaseDialect_) return false; + if (!getReferencingBackupsList().equals(other.getReferencingBackupsList())) return false; + if (hasMaxExpireTime() != other.hasMaxExpireTime()) return false; + if (hasMaxExpireTime()) { + if (!getMaxExpireTime().equals(other.getMaxExpireTime())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1092,6 +1302,14 @@ public int hashCode() { } hash = (37 * hash) + DATABASE_DIALECT_FIELD_NUMBER; hash = (53 * hash) + databaseDialect_; + if (getReferencingBackupsCount() > 0) { + hash = (37 * hash) + REFERENCING_BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getReferencingBackupsList().hashCode(); + } + if (hasMaxExpireTime()) { + hash = (37 * hash) + MAX_EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getMaxExpireTime().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1273,6 +1491,14 @@ public Builder clear() { } databaseDialect_ = 0; + referencingBackups_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (maxExpireTimeBuilder_ == null) { + maxExpireTime_ = null; + } else { + maxExpireTime_ = null; + maxExpireTimeBuilder_ = null; + } return this; } @@ -1331,6 +1557,16 @@ public com.google.spanner.admin.database.v1.Backup buildPartial() { result.encryptionInfo_ = encryptionInfoBuilder_.build(); } result.databaseDialect_ = databaseDialect_; + if (((bitField0_ & 0x00000002) != 0)) { + referencingBackups_ = referencingBackups_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.referencingBackups_ = referencingBackups_; + if (maxExpireTimeBuilder_ == null) { + result.maxExpireTime_ = maxExpireTime_; + } else { + result.maxExpireTime_ = maxExpireTimeBuilder_.build(); + } onBuilt(); return result; } @@ -1419,6 +1655,19 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { if (other.databaseDialect_ != 0) { setDatabaseDialectValue(other.getDatabaseDialectValue()); } + if (!other.referencingBackups_.isEmpty()) { + if (referencingBackups_.isEmpty()) { + referencingBackups_ = other.referencingBackups_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureReferencingBackupsIsMutable(); + referencingBackups_.addAll(other.referencingBackups_); + } + onChanged(); + } + if (other.hasMaxExpireTime()) { + mergeMaxExpireTime(other.getMaxExpireTime()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3094,6 +3343,485 @@ public Builder clearDatabaseDialect() { return this; } + private com.google.protobuf.LazyStringList referencingBackups_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureReferencingBackupsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + referencingBackups_ = new com.google.protobuf.LazyStringArrayList(referencingBackups_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencingBackups. + */ + public com.google.protobuf.ProtocolStringList getReferencingBackupsList() { + return referencingBackups_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencingBackups. + */ + public int getReferencingBackupsCount() { + return referencingBackups_.size(); + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencingBackups at the given index. + */ + public java.lang.String getReferencingBackups(int index) { + return referencingBackups_.get(index); + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingBackups at the given index. + */ + public com.google.protobuf.ByteString getReferencingBackupsBytes(int index) { + return referencingBackups_.getByteString(index); + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencingBackups to set. + * @return This builder for chaining. + */ + public Builder setReferencingBackups(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencingBackupsIsMutable(); + referencingBackups_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencingBackups to add. + * @return This builder for chaining. + */ + public Builder addReferencingBackups(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencingBackupsIsMutable(); + referencingBackups_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencingBackups to add. + * @return This builder for chaining. + */ + public Builder addAllReferencingBackups(java.lang.Iterable values) { + ensureReferencingBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingBackups_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencingBackups() { + referencingBackups_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the destination backups being created by copying
+     * this source backup. The backup names are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * Referencing backups may exist in different instances. The existence of
+     * any referencing backup prevents the backup from being deleted. When the
+     * copy operation is done (either successfully completed or cancelled or the
+     * destination backup is deleted), the reference to the backup is removed.
+     * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencingBackups to add. + * @return This builder for chaining. + */ + public Builder addReferencingBackupsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencingBackupsIsMutable(); + referencingBackups_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp maxExpireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + maxExpireTimeBuilder_; + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the maxExpireTime field is set. + */ + public boolean hasMaxExpireTime() { + return maxExpireTimeBuilder_ != null || maxExpireTime_ != null; + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The maxExpireTime. + */ + public com.google.protobuf.Timestamp getMaxExpireTime() { + if (maxExpireTimeBuilder_ == null) { + return maxExpireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : maxExpireTime_; + } else { + return maxExpireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMaxExpireTime(com.google.protobuf.Timestamp value) { + if (maxExpireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxExpireTime_ = value; + onChanged(); + } else { + maxExpireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMaxExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (maxExpireTimeBuilder_ == null) { + maxExpireTime_ = builderForValue.build(); + onChanged(); + } else { + maxExpireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMaxExpireTime(com.google.protobuf.Timestamp value) { + if (maxExpireTimeBuilder_ == null) { + if (maxExpireTime_ != null) { + maxExpireTime_ = + com.google.protobuf.Timestamp.newBuilder(maxExpireTime_) + .mergeFrom(value) + .buildPartial(); + } else { + maxExpireTime_ = value; + } + onChanged(); + } else { + maxExpireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMaxExpireTime() { + if (maxExpireTimeBuilder_ == null) { + maxExpireTime_ = null; + onChanged(); + } else { + maxExpireTime_ = null; + maxExpireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getMaxExpireTimeBuilder() { + + onChanged(); + return getMaxExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getMaxExpireTimeOrBuilder() { + if (maxExpireTimeBuilder_ != null) { + return maxExpireTimeBuilder_.getMessageOrBuilder(); + } else { + return maxExpireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : maxExpireTime_; + } + } + /** + * + * + *
+     * Output only. The max allowed expiration time of the backup, with
+     * microseconds granularity. A backup's expiration time can be configured in
+     * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+     * copying an existing backup, the expiration time specified must be
+     * less than `Backup.max_expire_time`.
+     * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getMaxExpireTimeFieldBuilder() { + if (maxExpireTimeBuilder_ == null) { + maxExpireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getMaxExpireTime(), getParentForChildren(), isClean()); + maxExpireTime_ = null; + } + return maxExpireTimeBuilder_; + } + @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/BackupOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java index 8810b28ee0c..e3fe5ccf08c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java @@ -433,4 +433,140 @@ public interface BackupOrBuilder * @return The databaseDialect. */ com.google.spanner.admin.database.v1.DatabaseDialect getDatabaseDialect(); + + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencingBackups. + */ + java.util.List getReferencingBackupsList(); + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencingBackups. + */ + int getReferencingBackupsCount(); + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencingBackups at the given index. + */ + java.lang.String getReferencingBackups(int index); + /** + * + * + *
+   * Output only. The names of the destination backups being created by copying
+   * this source backup. The backup names are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * Referencing backups may exist in different instances. The existence of
+   * any referencing backup prevents the backup from being deleted. When the
+   * copy operation is done (either successfully completed or cancelled or the
+   * destination backup is deleted), the reference to the backup is removed.
+   * 
+ * + * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingBackups at the given index. + */ + com.google.protobuf.ByteString getReferencingBackupsBytes(int index); + + /** + * + * + *
+   * Output only. The max allowed expiration time of the backup, with
+   * microseconds granularity. A backup's expiration time can be configured in
+   * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+   * copying an existing backup, the expiration time specified must be
+   * less than `Backup.max_expire_time`.
+   * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the maxExpireTime field is set. + */ + boolean hasMaxExpireTime(); + /** + * + * + *
+   * Output only. The max allowed expiration time of the backup, with
+   * microseconds granularity. A backup's expiration time can be configured in
+   * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+   * copying an existing backup, the expiration time specified must be
+   * less than `Backup.max_expire_time`.
+   * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The maxExpireTime. + */ + com.google.protobuf.Timestamp getMaxExpireTime(); + /** + * + * + *
+   * Output only. The max allowed expiration time of the backup, with
+   * microseconds granularity. A backup's expiration time can be configured in
+   * multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
+   * copying an existing backup, the expiration time specified must be
+   * less than `Backup.max_expire_time`.
+   * 
+ * + * + * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getMaxExpireTimeOrBuilder(); } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java index aafa5c2fc9b..d5a258d0e52 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java @@ -39,6 +39,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -75,6 +83,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -86,90 +98,115 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n-google/spanner/admin/database/v1/backu" + "p.proto\022 google.spanner.admin.database.v" - + "1\032\034google/api/annotations.proto\032\037google/" - + "api/field_behavior.proto\032\031google/api/res" - + "ource.proto\032#google/longrunning/operatio" - + "ns.proto\032 google/protobuf/field_mask.pro" - + "to\032\037google/protobuf/timestamp.proto\032-goo" - + "gle/spanner/admin/database/v1/common.pro" - + "to\"\305\005\n\006Backup\0226\n\010database\030\002 \001(\tB$\372A!\n\037sp" - + "anner.googleapis.com/Database\0220\n\014version" - + "_time\030\t \001(\0132\032.google.protobuf.Timestamp\022" - + "/\n\013expire_time\030\003 \001(\0132\032.google.protobuf.T" - + "imestamp\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\004 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\027\n\n" - + "size_bytes\030\005 \001(\003B\003\340A\003\022B\n\005state\030\006 \001(\0162..g" - + "oogle.spanner.admin.database.v1.Backup.S" - + "tateB\003\340A\003\022F\n\025referencing_databases\030\007 \003(\t" - + "B\'\340A\003\372A!\n\037spanner.googleapis.com/Databas" - + "e\022N\n\017encryption_info\030\010 \001(\01320.google.span" - + "ner.admin.database.v1.EncryptionInfoB\003\340A" - + "\003\022P\n\020database_dialect\030\n \001(\01621.google.spa" - + "nner.admin.database.v1.DatabaseDialectB\003" - + "\340A\003\"7\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010C" - + "REATING\020\001\022\t\n\005READY\020\002:\\\352AY\n\035spanner.googl" - + "eapis.com/Backup\0228projects/{project}/ins" - + "tances/{instance}/backups/{backup}\"\205\002\n\023C" - + "reateBackupRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372" - + "A!\n\037spanner.googleapis.com/Instance\022\026\n\tb" - + "ackup_id\030\002 \001(\tB\003\340A\002\022=\n\006backup\030\003 \001(\0132(.go" - + "ogle.spanner.admin.database.v1.BackupB\003\340" - + "A\002\022^\n\021encryption_config\030\004 \001(\0132>.google.s" - + "panner.admin.database.v1.CreateBackupEnc" - + "ryptionConfigB\003\340A\001\"\370\001\n\024CreateBackupMetad" - + "ata\0220\n\004name\030\001 \001(\tB\"\372A\037\n\035spanner.googleap" - + "is.com/Backup\0226\n\010database\030\002 \001(\tB$\372A!\n\037sp" - + "anner.googleapis.com/Database\022E\n\010progres" - + "s\030\003 \001(\01323.google.spanner.admin.database." - + "v1.OperationProgress\022/\n\013cancel_time\030\004 \001(" - + "\0132\032.google.protobuf.Timestamp\"\212\001\n\023Update" - + "BackupRequest\022=\n\006backup\030\001 \001(\0132(.google.s" - + "panner.admin.database.v1.BackupB\003\340A\002\0224\n\013" - + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel" - + "dMaskB\003\340A\002\"G\n\020GetBackupRequest\0223\n\004name\030\001" - + " \001(\tB%\340A\002\372A\037\n\035spanner.googleapis.com/Bac" - + "kup\"J\n\023DeleteBackupRequest\0223\n\004name\030\001 \001(\t" - + "B%\340A\002\372A\037\n\035spanner.googleapis.com/Backup\"" - + "\204\001\n\022ListBackupsRequest\0227\n\006parent\030\001 \001(\tB\'" - + "\340A\002\372A!\n\037spanner.googleapis.com/Instance\022" - + "\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npa" - + "ge_token\030\004 \001(\t\"i\n\023ListBackupsResponse\0229\n" - + "\007backups\030\001 \003(\0132(.google.spanner.admin.da" - + "tabase.v1.Backup\022\027\n\017next_page_token\030\002 \001(" - + "\t\"\215\001\n\033ListBackupOperationsRequest\0227\n\006par" - + "ent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.co" - + "m/Instance\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030" - + "\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"j\n\034ListBackupO" - + "perationsResponse\0221\n\noperations\030\001 \003(\0132\035." - + "google.longrunning.Operation\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\342\001\n\nBackupInfo\0222\n\006backup\030\001" - + " \001(\tB\"\372A\037\n\035spanner.googleapis.com/Backup" - + "\0220\n\014version_time\030\004 \001(\0132\032.google.protobuf" - + ".Timestamp\022/\n\013create_time\030\002 \001(\0132\032.google" - + ".protobuf.Timestamp\022=\n\017source_database\030\003" - + " \001(\tB$\372A!\n\037spanner.googleapis.com/Databa" - + "se\"\335\002\n\034CreateBackupEncryptionConfig\022k\n\017e" - + "ncryption_type\030\001 \001(\0162M.google.spanner.ad" - + "min.database.v1.CreateBackupEncryptionCo" - + "nfig.EncryptionTypeB\003\340A\002\022?\n\014kms_key_name" - + "\030\002 \001(\tB)\340A\001\372A#\n!cloudkms.googleapis.com/" - + "CryptoKey\"\216\001\n\016EncryptionType\022\037\n\033ENCRYPTI" - + "ON_TYPE_UNSPECIFIED\020\000\022\033\n\027USE_DATABASE_EN" - + "CRYPTION\020\001\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020" - + "\002\022\037\n\033CUSTOMER_MANAGED_ENCRYPTION\020\003B\377\001\n$c" - + "om.google.spanner.admin.database.v1B\013Bac" - + "kupProtoP\001ZHgoogle.golang.org/genproto/g" - + "oogleapis/spanner/admin/database/v1;data" - + "base\252\002&Google.Cloud.Spanner.Admin.Databa" - + "se.V1\312\002&Google\\Cloud\\Spanner\\Admin\\Datab" - + "ase\\V1\352\002+Google::Cloud::Spanner::Admin::" - + "Database::V1b\006proto3" + + "1\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032#google/longrunnin" + + "g/operations.proto\032 google/protobuf/fiel" + + "d_mask.proto\032\037google/protobuf/timestamp." + + "proto\032-google/spanner/admin/database/v1/" + + "common.proto\"\303\006\n\006Backup\0226\n\010database\030\002 \001(" + + "\tB$\372A!\n\037spanner.googleapis.com/Database\022" + + "0\n\014version_time\030\t \001(\0132\032.google.protobuf." + + "Timestamp\022/\n\013expire_time\030\003 \001(\0132\032.google." + + "protobuf.Timestamp\022\014\n\004name\030\001 \001(\t\0224\n\013crea" + + "te_time\030\004 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\022\027\n\nsize_bytes\030\005 \001(\003B\003\340A\003\022B\n\005state" + + "\030\006 \001(\0162..google.spanner.admin.database.v" + + "1.Backup.StateB\003\340A\003\022F\n\025referencing_datab" + + "ases\030\007 \003(\tB\'\340A\003\372A!\n\037spanner.googleapis.c" + + "om/Database\022N\n\017encryption_info\030\010 \001(\01320.g" + + "oogle.spanner.admin.database.v1.Encrypti" + + "onInfoB\003\340A\003\022P\n\020database_dialect\030\n \001(\01621." + + "google.spanner.admin.database.v1.Databas" + + "eDialectB\003\340A\003\022B\n\023referencing_backups\030\013 \003" + + "(\tB%\340A\003\372A\037\n\035spanner.googleapis.com/Backu" + + "p\0228\n\017max_expire_time\030\014 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\"7\n\005State\022\025\n\021STATE_UN" + + "SPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002:\\\352A" + + "Y\n\035spanner.googleapis.com/Backup\0228projec" + + "ts/{project}/instances/{instance}/backup" + + "s/{backup}\"\205\002\n\023CreateBackupRequest\0227\n\006pa" + + "rent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.c" + + "om/Instance\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022=\n\006b" + + "ackup\030\003 \001(\0132(.google.spanner.admin.datab" + + "ase.v1.BackupB\003\340A\002\022^\n\021encryption_config\030" + + "\004 \001(\0132>.google.spanner.admin.database.v1" + + ".CreateBackupEncryptionConfigB\003\340A\001\"\370\001\n\024C" + + "reateBackupMetadata\0220\n\004name\030\001 \001(\tB\"\372A\037\n\035" + + "spanner.googleapis.com/Backup\0226\n\010databas" + + "e\030\002 \001(\tB$\372A!\n\037spanner.googleapis.com/Dat" + + "abase\022E\n\010progress\030\003 \001(\01323.google.spanner" + + ".admin.database.v1.OperationProgress\022/\n\013" + + "cancel_time\030\004 \001(\0132\032.google.protobuf.Time" + + "stamp\"\266\002\n\021CopyBackupRequest\0227\n\006parent\030\001 " + + "\001(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/Inst" + + "ance\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022<\n\rsource_b" + + "ackup\030\003 \001(\tB%\340A\002\372A\037\n\035spanner.googleapis." + + "com/Backup\0224\n\013expire_time\030\004 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\002\022\\\n\021encryption_c" + + "onfig\030\005 \001(\0132<.google.spanner.admin.datab" + + "ase.v1.CopyBackupEncryptionConfigB\003\340A\001\"\371" + + "\001\n\022CopyBackupMetadata\0220\n\004name\030\001 \001(\tB\"\372A\037" + + "\n\035spanner.googleapis.com/Backup\0229\n\rsourc" + + "e_backup\030\002 \001(\tB\"\372A\037\n\035spanner.googleapis." + + "com/Backup\022E\n\010progress\030\003 \001(\01323.google.sp" + + "anner.admin.database.v1.OperationProgres" + + "s\022/\n\013cancel_time\030\004 \001(\0132\032.google.protobuf" + + ".Timestamp\"\212\001\n\023UpdateBackupRequest\022=\n\006ba" + + "ckup\030\001 \001(\0132(.google.spanner.admin.databa" + + "se.v1.BackupB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\002\"G\n\020GetBa" + + "ckupRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035spann" + + "er.googleapis.com/Backup\"J\n\023DeleteBackup" + + "Request\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035spanner.g" + + "oogleapis.com/Backup\"\204\001\n\022ListBackupsRequ" + + "est\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.goo" + + "gleapis.com/Instance\022\016\n\006filter\030\002 \001(\t\022\021\n\t" + + "page_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"i\n\023L" + + "istBackupsResponse\0229\n\007backups\030\001 \003(\0132(.go" + + "ogle.spanner.admin.database.v1.Backup\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\215\001\n\033ListBackupOpe" + + "rationsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037" + + "spanner.googleapis.com/Instance\022\016\n\006filte" + + "r\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token" + + "\030\004 \001(\t\"j\n\034ListBackupOperationsResponse\0221" + + "\n\noperations\030\001 \003(\0132\035.google.longrunning." + + "Operation\022\027\n\017next_page_token\030\002 \001(\t\"\342\001\n\nB" + + "ackupInfo\0222\n\006backup\030\001 \001(\tB\"\372A\037\n\035spanner." + + "googleapis.com/Backup\0220\n\014version_time\030\004 " + + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013creat" + + "e_time\030\002 \001(\0132\032.google.protobuf.Timestamp" + + "\022=\n\017source_database\030\003 \001(\tB$\372A!\n\037spanner." + + "googleapis.com/Database\"\335\002\n\034CreateBackup" + + "EncryptionConfig\022k\n\017encryption_type\030\001 \001(" + + "\0162M.google.spanner.admin.database.v1.Cre" + + "ateBackupEncryptionConfig.EncryptionType" + + "B\003\340A\002\022?\n\014kms_key_name\030\002 \001(\tB)\340A\001\372A#\n!clo" + + "udkms.googleapis.com/CryptoKey\"\216\001\n\016Encry" + + "ptionType\022\037\n\033ENCRYPTION_TYPE_UNSPECIFIED" + + "\020\000\022\033\n\027USE_DATABASE_ENCRYPTION\020\001\022\035\n\031GOOGL" + + "E_DEFAULT_ENCRYPTION\020\002\022\037\n\033CUSTOMER_MANAG" + + "ED_ENCRYPTION\020\003\"\351\002\n\032CopyBackupEncryption" + + "Config\022i\n\017encryption_type\030\001 \001(\0162K.google" + + ".spanner.admin.database.v1.CopyBackupEnc" + + "ryptionConfig.EncryptionTypeB\003\340A\002\022?\n\014kms" + + "_key_name\030\002 \001(\tB)\340A\001\372A#\n!cloudkms.google" + + "apis.com/CryptoKey\"\236\001\n\016EncryptionType\022\037\n" + + "\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022+\n\'USE_CO" + + "NFIG_DEFAULT_OR_BACKUP_ENCRYPTION\020\001\022\035\n\031G" + + "OOGLE_DEFAULT_ENCRYPTION\020\002\022\037\n\033CUSTOMER_M" + + "ANAGED_ENCRYPTION\020\003B\377\001\n$com.google.spann" + + "er.admin.database.v1B\013BackupProtoP\001ZHgoo" + + "gle.golang.org/genproto/googleapis/spann" + + "er/admin/database/v1;database\252\002&Google.C" + + "loud.Spanner.Admin.Database.V1\312\002&Google\\" + + "Cloud\\Spanner\\Admin\\Database\\V1\352\002+Google" + + "::Cloud::Spanner::Admin::Database::V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), @@ -193,6 +230,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReferencingDatabases", "EncryptionInfo", "DatabaseDialect", + "ReferencingBackups", + "MaxExpireTime", }); internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -210,8 +249,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Database", "Progress", "CancelTime", }); - internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor = + internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor, + new java.lang.String[] { + "Parent", "BackupId", "SourceBackup", "ExpireTime", "EncryptionConfig", + }); + internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor, + new java.lang.String[] { + "Name", "SourceBackup", "Progress", "CancelTime", + }); + internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor, @@ -219,7 +274,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Backup", "UpdateMask", }); internal_static_google_spanner_admin_database_v1_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_google_spanner_admin_database_v1_GetBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_GetBackupRequest_descriptor, @@ -227,7 +282,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_descriptor, @@ -235,7 +290,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_spanner_admin_database_v1_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_spanner_admin_database_v1_ListBackupsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupsRequest_descriptor, @@ -243,7 +298,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_google_spanner_admin_database_v1_ListBackupsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupsResponse_descriptor, @@ -251,7 +306,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Backups", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_descriptor, @@ -259,7 +314,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_descriptor, @@ -267,7 +322,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Operations", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_spanner_admin_database_v1_BackupInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor, @@ -275,13 +330,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Backup", "VersionTime", "CreateTime", "SourceDatabase", }); internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor, new java.lang.String[] { "EncryptionType", "KmsKeyName", }); + internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor, + new java.lang.String[] { + "EncryptionType", "KmsKeyName", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -289,7 +352,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java index 157e9098686..73dfc1efb12 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java @@ -50,46 +50,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n-google/spanner/admin/database/v1/commo" + "n.proto\022 google.spanner.admin.database.v" - + "1\032\034google/api/annotations.proto\032\037google/" - + "api/field_behavior.proto\032\031google/api/res" - + "ource.proto\032\037google/protobuf/timestamp.p" - + "roto\032\027google/rpc/status.proto\"\213\001\n\021Operat" - + "ionProgress\022\030\n\020progress_percent\030\001 \001(\005\022.\n" - + "\nstart_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobu" - + "f.Timestamp\"P\n\020EncryptionConfig\022<\n\014kms_k" - + "ey_name\030\002 \001(\tB&\372A#\n!cloudkms.googleapis." - + "com/CryptoKey\"\302\002\n\016EncryptionInfo\022S\n\017encr" - + "yption_type\030\003 \001(\01625.google.spanner.admin" - + ".database.v1.EncryptionInfo.TypeB\003\340A\003\0222\n" - + "\021encryption_status\030\004 \001(\0132\022.google.rpc.St" - + "atusB\003\340A\003\022I\n\017kms_key_version\030\002 \001(\tB0\340A\003\372" - + "A*\n(cloudkms.googleapis.com/CryptoKeyVer" - + "sion\"\\\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\035\n\031GO" - + "OGLE_DEFAULT_ENCRYPTION\020\001\022\037\n\033CUSTOMER_MA" - + "NAGED_ENCRYPTION\020\002*\\\n\017DatabaseDialect\022 \n" - + "\034DATABASE_DIALECT_UNSPECIFIED\020\000\022\027\n\023GOOGL" - + "E_STANDARD_SQL\020\001\022\016\n\nPOSTGRESQL\020\002B\244\004\n$com" - + ".google.spanner.admin.database.v1B\013Commo" - + "nProtoP\001ZHgoogle.golang.org/genproto/goo" - + "gleapis/spanner/admin/database/v1;databa" - + "se\252\002&Google.Cloud.Spanner.Admin.Database" - + ".V1\312\002&Google\\Cloud\\Spanner\\Admin\\Databas" - + "e\\V1\352\002+Google::Cloud::Spanner::Admin::Da" - + "tabase::V1\352Ax\n!cloudkms.googleapis.com/C" - + "ryptoKey\022Sprojects/{project}/locations/{" - + "location}/keyRings/{key_ring}/cryptoKeys" - + "/{crypto_key}\352A\246\001\n(cloudkms.googleapis.c" - + "om/CryptoKeyVersion\022zprojects/{project}/" - + "locations/{location}/keyRings/{key_ring}" - + "/cryptoKeys/{crypto_key}/cryptoKeyVersio" - + "ns/{crypto_key_version}b\006proto3" + + "1\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032\037google/protobuf/t" + + "imestamp.proto\032\027google/rpc/status.proto\"" + + "\213\001\n\021OperationProgress\022\030\n\020progress_percen" + + "t\030\001 \001(\005\022.\n\nstart_time\030\002 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022,\n\010end_time\030\003 \001(\0132\032.goog" + + "le.protobuf.Timestamp\"P\n\020EncryptionConfi" + + "g\022<\n\014kms_key_name\030\002 \001(\tB&\372A#\n!cloudkms.g" + + "oogleapis.com/CryptoKey\"\302\002\n\016EncryptionIn" + + "fo\022S\n\017encryption_type\030\003 \001(\01625.google.spa" + + "nner.admin.database.v1.EncryptionInfo.Ty" + + "peB\003\340A\003\0222\n\021encryption_status\030\004 \001(\0132\022.goo" + + "gle.rpc.StatusB\003\340A\003\022I\n\017kms_key_version\030\002" + + " \001(\tB0\340A\003\372A*\n(cloudkms.googleapis.com/Cr" + + "yptoKeyVersion\"\\\n\004Type\022\024\n\020TYPE_UNSPECIFI" + + "ED\020\000\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037\n\033C" + + "USTOMER_MANAGED_ENCRYPTION\020\002*\\\n\017Database" + + "Dialect\022 \n\034DATABASE_DIALECT_UNSPECIFIED\020" + + "\000\022\027\n\023GOOGLE_STANDARD_SQL\020\001\022\016\n\nPOSTGRESQL" + + "\020\002B\244\004\n$com.google.spanner.admin.database" + + ".v1B\013CommonProtoP\001ZHgoogle.golang.org/ge" + + "nproto/googleapis/spanner/admin/database" + + "/v1;database\252\002&Google.Cloud.Spanner.Admi" + + "n.Database.V1\312\002&Google\\Cloud\\Spanner\\Adm" + + "in\\Database\\V1\352\002+Google::Cloud::Spanner:" + + ":Admin::Database::V1\352Ax\n!cloudkms.google" + + "apis.com/CryptoKey\022Sprojects/{project}/l" + + "ocations/{location}/keyRings/{key_ring}/" + + "cryptoKeys/{crypto_key}\352A\246\001\n(cloudkms.go" + + "ogleapis.com/CryptoKeyVersion\022zprojects/" + + "{project}/locations/{location}/keyRings/" + + "{key_ring}/cryptoKeys/{crypto_key}/crypt" + + "oKeyVersions/{crypto_key_version}b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -126,7 +125,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java new file mode 100644 index 00000000000..ea29df0725f --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java @@ -0,0 +1,1057 @@ +/* + * 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/backup.proto + +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * Encryption configuration for the copied backup.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupEncryptionConfig} + */ +public final class CopyBackupEncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) + CopyBackupEncryptionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyBackupEncryptionConfig.newBuilder() to construct. + private CopyBackupEncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyBackupEncryptionConfig() { + encryptionType_ = 0; + kmsKeyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyBackupEncryptionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CopyBackupEncryptionConfig( + 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 8: + { + int rawValue = input.readEnum(); + + encryptionType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKeyName_ = 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.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.class, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder.class); + } + + /** + * + * + *
+   * Encryption types for the backup.
+   * 
+ * + * Protobuf enum {@code + * google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType} + */ + public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified. Do not use.
+     * 
+ * + * ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + ENCRYPTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * This is the default option for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]
+     * when [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig] is not specified.
+     * For example, if the source backup is using `Customer_Managed_Encryption`,
+     * the backup will be using the same Cloud KMS key as the source backup.
+     * 
+ * + * USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1; + */ + USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION(1), + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * GOOGLE_DEFAULT_ENCRYPTION = 2; + */ + GOOGLE_DEFAULT_ENCRYPTION(2), + /** + * + * + *
+     * Use customer managed encryption. If specified, `kms_key_name`
+     * must contain a valid Cloud KMS key.
+     * 
+ * + * CUSTOMER_MANAGED_ENCRYPTION = 3; + */ + CUSTOMER_MANAGED_ENCRYPTION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified. Do not use.
+     * 
+ * + * ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + public static final int ENCRYPTION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * This is the default option for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]
+     * when [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig] is not specified.
+     * For example, if the source backup is using `Customer_Managed_Encryption`,
+     * the backup will be using the same Cloud KMS key as the source backup.
+     * 
+ * + * USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1; + */ + public static final int USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION_VALUE = 1; + /** + * + * + *
+     * Use Google default encryption.
+     * 
+ * + * GOOGLE_DEFAULT_ENCRYPTION = 2; + */ + public static final int GOOGLE_DEFAULT_ENCRYPTION_VALUE = 2; + /** + * + * + *
+     * Use customer managed encryption. If specified, `kms_key_name`
+     * must contain a valid Cloud KMS key.
+     * 
+ * + * CUSTOMER_MANAGED_ENCRYPTION = 3; + */ + public static final int CUSTOMER_MANAGED_ENCRYPTION_VALUE = 3; + + 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 EncryptionType 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 EncryptionType forNumber(int value) { + switch (value) { + case 0: + return ENCRYPTION_TYPE_UNSPECIFIED; + case 1: + return USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION; + case 2: + return GOOGLE_DEFAULT_ENCRYPTION; + case 3: + return CUSTOMER_MANAGED_ENCRYPTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EncryptionType findValueByNumber(int number) { + return EncryptionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EncryptionType[] VALUES = values(); + + public static EncryptionType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EncryptionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType) + } + + public static final int ENCRYPTION_TYPE_FIELD_NUMBER = 1; + private int encryptionType_; + /** + * + * + *
+   * Required. The encryption type of the backup.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for encryptionType. + */ + @java.lang.Override + public int getEncryptionTypeValue() { + return encryptionType_; + } + /** + * + * + *
+   * Required. The encryption type of the backup.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The encryptionType. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + getEncryptionType() { + @SuppressWarnings("deprecation") + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType result = + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType.valueOf( + encryptionType_); + return result == null + ? com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + .UNRECOGNIZED + : result; + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object kmsKeyName_; + /** + * + * + *
+   * Optional. The Cloud KMS key that will be used to protect the backup.
+   * This field should be set only when
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+   * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+   * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+   * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Cloud KMS key that will be used to protect the backup.
+   * This field should be set only when
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+   * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+   * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+   * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = 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 (encryptionType_ + != com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + .ENCRYPTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, encryptionType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encryptionType_ + != com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + .ENCRYPTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encryptionType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyName_); + } + 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.spanner.admin.database.v1.CopyBackupEncryptionConfig)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig other = + (com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig) obj; + + if (encryptionType_ != other.encryptionType_) return false; + if (!getKmsKeyName().equals(other.getKmsKeyName())) 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) + ENCRYPTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + encryptionType_; + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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.CopyBackupEncryptionConfig 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; + } + /** + * + * + *
+   * Encryption configuration for the copied backup.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupEncryptionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.class, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + encryptionType_ = 0; + + kmsKeyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig + getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig build() { + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig buildPartial() { + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig result = + new com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig(this); + result.encryptionType_ = encryptionType_; + result.kmsKeyName_ = kmsKeyName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig) { + return mergeFrom((com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig other) { + if (other + == com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDefaultInstance()) + return this; + if (other.encryptionType_ != 0) { + setEncryptionTypeValue(other.getEncryptionTypeValue()); + } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int encryptionType_ = 0; + /** + * + * + *
+     * Required. The encryption type of the backup.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for encryptionType. + */ + @java.lang.Override + public int getEncryptionTypeValue() { + return encryptionType_; + } + /** + * + * + *
+     * Required. The encryption type of the backup.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for encryptionType to set. + * @return This builder for chaining. + */ + public Builder setEncryptionTypeValue(int value) { + + encryptionType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The encryption type of the backup.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The encryptionType. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + getEncryptionType() { + @SuppressWarnings("deprecation") + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType result = + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType.valueOf( + encryptionType_); + return result == null + ? com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The encryption type of the backup.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The encryptionType to set. + * @return This builder for chaining. + */ + public Builder setEncryptionType( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType value) { + if (value == null) { + throw new NullPointerException(); + } + + encryptionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The encryption type of the backup.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEncryptionType() { + + encryptionType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + /** + * + * + *
+     * Optional. The Cloud KMS key that will be used to protect the backup.
+     * This field should be set only when
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+     * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+     * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+     * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Cloud KMS key that will be used to protect the backup.
+     * This field should be set only when
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+     * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+     * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+     * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Cloud KMS key that will be used to protect the backup.
+     * This field should be set only when
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+     * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+     * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+     * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Cloud KMS key that will be used to protect the backup.
+     * This field should be set only when
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+     * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+     * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+     * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Cloud KMS key that will be used to protect the backup.
+     * This field should be set only when
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+     * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+     * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+     * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyName_ = 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.spanner.admin.database.v1.CopyBackupEncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) + private static final com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig(); + } + + public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyBackupEncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CopyBackupEncryptionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java new file mode 100644 index 00000000000..a6117dfb660 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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/backup.proto + +package com.google.spanner.admin.database.v1; + +public interface CopyBackupEncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The encryption type of the backup.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for encryptionType. + */ + int getEncryptionTypeValue(); + /** + * + * + *
+   * Required. The encryption type of the backup.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The encryptionType. + */ + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType + getEncryptionType(); + + /** + * + * + *
+   * Optional. The Cloud KMS key that will be used to protect the backup.
+   * This field should be set only when
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+   * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+   * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+   * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + * + * + *
+   * Optional. The Cloud KMS key that will be used to protect the backup.
+   * This field should be set only when
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is
+   * `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
+   * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+   * 
+ * + * + * string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java new file mode 100644 index 00000000000..01e37326459 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java @@ -0,0 +1,1541 @@ +/* + * 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/backup.proto + +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * Metadata type for the google.longrunning.Operation returned by
+ * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupMetadata} + */ +public final class CopyBackupMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CopyBackupMetadata) + CopyBackupMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyBackupMetadata.newBuilder() to construct. + private CopyBackupMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyBackupMetadata() { + name_ = ""; + sourceBackup_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyBackupMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CopyBackupMetadata( + 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(); + + sourceBackup_ = s; + break; + } + case 26: + { + com.google.spanner.admin.database.v1.OperationProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = + input.readMessage( + com.google.spanner.admin.database.v1.OperationProgress.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (cancelTime_ != null) { + subBuilder = cancelTime_.toBuilder(); + } + cancelTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cancelTime_); + cancelTime_ = subBuilder.buildPartial(); + } + + 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.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CopyBackupMetadata.class, + com.google.spanner.admin.database.v1.CopyBackupMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of the backup being created through the copy operation.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * The name of the backup being created through the copy operation.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string name = 1 [(.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 SOURCE_BACKUP_FIELD_NUMBER = 2; + private volatile java.lang.Object sourceBackup_; + /** + * + * + *
+   * The name of the source backup that is being copied.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return The sourceBackup. + */ + @java.lang.Override + public java.lang.String getSourceBackup() { + java.lang.Object ref = sourceBackup_; + 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(); + sourceBackup_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the source backup that is being copied.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceBackup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = sourceBackup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBackup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROGRESS_FIELD_NUMBER = 3; + private com.google.spanner.admin.database.v1.OperationProgress progress_; + /** + * + * + *
+   * The progress of the
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+   * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + * + * @return Whether the progress field is set. + */ + @java.lang.Override + public boolean hasProgress() { + return progress_ != null; + } + /** + * + * + *
+   * The progress of the
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+   * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + * + * @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
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+   * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + public static final int CANCEL_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp cancelTime_; + /** + * + * + *
+   * The time at which cancellation of CopyBackup operation was received.
+   * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+   * starts asynchronous cancellation on a long-running operation. The server
+   * makes a best effort to cancel the operation, but success is not guaranteed.
+   * Clients can use
+   * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+   * other methods to check whether the cancellation succeeded or whether the
+   * operation completed despite cancellation. On successful cancellation,
+   * the operation is not deleted; instead, it becomes an operation with
+   * an [Operation.error][google.longrunning.Operation.error] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + * + * @return Whether the cancelTime field is set. + */ + @java.lang.Override + public boolean hasCancelTime() { + return cancelTime_ != null; + } + /** + * + * + *
+   * The time at which cancellation of CopyBackup operation was received.
+   * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+   * starts asynchronous cancellation on a long-running operation. The server
+   * makes a best effort to cancel the operation, but success is not guaranteed.
+   * Clients can use
+   * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+   * other methods to check whether the cancellation succeeded or whether the
+   * operation completed despite cancellation. On successful cancellation,
+   * the operation is not deleted; instead, it becomes an operation with
+   * an [Operation.error][google.longrunning.Operation.error] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + * + * @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 cancellation of CopyBackup operation was received.
+   * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+   * starts asynchronous cancellation on a long-running operation. The server
+   * makes a best effort to cancel the operation, but success is not guaranteed.
+   * Clients can use
+   * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+   * other methods to check whether the cancellation succeeded or whether the
+   * operation completed despite cancellation. On successful cancellation,
+   * the operation is not deleted; instead, it becomes an operation with
+   * an [Operation.error][google.longrunning.Operation.error] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { + return getCancelTime(); + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceBackup_); + } + if (progress_ != null) { + output.writeMessage(3, getProgress()); + } + if (cancelTime_ != null) { + output.writeMessage(4, getCancelTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceBackup_); + } + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProgress()); + } + if (cancelTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCancelTime()); + } + 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.spanner.admin.database.v1.CopyBackupMetadata)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.CopyBackupMetadata other = + (com.google.spanner.admin.database.v1.CopyBackupMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSourceBackup().equals(other.getSourceBackup())) 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 (!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) + SOURCE_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getSourceBackup().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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupMetadata 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.CopyBackupMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupMetadata 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.CopyBackupMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupMetadata 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.CopyBackupMetadata 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.CopyBackupMetadata 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.CopyBackupMetadata 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.CopyBackupMetadata 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.CopyBackupMetadata 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.CopyBackupMetadata 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.CopyBackupMetadata 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 google.longrunning.Operation returned by
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CopyBackupMetadata) + com.google.spanner.admin.database.v1.CopyBackupMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CopyBackupMetadata.class, + com.google.spanner.admin.database.v1.CopyBackupMetadata.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.CopyBackupMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + sourceBackup_ = ""; + + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + if (cancelTimeBuilder_ == null) { + cancelTime_ = null; + } else { + cancelTime_ = null; + cancelTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupMetadata getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.CopyBackupMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupMetadata build() { + com.google.spanner.admin.database.v1.CopyBackupMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupMetadata buildPartial() { + com.google.spanner.admin.database.v1.CopyBackupMetadata result = + new com.google.spanner.admin.database.v1.CopyBackupMetadata(this); + result.name_ = name_; + result.sourceBackup_ = sourceBackup_; + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + if (cancelTimeBuilder_ == null) { + result.cancelTime_ = cancelTime_; + } else { + result.cancelTime_ = cancelTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.admin.database.v1.CopyBackupMetadata) { + return mergeFrom((com.google.spanner.admin.database.v1.CopyBackupMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.CopyBackupMetadata other) { + if (other == com.google.spanner.admin.database.v1.CopyBackupMetadata.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getSourceBackup().isEmpty()) { + sourceBackup_ = other.sourceBackup_; + onChanged(); + } + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + if (other.hasCancelTime()) { + mergeCancelTime(other.getCancelTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.spanner.admin.database.v1.CopyBackupMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.spanner.admin.database.v1.CopyBackupMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the backup being created through the copy operation.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * The name of the backup being created through the copy operation.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * The name of the backup being created through the copy operation.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * The name of the backup being created through the copy operation.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the backup being created through the copy operation.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string name = 1 [(.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 sourceBackup_ = ""; + /** + * + * + *
+     * The name of the source backup that is being copied.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return The sourceBackup. + */ + public java.lang.String getSourceBackup() { + java.lang.Object ref = sourceBackup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceBackup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the source backup that is being copied.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceBackup. + */ + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = sourceBackup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBackup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the source backup that is being copied.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceBackup_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the source backup that is being copied.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSourceBackup() { + + sourceBackup_ = getDefaultInstance().getSourceBackup(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the source backup that is being copied.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceBackup_ = value; + onChanged(); + return this; + } + + 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
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + * + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + * + * + *
+     * The progress of the
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + * + * @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
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + public Builder setProgress(com.google.spanner.admin.database.v1.OperationProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The progress of the
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + public Builder setProgress( + com.google.spanner.admin.database.v1.OperationProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The progress of the
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + public Builder mergeProgress(com.google.spanner.admin.database.v1.OperationProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + com.google.spanner.admin.database.v1.OperationProgress.newBuilder(progress_) + .mergeFrom(value) + .buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The progress of the
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The progress of the
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress of the
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + 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
+     * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+     * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + 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 cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + * + * @return Whether the cancelTime field is set. + */ + public boolean hasCancelTime() { + return cancelTimeBuilder_ != null || cancelTime_ != null; + } + /** + * + * + *
+     * The time at which cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + * + * @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 cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + public Builder setCancelTime(com.google.protobuf.Timestamp value) { + if (cancelTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cancelTime_ = value; + onChanged(); + } else { + cancelTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time at which cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + public Builder setCancelTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (cancelTimeBuilder_ == null) { + cancelTime_ = builderForValue.build(); + onChanged(); + } else { + cancelTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time at which cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + public Builder mergeCancelTime(com.google.protobuf.Timestamp value) { + if (cancelTimeBuilder_ == null) { + if (cancelTime_ != null) { + cancelTime_ = + com.google.protobuf.Timestamp.newBuilder(cancelTime_).mergeFrom(value).buildPartial(); + } else { + cancelTime_ = value; + } + onChanged(); + } else { + cancelTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time at which cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + public Builder clearCancelTime() { + if (cancelTimeBuilder_ == null) { + cancelTime_ = null; + onChanged(); + } else { + cancelTime_ = null; + cancelTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time at which cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { + + onChanged(); + return getCancelTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + 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 cancellation of CopyBackup operation was received.
+     * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * starts asynchronous cancellation on a long-running operation. The server
+     * makes a best effort to cancel the operation, but success is not guaranteed.
+     * Clients can use
+     * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * operation completed despite cancellation. On successful cancellation,
+     * the operation is not deleted; instead, it becomes an operation with
+     * an [Operation.error][google.longrunning.Operation.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + 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.CopyBackupMetadata) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.CopyBackupMetadata) + private static final com.google.spanner.admin.database.v1.CopyBackupMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.CopyBackupMetadata(); + } + + public static com.google.spanner.admin.database.v1.CopyBackupMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyBackupMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CopyBackupMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java new file mode 100644 index 00000000000..f977fe6fb38 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java @@ -0,0 +1,189 @@ +/* + * 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/backup.proto + +package com.google.spanner.admin.database.v1; + +public interface CopyBackupMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CopyBackupMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the backup being created through the copy operation.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the backup being created through the copy operation.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The name of the source backup that is being copied.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return The sourceBackup. + */ + java.lang.String getSourceBackup(); + /** + * + * + *
+   * The name of the source backup that is being copied.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string source_backup = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceBackup. + */ + com.google.protobuf.ByteString getSourceBackupBytes(); + + /** + * + * + *
+   * The progress of the
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+   * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + * + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + * + * + *
+   * The progress of the
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+   * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + * + * @return The progress. + */ + com.google.spanner.admin.database.v1.OperationProgress getProgress(); + /** + * + * + *
+   * The progress of the
+   * [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.
+   * 
+ * + * .google.spanner.admin.database.v1.OperationProgress progress = 3; + */ + com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgressOrBuilder(); + + /** + * + * + *
+   * The time at which cancellation of CopyBackup operation was received.
+   * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+   * starts asynchronous cancellation on a long-running operation. The server
+   * makes a best effort to cancel the operation, but success is not guaranteed.
+   * Clients can use
+   * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+   * other methods to check whether the cancellation succeeded or whether the
+   * operation completed despite cancellation. On successful cancellation,
+   * the operation is not deleted; instead, it becomes an operation with
+   * an [Operation.error][google.longrunning.Operation.error] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + * + * @return Whether the cancelTime field is set. + */ + boolean hasCancelTime(); + /** + * + * + *
+   * The time at which cancellation of CopyBackup operation was received.
+   * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+   * starts asynchronous cancellation on a long-running operation. The server
+   * makes a best effort to cancel the operation, but success is not guaranteed.
+   * Clients can use
+   * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+   * other methods to check whether the cancellation succeeded or whether the
+   * operation completed despite cancellation. On successful cancellation,
+   * the operation is not deleted; instead, it becomes an operation with
+   * an [Operation.error][google.longrunning.Operation.error] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + * + * @return The cancelTime. + */ + com.google.protobuf.Timestamp getCancelTime(); + /** + * + * + *
+   * The time at which cancellation of CopyBackup operation was received.
+   * [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+   * starts asynchronous cancellation on a long-running operation. The server
+   * makes a best effort to cancel the operation, but success is not guaranteed.
+   * Clients can use
+   * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
+   * other methods to check whether the cancellation succeeded or whether the
+   * operation completed despite cancellation. On successful cancellation,
+   * the operation is not deleted; instead, it becomes an operation with
+   * an [Operation.error][google.longrunning.Operation.error] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java new file mode 100644 index 00000000000..3e5aa64bae9 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java @@ -0,0 +1,1769 @@ +/* + * 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/backup.proto + +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * The request for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupRequest} + */ +public final class CopyBackupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CopyBackupRequest) + CopyBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyBackupRequest.newBuilder() to construct. + private CopyBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyBackupRequest() { + parent_ = ""; + backupId_ = ""; + sourceBackup_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CopyBackupRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceBackup_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder subBuilder = + null; + if (encryptionConfig_ != null) { + subBuilder = encryptionConfig_.toBuilder(); + } + encryptionConfig_ = + input.readMessage( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionConfig_); + encryptionConfig_ = subBuilder.buildPartial(); + } + + 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.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CopyBackupRequest.class, + com.google.spanner.admin.database.v1.CopyBackupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the destination instance that will contain the backup copy.
+   * Values are of the form: `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * 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 name of the destination instance that will contain the backup copy.
+   * Values are of the form: `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * 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 copy.
+   * The `backup_id` appended to `parent` forms the full backup_uri of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * 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 copy.
+   * The `backup_id` appended to `parent` forms the full backup_uri of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * 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 SOURCE_BACKUP_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceBackup_; + /** + * + * + *
+   * Required. The source backup to be copied.
+   * The source backup needs to be in READY state for it to be copied.
+   * Once CopyBackup is in progress, the source backup cannot be deleted or
+   * cleaned up on expiration until CopyBackup is finished.
+   * Values are of the form:
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceBackup. + */ + @java.lang.Override + public java.lang.String getSourceBackup() { + java.lang.Object ref = sourceBackup_; + 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(); + sourceBackup_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The source backup to be copied.
+   * The source backup needs to be in READY state for it to be copied.
+   * Once CopyBackup is in progress, the source backup cannot be deleted or
+   * cleaned up on expiration until CopyBackup is finished.
+   * Values are of the form:
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceBackup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = sourceBackup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBackup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Required. The expiration time of the backup in microsecond granularity.
+   * The expiration time must be at least 6 hours and at most 366 days
+   * from the `create_time` of the source backup. Once the `expire_time` has
+   * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+   * to free the resources used by the backup.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Required. The expiration time of the backup in microsecond granularity.
+   * The expiration time must be at least 6 hours and at most 366 days
+   * from the `create_time` of the source backup. Once the `expire_time` has
+   * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+   * to free the resources used by the backup.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Required. The expiration time of the backup in microsecond granularity.
+   * The expiration time must be at least 6 hours and at most 366 days
+   * from the `create_time` of the source backup. Once the `expire_time` has
+   * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+   * to free the resources used by the backup.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 5; + private com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryptionConfig_; + /** + * + * + *
+   * Optional. The encryption configuration used to encrypt the backup. If this field is
+   * not specified, the backup will use the same
+   * encryption configuration as the source backup by default, namely
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+   * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + * + * + *
+   * Optional. The encryption configuration used to encrypt the backup. If this field is
+   * not specified, the backup will use the same
+   * encryption configuration as the source backup by default, namely
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+   * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * Optional. The encryption configuration used to encrypt the backup. If this field is
+   * not specified, the backup will use the same
+   * encryption configuration as the source backup by default, namely
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+   * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return getEncryptionConfig(); + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceBackup_); + } + if (expireTime_ != null) { + output.writeMessage(4, getExpireTime()); + } + if (encryptionConfig_ != null) { + output.writeMessage(5, getEncryptionConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceBackup_); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExpireTime()); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig()); + } + 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.spanner.admin.database.v1.CopyBackupRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.CopyBackupRequest other = + (com.google.spanner.admin.database.v1.CopyBackupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBackupId().equals(other.getBackupId())) return false; + if (!getSourceBackup().equals(other.getSourceBackup())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) 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(); + hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getSourceBackup().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.CopyBackupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupRequest 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.CopyBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupRequest 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.CopyBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CopyBackupRequest 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.CopyBackupRequest 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.CopyBackupRequest 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.CopyBackupRequest 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.CopyBackupRequest 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.CopyBackupRequest 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.CopyBackupRequest 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.CopyBackupRequest 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 [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CopyBackupRequest) + com.google.spanner.admin.database.v1.CopyBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CopyBackupRequest.class, + com.google.spanner.admin.database.v1.CopyBackupRequest.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.CopyBackupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + backupId_ = ""; + + sourceBackup_ = ""; + + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupRequest getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.CopyBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupRequest build() { + com.google.spanner.admin.database.v1.CopyBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupRequest buildPartial() { + com.google.spanner.admin.database.v1.CopyBackupRequest result = + new com.google.spanner.admin.database.v1.CopyBackupRequest(this); + result.parent_ = parent_; + result.backupId_ = backupId_; + result.sourceBackup_ = sourceBackup_; + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + if (encryptionConfigBuilder_ == null) { + result.encryptionConfig_ = encryptionConfig_; + } else { + result.encryptionConfig_ = encryptionConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.admin.database.v1.CopyBackupRequest) { + return mergeFrom((com.google.spanner.admin.database.v1.CopyBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.CopyBackupRequest other) { + if (other == com.google.spanner.admin.database.v1.CopyBackupRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + onChanged(); + } + if (!other.getSourceBackup().isEmpty()) { + sourceBackup_ = other.sourceBackup_; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.spanner.admin.database.v1.CopyBackupRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.spanner.admin.database.v1.CopyBackupRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the destination instance that will contain the backup copy.
+     * Values are of the form: `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * 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 name of the destination instance that will contain the backup copy.
+     * Values are of the form: `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * 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 name of the destination instance that will contain the backup copy.
+     * Values are of the form: `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * 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 name of the destination instance that will contain the backup copy.
+     * Values are of the form: `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * 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 name of the destination instance that will contain the backup copy.
+     * Values are of the form: `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * 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 copy.
+     * The `backup_id` appended to `parent` forms the full backup_uri of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * 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 copy.
+     * The `backup_id` appended to `parent` forms the full backup_uri of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * 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 copy.
+     * The `backup_id` appended to `parent` forms the full backup_uri of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * 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 copy.
+     * The `backup_id` appended to `parent` forms the full backup_uri of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * 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 copy.
+     * The `backup_id` appended to `parent` forms the full backup_uri of the form
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * 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 java.lang.Object sourceBackup_ = ""; + /** + * + * + *
+     * Required. The source backup to be copied.
+     * The source backup needs to be in READY state for it to be copied.
+     * Once CopyBackup is in progress, the source backup cannot be deleted or
+     * cleaned up on expiration until CopyBackup is finished.
+     * Values are of the form:
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceBackup. + */ + public java.lang.String getSourceBackup() { + java.lang.Object ref = sourceBackup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceBackup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The source backup to be copied.
+     * The source backup needs to be in READY state for it to be copied.
+     * Once CopyBackup is in progress, the source backup cannot be deleted or
+     * cleaned up on expiration until CopyBackup is finished.
+     * Values are of the form:
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceBackup. + */ + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = sourceBackup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBackup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The source backup to be copied.
+     * The source backup needs to be in READY state for it to be copied.
+     * Once CopyBackup is in progress, the source backup cannot be deleted or
+     * cleaned up on expiration until CopyBackup is finished.
+     * Values are of the form:
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceBackup_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The source backup to be copied.
+     * The source backup needs to be in READY state for it to be copied.
+     * Once CopyBackup is in progress, the source backup cannot be deleted or
+     * cleaned up on expiration until CopyBackup is finished.
+     * Values are of the form:
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSourceBackup() { + + sourceBackup_ = getDefaultInstance().getSourceBackup(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The source backup to be copied.
+     * The source backup needs to be in READY state for it to be copied.
+     * Once CopyBackup is in progress, the source backup cannot be deleted or
+     * cleaned up on expiration until CopyBackup is finished.
+     * Values are of the form:
+     * `projects/<project>/instances/<instance>/backups/<backup>`.
+     * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceBackup_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Required. The expiration time of the backup in microsecond granularity.
+     * The expiration time must be at least 6 hours and at most 366 days
+     * from the `create_time` of the source backup. Once the `expire_time` has
+     * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+     * to free the resources used by the backup.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return encryptionConfigBuilder_ != null || encryptionConfig_ != null; + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig( + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (encryptionConfig_ != null) { + encryptionConfig_ = + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.newBuilder( + encryptionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionConfig_ = value; + } + onChanged(); + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + onChanged(); + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder + getEncryptionConfigBuilder() { + + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * Optional. The encryption configuration used to encrypt the backup. If this field is
+     * not specified, the backup will use the same
+     * encryption configuration as the source backup by default, namely
+     * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+     * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+     * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder, + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + @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.CopyBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.CopyBackupRequest) + private static final com.google.spanner.admin.database.v1.CopyBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.CopyBackupRequest(); + } + + public static com.google.spanner.admin.database.v1.CopyBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CopyBackupRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CopyBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java new file mode 100644 index 00000000000..5a8be05a57e --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java @@ -0,0 +1,228 @@ +/* + * 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/backup.proto + +package com.google.spanner.admin.database.v1; + +public interface CopyBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CopyBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the destination instance that will contain the backup copy.
+   * Values are of the form: `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the destination instance that will contain the backup copy.
+   * Values are of the form: `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * 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 copy.
+   * The `backup_id` appended to `parent` forms the full backup_uri of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * Required. The id of the backup copy.
+   * The `backup_id` appended to `parent` forms the full backup_uri of the form
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); + + /** + * + * + *
+   * Required. The source backup to be copied.
+   * The source backup needs to be in READY state for it to be copied.
+   * Once CopyBackup is in progress, the source backup cannot be deleted or
+   * cleaned up on expiration until CopyBackup is finished.
+   * Values are of the form:
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceBackup. + */ + java.lang.String getSourceBackup(); + /** + * + * + *
+   * Required. The source backup to be copied.
+   * The source backup needs to be in READY state for it to be copied.
+   * Once CopyBackup is in progress, the source backup cannot be deleted or
+   * cleaned up on expiration until CopyBackup is finished.
+   * Values are of the form:
+   * `projects/<project>/instances/<instance>/backups/<backup>`.
+   * 
+ * + * + * string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceBackup. + */ + com.google.protobuf.ByteString getSourceBackupBytes(); + + /** + * + * + *
+   * Required. The expiration time of the backup in microsecond granularity.
+   * The expiration time must be at least 6 hours and at most 366 days
+   * from the `create_time` of the source backup. Once the `expire_time` has
+   * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+   * to free the resources used by the backup.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Required. The expiration time of the backup in microsecond granularity.
+   * The expiration time must be at least 6 hours and at most 366 days
+   * from the `create_time` of the source backup. Once the `expire_time` has
+   * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+   * to free the resources used by the backup.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Required. The expiration time of the backup in microsecond granularity.
+   * The expiration time must be at least 6 hours and at most 366 days
+   * from the `create_time` of the source backup. Once the `expire_time` has
+   * passed, the backup is eligible to be automatically deleted by Cloud Spanner
+   * to free the resources used by the backup.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The encryption configuration used to encrypt the backup. If this field is
+   * not specified, the backup will use the same
+   * encryption configuration as the source backup by default, namely
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+   * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * Optional. The encryption configuration used to encrypt the backup. If this field is
+   * not specified, the backup will use the same
+   * encryption configuration as the source backup by default, namely
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+   * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * Optional. The encryption configuration used to encrypt the backup. If this field is
+   * not specified, the backup will use the same
+   * encryption configuration as the source backup by default, namely
+   * [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] =
+   * `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
+   * 
+ * + * + * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder + getEncryptionConfigOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java index 44a4c392f2c..a28e28e18f7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java @@ -208,6 +208,8 @@ public com.google.protobuf.ByteString getParentBytes() { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -216,8 +218,11 @@ public com.google.protobuf.ByteString getParentBytes() { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -226,6 +231,29 @@ public com.google.protobuf.ByteString getParentBytes() { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -262,6 +290,8 @@ public java.lang.String getFilter() { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -270,8 +300,11 @@ public java.lang.String getFilter() { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -280,6 +313,29 @@ public java.lang.String getFilter() { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -884,6 +940,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -892,8 +950,11 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -902,6 +963,29 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -937,6 +1021,8 @@ public java.lang.String getFilter() { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -945,8 +1031,11 @@ public java.lang.String getFilter() { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -955,6 +1044,29 @@ public java.lang.String getFilter() { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -990,6 +1102,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -998,8 +1112,11 @@ public com.google.protobuf.ByteString getFilterBytes() { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -1008,6 +1125,29 @@ public com.google.protobuf.ByteString getFilterBytes() { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1042,6 +1182,8 @@ public Builder setFilter(java.lang.String value) { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -1050,8 +1192,11 @@ public Builder setFilter(java.lang.String value) { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -1060,6 +1205,29 @@ public Builder setFilter(java.lang.String value) { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1090,6 +1258,8 @@ public Builder clearFilter() { * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -1098,8 +1268,11 @@ public Builder clearFilter() { * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -1108,6 +1281,29 @@ public Builder clearFilter() { * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java index 6d48d7f5f3f..4d862ccc097 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java @@ -72,6 +72,8 @@ public interface ListBackupOperationsRequestOrBuilder * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -80,8 +82,11 @@ public interface ListBackupOperationsRequestOrBuilder * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -90,6 +95,29 @@ public interface ListBackupOperationsRequestOrBuilder * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -115,6 +143,8 @@ public interface ListBackupOperationsRequestOrBuilder * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -123,8 +153,11 @@ public interface ListBackupOperationsRequestOrBuilder * you can specify AND, OR, and NOT logic explicitly. * Here are a few examples: * * `done:true` - The operation is complete. - * * `metadata.database:prod` - The database the backup was taken from has - * a name containing the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The database the backup was taken from has a name containing the + * string "prod". * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ * `(metadata.name:howl) AND` \ * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -133,6 +166,29 @@ public interface ListBackupOperationsRequestOrBuilder * * The backup name contains the string "howl". * * The operation started before 2018-03-28T14:50:00Z. * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup of the copied backup name contains the string + * "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + * database the backup was taken from has name containing string + * "test_db" + * * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + * backup the backup was copied from has name containing string + * "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java index f9b74a69539..be50a78b625 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java @@ -135,11 +135,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -156,11 +156,11 @@ public java.util.List getOperationsList() { *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -178,11 +178,11 @@ public java.util.List getOperationsList() { *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -199,11 +199,11 @@ public int getOperationsCount() { *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -220,11 +220,11 @@ public com.google.longrunning.Operation getOperations(int index) { *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -695,11 +695,11 @@ private void ensureOperationsIsMutable() { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -719,11 +719,11 @@ public java.util.List getOperationsList() { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -743,11 +743,11 @@ public int getOperationsCount() { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -767,11 +767,11 @@ public com.google.longrunning.Operation getOperations(int index) { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -797,11 +797,11 @@ public Builder setOperations(int index, com.google.longrunning.Operation value) *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -825,11 +825,11 @@ public Builder setOperations( *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -855,11 +855,11 @@ public Builder addOperations(com.google.longrunning.Operation value) { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -885,11 +885,11 @@ public Builder addOperations(int index, com.google.longrunning.Operation value) *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -912,11 +912,11 @@ public Builder addOperations(com.google.longrunning.Operation.Builder builderFor *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -940,11 +940,11 @@ public Builder addOperations( *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -968,11 +968,11 @@ public Builder addAllOperations( *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -995,11 +995,11 @@ public Builder clearOperations() { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -1022,11 +1022,11 @@ public Builder removeOperations(int index) { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -1042,11 +1042,11 @@ public com.google.longrunning.Operation.Builder getOperationsBuilder(int index) *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -1066,11 +1066,11 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -1091,11 +1091,11 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -1112,11 +1112,11 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder() { *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
@@ -1133,11 +1133,11 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) *
      * The list of matching backup [long-running
      * operations][google.longrunning.Operation]. Each operation's name will be
-     * prefixed by the backup's name and the operation's
-     * [metadata][google.longrunning.Operation.metadata] will be of type
-     * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-     * pending or have completed/failed/canceled within the last 7 days.
-     * Operations returned are ordered by
+     * prefixed by the backup's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that are pending or have completed/failed/canceled within the
+     * last 7 days. Operations returned are ordered by
      * `operation.metadata.value.progress.start_time` in descending order starting
      * from the most recently started operation.
      * 
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java index 05c3031f8d7..f170588152b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java @@ -29,11 +29,11 @@ public interface ListBackupOperationsResponseOrBuilder *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -47,11 +47,11 @@ public interface ListBackupOperationsResponseOrBuilder *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -65,11 +65,11 @@ public interface ListBackupOperationsResponseOrBuilder *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -83,11 +83,11 @@ public interface ListBackupOperationsResponseOrBuilder *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
@@ -101,11 +101,11 @@ public interface ListBackupOperationsResponseOrBuilder *
    * The list of matching backup [long-running
    * operations][google.longrunning.Operation]. Each operation's name will be
-   * prefixed by the backup's name and the operation's
-   * [metadata][google.longrunning.Operation.metadata] will be of type
-   * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
-   * pending or have completed/failed/canceled within the last 7 days.
-   * Operations returned are ordered by
+   * prefixed by the backup's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata. Operations returned
+   * include those that are pending or have completed/failed/canceled within the
+   * last 7 days. Operations returned are ordered by
    * `operation.metadata.value.progress.start_time` in descending order starting
    * from the most recently started operation.
    * 
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java index ed376a6f05d..da529706e56 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java @@ -208,6 +208,8 @@ public com.google.protobuf.ByteString getParentBytes() { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -264,6 +266,8 @@ public java.lang.String getFilter() { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -892,6 +896,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -947,6 +953,8 @@ public java.lang.String getFilter() { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -1002,6 +1010,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -1056,6 +1066,8 @@ public Builder setFilter(java.lang.String value) { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -1106,6 +1118,8 @@ public Builder clearFilter() { * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java index 38eb5693e1a..e020307e57f 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java @@ -72,6 +72,8 @@ public interface ListDatabaseOperationsRequestOrBuilder * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. @@ -117,6 +119,8 @@ public interface ListDatabaseOperationsRequestOrBuilder * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. * * `error` - Error associated with the long-running operation. * * `response.@type` - the type of response. * * `response.<field_name>` - any field in response.value. 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 1acad6985e1..8aa471048a2 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 @@ -116,214 +116,221 @@ 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 google/protobuf/fiel" - + "d_mask.proto\032\037google/protobuf/timestamp." - + "proto\032-google/spanner/admin/database/v1/" - + "backup.proto\032-google/spanner/admin/datab" - + "ase/v1/common.proto\"\253\001\n\013RestoreInfo\022H\n\013s" - + "ource_type\030\001 \001(\01623.google.spanner.admin." + + "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\n\025earliest_v" - + "ersion_time\030\007 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\022\033\n\016default_leader\030\t \001(\tB\003\340A\003\022" - + "P\n\020database_dialect\030\n \001(\01621.google.spann" - + "er.admin.database.v1.DatabaseDialectB\003\340A" - + "\003\"M\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE" - + "ATING\020\001\022\t\n\005READY\020\002\022\024\n\020READY_OPTIMIZING\020\003" - + ":b\352A_\n\037spanner.googleapis.com/Database\022<" - + "projects/{project}/instances/{instance}/" - + "databases/{database}\"v\n\024ListDatabasesReq" - + "uest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.go" - + "ogleapis.com/Instance\022\021\n\tpage_size\030\003 \001(\005" - + "\022\022\n\npage_token\030\004 \001(\t\"o\n\025ListDatabasesRes" - + "ponse\022=\n\tdatabases\030\001 \003(\0132*.google.spanne" - + "r.admin.database.v1.Database\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\264\002\n\025CreateDatabaseRequest\022" - + "7\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googlea" - + "pis.com/Instance\022\035\n\020create_statement\030\002 \001" - + "(\tB\003\340A\002\022\035\n\020extra_statements\030\003 \003(\tB\003\340A\001\022R" - + "\n\021encryption_config\030\004 \001(\01322.google.spann" - + "er.admin.database.v1.EncryptionConfigB\003\340" - + "A\001\022P\n\020database_dialect\030\005 \001(\01621.google.sp" - + "anner.admin.database.v1.DatabaseDialectB" - + "\003\340A\001\"P\n\026CreateDatabaseMetadata\0226\n\010databa" - + "se\030\001 \001(\tB$\372A!\n\037spanner.googleapis.com/Da" - + "tabase\"K\n\022GetDatabaseRequest\0225\n\004name\030\001 \001" - + "(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/Datab" - + "ase\"\204\001\n\030UpdateDatabaseDdlRequest\0229\n\010data" - + "base\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.c" - + "om/Database\022\027\n\nstatements\030\002 \003(\tB\003\340A\002\022\024\n\014" - + "operation_id\030\003 \001(\t\"\375\001\n\031UpdateDatabaseDdl" - + "Metadata\0226\n\010database\030\001 \001(\tB$\372A!\n\037spanner" - + ".googleapis.com/Database\022\022\n\nstatements\030\002" - + " \003(\t\0225\n\021commit_timestamps\030\003 \003(\0132\032.google" - + ".protobuf.Timestamp\022\026\n\tthrottled\030\004 \001(\010B\003" - + "\340A\003\022E\n\010progress\030\005 \003(\01323.google.spanner.a" - + "dmin.database.v1.OperationProgress\"P\n\023Dr" - + "opDatabaseRequest\0229\n\010database\030\001 \001(\tB\'\340A\002" - + "\372A!\n\037spanner.googleapis.com/Database\"R\n\025" - + "GetDatabaseDdlRequest\0229\n\010database\030\001 \001(\tB" - + "\'\340A\002\372A!\n\037spanner.googleapis.com/Database" - + "\",\n\026GetDatabaseDdlResponse\022\022\n\nstatements" - + "\030\001 \003(\t\"\217\001\n\035ListDatabaseOperationsRequest" - + "\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.google" - + "apis.com/Instance\022\016\n\006filter\030\002 \001(\t\022\021\n\tpag" - + "e_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"l\n\036List" - + "DatabaseOperationsResponse\0221\n\noperations" - + "\030\001 \003(\0132\035.google.longrunning.Operation\022\027\n" - + "\017next_page_token\030\002 \001(\t\"\216\002\n\026RestoreDataba" - + "seRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spann" - + "er.googleapis.com/Instance\022\030\n\013database_i" - + "d\030\002 \001(\tB\003\340A\002\0224\n\006backup\030\003 \001(\tB\"\372A\037\n\035spann" - + "er.googleapis.com/BackupH\000\022a\n\021encryption" - + "_config\030\004 \001(\0132A.google.spanner.admin.dat" - + "abase.v1.RestoreDatabaseEncryptionConfig" - + "B\003\340A\001B\010\n\006source\"\363\002\n\037RestoreDatabaseEncry" - + "ptionConfig\022n\n\017encryption_type\030\001 \001(\0162P.g" - + "oogle.spanner.admin.database.v1.RestoreD" - + "atabaseEncryptionConfig.EncryptionTypeB\003" - + "\340A\002\022?\n\014kms_key_name\030\002 \001(\tB)\340A\001\372A#\n!cloud" - + "kms.googleapis.com/CryptoKey\"\236\001\n\016Encrypt" - + "ionType\022\037\n\033ENCRYPTION_TYPE_UNSPECIFIED\020\000" - + "\022+\n\'USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPT" - + "ION\020\001\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020\002\022\037\n\033" - + "CUSTOMER_MANAGED_ENCRYPTION\020\003\"\215\003\n\027Restor" - + "eDatabaseMetadata\0222\n\004name\030\001 \001(\tB$\372A!\n\037sp" - + "anner.googleapis.com/Database\022H\n\013source_" - + "type\030\002 \001(\01623.google.spanner.admin.databa" - + "se.v1.RestoreSourceType\022C\n\013backup_info\030\003" - + " \001(\0132,.google.spanner.admin.database.v1." - + "BackupInfoH\000\022E\n\010progress\030\004 \001(\01323.google." - + "spanner.admin.database.v1.OperationProgr" - + "ess\022/\n\013cancel_time\030\005 \001(\0132\032.google.protob" - + "uf.Timestamp\022(\n optimize_database_operat" - + "ion_name\030\006 \001(\tB\r\n\013source_info\"\235\001\n Optimi" - + "zeRestoredDatabaseMetadata\0222\n\004name\030\001 \001(\t" - + "B$\372A!\n\037spanner.googleapis.com/Database\022E" - + "\n\010progress\030\002 \001(\01323.google.spanner.admin." - + "database.v1.OperationProgress*5\n\021Restore" - + "SourceType\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006BACK" - + "UP\020\0012\223\037\n\rDatabaseAdmin\022\300\001\n\rListDatabases" - + "\0226.google.spanner.admin.database.v1.List" - + "DatabasesRequest\0327.google.spanner.admin." - + "database.v1.ListDatabasesResponse\">\202\323\344\223\002" - + "/\022-/v1/{parent=projects/*/instances/*}/d" - + "atabases\332A\006parent\022\244\002\n\016CreateDatabase\0227.g" - + "oogle.spanner.admin.database.v1.CreateDa" - + "tabaseRequest\032\035.google.longrunning.Opera" - + "tion\"\271\001\202\323\344\223\0022\"-/v1/{parent=projects/*/in" - + "stances/*}/databases:\001*\332A\027parent,create_" - + "statement\312Ad\n)google.spanner.admin.datab" - + "ase.v1.Database\0227google.spanner.admin.da" - + "tabase.v1.CreateDatabaseMetadata\022\255\001\n\013Get" - + "Database\0224.google.spanner.admin.database" - + ".v1.GetDatabaseRequest\032*.google.spanner." - + "admin.database.v1.Database\"<\202\323\344\223\002/\022-/v1/" - + "{name=projects/*/instances/*/databases/*" - + "}\332A\004name\022\235\002\n\021UpdateDatabaseDdl\022:.google." - + "spanner.admin.database.v1.UpdateDatabase" - + "DdlRequest\032\035.google.longrunning.Operatio" - + "n\"\254\001\202\323\344\223\002:25/v1/{database=projects/*/ins" - + "tances/*/databases/*}/ddl:\001*\332A\023database," - + "statements\312AS\n\025google.protobuf.Empty\022:go" - + "ogle.spanner.admin.database.v1.UpdateDat" - + "abaseDdlMetadata\022\243\001\n\014DropDatabase\0225.goog" - + "le.spanner.admin.database.v1.DropDatabas" - + "eRequest\032\026.google.protobuf.Empty\"D\202\323\344\223\0023" - + "*1/v1/{database=projects/*/instances/*/d" - + "atabases/*}\332A\010database\022\315\001\n\016GetDatabaseDd" - + "l\0227.google.spanner.admin.database.v1.Get" - + "DatabaseDdlRequest\0328.google.spanner.admi" - + "n.database.v1.GetDatabaseDdlResponse\"H\202\323" - + "\344\223\0027\0225/v1/{database=projects/*/instances" - + "/*/databases/*}/ddl\332A\010database\022\353\001\n\014SetIa" - + "mPolicy\022\".google.iam.v1.SetIamPolicyRequ" - + "est\032\025.google.iam.v1.Policy\"\237\001\202\323\344\223\002\206\001\">/v" - + "1/{resource=projects/*/instances/*/datab" - + "ases/*}:setIamPolicy:\001*ZA\"/v1/" - + "{resource=projects/*/instances/*/databas" - + "es/*}:getIamPolicy:\001*ZA\".google.spanner.admin" - + ".database.v1.ListBackupOperationsRespons" - + "e\"E\202\323\344\223\0026\0224/v1/{parent=projects/*/instan" - + "ces/*}/backupOperations\332A\006parent\032x\312A\026spa" - + "nner.googleapis.com\322A\\https://www.google" - + "apis.com/auth/cloud-platform,https://www" - + ".googleapis.com/auth/spanner.adminB\332\002\n$c" - + "om.google.spanner.admin.database.v1B\031Spa" - + "nnerDatabaseAdminProtoP\001ZHgoogle.golang." - + "org/genproto/googleapis/spanner/admin/da" - + "tabase/v1;database\252\002&Google.Cloud.Spanne" - + "r.Admin.Database.V1\312\002&Google\\Cloud\\Spann" - + "er\\Admin\\Database\\V1\352\002+Google::Cloud::Sp" - + "anner::Admin::Database::V1\352AJ\n\037spanner.g" - + "oogleapis.com/Instance\022\'projects/{projec" - + "t}/instances/{instance}b\006proto3" + + "info\030\003 \001(\0132,.google.spanner.admin.databa" + + "se.v1.BackupInfoH\000\022E\n\010progress\030\004 \001(\01323.g" + + "oogle.spanner.admin.database.v1.Operatio" + + "nProgress\022/\n\013cancel_time\030\005 \001(\0132\032.google." + + "protobuf.Timestamp\022(\n optimize_database_" + + "operation_name\030\006 \001(\tB\r\n\013source_info\"\235\001\n " + + "OptimizeRestoredDatabaseMetadata\0222\n\004name" + + "\030\001 \001(\tB$\372A!\n\037spanner.googleapis.com/Data" + + "base\022E\n\010progress\030\002 \001(\01323.google.spanner." + + "admin.database.v1.OperationProgress*5\n\021R" + + "estoreSourceType\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n" + + "\n\006BACKUP\020\0012\302!\n\rDatabaseAdmin\022\300\001\n\rListDat" + + "abases\0226.google.spanner.admin.database.v" + + "1.ListDatabasesRequest\0327.google.spanner." + + "admin.database.v1.ListDatabasesResponse\"" + + ">\202\323\344\223\002/\022-/v1/{parent=projects/*/instance" + + "s/*}/databases\332A\006parent\022\244\002\n\016CreateDataba" + + "se\0227.google.spanner.admin.database.v1.Cr" + + "eateDatabaseRequest\032\035.google.longrunning" + + ".Operation\"\271\001\202\323\344\223\0022\"-/v1/{parent=project" + + "s/*/instances/*}/databases:\001*\332A\027parent,c" + + "reate_statement\312Ad\n)google.spanner.admin" + + ".database.v1.Database\0227google.spanner.ad" + + "min.database.v1.CreateDatabaseMetadata\022\255" + + "\001\n\013GetDatabase\0224.google.spanner.admin.da" + + "tabase.v1.GetDatabaseRequest\032*.google.sp" + + "anner.admin.database.v1.Database\"<\202\323\344\223\002/" + + "\022-/v1/{name=projects/*/instances/*/datab" + + "ases/*}\332A\004name\022\235\002\n\021UpdateDatabaseDdl\022:.g" + + "oogle.spanner.admin.database.v1.UpdateDa" + + "tabaseDdlRequest\032\035.google.longrunning.Op" + + "eration\"\254\001\202\323\344\223\002:25/v1/{database=projects" + + "/*/instances/*/databases/*}/ddl:\001*\332A\023dat" + + "abase,statements\312AS\n\025google.protobuf.Emp" + + "ty\022:google.spanner.admin.database.v1.Upd" + + "ateDatabaseDdlMetadata\022\243\001\n\014DropDatabase\022" + + "5.google.spanner.admin.database.v1.DropD" + + "atabaseRequest\032\026.google.protobuf.Empty\"D" + + "\202\323\344\223\0023*1/v1/{database=projects/*/instanc" + + "es/*/databases/*}\332A\010database\022\315\001\n\016GetData" + + "baseDdl\0227.google.spanner.admin.database." + + "v1.GetDatabaseDdlRequest\0328.google.spanne" + + "r.admin.database.v1.GetDatabaseDdlRespon" + + "se\"H\202\323\344\223\0027\0225/v1/{database=projects/*/ins" + + "tances/*/databases/*}/ddl\332A\010database\022\353\001\n" + + "\014SetIamPolicy\022\".google.iam.v1.SetIamPoli" + + "cyRequest\032\025.google.iam.v1.Policy\"\237\001\202\323\344\223\002" + + "\206\001\">/v1/{resource=projects/*/instances/*" + + "/databases/*}:setIamPolicy:\001*ZA\"/v1/{resource=projects/*/instances/*/d" + + "atabases/*}:getIamPolicy:\001*ZA\".google.spanner.admin.database.v" + + "1.ListBackupOperationsResponse\"E\202\323\344\223\0026\0224" + + "/v1/{parent=projects/*/instances/*}/back" + + "upOperations\332A\006parent\032x\312A\026spanner.google" + + "apis.com\322A\\https://www.googleapis.com/au" + + "th/cloud-platform,https://www.googleapis" + + ".com/auth/spanner.adminB\332\002\n$com.google.s" + + "panner.admin.database.v1B\031SpannerDatabas" + + "eAdminProtoP\001ZHgoogle.golang.org/genprot" + + "o/googleapis/spanner/admin/database/v1;d" + + "atabase\252\002&Google.Cloud.Spanner.Admin.Dat" + + "abase.V1\312\002&Google\\Cloud\\Spanner\\Admin\\Da" + + "tabase\\V1\352\002+Google::Cloud::Spanner::Admi" + + "n::Database::V1\352AJ\n\037spanner.googleapis.c" + + "om/Instance\022\'projects/{project}/instance" + + "s/{instance}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -337,7 +344,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.iam.v1.PolicyProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.spanner.admin.database.v1.BackupProto.getDescriptor(), com.google.spanner.admin.database.v1.CommonProto.getDescriptor(), @@ -522,7 +528,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.iam.v1.PolicyProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.spanner.admin.database.v1.BackupProto.getDescriptor(); com.google.spanner.admin.database.v1.CommonProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup.proto b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup.proto index 1e9ce30058a..5e019543eb9 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup.proto +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.admin.database.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; @@ -120,6 +119,27 @@ message Backup { // Output only. The database dialect information for the backup. DatabaseDialect database_dialect = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The names of the destination backups being created by copying + // this source backup. The backup names are of the form + // `projects//instances//backups/`. + // Referencing backups may exist in different instances. The existence of + // any referencing backup prevents the backup from being deleted. When the + // copy operation is done (either successfully completed or cancelled or the + // destination backup is deleted), the reference to the backup is removed. + repeated string referencing_backups = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + } + ]; + + // Output only. The max allowed expiration time of the backup, with + // microseconds granularity. A backup's expiration time can be configured in + // multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or + // copying an existing backup, the expiration time specified must be + // less than `Backup.max_expire_time`. + google.protobuf.Timestamp max_expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. @@ -185,6 +205,86 @@ message CreateBackupMetadata { google.protobuf.Timestamp cancel_time = 4; } +// The request for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]. +message CopyBackupRequest { + // Required. The name of the destination instance that will contain the backup copy. + // Values are of the form: `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // Required. The id of the backup copy. + // The `backup_id` appended to `parent` forms the full backup_uri of the form + // `projects//instances//backups/`. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The source backup to be copied. + // The source backup needs to be in READY state for it to be copied. + // Once CopyBackup is in progress, the source backup cannot be deleted or + // cleaned up on expiration until CopyBackup is finished. + // Values are of the form: + // `projects//instances//backups/`. + string source_backup = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + } + ]; + + // Required. The expiration time of the backup in microsecond granularity. + // The expiration time must be at least 6 hours and at most 366 days + // from the `create_time` of the source backup. Once the `expire_time` has + // passed, the backup is eligible to be automatically deleted by Cloud Spanner + // to free the resources used by the backup. + google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The encryption configuration used to encrypt the backup. If this field is + // not specified, the backup will use the same + // encryption configuration as the source backup by default, namely + // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] = + // `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + CopyBackupEncryptionConfig encryption_config = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata type for the google.longrunning.Operation returned by +// [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]. +message CopyBackupMetadata { + // The name of the backup being created through the copy operation. + // Values are of the form + // `projects//instances//backups/`. + string name = 1 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + }]; + + // The name of the source backup that is being copied. + // Values are of the form + // `projects//instances//backups/`. + string source_backup = 2 [(google.api.resource_reference) = { + type: "spanner.googleapis.com/Backup" + }]; + + // The progress of the + // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation. + OperationProgress progress = 3; + + // The time at which cancellation of CopyBackup operation was received. + // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + // starts asynchronous cancellation on a long-running operation. The server + // makes a best effort to cancel the operation, but success is not guaranteed. + // Clients can use + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + // other methods to check whether the cancellation succeeded or whether the + // operation completed despite cancellation. On successful cancellation, + // the operation is not deleted; instead, it becomes an operation with + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + google.protobuf.Timestamp cancel_time = 4; +} + // The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. message UpdateBackupRequest { // Required. The backup to update. `backup.name`, and the fields to be updated @@ -327,6 +427,8 @@ message ListBackupOperationsRequest { // for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is // `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. // * `metadata.` - any field in metadata.value. + // `metadata.@type` must be specified first if filtering on metadata + // fields. // * `error` - Error associated with the long-running operation. // * `response.@type` - the type of response. // * `response.` - any field in response.value. @@ -338,8 +440,11 @@ message ListBackupOperationsRequest { // Here are a few examples: // // * `done:true` - The operation is complete. - // * `metadata.database:prod` - The database the backup was taken from has - // a name containing the string "prod". + // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + // `metadata.database:prod` - Returns operations where: + // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + // * The database the backup was taken from has a name containing the + // string "prod". // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ // `(metadata.name:howl) AND` \ // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ @@ -348,6 +453,29 @@ message ListBackupOperationsRequest { // * The backup name contains the string "howl". // * The operation started before 2018-03-28T14:50:00Z. // * The operation resulted in an error. + // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + // `(metadata.source_backup:test) AND` \ + // `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + // `(error:*)` - Returns operations where: + // * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + // * The source backup of the copied backup name contains the string + // "test". + // * The operation started before 2022-01-18T14:50:00Z. + // * The operation resulted in an error. + // * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + // `(metadata.database:test_db)) OR` \ + // `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + // AND` \ + // `(metadata.source_backup:test_bkp)) AND` \ + // `(error:*)` - Returns operations where: + // * The operation's metadata matches either of criteria: + // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the + // database the backup was taken from has name containing string + // "test_db" + // * The operation's metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the + // backup the backup was copied from has name containing string + // "test_bkp" + // * The operation resulted in an error. string filter = 2; // Number of operations to be returned in the response. If 0 or @@ -366,11 +494,11 @@ message ListBackupOperationsRequest { message ListBackupOperationsResponse { // The list of matching backup [long-running // operations][google.longrunning.Operation]. Each operation's name will be - // prefixed by the backup's name and the operation's - // [metadata][google.longrunning.Operation.metadata] will be of type - // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are - // pending or have completed/failed/canceled within the last 7 days. - // Operations returned are ordered by + // prefixed by the backup's name. The operation's + // [metadata][google.longrunning.Operation.metadata] field type + // `metadata.type_url` describes the type of the metadata. Operations returned + // include those that are pending or have completed/failed/canceled within the + // last 7 days. Operations returned are ordered by // `operation.metadata.value.progress.start_time` in descending order starting // from the most recently started operation. repeated google.longrunning.Operation operations = 1; @@ -442,3 +570,40 @@ message CreateBackupEncryptionConfig { } ]; } + +// Encryption configuration for the copied backup. +message CopyBackupEncryptionConfig { + // Encryption types for the backup. + enum EncryptionType { + // Unspecified. Do not use. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // This is the default option for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] + // when [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig] is not specified. + // For example, if the source backup is using `Customer_Managed_Encryption`, + // the backup will be using the same Cloud KMS key as the source backup. + USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1; + + // Use Google default encryption. + GOOGLE_DEFAULT_ENCRYPTION = 2; + + // Use customer managed encryption. If specified, `kms_key_name` + // must contain a valid Cloud KMS key. + CUSTOMER_MANAGED_ENCRYPTION = 3; + } + + // Required. The encryption type of the backup. + EncryptionType encryption_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The Cloud KMS key that will be used to protect the backup. + // This field should be set only when + // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is + // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + string kms_key_name = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/common.proto b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/common.proto index 739a486458e..720ebb95dbc 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/common.proto +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.admin.database.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; 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 89d582412db..38023e0721c 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 2021 Google LLC +// Copyright 2022 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,7 +24,6 @@ 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"; @@ -216,6 +215,30 @@ service DatabaseAdmin { }; } + // Starts copying a Cloud Spanner Backup. + // The returned backup [long-running operation][google.longrunning.Operation] + // will have a name of the format + // `projects//instances//backups//operations/` + // and can be used to track copying of the backup. The operation is associated + // with the destination backup. + // The [metadata][google.longrunning.Operation.metadata] field type is + // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + // The [response][google.longrunning.Operation.response] field type is + // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the + // copying and delete the backup. + // Concurrent CopyBackup requests can run on the same source backup. + rpc CopyBackup(CopyBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/instances/*}/backups:copy" + body: "*" + }; + option (google.api.method_signature) = "parent,backup_id,source_backup,expire_time"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.database.v1.Backup" + metadata_type: "google.spanner.admin.database.v1.CopyBackupMetadata" + }; + } + // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. rpc GetBackup(GetBackupRequest) returns (Backup) { option (google.api.http) = { @@ -645,6 +668,8 @@ message ListDatabaseOperationsRequest { // for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is // `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. // * `metadata.` - any field in metadata.value. + // `metadata.@type` must be specified first, if filtering on metadata + // fields. // * `error` - Error associated with the long-running operation. // * `response.@type` - the type of response. // * `response.` - any field in response.value. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java index e093354a31b..8aa46a48cd7 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java @@ -45,26 +45,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\'google/spanner/v1/commit_response.prot" - + "o\022\021google.spanner.v1\032\034google/api/annotat" - + "ions.proto\032\036google/protobuf/duration.pro" - + "to\032\037google/protobuf/timestamp.proto\"\262\001\n\016" - + "CommitResponse\0224\n\020commit_timestamp\030\001 \001(\013" - + "2\032.google.protobuf.Timestamp\022C\n\014commit_s" - + "tats\030\002 \001(\0132-.google.spanner.v1.CommitRes" - + "ponse.CommitStats\032%\n\013CommitStats\022\026\n\016muta" - + "tion_count\030\001 \001(\003B\271\001\n\025com.google.spanner." - + "v1B\023CommitResponseProtoP\001Z8google.golang" - + ".org/genproto/googleapis/spanner/v1;span" - + "ner\252\002\027Google.Cloud.Spanner.V1\312\002\027Google\\C" - + "loud\\Spanner\\V1\352\002\032Google::Cloud::Spanner" - + "::V1b\006proto3" + + "o\022\021google.spanner.v1\032\037google/protobuf/ti" + + "mestamp.proto\"\262\001\n\016CommitResponse\0224\n\020comm" + + "it_timestamp\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022C\n\014commit_stats\030\002 \001(\0132-.google.sp" + + "anner.v1.CommitResponse.CommitStats\032%\n\013C" + + "ommitStats\022\026\n\016mutation_count\030\001 \001(\003B\271\001\n\025c" + + "om.google.spanner.v1B\023CommitResponseProt" + + "oP\001Z8google.golang.org/genproto/googleap" + + "is/spanner/v1;spanner\252\002\027Google.Cloud.Spa" + + "nner.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032Goog" + + "le::Cloud::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_spanner_v1_CommitResponse_descriptor = @@ -83,8 +79,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "MutationCount", }); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java index 6c95c92573d..b79f3d8169b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java @@ -45,28 +45,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\034google/spanner/v1/keys.proto\022\021google.s" - + "panner.v1\032\034google/api/annotations.proto\032" - + "\034google/protobuf/struct.proto\"\364\001\n\010KeyRan" - + "ge\0222\n\014start_closed\030\001 \001(\0132\032.google.protob" - + "uf.ListValueH\000\0220\n\nstart_open\030\002 \001(\0132\032.goo" - + "gle.protobuf.ListValueH\000\0220\n\nend_closed\030\003" - + " \001(\0132\032.google.protobuf.ListValueH\001\022.\n\010en" - + "d_open\030\004 \001(\0132\032.google.protobuf.ListValue" - + "H\001B\020\n\016start_key_typeB\016\n\014end_key_type\"l\n\006" - + "KeySet\022(\n\004keys\030\001 \003(\0132\032.google.protobuf.L" - + "istValue\022+\n\006ranges\030\002 \003(\0132\033.google.spanne" - + "r.v1.KeyRange\022\013\n\003all\030\003 \001(\010B\257\001\n\025com.googl" - + "e.spanner.v1B\tKeysProtoP\001Z8google.golang" - + ".org/genproto/googleapis/spanner/v1;span" - + "ner\252\002\027Google.Cloud.Spanner.V1\312\002\027Google\\C" - + "loud\\Spanner\\V1\352\002\032Google::Cloud::Spanner" - + "::V1b\006proto3" + + "panner.v1\032\034google/protobuf/struct.proto\"" + + "\364\001\n\010KeyRange\0222\n\014start_closed\030\001 \001(\0132\032.goo" + + "gle.protobuf.ListValueH\000\0220\n\nstart_open\030\002" + + " \001(\0132\032.google.protobuf.ListValueH\000\0220\n\nen" + + "d_closed\030\003 \001(\0132\032.google.protobuf.ListVal" + + "ueH\001\022.\n\010end_open\030\004 \001(\0132\032.google.protobuf" + + ".ListValueH\001B\020\n\016start_key_typeB\016\n\014end_ke" + + "y_type\"l\n\006KeySet\022(\n\004keys\030\001 \003(\0132\032.google." + + "protobuf.ListValue\022+\n\006ranges\030\002 \003(\0132\033.goo" + + "gle.spanner.v1.KeyRange\022\013\n\003all\030\003 \001(\010B\257\001\n" + + "\025com.google.spanner.v1B\tKeysProtoP\001Z8goo" + + "gle.golang.org/genproto/googleapis/spann" + + "er/v1;spanner\252\002\027Google.Cloud.Spanner.V1\312" + + "\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google::Clou" + + "d::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); internal_static_google_spanner_v1_KeyRange_descriptor = @@ -84,7 +82,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Keys", "Ranges", "All", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java index faf23ffff0a..1c10bfaa9ca 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java @@ -49,32 +49,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n google/spanner/v1/mutation.proto\022\021goog" - + "le.spanner.v1\032\034google/api/annotations.pr" - + "oto\032\037google/api/field_behavior.proto\032\034go" - + "ogle/protobuf/struct.proto\032\034google/spann" - + "er/v1/keys.proto\"\325\003\n\010Mutation\0223\n\006insert\030" - + "\001 \001(\0132!.google.spanner.v1.Mutation.Write" - + "H\000\0223\n\006update\030\002 \001(\0132!.google.spanner.v1.M" - + "utation.WriteH\000\022=\n\020insert_or_update\030\003 \001(" - + "\0132!.google.spanner.v1.Mutation.WriteH\000\0224" - + "\n\007replace\030\004 \001(\0132!.google.spanner.v1.Muta" - + "tion.WriteH\000\0224\n\006delete\030\005 \001(\0132\".google.sp" - + "anner.v1.Mutation.DeleteH\000\032X\n\005Write\022\022\n\005t" - + "able\030\001 \001(\tB\003\340A\002\022\017\n\007columns\030\002 \003(\t\022*\n\006valu" - + "es\030\003 \003(\0132\032.google.protobuf.ListValue\032M\n\006" - + "Delete\022\022\n\005table\030\001 \001(\tB\003\340A\002\022/\n\007key_set\030\002 " - + "\001(\0132\031.google.spanner.v1.KeySetB\003\340A\002B\013\n\to" - + "perationB\263\001\n\025com.google.spanner.v1B\rMuta" - + "tionProtoP\001Z8google.golang.org/genproto/" - + "googleapis/spanner/v1;spanner\252\002\027Google.C" - + "loud.Spanner.V1\312\002\027Google\\Cloud\\Spanner\\V" - + "1\352\002\032Google::Cloud::Spanner::V1b\006proto3" + + "le.spanner.v1\032\037google/api/field_behavior" + + ".proto\032\034google/protobuf/struct.proto\032\034go" + + "ogle/spanner/v1/keys.proto\"\325\003\n\010Mutation\022" + + "3\n\006insert\030\001 \001(\0132!.google.spanner.v1.Muta" + + "tion.WriteH\000\0223\n\006update\030\002 \001(\0132!.google.sp" + + "anner.v1.Mutation.WriteH\000\022=\n\020insert_or_u" + + "pdate\030\003 \001(\0132!.google.spanner.v1.Mutation" + + ".WriteH\000\0224\n\007replace\030\004 \001(\0132!.google.spann" + + "er.v1.Mutation.WriteH\000\0224\n\006delete\030\005 \001(\0132\"" + + ".google.spanner.v1.Mutation.DeleteH\000\032X\n\005" + + "Write\022\022\n\005table\030\001 \001(\tB\003\340A\002\022\017\n\007columns\030\002 \003" + + "(\t\022*\n\006values\030\003 \003(\0132\032.google.protobuf.Lis" + + "tValue\032M\n\006Delete\022\022\n\005table\030\001 \001(\tB\003\340A\002\022/\n\007" + + "key_set\030\002 \001(\0132\031.google.spanner.v1.KeySet" + + "B\003\340A\002B\013\n\toperationB\263\001\n\025com.google.spanne" + + "r.v1B\rMutationProtoP\001Z8google.golang.org" + + "/genproto/googleapis/spanner/v1;spanner\252" + + "\002\027Google.Cloud.Spanner.V1\312\002\027Google\\Cloud" + + "\\Spanner\\V1\352\002\032Google::Cloud::Spanner::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.spanner.v1.KeysProto.getDescriptor(), @@ -108,7 +107,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.spanner.v1.KeysProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java index 0a9d2b3583d..21cc5708fbc 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java @@ -57,37 +57,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\"google/spanner/v1/query_plan.proto\022\021go" - + "ogle.spanner.v1\032\034google/api/annotations." - + "proto\032\034google/protobuf/struct.proto\"\370\004\n\010" - + "PlanNode\022\r\n\005index\030\001 \001(\005\022.\n\004kind\030\002 \001(\0162 ." - + "google.spanner.v1.PlanNode.Kind\022\024\n\014displ" - + "ay_name\030\003 \001(\t\022:\n\013child_links\030\004 \003(\0132%.goo" - + "gle.spanner.v1.PlanNode.ChildLink\022M\n\024sho" - + "rt_representation\030\005 \001(\0132/.google.spanner" - + ".v1.PlanNode.ShortRepresentation\022)\n\010meta" - + "data\030\006 \001(\0132\027.google.protobuf.Struct\0220\n\017e" - + "xecution_stats\030\007 \001(\0132\027.google.protobuf.S" - + "truct\032@\n\tChildLink\022\023\n\013child_index\030\001 \001(\005\022" - + "\014\n\004type\030\002 \001(\t\022\020\n\010variable\030\003 \001(\t\032\262\001\n\023Shor" - + "tRepresentation\022\023\n\013description\030\001 \001(\t\022S\n\n" - + "subqueries\030\002 \003(\0132?.google.spanner.v1.Pla" - + "nNode.ShortRepresentation.SubqueriesEntr" - + "y\0321\n\017SubqueriesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\005:\0028\001\"8\n\004Kind\022\024\n\020KIND_UNSPECIFIED" - + "\020\000\022\016\n\nRELATIONAL\020\001\022\n\n\006SCALAR\020\002\"<\n\tQueryP" - + "lan\022/\n\nplan_nodes\030\001 \003(\0132\033.google.spanner" - + ".v1.PlanNodeB\264\001\n\025com.google.spanner.v1B\016" - + "QueryPlanProtoP\001Z8google.golang.org/genp" - + "roto/googleapis/spanner/v1;spanner\252\002\027Goo" - + "gle.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Span" - + "ner\\V1\352\002\032Google::Cloud::Spanner::V1b\006pro" - + "to3" + + "ogle.spanner.v1\032\034google/protobuf/struct." + + "proto\"\370\004\n\010PlanNode\022\r\n\005index\030\001 \001(\005\022.\n\004kin" + + "d\030\002 \001(\0162 .google.spanner.v1.PlanNode.Kin" + + "d\022\024\n\014display_name\030\003 \001(\t\022:\n\013child_links\030\004" + + " \003(\0132%.google.spanner.v1.PlanNode.ChildL" + + "ink\022M\n\024short_representation\030\005 \001(\0132/.goog" + + "le.spanner.v1.PlanNode.ShortRepresentati" + + "on\022)\n\010metadata\030\006 \001(\0132\027.google.protobuf.S" + + "truct\0220\n\017execution_stats\030\007 \001(\0132\027.google." + + "protobuf.Struct\032@\n\tChildLink\022\023\n\013child_in" + + "dex\030\001 \001(\005\022\014\n\004type\030\002 \001(\t\022\020\n\010variable\030\003 \001(" + + "\t\032\262\001\n\023ShortRepresentation\022\023\n\013description" + + "\030\001 \001(\t\022S\n\nsubqueries\030\002 \003(\0132?.google.span" + + "ner.v1.PlanNode.ShortRepresentation.Subq" + + "ueriesEntry\0321\n\017SubqueriesEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"8\n\004Kind\022\024\n\020KIND_U" + + "NSPECIFIED\020\000\022\016\n\nRELATIONAL\020\001\022\n\n\006SCALAR\020\002" + + "\"<\n\tQueryPlan\022/\n\nplan_nodes\030\001 \003(\0132\033.goog" + + "le.spanner.v1.PlanNodeB\264\001\n\025com.google.sp" + + "anner.v1B\016QueryPlanProtoP\001Z8google.golan" + + "g.org/genproto/googleapis/spanner/v1;spa" + + "nner\252\002\027Google.Cloud.Spanner.V1\312\002\027Google\\" + + "Cloud\\Spanner\\V1\352\002\032Google::Cloud::Spanne" + + "r::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); internal_static_google_spanner_v1_PlanNode_descriptor = @@ -138,7 +136,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PlanNodes", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java index e6b22d02d80..a5744a50a1f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java @@ -53,40 +53,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\"google/spanner/v1/result_set.proto\022\021go" - + "ogle.spanner.v1\032\034google/api/annotations." - + "proto\032\034google/protobuf/struct.proto\032\'goo" - + "gle/spanner/v1/commit_response.proto\032\"go" - + "ogle/spanner/v1/query_plan.proto\032#google" - + "/spanner/v1/transaction.proto\032\034google/sp" - + "anner/v1/type.proto\"\237\001\n\tResultSet\0226\n\010met" - + "adata\030\001 \001(\0132$.google.spanner.v1.ResultSe" - + "tMetadata\022(\n\004rows\030\002 \003(\0132\032.google.protobu" - + "f.ListValue\0220\n\005stats\030\003 \001(\0132!.google.span" - + "ner.v1.ResultSetStats\"\321\001\n\020PartialResultS" - + "et\0226\n\010metadata\030\001 \001(\0132$.google.spanner.v1" - + ".ResultSetMetadata\022&\n\006values\030\002 \003(\0132\026.goo" - + "gle.protobuf.Value\022\025\n\rchunked_value\030\003 \001(" - + "\010\022\024\n\014resume_token\030\004 \001(\014\0220\n\005stats\030\005 \001(\0132!" - + ".google.spanner.v1.ResultSetStats\"y\n\021Res" - + "ultSetMetadata\022/\n\010row_type\030\001 \001(\0132\035.googl" - + "e.spanner.v1.StructType\0223\n\013transaction\030\002" - + " \001(\0132\036.google.spanner.v1.Transaction\"\271\001\n" - + "\016ResultSetStats\0220\n\nquery_plan\030\001 \001(\0132\034.go" - + "ogle.spanner.v1.QueryPlan\022,\n\013query_stats" - + "\030\002 \001(\0132\027.google.protobuf.Struct\022\031\n\017row_c" - + "ount_exact\030\003 \001(\003H\000\022\037\n\025row_count_lower_bo" - + "und\030\004 \001(\003H\000B\013\n\trow_countB\267\001\n\025com.google." - + "spanner.v1B\016ResultSetProtoP\001Z8google.gol" - + "ang.org/genproto/googleapis/spanner/v1;s" - + "panner\370\001\001\252\002\027Google.Cloud.Spanner.V1\312\002\027Go" - + "ogle\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::S" - + "panner::V1b\006proto3" + + "ogle.spanner.v1\032\034google/protobuf/struct." + + "proto\032\'google/spanner/v1/commit_response" + + ".proto\032\"google/spanner/v1/query_plan.pro" + + "to\032#google/spanner/v1/transaction.proto\032" + + "\034google/spanner/v1/type.proto\"\237\001\n\tResult" + + "Set\0226\n\010metadata\030\001 \001(\0132$.google.spanner.v" + + "1.ResultSetMetadata\022(\n\004rows\030\002 \003(\0132\032.goog" + + "le.protobuf.ListValue\0220\n\005stats\030\003 \001(\0132!.g" + + "oogle.spanner.v1.ResultSetStats\"\321\001\n\020Part" + + "ialResultSet\0226\n\010metadata\030\001 \001(\0132$.google." + + "spanner.v1.ResultSetMetadata\022&\n\006values\030\002" + + " \003(\0132\026.google.protobuf.Value\022\025\n\rchunked_" + + "value\030\003 \001(\010\022\024\n\014resume_token\030\004 \001(\014\0220\n\005sta" + + "ts\030\005 \001(\0132!.google.spanner.v1.ResultSetSt" + + "ats\"y\n\021ResultSetMetadata\022/\n\010row_type\030\001 \001" + + "(\0132\035.google.spanner.v1.StructType\0223\n\013tra" + + "nsaction\030\002 \001(\0132\036.google.spanner.v1.Trans" + + "action\"\271\001\n\016ResultSetStats\0220\n\nquery_plan\030" + + "\001 \001(\0132\034.google.spanner.v1.QueryPlan\022,\n\013q" + + "uery_stats\030\002 \001(\0132\027.google.protobuf.Struc" + + "t\022\031\n\017row_count_exact\030\003 \001(\003H\000\022\037\n\025row_coun" + + "t_lower_bound\030\004 \001(\003H\000B\013\n\trow_countB\267\001\n\025c" + + "om.google.spanner.v1B\016ResultSetProtoP\001Z8" + + "google.golang.org/genproto/googleapis/sp" + + "anner/v1;spanner\370\001\001\252\002\027Google.Cloud.Spann" + + "er.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google" + + "::Cloud::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.spanner.v1.CommitResponseProto.getDescriptor(), com.google.spanner.v1.QueryPlanProto.getDescriptor(), @@ -125,7 +123,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "QueryPlan", "QueryStats", "RowCountExact", "RowCountLowerBound", "RowCount", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.spanner.v1.CommitResponseProto.getDescriptor(); com.google.spanner.v1.QueryPlanProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java index 2655d8e0fb4..4ce4f322c00 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java @@ -61,41 +61,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n#google/spanner/v1/transaction.proto\022\021g" - + "oogle.spanner.v1\032\034google/api/annotations" - + ".proto\032\036google/protobuf/duration.proto\032\037" - + "google/protobuf/timestamp.proto\"\303\004\n\022Tran" - + "sactionOptions\022E\n\nread_write\030\001 \001(\0132/.goo" - + "gle.spanner.v1.TransactionOptions.ReadWr" - + "iteH\000\022O\n\017partitioned_dml\030\003 \001(\01324.google." - + "spanner.v1.TransactionOptions.Partitione" - + "dDmlH\000\022C\n\tread_only\030\002 \001(\0132..google.spann" - + "er.v1.TransactionOptions.ReadOnlyH\000\032\013\n\tR" - + "eadWrite\032\020\n\016PartitionedDml\032\250\002\n\010ReadOnly\022" - + "\020\n\006strong\030\001 \001(\010H\000\0228\n\022min_read_timestamp\030" - + "\002 \001(\0132\032.google.protobuf.TimestampH\000\0222\n\rm" - + "ax_staleness\030\003 \001(\0132\031.google.protobuf.Dur" - + "ationH\000\0224\n\016read_timestamp\030\004 \001(\0132\032.google" - + ".protobuf.TimestampH\000\0224\n\017exact_staleness" - + "\030\005 \001(\0132\031.google.protobuf.DurationH\000\022\035\n\025r" - + "eturn_read_timestamp\030\006 \001(\010B\021\n\017timestamp_" - + "boundB\006\n\004mode\"M\n\013Transaction\022\n\n\002id\030\001 \001(\014" - + "\0222\n\016read_timestamp\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\"\244\001\n\023TransactionSelector\022;\n\n" - + "single_use\030\001 \001(\0132%.google.spanner.v1.Tra" - + "nsactionOptionsH\000\022\014\n\002id\030\002 \001(\014H\000\0226\n\005begin" - + "\030\003 \001(\0132%.google.spanner.v1.TransactionOp" - + "tionsH\000B\n\n\010selectorB\266\001\n\025com.google.spann" - + "er.v1B\020TransactionProtoP\001Z8google.golang" - + ".org/genproto/googleapis/spanner/v1;span" - + "ner\252\002\027Google.Cloud.Spanner.V1\312\002\027Google\\C" - + "loud\\Spanner\\V1\352\002\032Google::Cloud::Spanner" - + "::V1b\006proto3" + + "oogle.spanner.v1\032\036google/protobuf/durati" + + "on.proto\032\037google/protobuf/timestamp.prot" + + "o\"\303\004\n\022TransactionOptions\022E\n\nread_write\030\001" + + " \001(\0132/.google.spanner.v1.TransactionOpti" + + "ons.ReadWriteH\000\022O\n\017partitioned_dml\030\003 \001(\013" + + "24.google.spanner.v1.TransactionOptions." + + "PartitionedDmlH\000\022C\n\tread_only\030\002 \001(\0132..go" + + "ogle.spanner.v1.TransactionOptions.ReadO" + + "nlyH\000\032\013\n\tReadWrite\032\020\n\016PartitionedDml\032\250\002\n" + + "\010ReadOnly\022\020\n\006strong\030\001 \001(\010H\000\0228\n\022min_read_" + + "timestamp\030\002 \001(\0132\032.google.protobuf.Timest" + + "ampH\000\0222\n\rmax_staleness\030\003 \001(\0132\031.google.pr" + + "otobuf.DurationH\000\0224\n\016read_timestamp\030\004 \001(" + + "\0132\032.google.protobuf.TimestampH\000\0224\n\017exact" + + "_staleness\030\005 \001(\0132\031.google.protobuf.Durat" + + "ionH\000\022\035\n\025return_read_timestamp\030\006 \001(\010B\021\n\017" + + "timestamp_boundB\006\n\004mode\"M\n\013Transaction\022\n" + + "\n\002id\030\001 \001(\014\0222\n\016read_timestamp\030\002 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\"\244\001\n\023TransactionSe" + + "lector\022;\n\nsingle_use\030\001 \001(\0132%.google.span" + + "ner.v1.TransactionOptionsH\000\022\014\n\002id\030\002 \001(\014H" + + "\000\0226\n\005begin\030\003 \001(\0132%.google.spanner.v1.Tra" + + "nsactionOptionsH\000B\n\n\010selectorB\266\001\n\025com.go" + + "ogle.spanner.v1B\020TransactionProtoP\001Z8goo" + + "gle.golang.org/genproto/googleapis/spann" + + "er/v1;spanner\252\002\027Google.Cloud.Spanner.V1\312" + + "\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google::Clou" + + "d::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -149,7 +147,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SingleUse", "Id", "Begin", "Selector", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java index d0e7dd0f0cc..29e9151b325 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java @@ -49,34 +49,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\034google/spanner/v1/type.proto\022\021google.s" - + "panner.v1\032\034google/api/annotations.proto\032" - + "\037google/api/field_behavior.proto\"\337\001\n\004Typ" - + "e\022.\n\004code\030\001 \001(\0162\033.google.spanner.v1.Type" - + "CodeB\003\340A\002\0223\n\022array_element_type\030\002 \001(\0132\027." - + "google.spanner.v1.Type\0222\n\013struct_type\030\003 " - + "\001(\0132\035.google.spanner.v1.StructType\022>\n\017ty" - + "pe_annotation\030\004 \001(\0162%.google.spanner.v1." - + "TypeAnnotationCode\"\177\n\nStructType\0223\n\006fiel" - + "ds\030\001 \003(\0132#.google.spanner.v1.StructType." - + "Field\032<\n\005Field\022\014\n\004name\030\001 \001(\t\022%\n\004type\030\002 \001" - + "(\0132\027.google.spanner.v1.Type*\245\001\n\010TypeCode" - + "\022\031\n\025TYPE_CODE_UNSPECIFIED\020\000\022\010\n\004BOOL\020\001\022\t\n" - + "\005INT64\020\002\022\013\n\007FLOAT64\020\003\022\r\n\tTIMESTAMP\020\004\022\010\n\004" - + "DATE\020\005\022\n\n\006STRING\020\006\022\t\n\005BYTES\020\007\022\t\n\005ARRAY\020\010" - + "\022\n\n\006STRUCT\020\t\022\013\n\007NUMERIC\020\n\022\010\n\004JSON\020\013*J\n\022T" - + "ypeAnnotationCode\022$\n TYPE_ANNOTATION_COD" - + "E_UNSPECIFIED\020\000\022\016\n\nPG_NUMERIC\020\002B\257\001\n\025com." - + "google.spanner.v1B\tTypeProtoP\001Z8google.g" - + "olang.org/genproto/googleapis/spanner/v1" - + ";spanner\252\002\027Google.Cloud.Spanner.V1\312\002\027Goo" - + "gle\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::Sp" - + "anner::V1b\006proto3" + + "panner.v1\032\037google/api/field_behavior.pro" + + "to\"\337\001\n\004Type\022.\n\004code\030\001 \001(\0162\033.google.spann" + + "er.v1.TypeCodeB\003\340A\002\0223\n\022array_element_typ" + + "e\030\002 \001(\0132\027.google.spanner.v1.Type\0222\n\013stru" + + "ct_type\030\003 \001(\0132\035.google.spanner.v1.Struct" + + "Type\022>\n\017type_annotation\030\004 \001(\0162%.google.s" + + "panner.v1.TypeAnnotationCode\"\177\n\nStructTy" + + "pe\0223\n\006fields\030\001 \003(\0132#.google.spanner.v1.S" + + "tructType.Field\032<\n\005Field\022\014\n\004name\030\001 \001(\t\022%" + + "\n\004type\030\002 \001(\0132\027.google.spanner.v1.Type*\245\001" + + "\n\010TypeCode\022\031\n\025TYPE_CODE_UNSPECIFIED\020\000\022\010\n" + + "\004BOOL\020\001\022\t\n\005INT64\020\002\022\013\n\007FLOAT64\020\003\022\r\n\tTIMES" + + "TAMP\020\004\022\010\n\004DATE\020\005\022\n\n\006STRING\020\006\022\t\n\005BYTES\020\007\022" + + "\t\n\005ARRAY\020\010\022\n\n\006STRUCT\020\t\022\013\n\007NUMERIC\020\n\022\010\n\004J" + + "SON\020\013*J\n\022TypeAnnotationCode\022$\n TYPE_ANNO" + + "TATION_CODE_UNSPECIFIED\020\000\022\016\n\nPG_NUMERIC\020" + + "\002B\257\001\n\025com.google.spanner.v1B\tTypeProtoP\001" + + "Z8google.golang.org/genproto/googleapis/" + + "spanner/v1;spanner\252\002\027Google.Cloud.Spanne" + + "r.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google:" + + ":Cloud::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), }); internal_static_google_spanner_v1_Type_descriptor = getDescriptor().getMessageTypes().get(0); @@ -107,7 +105,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); } diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto index 4850600f0ef..d43a83a3206 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto @@ -16,8 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto index ddcd181266e..12495a616ab 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto index f4b722cc12e..ef7e75f8dc8 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/protobuf/struct.proto"; import "google/spanner/v1/keys.proto"; diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto index 690c36ea92b..f700014e283 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto index d6ba978de2b..89dfa234653 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; import "google/spanner/v1/commit_response.proto"; import "google/spanner/v1/query_plan.proto"; diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto index debc226e32b..1e4c655ee2c 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto index f88e7b251df..3d28c331300 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.spanner.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1";