{@code * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { - * ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + * ResourceName resource = + * CryptoKeyVersionName.of( + * "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); * Policy policy = Policy.newBuilder().build(); * Policy response = databaseAdminClient.setIamPolicy(resource, policy); * } @@ -1006,7 +1011,10 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * **/ @@ -1378,7 +1382,8 @@ public void getDatabase( * the format `<database_name>/operations/<operation_id>` and can be used to * track execution of the schema change(s). The * [metadata][google.longrunning.Operation.metadata] field type is - * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. + * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. + * The operation has no response. * */ public void updateDatabaseDdl( @@ -1505,12 +1510,12 @@ public void testIamPermissions( * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` * and can be used to track creation of the backup. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. 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 - * creation and delete the backup. - * There can be only one pending backup creation per database. Backup creation - * of different databases can run concurrently. + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * 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 creation and delete the + * backup. There can be only one pending backup creation per database. Backup + * creation of different databases can run concurrently. * */ public void createBackup( @@ -1526,7 +1531,8 @@ public void createBackup( * * *{@code * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { - * String resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString(); + * String resource = + * CryptoKeyVersionName.of( + * "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]") + * .toString(); * Policy policy = Policy.newBuilder().build(); * Policy response = databaseAdminClient.setIamPolicy(resource, policy); * } @@ -1040,7 +1048,14 @@ public final Policy setIamPolicy(String resource, Policy policy) { * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + * .setResource( + * CryptoKeyVersionName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[KEY_RING]", + * "[CRYPTO_KEY]", + * "[CRYPTO_KEY_VERSION]") + * .toString()) * .setPolicy(Policy.newBuilder().build()) * .build(); * Policy response = databaseAdminClient.setIamPolicy(request); @@ -1069,7 +1084,14 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() - * .setResource(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + * .setResource( + * CryptoKeyVersionName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[KEY_RING]", + * "[CRYPTO_KEY]", + * "[CRYPTO_KEY_VERSION]") + * .toString()) * .setPolicy(Policy.newBuilder().build()) * .build(); * ApiFuture*/ public void createBackup( @@ -1048,7 +1049,8 @@ public void createBackup( * * *future = databaseAdminClient.setIamPolicyCallable().futureCall(request); @@ -1096,7 +1118,9 @@ public final UnaryCallable setIamPolicyCallable() { * * {@code * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { - * ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + * ResourceName resource = + * CryptoKeyVersionName.of( + * "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); * Policy response = databaseAdminClient.getIamPolicy(resource); * } * }@@ -1127,7 +1151,10 @@ public final Policy getIamPolicy(ResourceName resource) { * *{@code * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { - * String resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString(); + * String resource = + * CryptoKeyVersionName.of( + * "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]") + * .toString(); * Policy response = databaseAdminClient.getIamPolicy(resource); * } * }@@ -1157,7 +1184,14 @@ public final Policy getIamPolicy(String resource) { * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + * .setResource( + * CryptoKeyVersionName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[KEY_RING]", + * "[CRYPTO_KEY]", + * "[CRYPTO_KEY_VERSION]") + * .toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = databaseAdminClient.getIamPolicy(request); @@ -1187,7 +1221,14 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + * .setResource( + * CryptoKeyVersionName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[KEY_RING]", + * "[CRYPTO_KEY]", + * "[CRYPTO_KEY_VERSION]") + * .toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuturefuture = databaseAdminClient.getIamPolicyCallable().futureCall(request); @@ -1214,7 +1255,9 @@ public final UnaryCallable getIamPolicyCallable() { * * {@code * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { - * ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + * ResourceName resource = + * CryptoKeyVersionName.of( + * "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); * List*/ public void updateDatabaseDdl( @@ -1030,12 +1031,12 @@ public void testIamPermissions( * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` * and can be used to track creation of the backup. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. 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 - * creation and delete the backup. - * There can be only one pending backup creation per database. Backup creation - * of different databases can run concurrently. + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * 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 creation and delete the + * backup. There can be only one pending backup creation per database. Backup + * creation of different databases can run concurrently. *permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * databaseAdminClient.testIamPermissions(resource, permissions); @@ -1252,7 +1295,10 @@ public final TestIamPermissionsResponse testIamPermissions( * * {@code * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { - * String resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString(); + * String resource = + * CryptoKeyVersionName.of( + * "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]") + * .toString(); * List*/ @@ -921,7 +921,8 @@ public void getDatabase( * the format `<database_name>/operations/<operation_id>` and can be used to * track execution of the schema change(s). The * [metadata][google.longrunning.Operation.metadata] field type is - * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. + * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. + * The operation has no response. *permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * databaseAdminClient.testIamPermissions(resource, permissions); @@ -1292,7 +1338,14 @@ public final TestIamPermissionsResponse testIamPermissions( * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + * .setResource( + * CryptoKeyVersionName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[KEY_RING]", + * "[CRYPTO_KEY]", + * "[CRYPTO_KEY_VERSION]") + * .toString()) * .addAllPermissions(new ArrayList ()) * .build(); * TestIamPermissionsResponse response = databaseAdminClient.testIamPermissions(request); @@ -1322,7 +1375,14 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) + * .setResource( + * CryptoKeyVersionName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[KEY_RING]", + * "[CRYPTO_KEY]", + * "[CRYPTO_KEY_VERSION]") + * .toString()) * .addAllPermissions(new ArrayList ()) * .build(); * ApiFuture future = @@ -1449,6 +1509,7 @@ public final OperationFuture createBackupAsync( * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setBackupId("backupId2121930365") * .setBackup(Backup.newBuilder().build()) + * .setEncryptionConfig(CreateBackupEncryptionConfig.newBuilder().build()) * .build(); * Backup response = databaseAdminClient.createBackupAsync(request).get(); * } @@ -1484,6 +1545,7 @@ public final OperationFuture createBackupAsync( * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setBackupId("backupId2121930365") * .setBackup(Backup.newBuilder().build()) + * .setEncryptionConfig(CreateBackupEncryptionConfig.newBuilder().build()) * .build(); * OperationFuture future = * databaseAdminClient.createBackupOperationCallable().futureCall(request); @@ -1519,6 +1581,7 @@ public final OperationFuture createBackupAsync( * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setBackupId("backupId2121930365") * .setBackup(Backup.newBuilder().build()) + * .setEncryptionConfig(CreateBackupEncryptionConfig.newBuilder().build()) * .build(); * ApiFuture future = databaseAdminClient.createBackupCallable().futureCall(request); * // Do something. @@ -2158,6 +2221,7 @@ public final OperationFuture restoreDatabaseA * RestoreDatabaseRequest.newBuilder() * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setDatabaseId("databaseId1688905718") + * .setEncryptionConfig(RestoreDatabaseEncryptionConfig.newBuilder().build()) * .build(); * Database response = databaseAdminClient.restoreDatabaseAsync(request).get(); * } @@ -2196,6 +2260,7 @@ public final OperationFuture restoreDatabaseA * RestoreDatabaseRequest.newBuilder() * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setDatabaseId("databaseId1688905718") + * .setEncryptionConfig(RestoreDatabaseEncryptionConfig.newBuilder().build()) * .build(); * OperationFuture future = * databaseAdminClient.restoreDatabaseOperationCallable().futureCall(request); @@ -2234,6 +2299,7 @@ public final OperationFuture restoreDatabaseA * RestoreDatabaseRequest.newBuilder() * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) * .setDatabaseId("databaseId1688905718") + * .setEncryptionConfig(RestoreDatabaseEncryptionConfig.newBuilder().build()) * .build(); * ApiFuture future = * databaseAdminClient.restoreDatabaseCallable().futureCall(request); 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 9d8efd01cb4..e73aaf466dd 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 @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 new file mode 100644 index 00000000000..bb689f4c8d4 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json @@ -0,0 +1,69 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.spanner.admin.database.v1", + "libraryPackage": "com.google.cloud.spanner.admin.database.v1", + "services": { + "DatabaseAdmin": { + "clients": { + "grpc": { + "libraryClient": "DatabaseAdminClient", + "rpcs": { + "CreateBackup": { + "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] + }, + "CreateDatabase": { + "methods": ["createDatabaseAsync", "createDatabaseAsync", "createDatabaseAsync", "createDatabaseOperationCallable", "createDatabaseCallable"] + }, + "DeleteBackup": { + "methods": ["deleteBackup", "deleteBackup", "deleteBackup", "deleteBackupCallable"] + }, + "DropDatabase": { + "methods": ["dropDatabase", "dropDatabase", "dropDatabase", "dropDatabaseCallable"] + }, + "GetBackup": { + "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] + }, + "GetDatabase": { + "methods": ["getDatabase", "getDatabase", "getDatabase", "getDatabaseCallable"] + }, + "GetDatabaseDdl": { + "methods": ["getDatabaseDdl", "getDatabaseDdl", "getDatabaseDdl", "getDatabaseDdlCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] + }, + "ListBackupOperations": { + "methods": ["listBackupOperations", "listBackupOperations", "listBackupOperations", "listBackupOperationsPagedCallable", "listBackupOperationsCallable"] + }, + "ListBackups": { + "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] + }, + "ListDatabaseOperations": { + "methods": ["listDatabaseOperations", "listDatabaseOperations", "listDatabaseOperations", "listDatabaseOperationsPagedCallable", "listDatabaseOperationsCallable"] + }, + "ListDatabases": { + "methods": ["listDatabases", "listDatabases", "listDatabases", "listDatabasesPagedCallable", "listDatabasesCallable"] + }, + "RestoreDatabase": { + "methods": ["restoreDatabaseAsync", "restoreDatabaseAsync", "restoreDatabaseAsync", "restoreDatabaseAsync", "restoreDatabaseAsync", "restoreDatabaseOperationCallable", "restoreDatabaseCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateBackup": { + "methods": ["updateBackup", "updateBackup", "updateBackupCallable"] + }, + "UpdateDatabaseDdl": { + "methods": ["updateDatabaseDdlAsync", "updateDatabaseDdlAsync", "updateDatabaseDdlAsync", "updateDatabaseDdlOperationCallable", "updateDatabaseDdlCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java index 6723f47e828..50846d9be21 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 44f3c24eaa5..cf873601ef7 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 @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 e2fe61bd3e3..9074c14b96a 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 @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java index 5d899f9acf2..172d6b25abb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 1a8e2015f15..27fa17e6184 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 @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -657,111 +657,136 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listDatabasesCallable() { return listDatabasesCallable; } + @Override public UnaryCallable listDatabasesPagedCallable() { return listDatabasesPagedCallable; } + @Override public UnaryCallable createDatabaseCallable() { return createDatabaseCallable; } + @Override public OperationCallable createDatabaseOperationCallable() { return createDatabaseOperationCallable; } + @Override public UnaryCallable getDatabaseCallable() { return getDatabaseCallable; } + @Override public UnaryCallable updateDatabaseDdlCallable() { return updateDatabaseDdlCallable; } + @Override public OperationCallable updateDatabaseDdlOperationCallable() { return updateDatabaseDdlOperationCallable; } + @Override public UnaryCallable dropDatabaseCallable() { return dropDatabaseCallable; } + @Override public UnaryCallable getDatabaseDdlCallable() { return getDatabaseDdlCallable; } + @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } + @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } + @Override public UnaryCallable testIamPermissionsCallable() { return testIamPermissionsCallable; } + @Override public UnaryCallable createBackupCallable() { return createBackupCallable; } + @Override public OperationCallable createBackupOperationCallable() { return createBackupOperationCallable; } + @Override public UnaryCallable getBackupCallable() { return getBackupCallable; } + @Override public UnaryCallable updateBackupCallable() { return updateBackupCallable; } + @Override public UnaryCallable deleteBackupCallable() { return deleteBackupCallable; } + @Override public UnaryCallable listBackupsCallable() { return listBackupsCallable; } + @Override public UnaryCallable listBackupsPagedCallable() { return listBackupsPagedCallable; } + @Override public UnaryCallable restoreDatabaseCallable() { return restoreDatabaseCallable; } + @Override public OperationCallable restoreDatabaseOperationCallable() { return restoreDatabaseOperationCallable; } + @Override public UnaryCallable listDatabaseOperationsCallable() { return listDatabaseOperationsCallable; } + @Override public UnaryCallable listDatabaseOperationsPagedCallable() { return listDatabaseOperationsPagedCallable; } + @Override public UnaryCallable listBackupOperationsCallable() { return listBackupOperationsCallable; } + @Override public UnaryCallable listBackupOperationsPagedCallable() { return listBackupOperationsPagedCallable; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java index 68c0be81db8..c2b1884163e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java index 81268aff533..4e6ab7ea356 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json new file mode 100644 index 00000000000..fd237fc2182 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.spanner.admin.instance.v1", + "libraryPackage": "com.google.cloud.spanner.admin.instance.v1", + "services": { + "InstanceAdmin": { + "clients": { + "grpc": { + "libraryClient": "InstanceAdminClient", + "rpcs": { + "CreateInstance": { + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstance", "deleteInstance", "deleteInstance", "deleteInstanceCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] + }, + "GetInstanceConfig": { + "methods": ["getInstanceConfig", "getInstanceConfig", "getInstanceConfig", "getInstanceConfigCallable"] + }, + "ListInstanceConfigs": { + "methods": ["listInstanceConfigs", "listInstanceConfigs", "listInstanceConfigs", "listInstanceConfigsPagedCallable", "listInstanceConfigsCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateInstance": { + "methods": ["updateInstanceAsync", "updateInstanceAsync", "updateInstanceOperationCallable", "updateInstanceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java index 19b1d13aca7..fcc5426dfe3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java index 01c6d82eb08..63cb8366206 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java index b168e86594f..d22c2f3caeb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -424,63 +424,77 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable listInstanceConfigsCallable() { return listInstanceConfigsCallable; } + @Override public UnaryCallable listInstanceConfigsPagedCallable() { return listInstanceConfigsPagedCallable; } + @Override public UnaryCallable getInstanceConfigCallable() { return getInstanceConfigCallable; } + @Override public UnaryCallable listInstancesCallable() { return listInstancesCallable; } + @Override public UnaryCallable listInstancesPagedCallable() { return listInstancesPagedCallable; } + @Override public UnaryCallable getInstanceCallable() { return getInstanceCallable; } + @Override public UnaryCallable createInstanceCallable() { return createInstanceCallable; } + @Override public OperationCallable createInstanceOperationCallable() { return createInstanceOperationCallable; } + @Override public UnaryCallable updateInstanceCallable() { return updateInstanceCallable; } + @Override public OperationCallable updateInstanceOperationCallable() { return updateInstanceOperationCallable; } + @Override public UnaryCallable deleteInstanceCallable() { return deleteInstanceCallable; } + @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } + @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } + @Override public UnaryCallable testIamPermissionsCallable() { return testIamPermissionsCallable; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java index ccf14583d65..ccd71babf22 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java index 7ec8bcb4192..1a79a102c4d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java index c05c3d5ee9e..a6a205d310d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java index 183370b6201..08f20695888 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json new file mode 100644 index 00000000000..26711916dbb --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.spanner.v1", + "libraryPackage": "com.google.cloud.spanner.v1", + "services": { + "Spanner": { + "clients": { + "grpc": { + "libraryClient": "SpannerClient", + "rpcs": { + "BatchCreateSessions": { + "methods": ["batchCreateSessions", "batchCreateSessions", "batchCreateSessions", "batchCreateSessionsCallable"] + }, + "BeginTransaction": { + "methods": ["beginTransaction", "beginTransaction", "beginTransaction", "beginTransactionCallable"] + }, + "Commit": { + "methods": ["commit", "commit", "commit", "commit", "commit", "commitCallable"] + }, + "CreateSession": { + "methods": ["createSession", "createSession", "createSession", "createSessionCallable"] + }, + "DeleteSession": { + "methods": ["deleteSession", "deleteSession", "deleteSession", "deleteSessionCallable"] + }, + "ExecuteBatchDml": { + "methods": ["executeBatchDml", "executeBatchDmlCallable"] + }, + "ExecuteSql": { + "methods": ["executeSql", "executeSqlCallable"] + }, + "ExecuteStreamingSql": { + "methods": ["executeStreamingSqlCallable"] + }, + "GetSession": { + "methods": ["getSession", "getSession", "getSession", "getSessionCallable"] + }, + "ListSessions": { + "methods": ["listSessions", "listSessions", "listSessions", "listSessionsPagedCallable", "listSessionsCallable"] + }, + "PartitionQuery": { + "methods": ["partitionQuery", "partitionQueryCallable"] + }, + "PartitionRead": { + "methods": ["partitionRead", "partitionReadCallable"] + }, + "Read": { + "methods": ["read", "readCallable"] + }, + "Rollback": { + "methods": ["rollback", "rollback", "rollback", "rollbackCallable"] + }, + "StreamingRead": { + "methods": ["streamingReadCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java index 0f340c9469a..656eaf03cd0 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java index 3340dd65f8b..3a16ff48017 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java index 17de6be8581..2ee4e8d4981 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -523,68 +523,84 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createSessionCallable() { return createSessionCallable; } + @Override public UnaryCallable batchCreateSessionsCallable() { return batchCreateSessionsCallable; } + @Override public UnaryCallable getSessionCallable() { return getSessionCallable; } + @Override public UnaryCallable listSessionsCallable() { return listSessionsCallable; } + @Override public UnaryCallable listSessionsPagedCallable() { return listSessionsPagedCallable; } + @Override public UnaryCallable deleteSessionCallable() { return deleteSessionCallable; } + @Override public UnaryCallable executeSqlCallable() { return executeSqlCallable; } + @Override public ServerStreamingCallable executeStreamingSqlCallable() { return executeStreamingSqlCallable; } + @Override public UnaryCallable executeBatchDmlCallable() { return executeBatchDmlCallable; } + @Override public UnaryCallable readCallable() { return readCallable; } + @Override public ServerStreamingCallable streamingReadCallable() { return streamingReadCallable; } + @Override public UnaryCallable beginTransactionCallable() { return beginTransactionCallable; } + @Override public UnaryCallable commitCallable() { return commitCallable; } + @Override public UnaryCallable rollbackCallable() { return rollbackCallable; } + @Override public UnaryCallable partitionQueryCallable() { return partitionQueryCallable; } + @Override public UnaryCallable partitionReadCallable() { return partitionReadCallable; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java index 38040871c8e..77719dfb949 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java index ec9363ae8be..f4b218c4e1a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 20a1869946e..6def238529d 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 @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,10 +48,13 @@ import com.google.spanner.admin.database.v1.BackupName; import com.google.spanner.admin.database.v1.CreateBackupRequest; import com.google.spanner.admin.database.v1.CreateDatabaseRequest; +import com.google.spanner.admin.database.v1.CryptoKeyVersionName; import com.google.spanner.admin.database.v1.Database; import com.google.spanner.admin.database.v1.DatabaseName; import com.google.spanner.admin.database.v1.DeleteBackupRequest; import com.google.spanner.admin.database.v1.DropDatabaseRequest; +import com.google.spanner.admin.database.v1.EncryptionConfig; +import com.google.spanner.admin.database.v1.EncryptionInfo; import com.google.spanner.admin.database.v1.GetBackupRequest; import com.google.spanner.admin.database.v1.GetDatabaseDdlRequest; import com.google.spanner.admin.database.v1.GetDatabaseDdlResponse; @@ -217,6 +220,8 @@ public void createDatabaseTest() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -270,6 +275,8 @@ public void createDatabaseTest2() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -323,6 +330,8 @@ public void getDatabaseTest() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -365,6 +374,8 @@ public void getDatabaseTest2() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -640,7 +651,9 @@ public void setIamPolicyTest() throws Exception { .build(); mockDatabaseAdmin.addResponse(expectedResponse); - ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + ResourceName resource = + CryptoKeyVersionName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -664,7 +677,9 @@ public void setIamPolicyExceptionTest() throws Exception { mockDatabaseAdmin.addException(exception); try { - ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + ResourceName resource = + CryptoKeyVersionName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -726,7 +741,9 @@ public void getIamPolicyTest() throws Exception { .build(); mockDatabaseAdmin.addResponse(expectedResponse); - ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + ResourceName resource = + CryptoKeyVersionName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -748,7 +765,9 @@ public void getIamPolicyExceptionTest() throws Exception { mockDatabaseAdmin.addException(exception); try { - ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + ResourceName resource = + CryptoKeyVersionName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -802,7 +821,9 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList ()).build(); mockDatabaseAdmin.addResponse(expectedResponse); - ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + ResourceName resource = + CryptoKeyVersionName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -826,7 +847,9 @@ public void testIamPermissionsExceptionTest() throws Exception { mockDatabaseAdmin.addException(exception); try { - ResourceName resource = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + ResourceName resource = + CryptoKeyVersionName.of( + "[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]", "[CRYPTO_KEY_VERSION]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); @@ -885,6 +908,7 @@ public void createBackupTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .addAllReferencingDatabases(new ArrayList ()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -943,6 +967,7 @@ public void createBackupTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .addAllReferencingDatabases(new ArrayList ()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1001,6 +1026,7 @@ public void getBackupTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .addAllReferencingDatabases(new ArrayList ()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1045,6 +1071,7 @@ public void getBackupTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .addAllReferencingDatabases(new ArrayList ()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1089,6 +1116,7 @@ public void updateBackupTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) .addAllReferencingDatabases(new ArrayList ()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1288,6 +1316,8 @@ public void restoreDatabaseTest() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -1344,6 +1374,8 @@ public void restoreDatabaseTest2() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -1400,6 +1432,8 @@ public void restoreDatabaseTest3() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); @@ -1456,6 +1490,8 @@ public void restoreDatabaseTest4() throws Exception { .setName(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .addAllEncryptionInfo(new ArrayList ()) .setVersionRetentionPeriod("versionRetentionPeriod-629783929") .setEarliestVersionTime(Timestamp.newBuilder().build()) .build(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java index 2fa221b947b..652b7fbd196 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 199a67b126b..e198a993c8c 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 @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,7 +97,13 @@ public void listDatabases( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDatabases, expected %s or %s", + response.getClass().getName(), + ListDatabasesResponse.class.getName(), + Exception.class.getName()))); } } @@ -112,7 +118,13 @@ public void createDatabase( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDatabase, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -126,7 +138,13 @@ public void getDatabase(GetDatabaseRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDatabase, expected %s or %s", + response.getClass().getName(), + Database.class.getName(), + Exception.class.getName()))); } } @@ -141,7 +159,13 @@ public void updateDatabaseDdl( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDatabaseDdl, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -155,7 +179,13 @@ public void dropDatabase(DropDatabaseRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DropDatabase, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -170,7 +200,13 @@ public void getDatabaseDdl( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDatabaseDdl, expected %s or %s", + response.getClass().getName(), + GetDatabaseDdlResponse.class.getName(), + Exception.class.getName()))); } } @@ -184,7 +220,13 @@ public void setIamPolicy(SetIamPolicyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); } } @@ -198,7 +240,13 @@ public void getIamPolicy(GetIamPolicyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); } } @@ -214,7 +262,13 @@ public void testIamPermissions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); } } @@ -229,7 +283,13 @@ public void createBackup( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateBackup, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -243,7 +303,13 @@ public void getBackup(GetBackupRequest request, StreamObserver responseO } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBackup, expected %s or %s", + response.getClass().getName(), + Backup.class.getName(), + Exception.class.getName()))); } } @@ -257,7 +323,13 @@ public void updateBackup(UpdateBackupRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateBackup, expected %s or %s", + response.getClass().getName(), + Backup.class.getName(), + Exception.class.getName()))); } } @@ -271,7 +343,13 @@ public void deleteBackup(DeleteBackupRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteBackup, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -286,7 +364,13 @@ public void listBackups( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBackups, expected %s or %s", + response.getClass().getName(), + ListBackupsResponse.class.getName(), + Exception.class.getName()))); } } @@ -301,7 +385,13 @@ public void restoreDatabase( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RestoreDatabase, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -317,7 +407,13 @@ public void listDatabaseOperations( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDatabaseOperations, expected %s or %s", + response.getClass().getName(), + ListDatabaseOperationsResponse.class.getName(), + Exception.class.getName()))); } } @@ -333,7 +429,13 @@ public void listBackupOperations( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBackupOperations, expected %s or %s", + response.getClass().getName(), + ListBackupOperationsResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java index e76ca2cf7c3..5e389c799c6 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java index 8fa12796e9c..3f441d917ee 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java index 970f60e15a6..7a9bb768a23 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,7 +88,13 @@ public void listInstanceConfigs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstanceConfigs, expected %s or %s", + response.getClass().getName(), + ListInstanceConfigsResponse.class.getName(), + Exception.class.getName()))); } } @@ -103,7 +109,13 @@ public void getInstanceConfig( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstanceConfig, expected %s or %s", + response.getClass().getName(), + InstanceConfig.class.getName(), + Exception.class.getName()))); } } @@ -118,7 +130,13 @@ public void listInstances( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstances, expected %s or %s", + response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); } } @@ -132,7 +150,13 @@ public void getInstance(GetInstanceRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstance, expected %s or %s", + response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); } } @@ -147,7 +171,13 @@ public void createInstance( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInstance, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -162,7 +192,13 @@ public void updateInstance( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInstance, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -177,7 +213,13 @@ public void deleteInstance( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInstance, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -191,7 +233,13 @@ public void setIamPolicy(SetIamPolicyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); } } @@ -205,7 +253,13 @@ public void getIamPolicy(GetIamPolicyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); } } @@ -221,7 +275,13 @@ public void testIamPermissions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrBackupAndRestore.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrBackupAndRestore.java index bfdaa60a258..8aa5baa2864 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrBackupAndRestore.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrBackupAndRestore.java @@ -48,7 +48,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; -import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -60,7 +59,7 @@ public class ITPitrBackupAndRestore { private static final Logger logger = Logger.getLogger(ITPitrBackupAndRestore.class.getName()); @ClassRule public static IntegrationTestEnv env = new IntegrationTestEnv(); - private static final long OP_TIMEOUT = 10; + private static final long OP_TIMEOUT = 20; private static final TimeUnit OP_TIMEOUT_UNIT = TimeUnit.MINUTES; private static RemoteSpannerHelper testHelper; private static DatabaseAdminClient dbAdminClient; @@ -106,7 +105,6 @@ public static void tearDown() { } @Test - @Ignore("backup and restore for pitr is not released yet") public void backupCreationWithVersionTimeWithinVersionRetentionPeriodSucceeds() throws Exception { final DatabaseId backupDatabaseId = testDatabase.getId(); final String restoreDatabaseId = testHelper.getUniqueDatabaseId(); @@ -147,7 +145,6 @@ public void backupCreationWithVersionTimeWithinVersionRetentionPeriodSucceeds() } @Test(expected = SpannerException.class) - @Ignore("backup and restore for pitr is not released yet") public void backupCreationWithVersionTimeTooFarInThePastFails() throws Exception { final DatabaseId databaseId = testDatabase.getId(); final InstanceId instanceId = databaseId.getInstanceId(); @@ -166,7 +163,6 @@ public void backupCreationWithVersionTimeTooFarInThePastFails() throws Exception } @Test(expected = SpannerException.class) - @Ignore("backup and restore for pitr is not released yet") public void backupCreationWithVersionTimeInTheFutureFails() throws Exception { final DatabaseId databaseId = testDatabase.getId(); final InstanceId instanceId = databaseId.getInstanceId(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java index 60a63a40c28..08688574d1d 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java index 21ca957936a..e7a7cf5f23a 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -92,7 +92,13 @@ public void createSession( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSession, expected %s or %s", + response.getClass().getName(), + Session.class.getName(), + Exception.class.getName()))); } } @@ -108,7 +114,13 @@ public void batchCreateSessions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchCreateSessions, expected %s or %s", + response.getClass().getName(), + BatchCreateSessionsResponse.class.getName(), + Exception.class.getName()))); } } @@ -122,7 +134,13 @@ public void getSession(GetSessionRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSession, expected %s or %s", + response.getClass().getName(), + Session.class.getName(), + Exception.class.getName()))); } } @@ -137,7 +155,13 @@ public void listSessions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSessions, expected %s or %s", + response.getClass().getName(), + ListSessionsResponse.class.getName(), + Exception.class.getName()))); } } @@ -151,7 +175,13 @@ public void deleteSession(DeleteSessionRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSession, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -165,7 +195,13 @@ public void executeSql(ExecuteSqlRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecuteSql, expected %s or %s", + response.getClass().getName(), + ResultSet.class.getName(), + Exception.class.getName()))); } } @@ -180,7 +216,13 @@ public void executeStreamingSql( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecuteStreamingSql, expected %s or %s", + response.getClass().getName(), + PartialResultSet.class.getName(), + Exception.class.getName()))); } } @@ -195,7 +237,13 @@ public void executeBatchDml( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecuteBatchDml, expected %s or %s", + response.getClass().getName(), + ExecuteBatchDmlResponse.class.getName(), + Exception.class.getName()))); } } @@ -209,7 +257,13 @@ public void read(ReadRequest request, StreamObserver responseObserver } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Read, expected %s or %s", + response.getClass().getName(), + ResultSet.class.getName(), + Exception.class.getName()))); } } @@ -224,7 +278,13 @@ public void streamingRead( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamingRead, expected %s or %s", + response.getClass().getName(), + PartialResultSet.class.getName(), + Exception.class.getName()))); } } @@ -239,7 +299,13 @@ public void beginTransaction( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BeginTransaction, expected %s or %s", + response.getClass().getName(), + Transaction.class.getName(), + Exception.class.getName()))); } } @@ -253,7 +319,13 @@ public void commit(CommitRequest request, StreamObserver respons } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Commit, expected %s or %s", + response.getClass().getName(), + CommitResponse.class.getName(), + Exception.class.getName()))); } } @@ -267,7 +339,13 @@ public void rollback(RollbackRequest request, StreamObserver responseObse } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Rollback, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -282,7 +360,13 @@ public void partitionQuery( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PartitionQuery, expected %s or %s", + response.getClass().getName(), + PartitionResponse.class.getName(), + Exception.class.getName()))); } } @@ -297,7 +381,13 @@ public void partitionRead( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PartitionRead, expected %s or %s", + response.getClass().getName(), + PartitionResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java index 0ee0e706d1f..1f9ef1d5a44 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/grpc-google-cloud-spanner-admin-database-v1/pom.xml index 6ca20cb6601..aebbc0e42c8 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/pom.xml +++ b/grpc-google-cloud-spanner-admin-database-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 -5.0.0 +5.1.0 grpc-google-cloud-spanner-admin-database-v1 GRPC library for grpc-google-cloud-spanner-admin-database-v1 com.google.cloud google-cloud-spanner-parent -5.0.0 +5.1.0 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 d704e767832..a732f9c397e 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 @@ -886,8 +886,8 @@ public void listDatabases( * have a name of the format `<database_name>/operations/<operation_id>` and * can be used to track preparation of the database. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The - * [response][google.longrunning.Operation.response] field type is + * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is * [Database][google.spanner.admin.database.v1.Database], if successful. * - * Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Gets metadata on a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public void getBackup( @@ -1061,7 +1063,8 @@ public void getBackup( * * *- * Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Updates a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public void updateBackup( @@ -1074,7 +1077,8 @@ public void updateBackup( * * *- * Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Deletes a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public void deleteBackup( @@ -1337,8 +1341,8 @@ public void listDatabases( * have a name of the format `<database_name>/operations/<operation_id>` and * can be used to track preparation of the database. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The - * [response][google.longrunning.Operation.response] field type is + * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is * [Database][google.spanner.admin.database.v1.Database], if successful. *
- * Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Gets metadata on a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public void getBackup( @@ -1540,7 +1546,8 @@ public void getBackup( * * *
- * Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Updates a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public void updateBackup( @@ -1556,7 +1563,8 @@ public void updateBackup( * * *
- * Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Deletes a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public void deleteBackup( @@ -1716,8 +1724,8 @@ public com.google.spanner.admin.database.v1.ListDatabasesResponse listDatabases( * have a name of the format `<database_name>/operations/<operation_id>` and * can be used to track preparation of the database. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The - * [response][google.longrunning.Operation.response] field type is + * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is * [Database][google.spanner.admin.database.v1.Database], if successful. * */ @@ -1748,7 +1756,8 @@ public com.google.spanner.admin.database.v1.Database getDatabase( * the format `<database_name>/operations/<operation_id>` and can be used to * track execution of the schema change(s). The * [metadata][google.longrunning.Operation.metadata] field type is - * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. + * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. + * The operation has no response. * */ public com.google.longrunning.Operation updateDatabaseDdl( @@ -1849,12 +1858,12 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( * `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` * and can be used to track creation of the backup. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. 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 - * creation and delete the backup. - * There can be only one pending backup creation per database. Backup creation - * of different databases can run concurrently. + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * 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 creation and delete the + * backup. There can be only one pending backup creation per database. Backup + * creation of different databases can run concurrently. * */ public com.google.longrunning.Operation createBackup( @@ -1866,7 +1875,8 @@ public com.google.longrunning.Operation createBackup( * * *
- * Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Gets metadata on a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public com.google.spanner.admin.database.v1.Backup getBackup( @@ -1878,7 +1888,8 @@ public com.google.spanner.admin.database.v1.Backup getBackup( * * *
- * Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Updates a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public com.google.spanner.admin.database.v1.Backup updateBackup( @@ -1890,7 +1901,8 @@ public com.google.spanner.admin.database.v1.Backup updateBackup( * * *
- * Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Deletes a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public com.google.protobuf.Empty deleteBackup( @@ -2030,8 +2042,8 @@ protected DatabaseAdminFutureStub build( * have a name of the format `<database_name>/operations/<operation_id>` and * can be used to track preparation of the database. The * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The - * [response][google.longrunning.Operation.response] field type is + * [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] field type is * [Database][google.spanner.admin.database.v1.Database], if successful. * */ @@ -2065,7 +2077,8 @@ protected DatabaseAdminFutureStub build( * the format `<database_name>/operations/<operation_id>` and can be used to * track execution of the schema change(s). The * [metadata][google.longrunning.Operation.metadata] field type is - * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response. + * [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. + * The operation has no response. * */ public com.google.common.util.concurrent.ListenableFuture
- * Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Gets metadata on a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public com.google.common.util.concurrent.ListenableFuture< @@ -2205,7 +2219,8 @@ protected DatabaseAdminFutureStub build( * * *
- * Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Updates a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public com.google.common.util.concurrent.ListenableFuture< @@ -2219,7 +2234,8 @@ protected DatabaseAdminFutureStub build( * * *
- * Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup]. + * Deletes a pending or completed + * [Backup][google.spanner.admin.database.v1.Backup]. **/ public com.google.common.util.concurrent.ListenableFuture
- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -384,10 +401,10 @@ public java.lang.String getDatabase() { * * *
- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -469,7 +486,8 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * *
- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -489,7 +507,8 @@ public boolean hasExpireTime() { * * ** @@ -1310,7 +1329,8 @@ public Builder setCancelTime(com.google.protobuf.Timestamp.Builder builderForVal * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. * * @@ -1344,7 +1364,8 @@ public Builder mergeCancelTime(com.google.protobuf.Timestamp value) { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. * * @@ -1374,7 +1395,8 @@ public Builder clearCancelTime() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. * * @@ -1398,7 +1420,8 @@ public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. * * @@ -1426,7 +1449,8 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. * * diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java index fcb89c03472..d8d2b6369b7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java @@ -78,7 +78,8 @@ public interface CreateBackupMetadataOrBuilder * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -509,7 +528,8 @@ public com.google.protobuf.Timestamp getExpireTime() { * * ** - *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -530,8 +550,11 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -563,8 +586,11 @@ public java.lang.String getName() { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -599,7 +625,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * ** - *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -617,7 +644,8 @@ public boolean hasCreateTime() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -635,7 +663,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -721,7 +750,8 @@ public com.google.spanner.admin.database.v1.Backup.State getState() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return A list containing the referencingDatabases. @@ -742,7 +772,8 @@ public com.google.protobuf.ProtocolStringList getReferencingDatabasesList() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return The count of referencingDatabases. @@ -763,7 +794,8 @@ public int getReferencingDatabasesCount() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index of the element to return. @@ -785,7 +817,8 @@ public java.lang.String getReferencingDatabases(int index) { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index of the value to return. @@ -795,6 +828,60 @@ public com.google.protobuf.ByteString getReferencingDatabasesBytes(int index) { return referencingDatabases_.getByteString(index); } + public static final int ENCRYPTION_INFO_FIELD_NUMBER = 8; + private com.google.spanner.admin.database.v1.EncryptionInfo encryptionInfo_; + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * + * @return Whether the encryptionInfo field is set. + */ + @java.lang.Override + public boolean hasEncryptionInfo() { + return encryptionInfo_ != null; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * + * @return The encryptionInfo. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionInfo getEncryptionInfo() { + return encryptionInfo_ == null + ? com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder() { + return getEncryptionInfo(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -831,6 +918,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 7, referencingDatabases_.getRaw(i)); } + if (encryptionInfo_ != null) { + output.writeMessage(8, getEncryptionInfo()); + } if (versionTime_ != null) { output.writeMessage(9, getVersionTime()); } @@ -869,6 +959,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getReferencingDatabasesList().size(); } + if (encryptionInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEncryptionInfo()); + } if (versionTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getVersionTime()); } @@ -905,6 +998,10 @@ public boolean equals(final java.lang.Object obj) { if (getSizeBytes() != other.getSizeBytes()) return false; if (state_ != other.state_) return false; if (!getReferencingDatabasesList().equals(other.getReferencingDatabasesList())) return false; + if (hasEncryptionInfo() != other.hasEncryptionInfo()) return false; + if (hasEncryptionInfo()) { + if (!getEncryptionInfo().equals(other.getEncryptionInfo())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -940,6 +1037,10 @@ public int hashCode() { hash = (37 * hash) + REFERENCING_DATABASES_FIELD_NUMBER; hash = (53 * hash) + getReferencingDatabasesList().hashCode(); } + if (hasEncryptionInfo()) { + hash = (37 * hash) + ENCRYPTION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionInfo().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1113,6 +1214,12 @@ public Builder clear() { referencingDatabases_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + if (encryptionInfoBuilder_ == null) { + encryptionInfo_ = null; + } else { + encryptionInfo_ = null; + encryptionInfoBuilder_ = null; + } return this; } @@ -1165,6 +1272,11 @@ public com.google.spanner.admin.database.v1.Backup buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.referencingDatabases_ = referencingDatabases_; + if (encryptionInfoBuilder_ == null) { + result.encryptionInfo_ = encryptionInfo_; + } else { + result.encryptionInfo_ = encryptionInfoBuilder_.build(); + } onBuilt(); return result; } @@ -1247,6 +1359,9 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { } onChanged(); } + if (other.hasEncryptionInfo()) { + mergeEncryptionInfo(other.getEncryptionInfo()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1283,10 +1398,10 @@ public Builder mergeFrom( * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -1309,10 +1424,10 @@ public java.lang.String getDatabase() { * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -1335,10 +1450,10 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -1360,10 +1475,10 @@ public Builder setDatabase(java.lang.String value) { * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -1381,10 +1496,10 @@ public Builder clearDatabase() { * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -1626,7 +1741,8 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1645,7 +1761,8 @@ public boolean hasExpireTime() { * * ** @@ -1281,7 +1299,8 @@ public Builder setCancelTime(com.google.protobuf.Timestamp value) { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1670,7 +1787,8 @@ public com.google.protobuf.Timestamp getExpireTime() { * * ** @@ -1249,7 +1266,8 @@ public com.google.protobuf.Timestamp getCancelTime() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1697,7 +1815,8 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { * * ** @@ -1219,7 +1235,8 @@ public boolean hasCancelTime() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1721,7 +1840,8 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal * * ** @@ -992,7 +998,8 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1750,7 +1870,8 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { * * ** @@ -366,7 +371,8 @@ public com.google.protobuf.Timestamp getCancelTime() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1775,7 +1896,8 @@ public Builder clearExpireTime() { * * ** - *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1794,7 +1916,8 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { * * ** - *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1817,7 +1940,8 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * * ** - *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -1849,8 +1973,11 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -1881,8 +2008,11 @@ public java.lang.String getName() { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -1913,8 +2043,11 @@ public com.google.protobuf.ByteString getNameBytes() { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -1944,8 +2077,11 @@ public Builder setName(java.lang.String value) { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -1971,8 +2107,11 @@ public Builder clearName() { * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -2010,7 +2149,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * ** - *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2028,7 +2168,8 @@ public boolean hasCreateTime() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2052,7 +2193,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2078,7 +2220,8 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2101,7 +2244,8 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2129,7 +2273,8 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2153,7 +2298,8 @@ public Builder clearCreateTime() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2171,7 +2317,8 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2193,7 +2340,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -2396,7 +2544,8 @@ private void ensureReferencingDatabasesIsMutable() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return A list containing the referencingDatabases. @@ -2417,7 +2566,8 @@ public com.google.protobuf.ProtocolStringList getReferencingDatabasesList() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return The count of referencingDatabases. @@ -2438,7 +2588,8 @@ public int getReferencingDatabasesCount() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index of the element to return. @@ -2460,7 +2611,8 @@ public java.lang.String getReferencingDatabases(int index) { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index of the value to return. @@ -2482,7 +2634,8 @@ public com.google.protobuf.ByteString getReferencingDatabasesBytes(int index) { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index to set the value at. @@ -2511,7 +2664,8 @@ public Builder setReferencingDatabases(int index, java.lang.String value) { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param value The referencingDatabases to add. @@ -2539,7 +2693,8 @@ public Builder addReferencingDatabases(java.lang.String value) { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param values The referencingDatabases to add. @@ -2564,7 +2719,8 @@ public Builder addAllReferencingDatabases(java.lang.Iterablev * to the backup is removed. * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return This builder for chaining. @@ -2588,7 +2744,8 @@ public Builder clearReferencingDatabases() { * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param value The bytes of the referencingDatabases to add. @@ -2605,6 +2762,211 @@ public Builder addReferencingDatabasesBytes(com.google.protobuf.ByteString value return this; } + private com.google.spanner.admin.database.v1.EncryptionInfo encryptionInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionInfo, + com.google.spanner.admin.database.v1.EncryptionInfo.Builder, + com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> + encryptionInfoBuilder_; + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * + * @return Whether the encryptionInfo field is set. + */ + public boolean hasEncryptionInfo() { + return encryptionInfoBuilder_ != null || encryptionInfo_ != null; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * + * @return The encryptionInfo. + */ + public com.google.spanner.admin.database.v1.EncryptionInfo getEncryptionInfo() { + if (encryptionInfoBuilder_ == null) { + return encryptionInfo_ == null + ? com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } else { + return encryptionInfoBuilder_.getMessage(); + } + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + public Builder setEncryptionInfo(com.google.spanner.admin.database.v1.EncryptionInfo value) { + if (encryptionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionInfo_ = value; + onChanged(); + } else { + encryptionInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + public Builder setEncryptionInfo( + com.google.spanner.admin.database.v1.EncryptionInfo.Builder builderForValue) { + if (encryptionInfoBuilder_ == null) { + encryptionInfo_ = builderForValue.build(); + onChanged(); + } else { + encryptionInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + public Builder mergeEncryptionInfo(com.google.spanner.admin.database.v1.EncryptionInfo value) { + if (encryptionInfoBuilder_ == null) { + if (encryptionInfo_ != null) { + encryptionInfo_ = + com.google.spanner.admin.database.v1.EncryptionInfo.newBuilder(encryptionInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionInfo_ = value; + } + onChanged(); + } else { + encryptionInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + public Builder clearEncryptionInfo() { + if (encryptionInfoBuilder_ == null) { + encryptionInfo_ = null; + onChanged(); + } else { + encryptionInfo_ = null; + encryptionInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryptionInfoBuilder() { + + onChanged(); + return getEncryptionInfoFieldBuilder().getBuilder(); + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + public com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder + getEncryptionInfoOrBuilder() { + if (encryptionInfoBuilder_ != null) { + return encryptionInfoBuilder_.getMessageOrBuilder(); + } else { + return encryptionInfo_ == null + ? com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } + } + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionInfo, + com.google.spanner.admin.database.v1.EncryptionInfo.Builder, + com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> + getEncryptionInfoFieldBuilder() { + if (encryptionInfoBuilder_ == null) { + encryptionInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionInfo, + com.google.spanner.admin.database.v1.EncryptionInfo.Builder, + com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>( + getEncryptionInfo(), getParentForChildren(), isClean()); + encryptionInfo_ = null; + } + return encryptionInfoBuilder_; + } + @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/BackupInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java index 56ce510e170..53a898d5d02 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java @@ -206,9 +206,9 @@ public com.google.protobuf.ByteString getBackupBytes() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -225,9 +225,9 @@ public boolean hasVersionTime() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -244,9 +244,9 @@ public com.google.protobuf.Timestamp getVersionTime() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -262,8 +262,9 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -278,8 +279,9 @@ public boolean hasCreateTime() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -294,8 +296,9 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -861,9 +864,9 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -879,9 +882,9 @@ public boolean hasVersionTime() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -903,9 +906,9 @@ public com.google.protobuf.Timestamp getVersionTime() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -929,9 +932,9 @@ public Builder setVersionTime(com.google.protobuf.Timestamp value) { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -952,9 +955,9 @@ public Builder setVersionTime(com.google.protobuf.Timestamp.Builder builderForVa ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -982,9 +985,9 @@ public Builder mergeVersionTime(com.google.protobuf.Timestamp value) { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -1006,9 +1009,9 @@ public Builder clearVersionTime() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -1024,9 +1027,9 @@ public com.google.protobuf.Timestamp.Builder getVersionTimeBuilder() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -1046,9 +1049,9 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -1080,8 +1083,9 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1095,8 +1099,9 @@ public boolean hasCreateTime() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1116,8 +1121,9 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1139,8 +1145,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1159,8 +1166,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1184,8 +1192,9 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1205,8 +1214,9 @@ public Builder clearCreateTime() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1220,8 +1230,9 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -1239,8 +1250,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java index 0d3766f1a33..dad1b7e146c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java @@ -54,9 +54,9 @@ public interface BackupInfoOrBuilder ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -70,9 +70,9 @@ public interface BackupInfoOrBuilder ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -86,9 +86,9 @@ public interface BackupInfoOrBuilder ** The backup contains an externally consistent copy of `source_database` at * the timestamp specified by `version_time`. If the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify - * `version_time`, the `version_time` of the backup is equivalent to the - * `create_time`. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request did not specify `version_time`, the `version_time` of the backup is + * equivalent to the `create_time`. ** *.google.protobuf.Timestamp version_time = 4;
@@ -99,8 +99,9 @@ public interface BackupInfoOrBuilder * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -112,8 +113,9 @@ public interface BackupInfoOrBuilder * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
@@ -125,8 +127,9 @@ public interface BackupInfoOrBuilder * * *- * The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was - * received. + * The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * request was received. ** *.google.protobuf.Timestamp create_time = 2;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java index befdf94aafd..e382d249592 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 67cfab26fc9..e7a8d1a9fad 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 @@ -27,10 +27,10 @@ public interface BackupOrBuilder * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -43,10 +43,10 @@ public interface BackupOrBuilder * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Name of the database from which this backup was - * created. This needs to be in the same instance as the backup. - * Values are of the form + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Name of the database from which this backup was created. This + * needs to be in the same instance as the backup. Values are of the form * `projects/<project>/instances/<instance>/databases/<database>`. ** @@ -104,7 +104,8 @@ public interface BackupOrBuilder * * *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -121,7 +122,8 @@ public interface BackupOrBuilder * * ** @@ -341,7 +345,8 @@ public boolean hasCancelTime() { * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -138,7 +140,8 @@ public interface BackupOrBuilder * * ** - *- * Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Required for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * operation. The expiration time of the backup, with microseconds * granularity that must be at least 6 hours and at most 366 days * from the time the CreateBackup request is processed. Once the `expire_time` @@ -154,8 +157,11 @@ public interface BackupOrBuilder * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -176,8 +182,11 @@ public interface BackupOrBuilder * * ** - *- * Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. - * Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation. + * Output only for the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. Required for the + * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] + * operation. * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]` @@ -199,7 +208,8 @@ public interface BackupOrBuilder * * ** - *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -214,7 +224,8 @@ public interface BackupOrBuilder * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -229,7 +240,8 @@ public interface BackupOrBuilder * * *- * Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * Output only. The time the + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] * request is received. If the request does not specify `version_time`, the * `version_time` of the backup will be equivalent to the `create_time`. *@@ -294,7 +306,8 @@ public interface BackupOrBuilder * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return A list containing the referencingDatabases. @@ -313,7 +326,8 @@ public interface BackupOrBuilder * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @return The count of referencingDatabases. @@ -332,7 +346,8 @@ public interface BackupOrBuilder * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index of the element to return. @@ -352,11 +367,53 @@ public interface BackupOrBuilder * to the backup is removed. *repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } *
* * @param index The index of the value to return. * @return The bytes of the referencingDatabases at the given index. */ com.google.protobuf.ByteString getReferencingDatabasesBytes(int index); + + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * + * @return Whether the encryptionInfo field is set. + */ + boolean hasEncryptionInfo(); + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ * + * @return The encryptionInfo. + */ + com.google.spanner.admin.database.v1.EncryptionInfo getEncryptionInfo(); + /** + * + * + *+ * Output only. The encryption information for the backup. + *+ * + *+ * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + *
+ */ + com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(); } 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 dd28586f35e..224196ec56c 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 @@ -71,6 +71,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_database_v1_BackupInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + 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; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -87,63 +91,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "g/operations.proto\032 google/protobuf/fiel" + "d_mask.proto\032\037google/protobuf/timestamp." + "proto\032-google/spanner/admin/database/v1/" - + "common.proto\032\034google/api/annotations.pro" - + "to\"\377\003\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\022\"\n\025referencing_databases\030\007 \003(\t" - + "B\003\340A\003\"7\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n" - + "\010CREATING\020\001\022\t\n\005READY\020\002:\\\352AY\n\035spanner.goo" - + "gleapis.com/Backup\0228projects/{project}/i" - + "nstances/{instance}/backups/{backup}\"\245\001\n" - + "\023CreateBackupRequest\0227\n\006parent\030\001 \001(\tB\'\340A" - + "\002\372A!\n\037spanner.googleapis.com/Instance\022\026\n" - + "\tbackup_id\030\002 \001(\tB\003\340A\002\022=\n\006backup\030\003 \001(\0132(." + + "common.proto\"\363\004\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\"7\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002:\\\352AY\n\035spann" + + "er.googleapis.com/Backup\0228projects/{proj" + + "ect}/instances/{instance}/backups/{backu" + + "p}\"\205\002\n\023CreateBackupRequest\0227\n\006parent\030\001 \001" + + "(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/Insta" + + "nce\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022=\n\006backup\030\003 " + + "\001(\0132(.google.spanner.admin.database.v1.B" + + "ackupB\003\340A\002\022^\n\021encryption_config\030\004 \001(\0132>." + + "google.spanner.admin.database.v1.CreateB" + + "ackupEncryptionConfigB\003\340A\001\"\370\001\n\024CreateBac" + + "kupMetadata\0220\n\004name\030\001 \001(\tB\"\372A\037\n\035spanner." + + "googleapis.com/Backup\0226\n\010database\030\002 \001(\tB" + + "$\372A!\n\037spanner.googleapis.com/Database\022E\n" + + "\010progress\030\003 \001(\01323.google.spanner.admin.d" + + "atabase.v1.OperationProgress\022/\n\013cancel_t" + + "ime\030\004 \001(\0132\032.google.protobuf.Timestamp\"\212\001" + + "\n\023UpdateBackupRequest\022=\n\006backup\030\001 \001(\0132(." + "google.spanner.admin.database.v1.BackupB" - + "\003\340A\002\"\370\001\n\024CreateBackupMetadata\0220\n\004name\030\001 " - + "\001(\tB\"\372A\037\n\035spanner.googleapis.com/Backup\022" - + "6\n\010database\030\002 \001(\tB$\372A!\n\037spanner.googleap" - + "is.com/Database\022E\n\010progress\030\003 \001(\01323.goog" - + "le.spanner.admin.database.v1.OperationPr" - + "ogress\022/\n\013cancel_time\030\004 \001(\0132\032.google.pro" - + "tobuf.Timestamp\"\212\001\n\023UpdateBackupRequest\022" - + "=\n\006backup\030\001 \001(\0132(.google.spanner.admin.d" - + "atabase.v1.BackupB\003\340A\002\0224\n\013update_mask\030\002 " - + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"G\n\020" - + "GetBackupRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035" - + "spanner.googleapis.com/Backup\"J\n\023DeleteB" - + "ackupRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035span" - + "ner.googleapis.com/Backup\"\204\001\n\022ListBackup" - + "sRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanne" - + "r.googleapis.com/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" - + "\"i\n\023ListBackupsResponse\0229\n\007backups\030\001 \003(\013" - + "2(.google.spanner.admin.database.v1.Back" - + "up\022\027\n\017next_page_token\030\002 \001(\t\"\215\001\n\033ListBack" - + "upOperationsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002" - + "\372A!\n\037spanner.googleapis.com/Instance\022\016\n\006" - + "filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_" - + "token\030\004 \001(\t\"j\n\034ListBackupOperationsRespo" - + "nse\0221\n\noperations\030\001 \003(\0132\035.google.longrun" - + "ning.Operation\022\027\n\017next_page_token\030\002 \001(\t\"" - + "\342\001\n\nBackupInfo\0222\n\006backup\030\001 \001(\tB\"\372A\037\n\035spa" - + "nner.googleapis.com/Backup\0220\n\014version_ti" - + "me\030\004 \001(\0132\032.google.protobuf.Timestamp\022/\n\013" - + "create_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stamp\022=\n\017source_database\030\003 \001(\tB$\372A!\n\037spa" - + "nner.googleapis.com/DatabaseB\377\001\n$com.goo" - + "gle.spanner.admin.database.v1B\013BackupPro" - + "toP\001ZHgoogle.golang.org/genproto/googlea" - + "pis/spanner/admin/database/v1;database\252\002" - + "&Google.Cloud.Spanner.Admin.Database.V1\312" - + "\002&Google\\Cloud\\Spanner\\Admin\\Database\\V1" - + "\352\002+Google::Cloud::Spanner::Admin::Databa" - + "se::V1b\006proto3" + + "\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.proto" + + "buf.FieldMaskB\003\340A\002\"G\n\020GetBackupRequest\0223" + + "\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035spanner.googleapis" + + ".com/Backup\"J\n\023DeleteBackupRequest\0223\n\004na" + + "me\030\001 \001(\tB%\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/I" + + "nstance\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\"i\n\023ListBackupsRes" + + "ponse\0229\n\007backups\030\001 \003(\0132(.google.spanner." + + "admin.database.v1.Backup\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"\215\001\n\033ListBackupOperationsReques" + + "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googl" + + "eapis.com/Instance\022\016\n\006filter\030\002 \001(\t\022\021\n\tpa" + + "ge_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"j\n\034Lis" + + "tBackupOperationsResponse\0221\n\noperations\030" + + "\001 \003(\0132\035.google.longrunning.Operation\022\027\n\017" + + "next_page_token\030\002 \001(\t\"\342\001\n\nBackupInfo\0222\n\006" + + "backup\030\001 \001(\tB\"\372A\037\n\035spanner.googleapis.co" + + "m/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_da" + + "tabase\030\003 \001(\tB$\372A!\n\037spanner.googleapis.co" + + "m/Database\"\335\002\n\034CreateBackupEncryptionCon" + + "fig\022k\n\017encryption_type\030\001 \001(\0162M.google.sp" + + "anner.admin.database.v1.CreateBackupEncr" + + "yptionConfig.EncryptionTypeB\003\340A\002\022?\n\014kms_" + + "key_name\030\002 \001(\tB)\340A\001\372A#\n!cloudkms.googlea" + + "pis.com/CryptoKey\"\216\001\n\016EncryptionType\022\037\n\033" + + "ENCRYPTION_TYPE_UNSPECIFIED\020\000\022\033\n\027USE_DAT" + + "ABASE_ENCRYPTION\020\001\022\035\n\031GOOGLE_DEFAULT_ENC" + + "RYPTION\020\002\022\037\n\033CUSTOMER_MANAGED_ENCRYPTION" + + "\020\003B\377\001\n$com.google.spanner.admin.database" + + ".v1B\013BackupProtoP\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::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -155,7 +172,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.spanner.admin.database.v1.CommonProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_spanner_admin_database_v1_Backup_descriptor = getDescriptor().getMessageTypes().get(0); @@ -171,6 +187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SizeBytes", "State", "ReferencingDatabases", + "EncryptionInfo", }); internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -178,7 +195,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor, new java.lang.String[] { - "Parent", "BackupId", "Backup", + "Parent", "BackupId", "Backup", "EncryptionConfig", }); internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_descriptor = getDescriptor().getMessageTypes().get(2); @@ -252,6 +269,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Backup", "VersionTime", "CreateTime", "SourceDatabase", }); + internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + 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", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -265,7 +290,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.spanner.admin.database.v1.CommonProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) 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 657d73efc9d..9420954126b 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 @@ -31,6 +31,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_database_v1_OperationProgress_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_database_v1_OperationProgress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -42,27 +50,46 @@ 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\037google/api/field_behavior.proto\032\037goog" - + "le/protobuf/timestamp.proto\032\034google/api/" - + "annotations.proto\"\213\001\n\021OperationProgress\022" - + "\030\n\020progress_percent\030\001 \001(\005\022.\n\nstart_time\030" - + "\002 \001(\0132\032.google.protobuf.Timestamp\022,\n\010end" - + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" - + "\377\001\n$com.google.spanner.admin.database.v1" - + "B\013CommonProtoP\001ZHgoogle.golang.org/genpr" - + "oto/googleapis/spanner/admin/database/v1" - + ";database\252\002&Google.Cloud.Spanner.Admin.D" - + "atabase.V1\312\002&Google\\Cloud\\Spanner\\Admin\\" - + "Database\\V1\352\002+Google::Cloud::Spanner::Ad" - + "min::Database::V1b\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\002B\244\004\n$com.goo" + + "gle.spanner.admin.database.v1B\013CommonPro" + + "toP\001ZHgoogle.golang.org/genproto/googlea" + + "pis/spanner/admin/database/v1;database\252\002" + + "&Google.Cloud.Spanner.Admin.Database.V1\312" + + "\002&Google\\Cloud\\Spanner\\Admin\\Database\\V1" + + "\352\002+Google::Cloud::Spanner::Admin::Databa" + + "se::V1\352Ax\n!cloudkms.googleapis.com/Crypt" + + "oKey\022Sprojects/{project}/locations/{loca" + + "tion}/keyRings/{key_ring}/cryptoKeys/{cr" + + "ypto_key}\352A\246\001\n(cloudkms.googleapis.com/C" + + "ryptoKeyVersion\022zprojects/{project}/loca" + + "tions/{location}/keyRings/{key_ring}/cry" + + "ptoKeys/{crypto_key}/cryptoKeyVersions/{" + + "crypto_key_version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_spanner_admin_database_v1_OperationProgress_descriptor = getDescriptor().getMessageTypes().get(0); @@ -72,9 +99,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ProgressPercent", "StartTime", "EndTime", }); + internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor, + new java.lang.String[] { + "KmsKeyName", + }); + internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor, + new java.lang.String[] { + "EncryptionType", "EncryptionStatus", "KmsKeyVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java new file mode 100644 index 00000000000..82e61f8125f --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java @@ -0,0 +1,1063 @@ +/* + * 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 backup to create. + *+ * + * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupEncryptionConfig} + */ +public final class CreateBackupEncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) + CreateBackupEncryptionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBackupEncryptionConfig.newBuilder() to construct. + private CreateBackupEncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateBackupEncryptionConfig() { + encryptionType_ = 0; + kmsKeyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBackupEncryptionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateBackupEncryptionConfig( + 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_CreateBackupEncryptionConfig_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_CreateBackupEncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.class, + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder.class); + } + + /** + * + * + *+ * Encryption types for the backup. + *+ * + * Protobuf enum {@code + * google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType} + */ + public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *+ * Unspecified. Do not use. + *+ * + *ENCRYPTION_TYPE_UNSPECIFIED = 0;
+ */ + ENCRYPTION_TYPE_UNSPECIFIED(0), + /** + * + * + *+ * Use the same encryption configuration as the database. This is the + * default option when + * [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig] + * is empty. For example, if the database is using + * `Customer_Managed_Encryption`, the backup will be using the same Cloud + * KMS key as the database. + *+ * + *USE_DATABASE_ENCRYPTION = 1;
+ */ + USE_DATABASE_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; + /** + * + * + *+ * Use the same encryption configuration as the database. This is the + * default option when + * [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig] + * is empty. For example, if the database is using + * `Customer_Managed_Encryption`, the backup will be using the same Cloud + * KMS key as the database. + *+ * + *USE_DATABASE_ENCRYPTION = 1;
+ */ + public static final int USE_DATABASE_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_DATABASE_ENCRYPTION; + case 2: + return GOOGLE_DEFAULT_ENCRYPTION; + case 3: + return CUSTOMER_MANAGED_ENCRYPTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMapinternalGetValueMap() { + 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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + *
+ * + * @return The encryptionType. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType + getEncryptionType() { + @SuppressWarnings("deprecation") + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType result = + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType.valueOf( + encryptionType_); + return result == null + ? com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.EncryptionType + .ENCRYPTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, encryptionType_); + } + if (!getKmsKeyNameBytes().isEmpty()) { + 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.CreateBackupEncryptionConfig.EncryptionType + .ENCRYPTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encryptionType_); + } + if (!getKmsKeyNameBytes().isEmpty()) { + 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.CreateBackupEncryptionConfig)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig other = + (com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig) 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.CreateBackupEncryptionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig + 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.CreateBackupEncryptionConfig + 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.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig 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.CreateBackupEncryptionConfig 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 backup to create. + *+ * + * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupEncryptionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder+ implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_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_CreateBackupEncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.class, + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder.class); + } + + // Construct using + // com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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_CreateBackupEncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig + getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig build() { + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig buildPartial() { + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig result = + new com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig(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.CreateBackupEncryptionConfig) { + return mergeFrom((com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig other) { + if (other + == com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig) + 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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + *
+ * + * @return The encryptionType. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType + getEncryptionType() { + @SuppressWarnings("deprecation") + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType result = + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType.valueOf( + encryptionType_); + return result == null + ? com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType + .UNRECOGNIZED + : result; + } + /** + * + * + *+ * Required. The encryption type of the backup. + *+ * + *+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) + private static final com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig(); + } + + public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.ParserPARSER = + new com.google.protobuf.AbstractParser () { + @java.lang.Override + public CreateBackupEncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateBackupEncryptionConfig(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.CreateBackupEncryptionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java new file mode 100644 index 00000000000..9fc893c189d --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.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 CreateBackupEncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + * + * Required. The encryption type of the backup. + *+ * + *+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED]; + *
+ * + * @return The encryptionType. + */ + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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.CreateBackupEncryptionConfig.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/CreateBackupMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java index c4e23c96e69..e877c70ec46 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java @@ -257,7 +257,8 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -273,7 +274,8 @@ public boolean hasProgress() { * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -291,7 +293,8 @@ public com.google.spanner.admin.database.v1.OperationProgress getProgress() { * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -316,7 +319,8 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1007,7 +1014,8 @@ public boolean hasProgress() { * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1028,7 +1036,8 @@ public com.google.spanner.admin.database.v1.OperationProgress getProgress() { * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1051,7 +1060,8 @@ public Builder setProgress(com.google.spanner.admin.database.v1.OperationProgres * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1072,7 +1082,8 @@ public Builder setProgress( * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1099,7 +1110,8 @@ public Builder mergeProgress(com.google.spanner.admin.database.v1.OperationProgr * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1120,7 +1132,8 @@ public Builder clearProgress() { * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1135,7 +1148,8 @@ public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgres * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1154,7 +1168,8 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * ** The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -1195,7 +1210,8 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, * corresponding to `Code.CANCELLED`. *
* The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *
.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -91,7 +92,8 @@ public interface CreateBackupMetadataOrBuilder
*
* * The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *
.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -104,7 +106,8 @@ public interface CreateBackupMetadataOrBuilder
*
* * The progress of the - * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] + * operation. ** *
.google.spanner.admin.database.v1.OperationProgress progress = 3;
@@ -124,7 +127,8 @@ public interface CreateBackupMetadataOrBuilder
* 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * an [Operation.error][google.longrunning.Operation.error] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -146,7 +150,8 @@ public interface CreateBackupMetadataOrBuilder
* 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * an [Operation.error][google.longrunning.Operation.error] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
@@ -168,7 +173,8 @@ public interface CreateBackupMetadataOrBuilder
* 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ * an [Operation.error][google.longrunning.Operation.error] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*
*
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java
index 42e0cac7a89..08ed508c7a3 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java
@@ -22,7 +22,8 @@
*
*
* - * The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. + * The request for + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. ** * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupRequest} @@ -99,6 +100,24 @@ private CreateBackupRequest( backup_ = subBuilder.buildPartial(); } + break; + } + case 34: + { + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder subBuilder = + null; + if (encryptionConfig_ != null) { + subBuilder = encryptionConfig_.toBuilder(); + } + encryptionConfig_ = + input.readMessage( + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionConfig_); + encryptionConfig_ = subBuilder.buildPartial(); + } + break; } default: @@ -305,6 +324,73 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() return getBackup(); } + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 4; + private com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig 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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig getEncryptionConfig() {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ return getEncryptionConfig();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -328,6 +414,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (backup_ != null) {
output.writeMessage(3, getBackup());
}
+ if (encryptionConfig_ != null) {
+ output.writeMessage(4, getEncryptionConfig());
+ }
unknownFields.writeTo(output);
}
@@ -346,6 +435,9 @@ public int getSerializedSize() {
if (backup_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup());
}
+ if (encryptionConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionConfig());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -368,6 +460,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasBackup()) {
if (!getBackup().equals(other.getBackup())) 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;
}
@@ -387,6 +483,10 @@ public int hashCode() {
hash = (37 * hash) + BACKUP_FIELD_NUMBER;
hash = (53 * hash) + getBackup().hashCode();
}
+ if (hasEncryptionConfig()) {
+ hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getEncryptionConfig().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -492,7 +592,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* - * The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. + * The request for + * [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. ** * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupRequest} @@ -543,6 +644,12 @@ public Builder clear() { backup_ = null; backupBuilder_ = null; } + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } return this; } @@ -577,6 +684,11 @@ public com.google.spanner.admin.database.v1.CreateBackupRequest buildPartial() { } else { result.backup_ = backupBuilder_.build(); } + if (encryptionConfigBuilder_ == null) { + result.encryptionConfig_ = encryptionConfig_; + } else { + result.encryptionConfig_ = encryptionConfigBuilder_.build(); + } onBuilt(); return result; } @@ -638,6 +750,9 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.CreateBackupReques if (other.hasBackup()) { mergeBackup(other.getBackup()); } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1128,6 +1243,251 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() return backupBuilder_; } + private com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, + com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder> + 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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig getEncryptionConfig() {
+ if (encryptionConfigBuilder_ == null) {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig 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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeEncryptionConfig(
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (encryptionConfig_ != null) {
+ encryptionConfig_ =
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ if (encryptionConfigBuilder_ != null) {
+ return encryptionConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig,
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder>
+ getEncryptionConfigFieldBuilder() {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig,
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder>(
+ getEncryptionConfig(), getParentForChildren(), isClean());
+ encryptionConfig_ = null;
+ }
+ return encryptionConfigBuilder_;
+ }
+
@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/CreateBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java
index 6fe0b49af6a..4fd3e5d9208 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java
@@ -131,4 +131,58 @@ public interface CreateBackupRequestOrBuilder
*
*/
com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder();
+
+ /**
+ *
+ *
+ * + * 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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig 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 database by default, namely + * [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] + * = `USE_DATABASE_ENCRYPTION`. + *+ * + *
+ * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder();
}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java
index f05c47f7387..f5aa1bca277 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java
@@ -22,7 +22,8 @@
*
*
* - * The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. + * The request for + * [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. ** * Protobuf type {@code google.spanner.admin.database.v1.CreateDatabaseRequest} @@ -95,6 +96,23 @@ private CreateDatabaseRequest( mutable_bitField0_ |= 0x00000001; } extraStatements_.add(s); + break; + } + case 34: + { + com.google.spanner.admin.database.v1.EncryptionConfig.Builder subBuilder = null; + if (encryptionConfig_ != null) { + subBuilder = encryptionConfig_.toBuilder(); + } + encryptionConfig_ = + input.readMessage( + com.google.spanner.admin.database.v1.EncryptionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionConfig_); + encryptionConfig_ = subBuilder.buildPartial(); + } + break; } default: @@ -319,6 +337,67 @@ public com.google.protobuf.ByteString getExtraStatementsBytes(int index) { return extraStatements_.getByteString(index); } + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 4; + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+ * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.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 for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ return getEncryptionConfig();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -342,6 +421,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < extraStatements_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraStatements_.getRaw(i));
}
+ if (encryptionConfig_ != null) {
+ output.writeMessage(4, getEncryptionConfig());
+ }
unknownFields.writeTo(output);
}
@@ -365,6 +447,9 @@ public int getSerializedSize() {
size += dataSize;
size += 1 * getExtraStatementsList().size();
}
+ if (encryptionConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionConfig());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -384,6 +469,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getParent().equals(other.getParent())) return false;
if (!getCreateStatement().equals(other.getCreateStatement())) return false;
if (!getExtraStatementsList().equals(other.getExtraStatementsList())) 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;
}
@@ -403,6 +492,10 @@ public int hashCode() {
hash = (37 * hash) + EXTRA_STATEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getExtraStatementsList().hashCode();
}
+ if (hasEncryptionConfig()) {
+ hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getEncryptionConfig().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -508,7 +601,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* - * The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. + * The request for + * [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. ** * Protobuf type {@code google.spanner.admin.database.v1.CreateDatabaseRequest} @@ -555,6 +649,12 @@ public Builder clear() { extraStatements_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } return this; } @@ -590,6 +690,11 @@ public com.google.spanner.admin.database.v1.CreateDatabaseRequest buildPartial() bitField0_ = (bitField0_ & ~0x00000001); } result.extraStatements_ = extraStatements_; + if (encryptionConfigBuilder_ == null) { + result.encryptionConfig_ = encryptionConfig_; + } else { + result.encryptionConfig_ = encryptionConfigBuilder_.build(); + } onBuilt(); return result; } @@ -658,6 +763,9 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.CreateDatabaseRequ } onChanged(); } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1132,6 +1240,232 @@ public Builder addExtraStatementsBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+ * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ public boolean hasEncryptionConfig() {
+ return encryptionConfigBuilder_ != null || encryptionConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() {
+ if (encryptionConfigBuilder_ == null) {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ } else {
+ return encryptionConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.EncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ encryptionConfig_ = value;
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder builderForValue) {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeEncryptionConfig(
+ com.google.spanner.admin.database.v1.EncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (encryptionConfig_ != null) {
+ encryptionConfig_ =
+ com.google.spanner.admin.database.v1.EncryptionConfig.newBuilder(encryptionConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ encryptionConfig_ = value;
+ }
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.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 for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionConfig.Builder
+ getEncryptionConfigBuilder() {
+
+ onChanged();
+ return getEncryptionConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ if (encryptionConfigBuilder_ != null) {
+ return encryptionConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionConfig,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>
+ getEncryptionConfigFieldBuilder() {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionConfig,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>(
+ getEncryptionConfig(), getParentForChildren(), isClean());
+ encryptionConfig_ = null;
+ }
+ return encryptionConfigBuilder_;
+ }
+
@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/CreateDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java
index 9b839b9e9a6..4558ac8b824 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java
@@ -149,4 +149,51 @@ public interface CreateDatabaseRequestOrBuilder
* @return The bytes of the extraStatements at the given index.
*/
com.google.protobuf.ByteString getExtraStatementsBytes(int index);
+
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ boolean hasEncryptionConfig();
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig();
+ /**
+ *
+ *
+ * + * Optional. The encryption configuration for the database. If this field is + * not specified, Cloud Spanner will encrypt/decrypt all data at rest using + * Google default encryption. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder();
}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CryptoKeyName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CryptoKeyName.java
new file mode 100644
index 00000000000..5a18151e38f
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CryptoKeyName.java
@@ -0,0 +1,261 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.spanner.admin.database.v1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+@Generated("by gapic-generator-java")
+public class CryptoKeyName implements ResourceName {
+ private static final PathTemplate PROJECT_LOCATION_KEY_RING_CRYPTO_KEY =
+ PathTemplate.createWithoutUrlEncoding(
+ "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}");
+ private volatile Map+ * Output only. For databases that are using customer managed encryption, this + * field contains the encryption configuration for the database. + * For databases that are using Google default or other types of encryption, + * this field is empty. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasEncryptionConfig() {
+ return encryptionConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. For databases that are using customer managed encryption, this + * field contains the encryption configuration for the database. + * For databases that are using Google default or other types of encryption, + * this field is empty. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ }
+ /**
+ *
+ *
+ * + * Output only. For databases that are using customer managed encryption, this + * field contains the encryption configuration for the database. + * For databases that are using Google default or other types of encryption, + * this field is empty. + *+ * + *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ return getEncryptionConfig();
+ }
+
+ public static final int ENCRYPTION_INFO_FIELD_NUMBER = 8;
+ private java.util.List+ * Output only. For databases that are using customer managed encryption, this + * field contains the encryption information for the database, such as + * encryption state and the Cloud KMS key versions that are in use. + * For databases that are using Google default or other types of encryption, + * this field is empty. + * This field is propagated lazily from the backend. There might be a delay + * from when a key version is being used and when it appears in this field. + *+ * + *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * Output only. For databases that are using customer managed encryption, this + * field contains the encryption information for the database, such as + * encryption state and the Cloud KMS key versions that are in use. + * For databases that are using Google default or other types of encryption, + * this field is empty. + * This field is propagated lazily from the backend. There might be a delay + * from when a key version is being used and when it appears in this field. + *+ * + *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>
+ getEncryptionInfoOrBuilderList() {
+ return encryptionInfo_;
+ }
+ /**
+ *
+ *
+ * + * Output only. For databases that are using customer managed encryption, this + * field contains the encryption information for the database, such as + * encryption state and the Cloud KMS key versions that are in use. + * For databases that are using Google default or other types of encryption, + * this field is empty. + * This field is propagated lazily from the backend. There might be a delay + * from when a key version is being used and when it appears in this field. + *+ * + *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public int getEncryptionInfoCount() {
+ return encryptionInfo_.size();
+ }
+ /**
+ *
+ *
+ * + * Output only. For databases that are using customer managed encryption, this + * field contains the encryption information for the database, such as + * encryption state and the Cloud KMS key versions that are in use. + * For databases that are using Google default or other types of encryption, + * this field is empty. + * This field is propagated lazily from the backend. There might be a delay + * from when a key version is being used and when it appears in this field. + *+ * + *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfo getEncryptionInfo(int index) {
+ return encryptionInfo_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Output only. For databases that are using customer managed encryption, this + * field contains the encryption information for the database, such as + * encryption state and the Cloud KMS key versions that are in use. + * For databases that are using Google default or other types of encryption, + * this field is empty. + * This field is propagated lazily from the backend. There might be a delay + * from when a key version is being used and when it appears in this field. + *+ * + *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(
+ int index) {
+ return encryptionInfo_.get(index);
+ }
+
public static final int VERSION_RETENTION_PERIOD_FIELD_NUMBER = 6;
private volatile java.lang.Object versionRetentionPeriod_;
/**
@@ -580,8 +790,8 @@ public com.google.spanner.admin.database.v1.RestoreInfoOrBuilder getRestoreInfoO
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -607,8 +817,8 @@ public java.lang.String getVersionRetentionPeriod() {
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -635,7 +845,10 @@ public com.google.protobuf.ByteString getVersionRetentionPeriodBytes() {
*
* * Output only. Earliest timestamp at which older versions of the data can be - * read. + * read. This value is continuously updated by Cloud Spanner and becomes stale + * the moment it is queried. If you are using this value to recover data, make + * sure to account for the time from the moment when the value is queried to + * the moment when you initiate the recovery. ** *
@@ -653,7 +866,10 @@ public boolean hasEarliestVersionTime() {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -673,7 +889,10 @@ public com.google.protobuf.Timestamp getEarliestVersionTime() {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -712,12 +931,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (restoreInfo_ != null) {
output.writeMessage(4, getRestoreInfo());
}
+ if (encryptionConfig_ != null) {
+ output.writeMessage(5, getEncryptionConfig());
+ }
if (!getVersionRetentionPeriodBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, versionRetentionPeriod_);
}
if (earliestVersionTime_ != null) {
output.writeMessage(7, getEarliestVersionTime());
}
+ for (int i = 0; i < encryptionInfo_.size(); i++) {
+ output.writeMessage(8, encryptionInfo_.get(i));
+ }
unknownFields.writeTo(output);
}
@@ -740,12 +965,18 @@ public int getSerializedSize() {
if (restoreInfo_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRestoreInfo());
}
+ if (encryptionConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig());
+ }
if (!getVersionRetentionPeriodBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, versionRetentionPeriod_);
}
if (earliestVersionTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEarliestVersionTime());
}
+ for (int i = 0; i < encryptionInfo_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, encryptionInfo_.get(i));
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -772,6 +1003,11 @@ public boolean equals(final java.lang.Object obj) {
if (hasRestoreInfo()) {
if (!getRestoreInfo().equals(other.getRestoreInfo())) return false;
}
+ if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false;
+ if (hasEncryptionConfig()) {
+ if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false;
+ }
+ if (!getEncryptionInfoList().equals(other.getEncryptionInfoList())) return false;
if (!getVersionRetentionPeriod().equals(other.getVersionRetentionPeriod())) return false;
if (hasEarliestVersionTime() != other.hasEarliestVersionTime()) return false;
if (hasEarliestVersionTime()) {
@@ -800,6 +1036,14 @@ public int hashCode() {
hash = (37 * hash) + RESTORE_INFO_FIELD_NUMBER;
hash = (53 * hash) + getRestoreInfo().hashCode();
}
+ if (hasEncryptionConfig()) {
+ hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getEncryptionConfig().hashCode();
+ }
+ if (getEncryptionInfoCount() > 0) {
+ hash = (37 * hash) + ENCRYPTION_INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getEncryptionInfoList().hashCode();
+ }
hash = (37 * hash) + VERSION_RETENTION_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getVersionRetentionPeriod().hashCode();
if (hasEarliestVersionTime()) {
@@ -945,7 +1189,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
}
private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getEncryptionInfoFieldBuilder();
+ }
}
@java.lang.Override
@@ -967,6 +1213,18 @@ public Builder clear() {
restoreInfo_ = null;
restoreInfoBuilder_ = null;
}
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = null;
+ } else {
+ encryptionConfig_ = null;
+ encryptionConfigBuilder_ = null;
+ }
+ if (encryptionInfoBuilder_ == null) {
+ encryptionInfo_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ encryptionInfoBuilder_.clear();
+ }
versionRetentionPeriod_ = "";
if (earliestVersionTimeBuilder_ == null) {
@@ -1002,6 +1260,7 @@ public com.google.spanner.admin.database.v1.Database build() {
public com.google.spanner.admin.database.v1.Database buildPartial() {
com.google.spanner.admin.database.v1.Database result =
new com.google.spanner.admin.database.v1.Database(this);
+ int from_bitField0_ = bitField0_;
result.name_ = name_;
result.state_ = state_;
if (createTimeBuilder_ == null) {
@@ -1014,6 +1273,20 @@ public com.google.spanner.admin.database.v1.Database buildPartial() {
} else {
result.restoreInfo_ = restoreInfoBuilder_.build();
}
+ if (encryptionConfigBuilder_ == null) {
+ result.encryptionConfig_ = encryptionConfig_;
+ } else {
+ result.encryptionConfig_ = encryptionConfigBuilder_.build();
+ }
+ if (encryptionInfoBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ encryptionInfo_ = java.util.Collections.unmodifiableList(encryptionInfo_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.encryptionInfo_ = encryptionInfo_;
+ } else {
+ result.encryptionInfo_ = encryptionInfoBuilder_.build();
+ }
result.versionRetentionPeriod_ = versionRetentionPeriod_;
if (earliestVersionTimeBuilder_ == null) {
result.earliestVersionTime_ = earliestVersionTime_;
@@ -1082,6 +1355,36 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Database other) {
if (other.hasRestoreInfo()) {
mergeRestoreInfo(other.getRestoreInfo());
}
+ if (other.hasEncryptionConfig()) {
+ mergeEncryptionConfig(other.getEncryptionConfig());
+ }
+ if (encryptionInfoBuilder_ == null) {
+ if (!other.encryptionInfo_.isEmpty()) {
+ if (encryptionInfo_.isEmpty()) {
+ encryptionInfo_ = other.encryptionInfo_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.addAll(other.encryptionInfo_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.encryptionInfo_.isEmpty()) {
+ if (encryptionInfoBuilder_.isEmpty()) {
+ encryptionInfoBuilder_.dispose();
+ encryptionInfoBuilder_ = null;
+ encryptionInfo_ = other.encryptionInfo_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ encryptionInfoBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+ ? getEncryptionInfoFieldBuilder()
+ : null;
+ } else {
+ encryptionInfoBuilder_.addAllMessages(other.encryptionInfo_);
+ }
+ }
+ }
if (!other.getVersionRetentionPeriod().isEmpty()) {
versionRetentionPeriod_ = other.versionRetentionPeriod_;
onChanged();
@@ -1118,6 +1421,8 @@ public Builder mergeFrom(
return this;
}
+ private int bitField0_;
+
private java.lang.Object name_ = "";
/**
*
@@ -1761,6 +2066,747 @@ public com.google.spanner.admin.database.v1.RestoreInfoOrBuilder getRestoreInfoO
return restoreInfoBuilder_;
}
+ private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionConfig,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>
+ encryptionConfigBuilder_;
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ public boolean hasEncryptionConfig() {
+ return encryptionConfigBuilder_ != null || encryptionConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() {
+ if (encryptionConfigBuilder_ == null) {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ } else {
+ return encryptionConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.EncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ encryptionConfig_ = value;
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder builderForValue) {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeEncryptionConfig(
+ com.google.spanner.admin.database.v1.EncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (encryptionConfig_ != null) {
+ encryptionConfig_ =
+ com.google.spanner.admin.database.v1.EncryptionConfig.newBuilder(encryptionConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ encryptionConfig_ = value;
+ }
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearEncryptionConfig() {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = null;
+ onChanged();
+ } else {
+ encryptionConfig_ = null;
+ encryptionConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionConfig.Builder
+ getEncryptionConfigBuilder() {
+
+ onChanged();
+ return getEncryptionConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ if (encryptionConfigBuilder_ != null) {
+ return encryptionConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionConfig,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>
+ getEncryptionConfigFieldBuilder() {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionConfig,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>(
+ getEncryptionConfig(), getParentForChildren(), isClean());
+ encryptionConfig_ = null;
+ }
+ return encryptionConfigBuilder_;
+ }
+
+ private java.util.List encryptionInfo_ =
+ java.util.Collections.emptyList();
+
+ private void ensureEncryptionInfoIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ encryptionInfo_ =
+ new java.util.ArrayList(
+ encryptionInfo_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionInfo,
+ com.google.spanner.admin.database.v1.EncryptionInfo.Builder,
+ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>
+ encryptionInfoBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List
+ getEncryptionInfoList() {
+ if (encryptionInfoBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(encryptionInfo_);
+ } else {
+ return encryptionInfoBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public int getEncryptionInfoCount() {
+ if (encryptionInfoBuilder_ == null) {
+ return encryptionInfo_.size();
+ } else {
+ return encryptionInfoBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionInfo getEncryptionInfo(int index) {
+ if (encryptionInfoBuilder_ == null) {
+ return encryptionInfo_.get(index);
+ } else {
+ return encryptionInfoBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEncryptionInfo(
+ int index, com.google.spanner.admin.database.v1.EncryptionInfo value) {
+ if (encryptionInfoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.set(index, value);
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEncryptionInfo(
+ int index, com.google.spanner.admin.database.v1.EncryptionInfo.Builder builderForValue) {
+ if (encryptionInfoBuilder_ == null) {
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addEncryptionInfo(com.google.spanner.admin.database.v1.EncryptionInfo value) {
+ if (encryptionInfoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.add(value);
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addEncryptionInfo(
+ int index, com.google.spanner.admin.database.v1.EncryptionInfo value) {
+ if (encryptionInfoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.add(index, value);
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addEncryptionInfo(
+ com.google.spanner.admin.database.v1.EncryptionInfo.Builder builderForValue) {
+ if (encryptionInfoBuilder_ == null) {
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.add(builderForValue.build());
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addEncryptionInfo(
+ int index, com.google.spanner.admin.database.v1.EncryptionInfo.Builder builderForValue) {
+ if (encryptionInfoBuilder_ == null) {
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addAllEncryptionInfo(
+ java.lang.Iterable extends com.google.spanner.admin.database.v1.EncryptionInfo> values) {
+ if (encryptionInfoBuilder_ == null) {
+ ensureEncryptionInfoIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, encryptionInfo_);
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearEncryptionInfo() {
+ if (encryptionInfoBuilder_ == null) {
+ encryptionInfo_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder removeEncryptionInfo(int index) {
+ if (encryptionInfoBuilder_ == null) {
+ ensureEncryptionInfoIsMutable();
+ encryptionInfo_.remove(index);
+ onChanged();
+ } else {
+ encryptionInfoBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryptionInfoBuilder(
+ int index) {
+ return getEncryptionInfoFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(
+ int index) {
+ if (encryptionInfoBuilder_ == null) {
+ return encryptionInfo_.get(index);
+ } else {
+ return encryptionInfoBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List extends com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>
+ getEncryptionInfoOrBuilderList() {
+ if (encryptionInfoBuilder_ != null) {
+ return encryptionInfoBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(encryptionInfo_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryptionInfoBuilder() {
+ return getEncryptionInfoFieldBuilder()
+ .addBuilder(com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryptionInfoBuilder(
+ int index) {
+ return getEncryptionInfoFieldBuilder()
+ .addBuilder(
+ index, com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List
+ getEncryptionInfoBuilderList() {
+ return getEncryptionInfoFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionInfo,
+ com.google.spanner.admin.database.v1.EncryptionInfo.Builder,
+ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>
+ getEncryptionInfoFieldBuilder() {
+ if (encryptionInfoBuilder_ == null) {
+ encryptionInfoBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.admin.database.v1.EncryptionInfo,
+ com.google.spanner.admin.database.v1.EncryptionInfo.Builder,
+ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>(
+ encryptionInfo_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ encryptionInfo_ = null;
+ }
+ return encryptionInfoBuilder_;
+ }
+
private java.lang.Object versionRetentionPeriod_ = "";
/**
*
@@ -1769,8 +2815,8 @@ public com.google.spanner.admin.database.v1.RestoreInfoOrBuilder getRestoreInfoO
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1796,8 +2842,8 @@ public java.lang.String getVersionRetentionPeriod() {
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1823,8 +2869,8 @@ public com.google.protobuf.ByteString getVersionRetentionPeriodBytes() {
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1849,8 +2895,8 @@ public Builder setVersionRetentionPeriod(java.lang.String value) {
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1871,8 +2917,8 @@ public Builder clearVersionRetentionPeriod() {
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1903,7 +2949,10 @@ public Builder setVersionRetentionPeriodBytes(com.google.protobuf.ByteString val
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -1920,7 +2969,10 @@ public boolean hasEarliestVersionTime() {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -1943,7 +2995,10 @@ public com.google.protobuf.Timestamp getEarliestVersionTime() {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -1968,7 +3023,10 @@ public Builder setEarliestVersionTime(com.google.protobuf.Timestamp value) {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -1990,7 +3048,10 @@ public Builder setEarliestVersionTime(com.google.protobuf.Timestamp.Builder buil
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -2019,7 +3080,10 @@ public Builder mergeEarliestVersionTime(com.google.protobuf.Timestamp value) {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -2042,7 +3106,10 @@ public Builder clearEarliestVersionTime() {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -2059,7 +3126,10 @@ public com.google.protobuf.Timestamp.Builder getEarliestVersionTimeBuilder() {
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -2080,7 +3150,10 @@ public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder()
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java
index e01e407931b..cefd7427d47 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java
index 9ca843fc93f..eca4f8317f3 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java
@@ -167,6 +167,149 @@ public interface DatabaseOrBuilder
*/
com.google.spanner.admin.database.v1.RestoreInfoOrBuilder getRestoreInfoOrBuilder();
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ boolean hasEncryptionConfig();
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig();
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption configuration for the database.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ java.util.List getEncryptionInfoList();
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.spanner.admin.database.v1.EncryptionInfo getEncryptionInfo(int index);
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ int getEncryptionInfoCount();
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ java.util.List extends com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>
+ getEncryptionInfoOrBuilderList();
+ /**
+ *
+ *
+ *
+ * Output only. For databases that are using customer managed encryption, this
+ * field contains the encryption information for the database, such as
+ * encryption state and the Cloud KMS key versions that are in use.
+ * For databases that are using Google default or other types of encryption,
+ * this field is empty.
+ * This field is propagated lazily from the backend. There might be a delay
+ * from when a key version is being used and when it appears in this field.
+ *
+ *
+ *
+ * repeated .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(
+ int index);
+
/**
*
*
@@ -174,8 +317,8 @@ public interface DatabaseOrBuilder
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -190,8 +333,8 @@ public interface DatabaseOrBuilder
* Output only. The period in which Cloud Spanner retains all versions of data
* for the database. This is the same as the value of version_retention_period
* database option set using
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- * if not set.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ * Defaults to 1 hour, if not set.
*
*
* string version_retention_period = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -205,7 +348,10 @@ public interface DatabaseOrBuilder
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -220,7 +366,10 @@ public interface DatabaseOrBuilder
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
@@ -235,7 +384,10 @@ public interface DatabaseOrBuilder
*
*
* Output only. Earliest timestamp at which older versions of the data can be
- * read.
+ * read. This value is continuously updated by Cloud Spanner and becomes stale
+ * the moment it is queried. If you are using this value to recover data, make
+ * sure to account for the time from the moment when the value is queried to
+ * the moment when you initiate the recovery.
*
*
*
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java
index 44e63a951a0..9aa1cf40ff4 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
+ * The request for
+ * [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.DeleteBackupRequest}
@@ -332,7 +333,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
+ * The request for
+ * [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.DeleteBackupRequest}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java
index e834f43e720..dd74e919420 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
+ * The request for
+ * [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.DropDatabaseRequest}
@@ -328,7 +329,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
+ * The request for
+ * [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.DropDatabaseRequest}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java
new file mode 100644
index 00000000000..0be957e493b
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java
@@ -0,0 +1,651 @@
+/*
+ * 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/common.proto
+
+package com.google.spanner.admin.database.v1;
+
+/**
+ *
+ *
+ *
+ * Encryption configuration for a Cloud Spanner database.
+ *
+ *
+ * Protobuf type {@code google.spanner.admin.database.v1.EncryptionConfig}
+ */
+public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.EncryptionConfig)
+ EncryptionConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use EncryptionConfig.newBuilder() to construct.
+ private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private EncryptionConfig() {
+ kmsKeyName_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new EncryptionConfig();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private EncryptionConfig(
+ 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 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.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.spanner.admin.database.v1.EncryptionConfig.class,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder.class);
+ }
+
+ public static final int KMS_KEY_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object kmsKeyName_;
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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 (!getKmsKeyNameBytes().isEmpty()) {
+ 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 (!getKmsKeyNameBytes().isEmpty()) {
+ 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.EncryptionConfig)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.admin.database.v1.EncryptionConfig other =
+ (com.google.spanner.admin.database.v1.EncryptionConfig) obj;
+
+ 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) + 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.EncryptionConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionConfig 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.EncryptionConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionConfig 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.EncryptionConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionConfig 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.EncryptionConfig 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.EncryptionConfig 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.EncryptionConfig 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.EncryptionConfig 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.EncryptionConfig 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.EncryptionConfig 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.EncryptionConfig 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 a Cloud Spanner database.
+ *
+ *
+ * Protobuf type {@code google.spanner.admin.database.v1.EncryptionConfig}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.EncryptionConfig)
+ com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.spanner.admin.database.v1.EncryptionConfig.class,
+ com.google.spanner.admin.database.v1.EncryptionConfig.Builder.class);
+ }
+
+ // Construct using com.google.spanner.admin.database.v1.EncryptionConfig.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();
+ kmsKeyName_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfig getDefaultInstanceForType() {
+ return com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfig build() {
+ com.google.spanner.admin.database.v1.EncryptionConfig result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionConfig buildPartial() {
+ com.google.spanner.admin.database.v1.EncryptionConfig result =
+ new com.google.spanner.admin.database.v1.EncryptionConfig(this);
+ 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.EncryptionConfig) {
+ return mergeFrom((com.google.spanner.admin.database.v1.EncryptionConfig) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.spanner.admin.database.v1.EncryptionConfig other) {
+ if (other == com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance())
+ return this;
+ 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.EncryptionConfig parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage =
+ (com.google.spanner.admin.database.v1.EncryptionConfig) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object kmsKeyName_ = "";
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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;
+ }
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearKmsKeyName() {
+
+ kmsKeyName_ = getDefaultInstance().getKmsKeyName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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.EncryptionConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.EncryptionConfig)
+ private static final com.google.spanner.admin.database.v1.EncryptionConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.EncryptionConfig();
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public EncryptionConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new EncryptionConfig(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.EncryptionConfig getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java
new file mode 100644
index 00000000000..f3638c5eb90
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java
@@ -0,0 +1,54 @@
+/*
+ * 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/common.proto
+
+package com.google.spanner.admin.database.v1;
+
+public interface EncryptionConfigOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.EncryptionConfig)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The kmsKeyName.
+ */
+ java.lang.String getKmsKeyName();
+ /**
+ *
+ *
+ *
+ * The Cloud KMS key to be used for encrypting and decrypting
+ * the database. Values are of the form
+ * `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
+ *
+ *
+ * string kms_key_name = 2 [(.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/EncryptionInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java
new file mode 100644
index 00000000000..87c729a88a7
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java
@@ -0,0 +1,1301 @@
+/*
+ * 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/common.proto
+
+package com.google.spanner.admin.database.v1;
+
+/**
+ *
+ *
+ *
+ * Encryption information for a Cloud Spanner database or backup.
+ *
+ *
+ * Protobuf type {@code google.spanner.admin.database.v1.EncryptionInfo}
+ */
+public final class EncryptionInfo extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.EncryptionInfo)
+ EncryptionInfoOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use EncryptionInfo.newBuilder() to construct.
+ private EncryptionInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private EncryptionInfo() {
+ encryptionType_ = 0;
+ kmsKeyVersion_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new EncryptionInfo();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private EncryptionInfo(
+ 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 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ kmsKeyVersion_ = s;
+ break;
+ }
+ case 24:
+ {
+ int rawValue = input.readEnum();
+
+ encryptionType_ = rawValue;
+ break;
+ }
+ case 34:
+ {
+ com.google.rpc.Status.Builder subBuilder = null;
+ if (encryptionStatus_ != null) {
+ subBuilder = encryptionStatus_.toBuilder();
+ }
+ encryptionStatus_ =
+ input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(encryptionStatus_);
+ encryptionStatus_ = 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.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.spanner.admin.database.v1.EncryptionInfo.class,
+ com.google.spanner.admin.database.v1.EncryptionInfo.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Possible encryption types.
+ *
+ *
+ * Protobuf enum {@code google.spanner.admin.database.v1.EncryptionInfo.Type}
+ */
+ public enum Type implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Encryption type was not specified, though data at rest remains encrypted.
+ *
+ *
+ * TYPE_UNSPECIFIED = 0;
+ */
+ TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * The data is encrypted at rest with a key that is
+ * fully managed by Google. No key version or status will be populated.
+ * This is the default state.
+ *
+ *
+ * GOOGLE_DEFAULT_ENCRYPTION = 1;
+ */
+ GOOGLE_DEFAULT_ENCRYPTION(1),
+ /**
+ *
+ *
+ *
+ * The data is encrypted at rest with a key that is
+ * managed by the customer. The active version of the key. `kms_key_version`
+ * will be populated, and `encryption_status` may be populated.
+ *
+ *
+ * CUSTOMER_MANAGED_ENCRYPTION = 2;
+ */
+ CUSTOMER_MANAGED_ENCRYPTION(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Encryption type was not specified, though data at rest remains encrypted.
+ *
+ *
+ * TYPE_UNSPECIFIED = 0;
+ */
+ public static final int TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * The data is encrypted at rest with a key that is
+ * fully managed by Google. No key version or status will be populated.
+ * This is the default state.
+ *
+ *
+ * GOOGLE_DEFAULT_ENCRYPTION = 1;
+ */
+ public static final int GOOGLE_DEFAULT_ENCRYPTION_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * The data is encrypted at rest with a key that is
+ * managed by the customer. The active version of the key. `kms_key_version`
+ * will be populated, and `encryption_status` may be populated.
+ *
+ *
+ * CUSTOMER_MANAGED_ENCRYPTION = 2;
+ */
+ public static final int CUSTOMER_MANAGED_ENCRYPTION_VALUE = 2;
+
+ 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 Type 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 Type forNumber(int value) {
+ switch (value) {
+ case 0:
+ return TYPE_UNSPECIFIED;
+ case 1:
+ return GOOGLE_DEFAULT_ENCRYPTION;
+ case 2:
+ 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 Type findValueByNumber(int number) {
+ return Type.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.EncryptionInfo.getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final Type[] VALUES = values();
+
+ public static Type 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 Type(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.spanner.admin.database.v1.EncryptionInfo.Type)
+ }
+
+ public static final int ENCRYPTION_TYPE_FIELD_NUMBER = 3;
+ private int encryptionType_;
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The enum numeric value on the wire for encryptionType.
+ */
+ @java.lang.Override
+ public int getEncryptionTypeValue() {
+ return encryptionType_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionType.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfo.Type getEncryptionType() {
+ @SuppressWarnings("deprecation")
+ com.google.spanner.admin.database.v1.EncryptionInfo.Type result =
+ com.google.spanner.admin.database.v1.EncryptionInfo.Type.valueOf(encryptionType_);
+ return result == null
+ ? com.google.spanner.admin.database.v1.EncryptionInfo.Type.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int ENCRYPTION_STATUS_FIELD_NUMBER = 4;
+ private com.google.rpc.Status encryptionStatus_;
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the encryptionStatus field is set.
+ */
+ @java.lang.Override
+ public boolean hasEncryptionStatus() {
+ return encryptionStatus_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionStatus.
+ */
+ @java.lang.Override
+ public com.google.rpc.Status getEncryptionStatus() {
+ return encryptionStatus_ == null
+ ? com.google.rpc.Status.getDefaultInstance()
+ : encryptionStatus_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() {
+ return getEncryptionStatus();
+ }
+
+ public static final int KMS_KEY_VERSION_FIELD_NUMBER = 2;
+ private volatile java.lang.Object kmsKeyVersion_;
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The kmsKeyVersion.
+ */
+ @java.lang.Override
+ public java.lang.String getKmsKeyVersion() {
+ java.lang.Object ref = kmsKeyVersion_;
+ 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();
+ kmsKeyVersion_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for kmsKeyVersion.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getKmsKeyVersionBytes() {
+ java.lang.Object ref = kmsKeyVersion_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ kmsKeyVersion_ = 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 (!getKmsKeyVersionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyVersion_);
+ }
+ if (encryptionType_
+ != com.google.spanner.admin.database.v1.EncryptionInfo.Type.TYPE_UNSPECIFIED.getNumber()) {
+ output.writeEnum(3, encryptionType_);
+ }
+ if (encryptionStatus_ != null) {
+ output.writeMessage(4, getEncryptionStatus());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getKmsKeyVersionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyVersion_);
+ }
+ if (encryptionType_
+ != com.google.spanner.admin.database.v1.EncryptionInfo.Type.TYPE_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, encryptionType_);
+ }
+ if (encryptionStatus_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionStatus());
+ }
+ 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.EncryptionInfo)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.admin.database.v1.EncryptionInfo other =
+ (com.google.spanner.admin.database.v1.EncryptionInfo) obj;
+
+ if (encryptionType_ != other.encryptionType_) return false;
+ if (hasEncryptionStatus() != other.hasEncryptionStatus()) return false;
+ if (hasEncryptionStatus()) {
+ if (!getEncryptionStatus().equals(other.getEncryptionStatus())) return false;
+ }
+ if (!getKmsKeyVersion().equals(other.getKmsKeyVersion())) 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_;
+ if (hasEncryptionStatus()) {
+ hash = (37 * hash) + ENCRYPTION_STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getEncryptionStatus().hashCode();
+ }
+ hash = (37 * hash) + KMS_KEY_VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getKmsKeyVersion().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionInfo parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionInfo 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.EncryptionInfo parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionInfo 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.EncryptionInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionInfo 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.EncryptionInfo 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.EncryptionInfo 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.EncryptionInfo 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.EncryptionInfo 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.EncryptionInfo 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.EncryptionInfo 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.EncryptionInfo 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 information for a Cloud Spanner database or backup.
+ *
+ *
+ * Protobuf type {@code google.spanner.admin.database.v1.EncryptionInfo}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.EncryptionInfo)
+ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.spanner.admin.database.v1.EncryptionInfo.class,
+ com.google.spanner.admin.database.v1.EncryptionInfo.Builder.class);
+ }
+
+ // Construct using com.google.spanner.admin.database.v1.EncryptionInfo.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;
+
+ if (encryptionStatusBuilder_ == null) {
+ encryptionStatus_ = null;
+ } else {
+ encryptionStatus_ = null;
+ encryptionStatusBuilder_ = null;
+ }
+ kmsKeyVersion_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.spanner.admin.database.v1.CommonProto
+ .internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfo getDefaultInstanceForType() {
+ return com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfo build() {
+ com.google.spanner.admin.database.v1.EncryptionInfo result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfo buildPartial() {
+ com.google.spanner.admin.database.v1.EncryptionInfo result =
+ new com.google.spanner.admin.database.v1.EncryptionInfo(this);
+ result.encryptionType_ = encryptionType_;
+ if (encryptionStatusBuilder_ == null) {
+ result.encryptionStatus_ = encryptionStatus_;
+ } else {
+ result.encryptionStatus_ = encryptionStatusBuilder_.build();
+ }
+ result.kmsKeyVersion_ = kmsKeyVersion_;
+ 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.EncryptionInfo) {
+ return mergeFrom((com.google.spanner.admin.database.v1.EncryptionInfo) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.spanner.admin.database.v1.EncryptionInfo other) {
+ if (other == com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance())
+ return this;
+ if (other.encryptionType_ != 0) {
+ setEncryptionTypeValue(other.getEncryptionTypeValue());
+ }
+ if (other.hasEncryptionStatus()) {
+ mergeEncryptionStatus(other.getEncryptionStatus());
+ }
+ if (!other.getKmsKeyVersion().isEmpty()) {
+ kmsKeyVersion_ = other.kmsKeyVersion_;
+ 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.EncryptionInfo parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage =
+ (com.google.spanner.admin.database.v1.EncryptionInfo) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int encryptionType_ = 0;
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The enum numeric value on the wire for encryptionType.
+ */
+ @java.lang.Override
+ public int getEncryptionTypeValue() {
+ return encryptionType_;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @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;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionType.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.EncryptionInfo.Type getEncryptionType() {
+ @SuppressWarnings("deprecation")
+ com.google.spanner.admin.database.v1.EncryptionInfo.Type result =
+ com.google.spanner.admin.database.v1.EncryptionInfo.Type.valueOf(encryptionType_);
+ return result == null
+ ? com.google.spanner.admin.database.v1.EncryptionInfo.Type.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @param value The encryptionType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEncryptionType(
+ com.google.spanner.admin.database.v1.EncryptionInfo.Type value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ encryptionType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEncryptionType() {
+
+ encryptionType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.rpc.Status encryptionStatus_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ encryptionStatusBuilder_;
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the encryptionStatus field is set.
+ */
+ public boolean hasEncryptionStatus() {
+ return encryptionStatusBuilder_ != null || encryptionStatus_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionStatus.
+ */
+ public com.google.rpc.Status getEncryptionStatus() {
+ if (encryptionStatusBuilder_ == null) {
+ return encryptionStatus_ == null
+ ? com.google.rpc.Status.getDefaultInstance()
+ : encryptionStatus_;
+ } else {
+ return encryptionStatusBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEncryptionStatus(com.google.rpc.Status value) {
+ if (encryptionStatusBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ encryptionStatus_ = value;
+ onChanged();
+ } else {
+ encryptionStatusBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setEncryptionStatus(com.google.rpc.Status.Builder builderForValue) {
+ if (encryptionStatusBuilder_ == null) {
+ encryptionStatus_ = builderForValue.build();
+ onChanged();
+ } else {
+ encryptionStatusBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder mergeEncryptionStatus(com.google.rpc.Status value) {
+ if (encryptionStatusBuilder_ == null) {
+ if (encryptionStatus_ != null) {
+ encryptionStatus_ =
+ com.google.rpc.Status.newBuilder(encryptionStatus_).mergeFrom(value).buildPartial();
+ } else {
+ encryptionStatus_ = value;
+ }
+ onChanged();
+ } else {
+ encryptionStatusBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearEncryptionStatus() {
+ if (encryptionStatusBuilder_ == null) {
+ encryptionStatus_ = null;
+ onChanged();
+ } else {
+ encryptionStatus_ = null;
+ encryptionStatusBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.rpc.Status.Builder getEncryptionStatusBuilder() {
+
+ onChanged();
+ return getEncryptionStatusFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() {
+ if (encryptionStatusBuilder_ != null) {
+ return encryptionStatusBuilder_.getMessageOrBuilder();
+ } else {
+ return encryptionStatus_ == null
+ ? com.google.rpc.Status.getDefaultInstance()
+ : encryptionStatus_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ getEncryptionStatusFieldBuilder() {
+ if (encryptionStatusBuilder_ == null) {
+ encryptionStatusBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status,
+ com.google.rpc.Status.Builder,
+ com.google.rpc.StatusOrBuilder>(
+ getEncryptionStatus(), getParentForChildren(), isClean());
+ encryptionStatus_ = null;
+ }
+ return encryptionStatusBuilder_;
+ }
+
+ private java.lang.Object kmsKeyVersion_ = "";
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The kmsKeyVersion.
+ */
+ public java.lang.String getKmsKeyVersion() {
+ java.lang.Object ref = kmsKeyVersion_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kmsKeyVersion_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for kmsKeyVersion.
+ */
+ public com.google.protobuf.ByteString getKmsKeyVersionBytes() {
+ java.lang.Object ref = kmsKeyVersion_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ kmsKeyVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The kmsKeyVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setKmsKeyVersion(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kmsKeyVersion_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearKmsKeyVersion() {
+
+ kmsKeyVersion_ = getDefaultInstance().getKmsKeyVersion();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for kmsKeyVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setKmsKeyVersionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kmsKeyVersion_ = 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.EncryptionInfo)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.EncryptionInfo)
+ private static final com.google.spanner.admin.database.v1.EncryptionInfo DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.EncryptionInfo();
+ }
+
+ public static com.google.spanner.admin.database.v1.EncryptionInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public EncryptionInfo parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new EncryptionInfo(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.EncryptionInfo getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java
new file mode 100644
index 00000000000..76b267287c4
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java
@@ -0,0 +1,129 @@
+/*
+ * 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/common.proto
+
+package com.google.spanner.admin.database.v1;
+
+public interface EncryptionInfoOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.EncryptionInfo)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The enum numeric value on the wire for encryptionType.
+ */
+ int getEncryptionTypeValue();
+ /**
+ *
+ *
+ *
+ * Output only. The type of encryption.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.EncryptionInfo.Type encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionType.
+ */
+ com.google.spanner.admin.database.v1.EncryptionInfo.Type getEncryptionType();
+
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return Whether the encryptionStatus field is set.
+ */
+ boolean hasEncryptionStatus();
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ *
+ * @return The encryptionStatus.
+ */
+ com.google.rpc.Status getEncryptionStatus();
+ /**
+ *
+ *
+ *
+ * Output only. If present, the status of a recent encrypt/decrypt call on
+ * underlying data for this database or backup. Regardless of status, data is
+ * always encrypted at rest.
+ *
+ *
+ * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The kmsKeyVersion.
+ */
+ java.lang.String getKmsKeyVersion();
+ /**
+ *
+ *
+ *
+ * Output only. A Cloud KMS key version that is being used to protect the
+ * database or backup.
+ *
+ *
+ *
+ * string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for kmsKeyVersion.
+ */
+ com.google.protobuf.ByteString getKmsKeyVersionBytes();
+}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java
index c503740fca9..be64eafeb8d 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
+ * The request for
+ * [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetBackupRequest}
@@ -332,7 +333,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
+ * The request for
+ * [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetBackupRequest}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java
index f5bc73b7d83..cd7a904d1d7 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+ * The request for
+ * [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlRequest}
@@ -332,7 +333,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+ * The request for
+ * [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlRequest}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java
index de7f8389d15..76372e93e6b 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java
@@ -22,7 +22,8 @@
*
*
*
- * The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+ * The response for
+ * [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlResponse}
@@ -354,7 +355,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+ * The response for
+ * [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlResponse}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java
index 37a5e3ef978..690f6b03ecb 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
+ * The request for
+ * [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseRequest}
@@ -330,7 +331,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
+ * The request for
+ * [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseRequest}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java
index e3e76d42320..1cbf45abef0 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
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 a49ee408beb..59e5c8768cd 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
@@ -205,7 +205,9 @@ public com.google.protobuf.ByteString getParentBytes() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -222,7 +224,8 @@ public com.google.protobuf.ByteString getParentBytes() {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -259,7 +262,9 @@ public java.lang.String getFilter() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -276,7 +281,8 @@ public java.lang.String getFilter() {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -326,8 +332,9 @@ public int getPageSize() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -352,8 +359,9 @@ public java.lang.String getPageToken() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -881,7 +889,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -898,7 +908,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -934,7 +945,9 @@ public java.lang.String getFilter() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -951,7 +964,8 @@ public java.lang.String getFilter() {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -987,7 +1001,9 @@ public com.google.protobuf.ByteString getFilterBytes() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -1004,7 +1020,8 @@ public com.google.protobuf.ByteString getFilterBytes() {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -1039,7 +1056,9 @@ public Builder setFilter(java.lang.String value) {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -1056,7 +1075,8 @@ public Builder setFilter(java.lang.String value) {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -1087,7 +1107,9 @@ public Builder clearFilter() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -1104,7 +1126,8 @@ public Builder clearFilter() {
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -1188,8 +1211,9 @@ public Builder clearPageSize() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1213,8 +1237,9 @@ public java.lang.String getPageToken() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1238,8 +1263,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1262,8 +1288,9 @@ public Builder setPageToken(java.lang.String value) {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1282,8 +1309,9 @@ public Builder clearPageToken() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
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..0cb25ca2515 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
@@ -69,7 +69,9 @@ public interface ListBackupOperationsRequestOrBuilder
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -86,7 +88,8 @@ public interface ListBackupOperationsRequestOrBuilder
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -112,7 +115,9 @@ public interface ListBackupOperationsRequestOrBuilder
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -129,7 +134,8 @@ public interface ListBackupOperationsRequestOrBuilder
* `(metadata.name:howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Returns operations where:
- * * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ * * The operation's metadata type is
+ * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
* * The backup name contains the string "howl".
* * The operation started before 2018-03-28T14:50:00Z.
* * The operation resulted in an error.
@@ -161,8 +167,9 @@ public interface ListBackupOperationsRequestOrBuilder
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -176,8 +183,9 @@ public interface ListBackupOperationsRequestOrBuilder
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- * from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
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 a615824bb26..b662c169389 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
@@ -137,11 +137,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -158,11 +158,11 @@ public java.util.List getOperationsList() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -180,11 +180,11 @@ public java.util.List getOperationsList() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -201,11 +201,11 @@ public int getOperationsCount() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -222,11 +222,11 @@ public com.google.longrunning.Operation getOperations(int index) {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -697,11 +697,11 @@ private void ensureOperationsIsMutable() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -721,11 +721,11 @@ public java.util.List getOperationsList() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -745,11 +745,11 @@ public int getOperationsCount() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -769,11 +769,11 @@ public com.google.longrunning.Operation getOperations(int index) {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -799,11 +799,11 @@ public Builder setOperations(int index, com.google.longrunning.Operation value)
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -827,11 +827,11 @@ public Builder setOperations(
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -857,11 +857,11 @@ public Builder addOperations(com.google.longrunning.Operation value) {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -887,11 +887,11 @@ public Builder addOperations(int index, com.google.longrunning.Operation value)
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -914,11 +914,11 @@ public Builder addOperations(com.google.longrunning.Operation.Builder builderFor
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -942,11 +942,11 @@ public Builder addOperations(
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -970,11 +970,11 @@ public Builder addAllOperations(
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -997,11 +997,11 @@ public Builder clearOperations() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -1024,11 +1024,11 @@ public Builder removeOperations(int index) {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -1044,11 +1044,11 @@ public com.google.longrunning.Operation.Builder getOperationsBuilder(int index)
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -1068,11 +1068,11 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -1093,11 +1093,11 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -1114,11 +1114,11 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder() {
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -1135,11 +1135,11 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index)
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
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..cdead6be79a 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
@@ -31,11 +31,11 @@ public interface ListBackupOperationsResponseOrBuilder
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -49,11 +49,11 @@ public interface ListBackupOperationsResponseOrBuilder
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -67,11 +67,11 @@ public interface ListBackupOperationsResponseOrBuilder
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -85,11 +85,11 @@ public interface ListBackupOperationsResponseOrBuilder
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
@@ -103,11 +103,11 @@ public interface ListBackupOperationsResponseOrBuilder
* 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
- * `operation.metadata.value.progress.start_time` in descending order starting
- * from the most recently started operation.
+ * [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 `operation.metadata.value.progress.start_time` in descending
+ * order starting from the most recently started operation.
*
*
* repeated .google.longrunning.Operation operations = 1;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java
index 9ec5b03ed7a..363ab756672 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
+ * The request for
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListBackupsRequest}
@@ -199,12 +200,15 @@ public com.google.protobuf.ByteString getParentBytes() {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -249,12 +253,15 @@ public java.lang.String getFilter() {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -316,9 +323,10 @@ public int getPageSize() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -342,9 +350,10 @@ public java.lang.String getPageToken() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -555,7 +564,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
+ * The request for
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListBackupsRequest}
@@ -862,12 +872,15 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -911,12 +924,15 @@ public java.lang.String getFilter() {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -960,12 +976,15 @@ public com.google.protobuf.ByteString getFilterBytes() {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -1008,12 +1027,15 @@ public Builder setFilter(java.lang.String value) {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -1052,12 +1074,15 @@ public Builder clearFilter() {
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -1153,9 +1178,10 @@ public Builder clearPageSize() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1178,9 +1204,10 @@ public java.lang.String getPageToken() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1203,9 +1230,10 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1227,9 +1255,10 @@ public Builder setPageToken(java.lang.String value) {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1247,9 +1276,10 @@ public Builder clearPageToken() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java
index a31254101d2..7fb2a3dc449 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java
@@ -64,12 +64,15 @@ public interface ListBackupsRequestOrBuilder
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -103,12 +106,15 @@ public interface ListBackupsRequestOrBuilder
* The value must be a string, a number, or a boolean. The comparison operator
* must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
* Colon `:` is the contains operator. Filter rules are not case sensitive.
- * The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ * The following fields in the
+ * [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ * filtering:
* * `name`
* * `database`
* * `state`
- * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
* * `size_bytes`
* You can combine multiple expressions by enclosing each expression in
* parentheses. By default, expressions are combined with AND logic, but
@@ -152,9 +158,10 @@ public interface ListBackupsRequestOrBuilder
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -167,9 +174,10 @@ public interface ListBackupsRequestOrBuilder
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- * previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- * `filter`.
+ * [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ * from a previous
+ * [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java
index 8e0b6a12ac3..e0e5169d72f 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java
@@ -22,7 +22,8 @@
*
*
*
- * The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
+ * The response for
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListBackupsResponse}
@@ -208,8 +209,8 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupsOrBuilder(
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -233,8 +234,8 @@ public java.lang.String getNextPageToken() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -429,7 +430,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
+ * The response for
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListBackupsResponse}
@@ -1004,8 +1006,8 @@ public com.google.spanner.admin.database.v1.Backup.Builder addBackupsBuilder(int
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -1028,8 +1030,8 @@ public java.lang.String getNextPageToken() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -1052,8 +1054,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -1075,8 +1077,8 @@ public Builder setNextPageToken(java.lang.String value) {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -1094,8 +1096,8 @@ public Builder clearNextPageToken() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java
index fe5c302a0e8..2b4e7936db0 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java
@@ -85,8 +85,8 @@ public interface ListBackupsResponseOrBuilder
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
@@ -99,8 +99,8 @@ public interface ListBackupsResponseOrBuilder
*
*
* `next_page_token` can be sent in a subsequent
- * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- * of the matching backups.
+ * [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ * call to fetch more of the matching backups.
*
*
* string next_page_token = 2;
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 d59caa1f7de..0f3bb37ecef 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
@@ -205,7 +205,9 @@ public com.google.protobuf.ByteString getParentBytes() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -222,7 +224,8 @@ public com.google.protobuf.ByteString getParentBytes() {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -261,7 +264,9 @@ public java.lang.String getFilter() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -278,7 +283,8 @@ public java.lang.String getFilter() {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -330,8 +336,9 @@ public int getPageSize() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -356,8 +363,9 @@ public java.lang.String getPageToken() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -889,7 +897,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -906,7 +916,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -944,7 +955,9 @@ public java.lang.String getFilter() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -961,7 +974,8 @@ public java.lang.String getFilter() {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -999,7 +1013,9 @@ public com.google.protobuf.ByteString getFilterBytes() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -1016,7 +1032,8 @@ public com.google.protobuf.ByteString getFilterBytes() {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -1053,7 +1070,9 @@ public Builder setFilter(java.lang.String value) {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -1070,7 +1089,8 @@ public Builder setFilter(java.lang.String value) {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -1103,7 +1123,9 @@ public Builder clearFilter() {
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -1120,7 +1142,8 @@ public Builder clearFilter() {
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -1206,8 +1229,9 @@ public Builder clearPageSize() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1231,8 +1255,9 @@ public java.lang.String getPageToken() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1256,8 +1281,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1280,8 +1306,9 @@ public Builder setPageToken(java.lang.String value) {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -1300,8 +1327,9 @@ public Builder clearPageToken() {
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
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..b1ca680d448 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
@@ -69,7 +69,9 @@ public interface ListDatabaseOperationsRequestOrBuilder
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -86,7 +88,8 @@ public interface ListDatabaseOperationsRequestOrBuilder
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -114,7 +117,9 @@ public interface ListDatabaseOperationsRequestOrBuilder
* * `name` - The name of the long-running operation
* * `done` - False if the operation is in progress, else true.
* * `metadata.@type` - the type of metadata. For example, the type string
- * for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ * 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.
* * `error` - Error associated with the long-running operation.
@@ -131,7 +136,8 @@ public interface ListDatabaseOperationsRequestOrBuilder
* `(metadata.name:restored_howl) AND` \
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
* `(error:*)` - Return operations where:
- * * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ * * The operation's metadata type is
+ * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
* * The database is restored from a backup.
* * The backup name contains "backup_howl".
* * The restored database's name contains "restored_howl".
@@ -165,8 +171,9 @@ public interface ListDatabaseOperationsRequestOrBuilder
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
@@ -180,8 +187,9 @@ public interface ListDatabaseOperationsRequestOrBuilder
*
* If non-empty, `page_token` should contain a
* [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- * from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- * same `parent` and with the same `filter`.
+ * from a previous
+ * [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ * to the same `parent` and with the same `filter`.
*
*
* string page_token = 4;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java
index 8c7bf427c46..a4f2d95e564 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+ * The request for
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesRequest}
@@ -205,8 +206,9 @@ public int getPageSize() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -230,8 +232,9 @@ public java.lang.String getPageToken() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -433,7 +436,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+ * The request for
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesRequest}
@@ -783,8 +787,9 @@ public Builder clearPageSize() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -807,8 +812,9 @@ public java.lang.String getPageToken() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -831,8 +837,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -854,8 +861,9 @@ public Builder setPageToken(java.lang.String value) {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -873,8 +881,9 @@ public Builder clearPageToken() {
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java
index 89cfe991ec2..07ece05c55d 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java
@@ -73,8 +73,9 @@ public interface ListDatabasesRequestOrBuilder
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
@@ -87,8 +88,9 @@ public interface ListDatabasesRequestOrBuilder
*
*
* If non-empty, `page_token` should contain a
- * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- * previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ * [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ * from a previous
+ * [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
*
*
* string page_token = 4;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java
index b96d13481b2..84eaf1a8d12 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java
@@ -22,7 +22,8 @@
*
*
*
- * The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+ * The response for
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesResponse}
@@ -204,8 +205,8 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabasesOrBuil
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -229,8 +230,8 @@ public java.lang.String getNextPageToken() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -425,7 +426,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+ * The response for
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesResponse}
@@ -984,8 +986,8 @@ public com.google.spanner.admin.database.v1.Database.Builder addDatabasesBuilder
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -1008,8 +1010,8 @@ public java.lang.String getNextPageToken() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -1032,8 +1034,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -1055,8 +1057,8 @@ public Builder setNextPageToken(java.lang.String value) {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -1074,8 +1076,8 @@ public Builder clearNextPageToken() {
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java
index e6b6facc0bb..7fdefde15d2 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java
@@ -80,8 +80,8 @@ public interface ListDatabasesResponseOrBuilder
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
@@ -94,8 +94,8 @@ public interface ListDatabasesResponseOrBuilder
*
*
* `next_page_token` can be sent in a subsequent
- * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- * of the matching databases.
+ * [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ * call to fetch more of the matching databases.
*
*
* string next_page_token = 2;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java
new file mode 100644
index 00000000000..ab45840391d
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java
@@ -0,0 +1,1060 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/spanner/admin/database/v1/spanner_database_admin.proto
+
+package com.google.spanner.admin.database.v1;
+
+/**
+ *
+ *
+ *
+ * Encryption configuration for the restored database.
+ *
+ *
+ * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig}
+ */
+public final class RestoreDatabaseEncryptionConfig extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig)
+ RestoreDatabaseEncryptionConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use RestoreDatabaseEncryptionConfig.newBuilder() to construct.
+ private RestoreDatabaseEncryptionConfig(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private RestoreDatabaseEncryptionConfig() {
+ encryptionType_ = 0;
+ kmsKeyName_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new RestoreDatabaseEncryptionConfig();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private RestoreDatabaseEncryptionConfig(
+ 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.SpannerDatabaseAdminProto
+ .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto
+ .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.class,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Encryption types for the database to be restored.
+ *
+ *
+ * Protobuf enum {@code
+ * google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 when
+ * [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig]
+ * is not specified.
+ *
+ *
+ * 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
+ * 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 when
+ * [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig]
+ * is not specified.
+ *
+ *
+ * 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
+ * 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.RestoreDatabaseEncryptionConfig.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.RestoreDatabaseEncryptionConfig.EncryptionType)
+ }
+
+ public static final int ENCRYPTION_TYPE_FIELD_NUMBER = 1;
+ private int encryptionType_;
+ /**
+ *
+ *
+ *
+ * Required. The encryption type of the restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The encryptionType.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType
+ getEncryptionType() {
+ @SuppressWarnings("deprecation")
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType result =
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType.valueOf(
+ encryptionType_);
+ return result == null
+ ? com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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.RestoreDatabaseEncryptionConfig.EncryptionType
+ .ENCRYPTION_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, encryptionType_);
+ }
+ if (!getKmsKeyNameBytes().isEmpty()) {
+ 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.RestoreDatabaseEncryptionConfig.EncryptionType
+ .ENCRYPTION_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encryptionType_);
+ }
+ if (!getKmsKeyNameBytes().isEmpty()) {
+ 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.RestoreDatabaseEncryptionConfig)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig other =
+ (com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig) 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.RestoreDatabaseEncryptionConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig
+ 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.RestoreDatabaseEncryptionConfig
+ 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.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig 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.RestoreDatabaseEncryptionConfig 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 restored database.
+ *
+ *
+ * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig)
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto
+ .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto
+ .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.class,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder.class);
+ }
+
+ // Construct using
+ // com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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.SpannerDatabaseAdminProto
+ .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ getDefaultInstanceForType() {
+ return com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig build() {
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig buildPartial() {
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig result =
+ new com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig(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.RestoreDatabaseEncryptionConfig) {
+ return mergeFrom(
+ (com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig other) {
+ if (other
+ == com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ .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.RestoreDatabaseEncryptionConfig parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage =
+ (com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig)
+ e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int encryptionType_ = 0;
+ /**
+ *
+ *
+ *
+ * Required. The encryption type of the restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The encryptionType.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType
+ getEncryptionType() {
+ @SuppressWarnings("deprecation")
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType result =
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType
+ .valueOf(encryptionType_);
+ return result == null
+ ? com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType
+ .UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The encryption type of the restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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.RestoreDatabaseEncryptionConfig.EncryptionType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ encryptionType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The encryption type of the restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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.RestoreDatabaseEncryptionConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig)
+ private static final com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig();
+ }
+
+ public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public RestoreDatabaseEncryptionConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new RestoreDatabaseEncryptionConfig(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.RestoreDatabaseEncryptionConfig
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java
new file mode 100644
index 00000000000..1ee5ae2a06c
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.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/spanner_database_admin.proto
+
+package com.google.spanner.admin.database.v1;
+
+public interface RestoreDatabaseEncryptionConfigOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. The encryption type of the restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 restored database.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The encryptionType.
+ */
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType
+ getEncryptionType();
+
+ /**
+ *
+ *
+ *
+ * Optional. The Cloud KMS key that will be used to encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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 encrypt/decrypt the
+ * restored database. This field should be set only when
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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/RestoreDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java
index 8a849d56711..64b9316588f 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java
@@ -429,7 +429,8 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -454,7 +455,8 @@ public boolean hasCancelTime() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -479,7 +481,8 @@ public com.google.protobuf.Timestamp getCancelTime() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -502,10 +505,10 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -535,10 +538,10 @@ public java.lang.String getOptimizeDatabaseOperationName() {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -1664,7 +1667,8 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1688,7 +1692,8 @@ public boolean hasCancelTime() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1718,7 +1723,8 @@ public com.google.protobuf.Timestamp getCancelTime() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1750,7 +1756,8 @@ public Builder setCancelTime(com.google.protobuf.Timestamp value) {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1779,7 +1786,8 @@ public Builder setCancelTime(com.google.protobuf.Timestamp.Builder builderForVal
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1813,7 +1821,8 @@ public Builder mergeCancelTime(com.google.protobuf.Timestamp value) {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1843,7 +1852,8 @@ public Builder clearCancelTime() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1867,7 +1877,8 @@ public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1895,7 +1906,8 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() {
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -1929,10 +1941,10 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -1961,10 +1973,10 @@ public java.lang.String getOptimizeDatabaseOperationName() {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -1993,10 +2005,10 @@ public com.google.protobuf.ByteString getOptimizeDatabaseOperationNameBytes() {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -2024,10 +2036,10 @@ public Builder setOptimizeDatabaseOperationName(java.lang.String value) {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -2051,10 +2063,10 @@ public Builder clearOptimizeDatabaseOperationName() {
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java
index 35ad6d76e9d..4659104599a 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java
@@ -163,7 +163,8 @@ public interface RestoreDatabaseMetadataOrBuilder
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -185,7 +186,8 @@ public interface RestoreDatabaseMetadataOrBuilder
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -207,7 +209,8 @@ public interface RestoreDatabaseMetadataOrBuilder
* 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
*
* .google.protobuf.Timestamp cancel_time = 5;
@@ -225,10 +228,10 @@ public interface RestoreDatabaseMetadataOrBuilder
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
@@ -247,10 +250,10 @@ public interface RestoreDatabaseMetadataOrBuilder
* `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
* where the <database> is the name of database being created and restored to.
* The metadata type of the long-running operation is
- * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- * automatically created by the system after the RestoreDatabase long-running
- * operation completes successfully. This operation will not be created if the
- * restore was not successful.
+ * [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ * This long-running operation will be automatically created by the system
+ * after the RestoreDatabase long-running operation completes successfully.
+ * This operation will not be created if the restore was not successful.
*
*
* string optimize_database_operation_name = 6;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java
index ac2faaff1d6..8a336925731 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java
@@ -91,6 +91,24 @@ private RestoreDatabaseRequest(
java.lang.String s = input.readStringRequireUtf8();
sourceCase_ = 3;
source_ = s;
+ break;
+ }
+ case 34:
+ {
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder
+ subBuilder = null;
+ if (encryptionConfig_ != null) {
+ subBuilder = encryptionConfig_.toBuilder();
+ }
+ encryptionConfig_ =
+ input.readMessage(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(encryptionConfig_);
+ encryptionConfig_ = subBuilder.buildPartial();
+ }
+
break;
}
default:
@@ -288,6 +306,21 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() {
}
public static final int BACKUP_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ *
+ * Name of the backup from which to restore. Values are of the form
+ * `projects/<project>/instances/<instance>/backups/<backup>`.
+ *
+ *
+ * string backup = 3 [(.google.api.resource_reference) = { ... }
+ *
+ * @return Whether the backup field is set.
+ */
+ public boolean hasBackup() {
+ return sourceCase_ == 3;
+ }
/**
*
*
@@ -345,6 +378,77 @@ public com.google.protobuf.ByteString getBackupBytes() {
}
}
+ public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 4;
+ private com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryptionConfig_;
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasEncryptionConfig() {
+ return encryptionConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ getEncryptionConfig() {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.getDefaultInstance()
+ : encryptionConfig_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ return getEncryptionConfig();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -368,6 +472,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (sourceCase_ == 3) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_);
}
+ if (encryptionConfig_ != null) {
+ output.writeMessage(4, getEncryptionConfig());
+ }
unknownFields.writeTo(output);
}
@@ -386,6 +493,9 @@ public int getSerializedSize() {
if (sourceCase_ == 3) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_);
}
+ if (encryptionConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionConfig());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -404,6 +514,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getParent().equals(other.getParent())) return false;
if (!getDatabaseId().equals(other.getDatabaseId())) return false;
+ if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false;
+ if (hasEncryptionConfig()) {
+ if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false;
+ }
if (!getSourceCase().equals(other.getSourceCase())) return false;
switch (sourceCase_) {
case 3:
@@ -427,6 +541,10 @@ public int hashCode() {
hash = (53 * hash) + getParent().hashCode();
hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER;
hash = (53 * hash) + getDatabaseId().hashCode();
+ if (hasEncryptionConfig()) {
+ hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getEncryptionConfig().hashCode();
+ }
switch (sourceCase_) {
case 3:
hash = (37 * hash) + BACKUP_FIELD_NUMBER;
@@ -586,6 +704,12 @@ public Builder clear() {
databaseId_ = "";
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = null;
+ } else {
+ encryptionConfig_ = null;
+ encryptionConfigBuilder_ = null;
+ }
sourceCase_ = 0;
source_ = null;
return this;
@@ -620,6 +744,11 @@ public com.google.spanner.admin.database.v1.RestoreDatabaseRequest buildPartial(
if (sourceCase_ == 3) {
result.source_ = source_;
}
+ if (encryptionConfigBuilder_ == null) {
+ result.encryptionConfig_ = encryptionConfig_;
+ } else {
+ result.encryptionConfig_ = encryptionConfigBuilder_.build();
+ }
result.sourceCase_ = sourceCase_;
onBuilt();
return result;
@@ -679,6 +808,9 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.RestoreDatabaseReq
databaseId_ = other.databaseId_;
onChanged();
}
+ if (other.hasEncryptionConfig()) {
+ mergeEncryptionConfig(other.getEncryptionConfig());
+ }
switch (other.getSourceCase()) {
case BACKUP:
{
@@ -993,6 +1125,22 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) {
return this;
}
+ /**
+ *
+ *
+ *
+ * Name of the backup from which to restore. Values are of the form
+ * `projects/<project>/instances/<instance>/backups/<backup>`.
+ *
+ *
+ * string backup = 3 [(.google.api.resource_reference) = { ... }
+ *
+ * @return Whether the backup field is set.
+ */
+ @java.lang.Override
+ public boolean hasBackup() {
+ return sourceCase_ == 3;
+ }
/**
*
*
@@ -1117,6 +1265,264 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryptionConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder>
+ encryptionConfigBuilder_;
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ public boolean hasEncryptionConfig() {
+ return encryptionConfigBuilder_ != null || encryptionConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ getEncryptionConfig() {
+ if (encryptionConfigBuilder_ == null) {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ .getDefaultInstance()
+ : encryptionConfig_;
+ } else {
+ return encryptionConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ encryptionConfig_ = value;
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setEncryptionConfig(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder
+ builderForValue) {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeEncryptionConfig(
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig value) {
+ if (encryptionConfigBuilder_ == null) {
+ if (encryptionConfig_ != null) {
+ encryptionConfig_ =
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.newBuilder(
+ encryptionConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ encryptionConfig_ = value;
+ }
+ onChanged();
+ } else {
+ encryptionConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearEncryptionConfig() {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfig_ = null;
+ onChanged();
+ } else {
+ encryptionConfig_ = null;
+ encryptionConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder
+ getEncryptionConfigBuilder() {
+
+ onChanged();
+ return getEncryptionConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder() {
+ if (encryptionConfigBuilder_ != null) {
+ return encryptionConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return encryptionConfig_ == null
+ ? com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
+ .getDefaultInstance()
+ : encryptionConfig_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder>
+ getEncryptionConfigFieldBuilder() {
+ if (encryptionConfigBuilder_ == null) {
+ encryptionConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder,
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder>(
+ getEncryptionConfig(), getParentForChildren(), isClean());
+ encryptionConfig_ = null;
+ }
+ return encryptionConfigBuilder_;
+ }
+
@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/RestoreDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java
index 98e6ad0e617..dc65c13f5c2 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java
@@ -91,6 +91,19 @@ public interface RestoreDatabaseRequestOrBuilder
*/
com.google.protobuf.ByteString getDatabaseIdBytes();
+ /**
+ *
+ *
+ *
+ * Name of the backup from which to restore. Values are of the form
+ * `projects/<project>/instances/<instance>/backups/<backup>`.
+ *
+ *
+ * string backup = 3 [(.google.api.resource_reference) = { ... }
+ *
+ * @return Whether the backup field is set.
+ */
+ boolean hasBackup();
/**
*
*
@@ -118,5 +131,62 @@ public interface RestoreDatabaseRequestOrBuilder
*/
com.google.protobuf.ByteString getBackupBytes();
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the encryptionConfig field is set.
+ */
+ boolean hasEncryptionConfig();
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The encryptionConfig.
+ */
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig getEncryptionConfig();
+ /**
+ *
+ *
+ *
+ * Optional. An encryption configuration describing the encryption type and
+ * key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ * to. If this field is not specified, the restored database will use the same
+ * encryption configuration as the backup by default, namely
+ * [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ * = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ *
+ *
+ *
+ * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder
+ getEncryptionConfigOrBuilder();
+
public com.google.spanner.admin.database.v1.RestoreDatabaseRequest.SourceCase getSourceCase();
}
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 7b981be4f45..09b1b2d0155 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
@@ -87,6 +87,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -120,181 +124,199 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "admin.database.v1.RestoreSourceType\022C\n\013b"
+ "ackup_info\030\002 \001(\0132,.google.spanner.admin."
+ "database.v1.BackupInfoH\000B\r\n\013source_info\""
- + "\375\003\n\010Database\022\021\n\004name\030\001 \001(\tB\003\340A\002\022D\n\005state"
+ + "\241\005\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\022%\n\030version"
- + "_retention_period\030\006 \001(\tB\003\340A\003\022>\n\025earliest"
- + "_version_time\030\007 \001(\0132\032.google.protobuf.Ti"
- + "mestampB\003\340A\003\"M\n\005State\022\025\n\021STATE_UNSPECIFI"
- + "ED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\024\n\020READY_O"
- + "PTIMIZING\020\003:b\352A_\n\037spanner.googleapis.com"
- + "/Database\022\202\323\344\223\002/\022-/v1/{parent=proj"
- + "ects/*/instances/*}/databases\332A\006parent\022\244"
- + "\002\n\016CreateDatabase\0227.google.spanner.admin"
- + ".database.v1.CreateDatabaseRequest\032\035.goo"
- + "gle.longrunning.Operation\"\271\001\202\323\344\223\0022\"-/v1/"
- + "{parent=projects/*/instances/*}/database"
- + "s:\001*\332A\027parent,create_statement\312Ad\n)googl"
- + "e.spanner.admin.database.v1.Database\0227go"
- + "ogle.spanner.admin.database.v1.CreateDat"
- + "abaseMetadata\022\255\001\n\013GetDatabase\0224.google.s"
- + "panner.admin.database.v1.GetDatabaseRequ"
- + "est\032*.google.spanner.admin.database.v1.D"
- + "atabase\"<\202\323\344\223\002/\022-/v1/{name=projects/*/in"
- + "stances/*/databases/*}\332A\004name\022\235\002\n\021Update"
- + "DatabaseDdl\022:.google.spanner.admin.datab"
- + "ase.v1.UpdateDatabaseDdlRequest\032\035.google"
- + ".longrunning.Operation\"\254\001\202\323\344\223\002:25/v1/{da"
- + "tabase=projects/*/instances/*/databases/"
- + "*}/ddl:\001*\332A\023database,statements\312AS\n\025goog"
- + "le.protobuf.Empty\022:google.spanner.admin."
- + "database.v1.UpdateDatabaseDdlMetadata\022\243\001"
- + "\n\014DropDatabase\0225.google.spanner.admin.da"
- + "tabase.v1.DropDatabaseRequest\032\026.google.p"
- + "rotobuf.Empty\"D\202\323\344\223\0023*1/v1/{database=pro"
- + "jects/*/instances/*/databases/*}\332A\010datab"
- + "ase\022\315\001\n\016GetDatabaseDdl\0227.google.spanner."
- + "admin.database.v1.GetDatabaseDdlRequest\032"
- + "8.google.spanner.admin.database.v1.GetDa"
- + "tabaseDdlResponse\"H\202\323\344\223\0027\0225/v1/{database"
- + "=projects/*/instances/*/databases/*}/ddl"
- + "\332A\010database\022\353\001\n\014SetIamPolicy\022\".google.ia"
- + "m.v1.SetIamPolicyRequest\032\025.google.iam.v1"
- + ".Policy\"\237\001\202\323\344\223\002\206\001\">/v1/{resource=project"
- + "s/*/instances/*/databases/*}:setIamPolic"
- + "y:\001*ZA\"/v1/{resource=projects/"
- + "*/instances/*/databases/*}:getIamPolicy:"
- + "\001*ZA\""
- + ".google.spanner.admin.database.v1.ListBa"
- + "ckupOperationsResponse\"E\202\323\344\223\0026\0224/v1/{par"
- + "ent=projects/*/instances/*}/backupOperat"
- + "ions\332A\006parent\032x\312A\026spanner.googleapis.com"
- + "\322A\\https://www.googleapis.com/auth/cloud"
- + "-platform,https://www.googleapis.com/aut"
- + "h/spanner.adminB\332\002\n$com.google.spanner.a"
- + "dmin.database.v1B\031SpannerDatabaseAdminPr"
- + "otoP\001ZHgoogle.golang.org/genproto/google"
- + "apis/spanner/admin/database/v1;database\252"
- + "\002&Google.Cloud.Spanner.Admin.Database.V1"
- + "\312\002&Google\\Cloud\\Spanner\\Admin\\Database\\V"
- + "1\352\002+Google::Cloud::Spanner::Admin::Datab"
- + "ase::V1\352AJ\n\037spanner.googleapis.com/Insta"
- + "nce\022\'projects/{project}/instances/{insta"
- + "nce}b\006proto3"
+ + ".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\"M\n\005State\022\025\n\021STATE_UNSPE"
+ + "CIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\024\n\020REA"
+ + "DY_OPTIMIZING\020\003:b\352A_\n\037spanner.googleapis"
+ + ".com/Database\022\202\323\344\223\002/\022-/v1/{parent=pro"
+ + "jects/*/instances/*}/databases\332A\006parent\022"
+ + "\244\002\n\016CreateDatabase\0227.google.spanner.admi"
+ + "n.database.v1.CreateDatabaseRequest\032\035.go"
+ + "ogle.longrunning.Operation\"\271\001\202\323\344\223\0022\"-/v1"
+ + "/{parent=projects/*/instances/*}/databas"
+ + "es:\001*\332A\027parent,create_statement\312Ad\n)goog"
+ + "le.spanner.admin.database.v1.Database\0227g"
+ + "oogle.spanner.admin.database.v1.CreateDa"
+ + "tabaseMetadata\022\255\001\n\013GetDatabase\0224.google."
+ + "spanner.admin.database.v1.GetDatabaseReq"
+ + "uest\032*.google.spanner.admin.database.v1."
+ + "Database\"<\202\323\344\223\002/\022-/v1/{name=projects/*/i"
+ + "nstances/*/databases/*}\332A\004name\022\235\002\n\021Updat"
+ + "eDatabaseDdl\022:.google.spanner.admin.data"
+ + "base.v1.UpdateDatabaseDdlRequest\032\035.googl"
+ + "e.longrunning.Operation\"\254\001\202\323\344\223\002:25/v1/{d"
+ + "atabase=projects/*/instances/*/databases"
+ + "/*}/ddl:\001*\332A\023database,statements\312AS\n\025goo"
+ + "gle.protobuf.Empty\022:google.spanner.admin"
+ + ".database.v1.UpdateDatabaseDdlMetadata\022\243"
+ + "\001\n\014DropDatabase\0225.google.spanner.admin.d"
+ + "atabase.v1.DropDatabaseRequest\032\026.google."
+ + "protobuf.Empty\"D\202\323\344\223\0023*1/v1/{database=pr"
+ + "ojects/*/instances/*/databases/*}\332A\010data"
+ + "base\022\315\001\n\016GetDatabaseDdl\0227.google.spanner"
+ + ".admin.database.v1.GetDatabaseDdlRequest"
+ + "\0328.google.spanner.admin.database.v1.GetD"
+ + "atabaseDdlResponse\"H\202\323\344\223\0027\0225/v1/{databas"
+ + "e=projects/*/instances/*/databases/*}/dd"
+ + "l\332A\010database\022\353\001\n\014SetIamPolicy\022\".google.i"
+ + "am.v1.SetIamPolicyRequest\032\025.google.iam.v"
+ + "1.Policy\"\237\001\202\323\344\223\002\206\001\">/v1/{resource=projec"
+ + "ts/*/instances/*/databases/*}:setIamPoli"
+ + "cy:\001*ZA\"/v1/{resource=projects"
+ + "/*/instances/*/databases/*}:getIamPolicy"
+ + ":\001*ZA\".google.spanner.admin.database.v1.ListB"
+ + "ackupOperationsResponse\"E\202\323\344\223\0026\0224/v1/{pa"
+ + "rent=projects/*/instances/*}/backupOpera"
+ + "tions\332A\006parent\032x\312A\026spanner.googleapis.co"
+ + "m\322A\\https://www.googleapis.com/auth/clou"
+ + "d-platform,https://www.googleapis.com/au"
+ + "th/spanner.adminB\332\002\n$com.google.spanner."
+ + "admin.database.v1B\031SpannerDatabaseAdminP"
+ + "rotoP\001ZHgoogle.golang.org/genproto/googl"
+ + "eapis/spanner/admin/database/v1;database"
+ + "\252\002&Google.Cloud.Spanner.Admin.Database.V"
+ + "1\312\002&Google\\Cloud\\Spanner\\Admin\\Database\\"
+ + "V1\352\002+Google::Cloud::Spanner::Admin::Data"
+ + "base::V1\352AJ\n\037spanner.googleapis.com/Inst"
+ + "ance\022\'projects/{project}/instances/{inst"
+ + "ance}b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -330,6 +352,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"State",
"CreateTime",
"RestoreInfo",
+ "EncryptionConfig",
+ "EncryptionInfo",
"VersionRetentionPeriod",
"EarliestVersionTime",
});
@@ -355,7 +379,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_descriptor,
new java.lang.String[] {
- "Parent", "CreateStatement", "ExtraStatements",
+ "Parent", "CreateStatement", "ExtraStatements", "EncryptionConfig",
});
internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_descriptor =
getDescriptor().getMessageTypes().get(5);
@@ -435,10 +459,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_descriptor,
new java.lang.String[] {
- "Parent", "DatabaseId", "Backup", "Source",
+ "Parent", "DatabaseId", "Backup", "EncryptionConfig", "Source",
});
- internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor =
+ internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor =
getDescriptor().getMessageTypes().get(15);
+ internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor,
+ new java.lang.String[] {
+ "EncryptionType", "KmsKeyName",
+ });
+ internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor =
+ getDescriptor().getMessageTypes().get(16);
internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor,
@@ -452,7 +484,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"SourceInfo",
});
internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_descriptor =
- getDescriptor().getMessageTypes().get(16);
+ getDescriptor().getMessageTypes().get(17);
internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_descriptor,
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java
index 6eb84dbaf82..4771b6f3367 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java
@@ -22,7 +22,8 @@
*
*
*
- * The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].
+ * The request for
+ * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.UpdateBackupRequest}
@@ -440,7 +441,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
*
- * The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].
+ * The request for
+ * [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].
*
*
* Protobuf type {@code google.spanner.admin.database.v1.UpdateBackupRequest}
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java
index d4b1adc70f9..8f9214becfd 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java
@@ -35,8 +35,8 @@
* Each batch of statements is assigned a name which can be used with
* the [Operations][google.longrunning.Operations] API to monitor
* progress. See the
- * [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
- * details.
+ * [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id]
+ * field for more details.
*
*
* Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseDdlRequest}
@@ -274,17 +274,19 @@ public com.google.protobuf.ByteString getStatementsBytes(int index) {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -313,17 +315,19 @@ public java.lang.String getOperationId() {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -545,8 +549,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* Each batch of statements is assigned a name which can be used with
* the [Operations][google.longrunning.Operations] API to monitor
* progress. See the
- * [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
- * details.
+ * [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id]
+ * field for more details.
*
*
* Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseDdlRequest}
@@ -1026,17 +1030,19 @@ public Builder addStatementsBytes(com.google.protobuf.ByteString value) {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -1064,17 +1070,19 @@ public java.lang.String getOperationId() {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -1102,17 +1110,19 @@ public com.google.protobuf.ByteString getOperationIdBytes() {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -1139,17 +1149,19 @@ public Builder setOperationId(java.lang.String value) {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -1172,17 +1184,19 @@ public Builder clearOperationId() {
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java
index cad7c3a28a2..1519dd8d710 100644
--- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java
@@ -113,17 +113,19 @@ public interface UpdateDatabaseDdlRequestOrBuilder
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
@@ -141,17 +143,19 @@ public interface UpdateDatabaseDdlRequestOrBuilder
* [Operation][google.longrunning.Operation].
* Specifying an explicit operation ID simplifies determining
* whether the statements were executed in the event that the
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- * or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- * `operation_id` fields can be combined to form the
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * call is replayed, or the return value is otherwise lost: the
+ * [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ * and `operation_id` fields can be combined to form the
* [name][google.longrunning.Operation.name] of the resulting
- * [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
+ * [longrunning.Operation][google.longrunning.Operation]:
+ * `<database>/operations/<operation_id>`.
* `operation_id` should be unique within the database, and must be
* a valid identifier: `[a-z][a-z0-9_]*`. Note that
* automatically-generated operation IDs always begin with an
* underscore. If the named operation already exists,
- * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- * `ALREADY_EXISTS`.
+ * [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ * returns `ALREADY_EXISTS`.
*
*
* string operation_id = 3;
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 a677207f729..31fdb5326cf 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 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/spanner/admin/database/v1/common.proto";
-import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
option go_package = "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database";
@@ -52,14 +51,14 @@ message Backup {
READY = 2;
}
- // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
- // Name of the database from which this backup was
- // created. This needs to be in the same instance as the backup.
- // Values are of the form
+ // Required for the
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // operation. Name of the database from which this backup was created. This
+ // needs to be in the same instance as the backup. Values are of the form
// `projects//instances//databases/`.
string database = 2 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
// The backup will contain an externally consistent copy of the database at
// the timestamp specified by `version_time`. If `version_time` is not
@@ -67,7 +66,8 @@ message Backup {
// backup.
google.protobuf.Timestamp version_time = 9;
- // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // Required for the
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
// operation. The expiration time of the backup, with microseconds
// granularity that must be at least 6 hours and at most 366 days
// from the time the CreateBackup request is processed. Once the `expire_time`
@@ -75,8 +75,11 @@ message Backup {
// Spanner to free the resources used by the backup.
google.protobuf.Timestamp expire_time = 3;
- // Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
- // Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation.
+ // Output only for the
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // operation. Required for the
+ // [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]
+ // operation.
//
// A globally unique identifier for the backup which cannot be
// changed. Values are of the form
@@ -90,10 +93,12 @@ message Backup {
// `projects//instances/`.
string name = 1;
- // Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // Output only. The time the
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
// request is received. If the request does not specify `version_time`, the
// `version_time` of the backup will be equivalent to the `create_time`.
- google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp create_time = 4
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Size of the backup in bytes.
int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -108,10 +113,20 @@ message Backup {
// any referencing database prevents the backup from being deleted. When a
// restored database from the backup enters the `READY` state, the reference
// to the backup is removed.
- repeated string referencing_databases = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+ repeated string referencing_databases = 7 [
+ (google.api.field_behavior) = OUTPUT_ONLY,
+ (google.api.resource_reference) = {
+ type: "spanner.googleapis.com/Database"
+ }
+ ];
+
+ // Output only. The encryption information for the backup.
+ EncryptionInfo encryption_info = 8
+ [(google.api.field_behavior) = OUTPUT_ONLY];
}
-// The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
+// The request for
+// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
message CreateBackupRequest {
// Required. The name of the instance in which the backup will be
// created. This must be the same instance that contains the database the
@@ -133,23 +148,32 @@ message CreateBackupRequest {
// Required. The backup to create.
Backup backup = 3 [(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 database by default, namely
+ // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
+ // = `USE_DATABASE_ENCRYPTION`.
+ CreateBackupEncryptionConfig encryption_config = 4
+ [(google.api.field_behavior) = OPTIONAL];
}
// Metadata type for the operation returned by
// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
message CreateBackupMetadata {
// The name of the backup being created.
- string name = 1 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Backup"
- }];
+ string name = 1 [
+ (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
+ ];
// The name of the database the backup is created from.
string database = 2 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
// The progress of the
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // operation.
OperationProgress progress = 3;
// The time at which cancellation of this operation was received.
@@ -161,12 +185,14 @@ message CreateBackupMetadata {
// 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][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+ // 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].
+// 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
// as specified by `update_mask` are required. Other fields are ignored.
@@ -179,36 +205,36 @@ message UpdateBackupRequest {
// resource, not to the request message. The field mask must always be
// specified; this prevents any future fields from being erased accidentally
// by clients that do not know about them.
- google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+ google.protobuf.FieldMask update_mask = 2
+ [(google.api.field_behavior) = REQUIRED];
}
-// The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
+// The request for
+// [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
message GetBackupRequest {
// Required. Name of the backup.
// Values are of the form
// `projects//instances//backups/`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "spanner.googleapis.com/Backup"
- }
+ (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
];
}
-// The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
+// The request for
+// [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
message DeleteBackupRequest {
// Required. Name of the backup to delete.
// Values are of the form
// `projects//instances//backups/`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "spanner.googleapis.com/Backup"
- }
+ (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
];
}
-// The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
+// The request for
+// [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
message ListBackupsRequest {
// Required. The instance to list backups from. Values are of the
// form `projects//instances/`.
@@ -227,13 +253,16 @@ message ListBackupsRequest {
// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
// Colon `:` is the contains operator. Filter rules are not case sensitive.
//
- // The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
+ // The following fields in the
+ // [Backup][google.spanner.admin.database.v1.Backup] are eligible for
+ // filtering:
//
// * `name`
// * `database`
// * `state`
- // * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
- // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ // * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
+ // * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
// * `size_bytes`
//
// You can combine multiple expressions by enclosing each expression in
@@ -260,21 +289,23 @@ message ListBackupsRequest {
int32 page_size = 3;
// If non-empty, `page_token` should contain a
- // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
- // previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
- // `filter`.
+ // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
+ // from a previous
+ // [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
+ // to the same `parent` and with the same `filter`.
string page_token = 4;
}
-// The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
+// The response for
+// [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
message ListBackupsResponse {
// The list of matching backups. Backups returned are ordered by `create_time`
// in descending order, starting from the most recent `create_time`.
repeated Backup backups = 1;
// `next_page_token` can be sent in a subsequent
- // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
- // of the matching backups.
+ // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
+ // call to fetch more of the matching backups.
string next_page_token = 2;
}
@@ -304,7 +335,9 @@ message ListBackupOperationsRequest {
// * `name` - The name of the long-running operation
// * `done` - False if the operation is in progress, else true.
// * `metadata.@type` - the type of metadata. For example, the type string
- // for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
+ // for
+ // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]
+ // is
// `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
// * `metadata.` - any field in metadata.value.
// * `error` - Error associated with the long-running operation.
@@ -324,7 +357,8 @@ message ListBackupOperationsRequest {
// `(metadata.name:howl) AND` \
// `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
// `(error:*)` - Returns operations where:
- // * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ // * The operation's metadata type is
+ // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
// * The backup name contains the string "howl".
// * The operation started before 2018-03-28T14:50:00Z.
// * The operation resulted in an error.
@@ -336,8 +370,9 @@ message ListBackupOperationsRequest {
// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
- // from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
- // same `parent` and with the same `filter`.
+ // from a previous
+ // [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
+ // to the same `parent` and with the same `filter`.
string page_token = 4;
}
@@ -348,11 +383,11 @@ message ListBackupOperationsResponse {
// 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
- // `operation.metadata.value.progress.start_time` in descending order starting
- // from the most recently started operation.
+ // [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 `operation.metadata.value.progress.start_time` in descending
+ // order starting from the most recently started operation.
repeated google.longrunning.Operation operations = 1;
// `next_page_token` can be sent in a subsequent
@@ -364,23 +399,63 @@ message ListBackupOperationsResponse {
// Information about a backup.
message BackupInfo {
// Name of the backup.
- string backup = 1 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Backup"
- }];
+ string backup = 1 [
+ (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
+ ];
// The backup contains an externally consistent copy of `source_database` at
// the timestamp specified by `version_time`. If the
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify
- // `version_time`, the `version_time` of the backup is equivalent to the
- // `create_time`.
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // request did not specify `version_time`, the `version_time` of the backup is
+ // equivalent to the `create_time`.
google.protobuf.Timestamp version_time = 4;
- // The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was
- // received.
+ // The time the
+ // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
+ // request was received.
google.protobuf.Timestamp create_time = 2;
// Name of the database the backup was created from.
string source_database = 3 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
+}
+
+// Encryption configuration for the backup to create.
+message CreateBackupEncryptionConfig {
+ // Encryption types for the backup.
+ enum EncryptionType {
+ // Unspecified. Do not use.
+ ENCRYPTION_TYPE_UNSPECIFIED = 0;
+
+ // Use the same encryption configuration as the database. This is the
+ // default option when
+ // [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig]
+ // is empty. For example, if the database is using
+ // `Customer_Managed_Encryption`, the backup will be using the same Cloud
+ // KMS key as the database.
+ USE_DATABASE_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.CreateBackupEncryptionConfig.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 27ecb0a98b9..24d7c2d080a 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 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -17,8 +17,9 @@ syntax = "proto3";
package google.spanner.admin.database.v1;
import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
-import "google/api/annotations.proto";
+import "google/rpc/status.proto";
option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
option go_package = "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database";
@@ -27,6 +28,14 @@ option java_outer_classname = "CommonProto";
option java_package = "com.google.spanner.admin.database.v1";
option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1";
option ruby_package = "Google::Cloud::Spanner::Admin::Database::V1";
+option (google.api.resource_definition) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
+};
+option (google.api.resource_definition) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"
+};
// Encapsulates progress related information for a Cloud Spanner long
// running operation.
@@ -42,3 +51,50 @@ message OperationProgress {
// successfully.
google.protobuf.Timestamp end_time = 3;
}
+
+// Encryption configuration for a Cloud Spanner database.
+message EncryptionConfig {
+ // The Cloud KMS key to be used for encrypting and decrypting
+ // the database. Values are of the form
+ // `projects//locations//keyRings//cryptoKeys/`.
+ string kms_key_name = 2 [(google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }];
+}
+
+// Encryption information for a Cloud Spanner database or backup.
+message EncryptionInfo {
+ // Possible encryption types.
+ enum Type {
+ // Encryption type was not specified, though data at rest remains encrypted.
+ TYPE_UNSPECIFIED = 0;
+
+ // The data is encrypted at rest with a key that is
+ // fully managed by Google. No key version or status will be populated.
+ // This is the default state.
+ GOOGLE_DEFAULT_ENCRYPTION = 1;
+
+ // The data is encrypted at rest with a key that is
+ // managed by the customer. The active version of the key. `kms_key_version`
+ // will be populated, and `encryption_status` may be populated.
+ CUSTOMER_MANAGED_ENCRYPTION = 2;
+ }
+
+ // Output only. The type of encryption.
+ Type encryption_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. If present, the status of a recent encrypt/decrypt call on
+ // underlying data for this database or backup. Regardless of status, data is
+ // always encrypted at rest.
+ google.rpc.Status encryption_status = 4
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. A Cloud KMS key version that is being used to protect the
+ // database or backup.
+ string kms_key_version = 2 [
+ (google.api.field_behavior) = OUTPUT_ONLY,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+}
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 12e751bd672..ac771bc061d 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 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -65,10 +65,11 @@ service DatabaseAdmin {
// have a name of the format `/operations/` and
// can be used to track preparation of the database. The
// [metadata][google.longrunning.Operation.metadata] field type is
- // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
- // [response][google.longrunning.Operation.response] field type is
+ // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
+ // The [response][google.longrunning.Operation.response] field type is
// [Database][google.spanner.admin.database.v1.Database], if successful.
- rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) {
+ rpc CreateDatabase(CreateDatabaseRequest)
+ returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/instances/*}/databases"
body: "*"
@@ -94,8 +95,10 @@ service DatabaseAdmin {
// the format `/operations/` and can be used to
// track execution of the schema change(s). The
// [metadata][google.longrunning.Operation.metadata] field type is
- // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
- rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) returns (google.longrunning.Operation) {
+ // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
+ // The operation has no response.
+ rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest)
+ returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl"
body: "*"
@@ -134,7 +137,8 @@ service DatabaseAdmin {
// permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
// For backups, authorization requires `spanner.backups.setIamPolicy`
// permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
- rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy"
body: "*"
@@ -154,7 +158,8 @@ service DatabaseAdmin {
// [resource][google.iam.v1.GetIamPolicyRequest.resource].
// For backups, authorization requires `spanner.backups.getIamPolicy`
// permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
- rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
+ returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy"
body: "*"
@@ -176,7 +181,8 @@ service DatabaseAdmin {
// Calling this method on a backup that does not exist will
// result in a NOT_FOUND error if the user has
// `spanner.backups.list` permission on the containing instance.
- rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
+ returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions"
body: "*"
@@ -194,12 +200,12 @@ service DatabaseAdmin {
// `projects//instances//backups//operations/`
// and can be used to track creation of the backup. The
// [metadata][google.longrunning.Operation.metadata] field type is
- // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. 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
- // creation and delete the backup.
- // There can be only one pending backup creation per database. Backup creation
- // of different databases can run concurrently.
+ // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
+ // 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 creation and delete the
+ // backup. There can be only one pending backup creation per database. Backup
+ // creation of different databases can run concurrently.
rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/instances/*}/backups"
@@ -212,7 +218,8 @@ service DatabaseAdmin {
};
}
- // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
+ // Gets metadata on a pending or completed
+ // [Backup][google.spanner.admin.database.v1.Backup].
rpc GetBackup(GetBackupRequest) returns (Backup) {
option (google.api.http) = {
get: "/v1/{name=projects/*/instances/*/backups/*}"
@@ -220,7 +227,8 @@ service DatabaseAdmin {
option (google.api.method_signature) = "name";
}
- // Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
+ // Updates a pending or completed
+ // [Backup][google.spanner.admin.database.v1.Backup].
rpc UpdateBackup(UpdateBackupRequest) returns (Backup) {
option (google.api.http) = {
patch: "/v1/{backup.name=projects/*/instances/*/backups/*}"
@@ -229,7 +237,8 @@ service DatabaseAdmin {
option (google.api.method_signature) = "backup,update_mask";
}
- // Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
+ // Deletes a pending or completed
+ // [Backup][google.spanner.admin.database.v1.Backup].
rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/instances/*/backups/*}"
@@ -264,7 +273,8 @@ service DatabaseAdmin {
// Once the restore operation completes, a new restore operation can be
// initiated, without waiting for the optimize operation associated with the
// first restore to complete.
- rpc RestoreDatabase(RestoreDatabaseRequest) returns (google.longrunning.Operation) {
+ rpc RestoreDatabase(RestoreDatabaseRequest)
+ returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/instances/*}/databases:restore"
body: "*"
@@ -284,7 +294,8 @@ service DatabaseAdmin {
// `metadata.type_url` describes the type of the metadata. Operations returned
// include those that have completed/failed/canceled within the last 7 days,
// and pending operations.
- rpc ListDatabaseOperations(ListDatabaseOperationsRequest) returns (ListDatabaseOperationsResponse) {
+ rpc ListDatabaseOperations(ListDatabaseOperationsRequest)
+ returns (ListDatabaseOperationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/instances/*}/databaseOperations"
};
@@ -301,7 +312,8 @@ service DatabaseAdmin {
// and pending operations. Operations returned are ordered by
// `operation.metadata.value.progress.start_time` in descending order starting
// from the most recently started operation.
- rpc ListBackupOperations(ListBackupOperationsRequest) returns (ListBackupOperationsResponse) {
+ rpc ListBackupOperations(ListBackupOperationsRequest)
+ returns (ListBackupOperationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/instances/*}/backupOperations"
};
@@ -363,25 +375,51 @@ message Database {
State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. If exists, the time at which the database creation started.
- google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp create_time = 3
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Applicable only for restored databases. Contains information
// about the restore source.
RestoreInfo restore_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // Output only. For databases that are using customer managed encryption, this
+ // field contains the encryption configuration for the database.
+ // For databases that are using Google default or other types of encryption,
+ // this field is empty.
+ EncryptionConfig encryption_config = 5
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. For databases that are using customer managed encryption, this
+ // field contains the encryption information for the database, such as
+ // encryption state and the Cloud KMS key versions that are in use.
+ //
+ // For databases that are using Google default or other types of encryption,
+ // this field is empty.
+ //
+ // This field is propagated lazily from the backend. There might be a delay
+ // from when a key version is being used and when it appears in this field.
+ repeated EncryptionInfo encryption_info = 8
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
// Output only. The period in which Cloud Spanner retains all versions of data
// for the database. This is the same as the value of version_retention_period
// database option set using
- // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour,
- // if not set.
- string version_retention_period = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
+ // Defaults to 1 hour, if not set.
+ string version_retention_period = 6
+ [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Earliest timestamp at which older versions of the data can be
- // read.
- google.protobuf.Timestamp earliest_version_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // read. This value is continuously updated by Cloud Spanner and becomes stale
+ // the moment it is queried. If you are using this value to recover data, make
+ // sure to account for the time from the moment when the value is queried to
+ // the moment when you initiate the recovery.
+ google.protobuf.Timestamp earliest_version_time = 7
+ [(google.api.field_behavior) = OUTPUT_ONLY];
}
-// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+// The request for
+// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
message ListDatabasesRequest {
// Required. The instance whose databases should be listed.
// Values are of the form `projects//instances/`.
@@ -397,23 +435,26 @@ message ListDatabasesRequest {
int32 page_size = 3;
// If non-empty, `page_token` should contain a
- // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
- // previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
+ // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
+ // from a previous
+ // [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
string page_token = 4;
}
-// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
+// The response for
+// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
message ListDatabasesResponse {
// Databases that matched the request.
repeated Database databases = 1;
// `next_page_token` can be sent in a subsequent
- // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
- // of the matching databases.
+ // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
+ // call to fetch more of the matching databases.
string next_page_token = 2;
}
-// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
+// The request for
+// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
message CreateDatabaseRequest {
// Required. The name of the instance that will serve the new database.
// Values are of the form `projects//instances/`.
@@ -436,6 +477,12 @@ message CreateDatabaseRequest {
// statements execute atomically with the creation of the database:
// if there is an error in any statement, the database is not created.
repeated string extra_statements = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The encryption configuration for the database. If this field is
+ // not specified, Cloud Spanner will encrypt/decrypt all data at rest using
+ // Google default encryption.
+ EncryptionConfig encryption_config = 4
+ [(google.api.field_behavior) = OPTIONAL];
}
// Metadata type for the operation returned by
@@ -443,11 +490,12 @@ message CreateDatabaseRequest {
message CreateDatabaseMetadata {
// The database being created.
string database = 1 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
}
-// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
+// The request for
+// [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
message GetDatabaseRequest {
// Required. The name of the requested database. Values are of the form
// `projects//instances//databases/`.
@@ -473,8 +521,8 @@ message GetDatabaseRequest {
// Each batch of statements is assigned a name which can be used with
// the [Operations][google.longrunning.Operations] API to monitor
// progress. See the
-// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
-// details.
+// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id]
+// field for more details.
message UpdateDatabaseDdlRequest {
// Required. The database to update.
string database = 1 [
@@ -494,18 +542,20 @@ message UpdateDatabaseDdlRequest {
//
// Specifying an explicit operation ID simplifies determining
// whether the statements were executed in the event that the
- // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
- // or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
- // `operation_id` fields can be combined to form the
+ // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ // call is replayed, or the return value is otherwise lost: the
+ // [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
+ // and `operation_id` fields can be combined to form the
// [name][google.longrunning.Operation.name] of the resulting
- // [longrunning.Operation][google.longrunning.Operation]: `/operations/`.
+ // [longrunning.Operation][google.longrunning.Operation]:
+ // `/operations/`.
//
// `operation_id` should be unique within the database, and must be
// a valid identifier: `[a-z][a-z0-9_]*`. Note that
// automatically-generated operation IDs always begin with an
// underscore. If the named operation already exists,
- // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
- // `ALREADY_EXISTS`.
+ // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
+ // returns `ALREADY_EXISTS`.
string operation_id = 3;
}
@@ -514,8 +564,8 @@ message UpdateDatabaseDdlRequest {
message UpdateDatabaseDdlMetadata {
// The database being modified.
string database = 1 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
// For an update this list contains all the statements. For an
// individual statement, this list contains only that statement.
@@ -532,7 +582,8 @@ message UpdateDatabaseDdlMetadata {
bool throttled = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}
-// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
+// The request for
+// [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
message DropDatabaseRequest {
// Required. The database to be dropped.
string database = 1 [
@@ -543,7 +594,8 @@ message DropDatabaseRequest {
];
}
-// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+// The request for
+// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
message GetDatabaseDdlRequest {
// Required. The database whose schema we wish to get.
// Values are of the form
@@ -556,7 +608,8 @@ message GetDatabaseDdlRequest {
];
}
-// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
+// The response for
+// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
message GetDatabaseDdlResponse {
// A list of formatted DDL statements defining the schema of the database
// specified in the request.
@@ -589,7 +642,9 @@ message ListDatabaseOperationsRequest {
// * `name` - The name of the long-running operation
// * `done` - False if the operation is in progress, else true.
// * `metadata.@type` - the type of metadata. For example, the type string
- // for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
+ // for
+ // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]
+ // is
// `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
// * `metadata.` - any field in metadata.value.
// * `error` - Error associated with the long-running operation.
@@ -609,7 +664,8 @@ message ListDatabaseOperationsRequest {
// `(metadata.name:restored_howl) AND` \
// `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
// `(error:*)` - Return operations where:
- // * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
+ // * The operation's metadata type is
+ // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
// * The database is restored from a backup.
// * The backup name contains "backup_howl".
// * The restored database's name contains "restored_howl".
@@ -623,8 +679,9 @@ message ListDatabaseOperationsRequest {
// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
- // from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
- // same `parent` and with the same `filter`.
+ // from a previous
+ // [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse]
+ // to the same `parent` and with the same `filter`.
string page_token = 4;
}
@@ -670,9 +727,54 @@ message RestoreDatabaseRequest {
// Name of the backup from which to restore. Values are of the form
// `projects//instances//backups/`.
string backup = 3 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Backup"
- }];
+ type: "spanner.googleapis.com/Backup"
+ }];
}
+
+ // Optional. An encryption configuration describing the encryption type and
+ // key resources in Cloud KMS used to encrypt/decrypt the database to restore
+ // to. If this field is not specified, the restored database will use the same
+ // encryption configuration as the backup by default, namely
+ // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type]
+ // = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
+ RestoreDatabaseEncryptionConfig encryption_config = 4
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Encryption configuration for the restored database.
+message RestoreDatabaseEncryptionConfig {
+ // Encryption types for the database to be restored.
+ enum EncryptionType {
+ // Unspecified. Do not use.
+ ENCRYPTION_TYPE_UNSPECIFIED = 0;
+
+ // This is the default option when
+ // [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig]
+ // is not specified.
+ 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
+ // must contain a valid Cloud KMS key.
+ CUSTOMER_MANAGED_ENCRYPTION = 3;
+ }
+
+ // Required. The encryption type of the restored database.
+ EncryptionType encryption_type = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The Cloud KMS key that will be used to encrypt/decrypt the
+ // restored database. This field should be set only when
+ // [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.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"
+ }
+ ];
}
// Metadata type for the long-running operation returned by
@@ -680,14 +782,15 @@ message RestoreDatabaseRequest {
message RestoreDatabaseMetadata {
// Name of the database being created and restored to.
string name = 1 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
// The type of the restore source.
RestoreSourceType source_type = 2;
// Information about the source used to restore the database, as specified by
- // `source` in [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest].
+ // `source` in
+ // [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest].
oneof source_info {
// Information about the backup used to restore the database.
BackupInfo backup_info = 3;
@@ -708,7 +811,8 @@ message RestoreDatabaseMetadata {
// 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.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ // `Code.CANCELLED`.
google.protobuf.Timestamp cancel_time = 5;
// If exists, the name of the long-running operation that will be used to
@@ -718,10 +822,10 @@ message RestoreDatabaseMetadata {
// `projects//instances//databases//operations/`
// where the is the name of database being created and restored to.
// The metadata type of the long-running operation is
- // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
- // automatically created by the system after the RestoreDatabase long-running
- // operation completes successfully. This operation will not be created if the
- // restore was not successful.
+ // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata].
+ // This long-running operation will be automatically created by the system
+ // after the RestoreDatabase long-running operation completes successfully.
+ // This operation will not be created if the restore was not successful.
string optimize_database_operation_name = 6;
}
@@ -732,8 +836,8 @@ message RestoreDatabaseMetadata {
message OptimizeRestoredDatabaseMetadata {
// Name of the restored database being optimized.
string name = 1 [(google.api.resource_reference) = {
- type: "spanner.googleapis.com/Database"
- }];
+ type: "spanner.googleapis.com/Database"
+ }];
// The progress of the post-restore optimizations.
OperationProgress progress = 2;
diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml
index aba97b3de56..11e85dfd8e3 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/proto-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 5.0.0
+ 5.1.0
proto-google-cloud-spanner-admin-instance-v1
PROTO library for proto-google-cloud-spanner-admin-instance-v1
com.google.cloud
google-cloud-spanner-parent
- 5.0.0
+ 5.1.0
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java
index 727cc6a67c6..50dd499dd4a 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java
index 71069623225..e0263410a9f 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java
index 7c14ac3eb2b..092f061ae21 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml
index b648856f25f..a35f6295308 100644
--- a/proto-google-cloud-spanner-v1/pom.xml
+++ b/proto-google-cloud-spanner-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-v1
- 5.0.0
+ 5.1.0
proto-google-cloud-spanner-v1
PROTO library for proto-google-cloud-spanner-v1
com.google.cloud
google-cloud-spanner-parent
- 5.0.0
+ 5.1.0
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java
index 1ba7b235bbb..bebe019ba47 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java
@@ -254,6 +254,21 @@ public com.google.protobuf.ByteString getSessionBytes() {
}
public static final int TRANSACTION_ID_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ *
+ * Commit a previously-started transaction.
+ *
+ *
+ * bytes transaction_id = 2;
+ *
+ * @return Whether the transactionId field is set.
+ */
+ @java.lang.Override
+ public boolean hasTransactionId() {
+ return transactionCase_ == 2;
+ }
/**
*
*
@@ -1031,6 +1046,20 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) {
return this;
}
+ /**
+ *
+ *
+ *
+ * Commit a previously-started transaction.
+ *
+ *
+ * bytes transaction_id = 2;
+ *
+ * @return Whether the transactionId field is set.
+ */
+ public boolean hasTransactionId() {
+ return transactionCase_ == 2;
+ }
/**
*
*
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java
index a32fa4b4396..4560d510774 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java
@@ -52,6 +52,18 @@ public interface CommitRequestOrBuilder
*/
com.google.protobuf.ByteString getSessionBytes();
+ /**
+ *
+ *
+ *
+ * Commit a previously-started transaction.
+ *
+ *
+ * bytes transaction_id = 2;
+ *
+ * @return Whether the transactionId field is set.
+ */
+ boolean hasTransactionId();
/**
*
*
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java
index b7c78d5726a..234fb2001c4 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java
index 79a7ad822b4..631e8affa4f 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java
@@ -393,15 +393,15 @@ public interface QueryOptionsOrBuilder
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -420,15 +420,15 @@ public interface QueryOptionsOrBuilder
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -440,6 +440,65 @@ public interface QueryOptionsOrBuilder
* @return The bytes for optimizerVersion.
*/
com.google.protobuf.ByteString getOptimizerVersionBytes();
+
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return The optimizerStatisticsPackage.
+ */
+ java.lang.String getOptimizerStatisticsPackage();
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return The bytes for optimizerStatisticsPackage.
+ */
+ com.google.protobuf.ByteString getOptimizerStatisticsPackageBytes();
}
/**
*
@@ -462,6 +521,7 @@ private QueryOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder)
private QueryOptions() {
optimizerVersion_ = "";
+ optimizerStatisticsPackage_ = "";
}
@java.lang.Override
@@ -500,6 +560,13 @@ private QueryOptions(
optimizerVersion_ = s;
break;
}
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ optimizerStatisticsPackage_ = s;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -543,15 +610,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -581,15 +648,15 @@ public java.lang.String getOptimizerVersion() {
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -613,6 +680,89 @@ public com.google.protobuf.ByteString getOptimizerVersionBytes() {
}
}
+ public static final int OPTIMIZER_STATISTICS_PACKAGE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object optimizerStatisticsPackage_;
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return The optimizerStatisticsPackage.
+ */
+ @java.lang.Override
+ public java.lang.String getOptimizerStatisticsPackage() {
+ java.lang.Object ref = optimizerStatisticsPackage_;
+ 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();
+ optimizerStatisticsPackage_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return The bytes for optimizerStatisticsPackage.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getOptimizerStatisticsPackageBytes() {
+ java.lang.Object ref = optimizerStatisticsPackage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ optimizerStatisticsPackage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -630,6 +780,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getOptimizerVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, optimizerVersion_);
}
+ if (!getOptimizerStatisticsPackageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optimizerStatisticsPackage_);
+ }
unknownFields.writeTo(output);
}
@@ -642,6 +795,11 @@ public int getSerializedSize() {
if (!getOptimizerVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, optimizerVersion_);
}
+ if (!getOptimizerStatisticsPackageBytes().isEmpty()) {
+ size +=
+ com.google.protobuf.GeneratedMessageV3.computeStringSize(
+ 2, optimizerStatisticsPackage_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -659,6 +817,8 @@ public boolean equals(final java.lang.Object obj) {
(com.google.spanner.v1.ExecuteSqlRequest.QueryOptions) obj;
if (!getOptimizerVersion().equals(other.getOptimizerVersion())) return false;
+ if (!getOptimizerStatisticsPackage().equals(other.getOptimizerStatisticsPackage()))
+ return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -672,6 +832,8 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + OPTIMIZER_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getOptimizerVersion().hashCode();
+ hash = (37 * hash) + OPTIMIZER_STATISTICS_PACKAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getOptimizerStatisticsPackage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -822,6 +984,8 @@ public Builder clear() {
super.clear();
optimizerVersion_ = "";
+ optimizerStatisticsPackage_ = "";
+
return this;
}
@@ -850,6 +1014,7 @@ public com.google.spanner.v1.ExecuteSqlRequest.QueryOptions buildPartial() {
com.google.spanner.v1.ExecuteSqlRequest.QueryOptions result =
new com.google.spanner.v1.ExecuteSqlRequest.QueryOptions(this);
result.optimizerVersion_ = optimizerVersion_;
+ result.optimizerStatisticsPackage_ = optimizerStatisticsPackage_;
onBuilt();
return result;
}
@@ -906,6 +1071,10 @@ public Builder mergeFrom(com.google.spanner.v1.ExecuteSqlRequest.QueryOptions ot
optimizerVersion_ = other.optimizerVersion_;
onChanged();
}
+ if (!other.getOptimizerStatisticsPackage().isEmpty()) {
+ optimizerStatisticsPackage_ = other.optimizerStatisticsPackage_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -944,15 +1113,15 @@ public Builder mergeFrom(
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -981,15 +1150,15 @@ public java.lang.String getOptimizerVersion() {
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -1018,15 +1187,15 @@ public com.google.protobuf.ByteString getOptimizerVersionBytes() {
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -1054,15 +1223,15 @@ public Builder setOptimizerVersion(java.lang.String value) {
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -1086,15 +1255,15 @@ public Builder clearOptimizerVersion() {
* An option to control the selection of optimizer version.
* This parameter allows individual queries to pick different query
* optimizer versions.
- * Specifying "latest" as a value instructs Cloud Spanner to use the
+ * Specifying `latest` as a value instructs Cloud Spanner to use the
* latest supported query optimizer version. If not specified, Cloud Spanner
- * uses optimizer version set at the database level options. Any other
+ * uses the optimizer version set at the database level options. Any other
* positive integer (from the list of supported optimizer versions)
* overrides the default optimizer version for query execution.
* The list of supported optimizer versions can be queried from
- * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- * with an invalid optimizer version will fail with a syntax error
- * (`INVALID_ARGUMENT`) status.
+ * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ * Executing a SQL statement with an invalid optimizer version fails with
+ * an `INVALID_ARGUMENT` error.
* See
* https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
* for more information on managing the query optimizer.
@@ -1117,6 +1286,197 @@ public Builder setOptimizerVersionBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private java.lang.Object optimizerStatisticsPackage_ = "";
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return The optimizerStatisticsPackage.
+ */
+ public java.lang.String getOptimizerStatisticsPackage() {
+ java.lang.Object ref = optimizerStatisticsPackage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ optimizerStatisticsPackage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return The bytes for optimizerStatisticsPackage.
+ */
+ public com.google.protobuf.ByteString getOptimizerStatisticsPackageBytes() {
+ java.lang.Object ref = optimizerStatisticsPackage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ optimizerStatisticsPackage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @param value The optimizerStatisticsPackage to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOptimizerStatisticsPackage(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ optimizerStatisticsPackage_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOptimizerStatisticsPackage() {
+
+ optimizerStatisticsPackage_ = getDefaultInstance().getOptimizerStatisticsPackage();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query optimizer statistics package to use.
+ * This parameter allows individual queries to use a different query
+ * optimizer statistics.
+ * Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ * generated statistics package. If not specified, Cloud Spanner uses
+ * statistics package set at the database level options, or latest if
+ * the database option is not set.
+ * The statistics package requested by the query has to be exempt from
+ * garbage collection. This can be achieved with the following DDL
+ * statement:
+ * ```
+ * ALTER STATISTICS <package_name> SET OPTIONS (allow_gc=false)
+ * ```
+ * The list of available statistics packages can be queried from
+ * `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ * Executing a SQL statement with an invalid optimizer statistics package
+ * or with statistics package that allows garbage collection fails with
+ * an `INVALID_ARGUMENT` error.
+ *
+ *
+ * string optimizer_statistics_package = 2;
+ *
+ * @param value The bytes for optimizerStatisticsPackage to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOptimizerStatisticsPackageBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ optimizerStatisticsPackage_ = value;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java
index 932da73d048..cbd9063c37e 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java
@@ -305,6 +305,21 @@ public com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder() {
}
public static final int ROW_COUNT_EXACT_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ *
+ * Standard DML returns an exact count of rows that were modified.
+ *
+ *
+ * int64 row_count_exact = 3;
+ *
+ * @return Whether the rowCountExact field is set.
+ */
+ @java.lang.Override
+ public boolean hasRowCountExact() {
+ return rowCountCase_ == 3;
+ }
/**
*
*
@@ -325,6 +340,22 @@ public long getRowCountExact() {
}
public static final int ROW_COUNT_LOWER_BOUND_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ *
+ * Partitioned DML does not offer exactly-once semantics, so it
+ * returns a lower bound of the rows modified.
+ *
+ *
+ * int64 row_count_lower_bound = 4;
+ *
+ * @return Whether the rowCountLowerBound field is set.
+ */
+ @java.lang.Override
+ public boolean hasRowCountLowerBound() {
+ return rowCountCase_ == 4;
+ }
/**
*
*
@@ -1203,6 +1234,20 @@ public com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder() {
return queryStatsBuilder_;
}
+ /**
+ *
+ *
+ *
+ * Standard DML returns an exact count of rows that were modified.
+ *
+ *
+ * int64 row_count_exact = 3;
+ *
+ * @return Whether the rowCountExact field is set.
+ */
+ public boolean hasRowCountExact() {
+ return rowCountCase_ == 3;
+ }
/**
*
*
@@ -1258,6 +1303,21 @@ public Builder clearRowCountExact() {
return this;
}
+ /**
+ *
+ *
+ *
+ * Partitioned DML does not offer exactly-once semantics, so it
+ * returns a lower bound of the rows modified.
+ *
+ *
+ * int64 row_count_lower_bound = 4;
+ *
+ * @return Whether the rowCountLowerBound field is set.
+ */
+ public boolean hasRowCountLowerBound() {
+ return rowCountCase_ == 4;
+ }
/**
*
*
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java
index 272a7a93bee..9a01e754b41 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java
@@ -114,6 +114,18 @@ public interface ResultSetStatsOrBuilder
*/
com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder();
+ /**
+ *
+ *
+ *
+ * Standard DML returns an exact count of rows that were modified.
+ *
+ *
+ * int64 row_count_exact = 3;
+ *
+ * @return Whether the rowCountExact field is set.
+ */
+ boolean hasRowCountExact();
/**
*
*
@@ -127,6 +139,19 @@ public interface ResultSetStatsOrBuilder
*/
long getRowCountExact();
+ /**
+ *
+ *
+ *
+ * Partitioned DML does not offer exactly-once semantics, so it
+ * returns a lower bound of the rows modified.
+ *
+ *
+ * int64 row_count_lower_bound = 4;
+ *
+ * @return Whether the rowCountLowerBound field is set.
+ */
+ boolean hasRowCountLowerBound();
/**
*
*
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java
index 3e4edd0d668..1f47796f0ff 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
index 8458063adac..ac143df1f29 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
@@ -188,7 +188,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ns\030\001 \003(\0132\032.google.spanner.v1.Session\022\027\n\017"
+ "next_page_token\030\002 \001(\t\"L\n\024DeleteSessionRe"
+ "quest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036spanner.goo"
- + "gleapis.com/Session\"\202\005\n\021ExecuteSqlReques"
+ + "gleapis.com/Session\"\250\005\n\021ExecuteSqlReques"
+ "t\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.goog"
+ "leapis.com/Session\022;\n\013transaction\030\002 \001(\0132"
+ "&.google.spanner.v1.TransactionSelector\022"
@@ -200,154 +200,155 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "uteSqlRequest.QueryMode\022\027\n\017partition_tok"
+ "en\030\010 \001(\014\022\r\n\005seqno\030\t \001(\003\022H\n\rquery_options"
+ "\030\n \001(\01321.google.spanner.v1.ExecuteSqlReq"
- + "uest.QueryOptions\032)\n\014QueryOptions\022\031\n\021opt"
- + "imizer_version\030\001 \001(\t\032J\n\017ParamTypesEntry\022"
- + "\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.google.spa"
- + "nner.v1.Type:\0028\001\".\n\tQueryMode\022\n\n\006NORMAL\020"
- + "\000\022\010\n\004PLAN\020\001\022\013\n\007PROFILE\020\002\"\337\003\n\026ExecuteBatc"
- + "hDmlRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036sp"
- + "anner.googleapis.com/Session\022@\n\013transact"
- + "ion\030\002 \001(\0132&.google.spanner.v1.Transactio"
- + "nSelectorB\003\340A\002\022L\n\nstatements\030\003 \003(\01323.goo"
- + "gle.spanner.v1.ExecuteBatchDmlRequest.St"
- + "atementB\003\340A\002\022\022\n\005seqno\030\004 \001(\003B\003\340A\002\032\347\001\n\tSta"
- + "tement\022\013\n\003sql\030\001 \001(\t\022\'\n\006params\030\002 \001(\0132\027.go"
- + "ogle.protobuf.Struct\022X\n\013param_types\030\003 \003("
- + "\0132C.google.spanner.v1.ExecuteBatchDmlReq"
- + "uest.Statement.ParamTypesEntry\032J\n\017ParamT"
- + "ypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027."
- + "google.spanner.v1.Type:\0028\001\"p\n\027ExecuteBat"
- + "chDmlResponse\0221\n\013result_sets\030\001 \003(\0132\034.goo"
- + "gle.spanner.v1.ResultSet\022\"\n\006status\030\002 \001(\013"
- + "2\022.google.rpc.Status\"H\n\020PartitionOptions"
- + "\022\034\n\024partition_size_bytes\030\001 \001(\003\022\026\n\016max_pa"
- + "rtitions\030\002 \001(\003\"\243\003\n\025PartitionQueryRequest"
+ + "uest.QueryOptions\032O\n\014QueryOptions\022\031\n\021opt"
+ + "imizer_version\030\001 \001(\t\022$\n\034optimizer_statis"
+ + "tics_package\030\002 \001(\t\032J\n\017ParamTypesEntry\022\013\n"
+ + "\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.google.spann"
+ + "er.v1.Type:\0028\001\".\n\tQueryMode\022\n\n\006NORMAL\020\000\022"
+ + "\010\n\004PLAN\020\001\022\013\n\007PROFILE\020\002\"\337\003\n\026ExecuteBatchD"
+ + "mlRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036span"
+ + "ner.googleapis.com/Session\022@\n\013transactio"
+ + "n\030\002 \001(\0132&.google.spanner.v1.TransactionS"
+ + "electorB\003\340A\002\022L\n\nstatements\030\003 \003(\01323.googl"
+ + "e.spanner.v1.ExecuteBatchDmlRequest.Stat"
+ + "ementB\003\340A\002\022\022\n\005seqno\030\004 \001(\003B\003\340A\002\032\347\001\n\tState"
+ + "ment\022\013\n\003sql\030\001 \001(\t\022\'\n\006params\030\002 \001(\0132\027.goog"
+ + "le.protobuf.Struct\022X\n\013param_types\030\003 \003(\0132"
+ + "C.google.spanner.v1.ExecuteBatchDmlReque"
+ + "st.Statement.ParamTypesEntry\032J\n\017ParamTyp"
+ + "esEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.go"
+ + "ogle.spanner.v1.Type:\0028\001\"p\n\027ExecuteBatch"
+ + "DmlResponse\0221\n\013result_sets\030\001 \003(\0132\034.googl"
+ + "e.spanner.v1.ResultSet\022\"\n\006status\030\002 \001(\0132\022"
+ + ".google.rpc.Status\"H\n\020PartitionOptions\022\034"
+ + "\n\024partition_size_bytes\030\001 \001(\003\022\026\n\016max_part"
+ + "itions\030\002 \001(\003\"\243\003\n\025PartitionQueryRequest\0227"
+ + "\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.googlea"
+ + "pis.com/Session\022;\n\013transaction\030\002 \001(\0132&.g"
+ + "oogle.spanner.v1.TransactionSelector\022\020\n\003"
+ + "sql\030\003 \001(\tB\003\340A\002\022\'\n\006params\030\004 \001(\0132\027.google."
+ + "protobuf.Struct\022M\n\013param_types\030\005 \003(\01328.g"
+ + "oogle.spanner.v1.PartitionQueryRequest.P"
+ + "aramTypesEntry\022>\n\021partition_options\030\006 \001("
+ + "\0132#.google.spanner.v1.PartitionOptions\032J"
+ + "\n\017ParamTypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030"
+ + "\002 \001(\0132\027.google.spanner.v1.Type:\0028\001\"\261\002\n\024P"
+ + "artitionReadRequest\0227\n\007session\030\001 \001(\tB&\340A"
+ + "\002\372A \n\036spanner.googleapis.com/Session\022;\n\013"
+ + "transaction\030\002 \001(\0132&.google.spanner.v1.Tr"
+ + "ansactionSelector\022\022\n\005table\030\003 \001(\tB\003\340A\002\022\r\n"
+ + "\005index\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022/\n\007key_set"
+ + "\030\006 \001(\0132\031.google.spanner.v1.KeySetB\003\340A\002\022>"
+ + "\n\021partition_options\030\t \001(\0132#.google.spann"
+ + "er.v1.PartitionOptions\"$\n\tPartition\022\027\n\017p"
+ + "artition_token\030\001 \001(\014\"z\n\021PartitionRespons"
+ + "e\0220\n\npartitions\030\001 \003(\0132\034.google.spanner.v"
+ + "1.Partition\0223\n\013transaction\030\002 \001(\0132\036.googl"
+ + "e.spanner.v1.Transaction\"\253\002\n\013ReadRequest"
+ "\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.googl"
+ "eapis.com/Session\022;\n\013transaction\030\002 \001(\0132&"
- + ".google.spanner.v1.TransactionSelector\022\020"
- + "\n\003sql\030\003 \001(\tB\003\340A\002\022\'\n\006params\030\004 \001(\0132\027.googl"
- + "e.protobuf.Struct\022M\n\013param_types\030\005 \003(\01328"
- + ".google.spanner.v1.PartitionQueryRequest"
- + ".ParamTypesEntry\022>\n\021partition_options\030\006 "
- + "\001(\0132#.google.spanner.v1.PartitionOptions"
- + "\032J\n\017ParamTypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005valu"
- + "e\030\002 \001(\0132\027.google.spanner.v1.Type:\0028\001\"\261\002\n"
- + "\024PartitionReadRequest\0227\n\007session\030\001 \001(\tB&"
- + "\340A\002\372A \n\036spanner.googleapis.com/Session\022;"
- + "\n\013transaction\030\002 \001(\0132&.google.spanner.v1."
- + "TransactionSelector\022\022\n\005table\030\003 \001(\tB\003\340A\002\022"
- + "\r\n\005index\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022/\n\007key_s"
- + "et\030\006 \001(\0132\031.google.spanner.v1.KeySetB\003\340A\002"
- + "\022>\n\021partition_options\030\t \001(\0132#.google.spa"
- + "nner.v1.PartitionOptions\"$\n\tPartition\022\027\n"
- + "\017partition_token\030\001 \001(\014\"z\n\021PartitionRespo"
- + "nse\0220\n\npartitions\030\001 \003(\0132\034.google.spanner"
- + ".v1.Partition\0223\n\013transaction\030\002 \001(\0132\036.goo"
- + "gle.spanner.v1.Transaction\"\253\002\n\013ReadReque"
- + "st\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.goo"
- + "gleapis.com/Session\022;\n\013transaction\030\002 \001(\013"
- + "2&.google.spanner.v1.TransactionSelector"
- + "\022\022\n\005table\030\003 \001(\tB\003\340A\002\022\r\n\005index\030\004 \001(\t\022\024\n\007c"
- + "olumns\030\005 \003(\tB\003\340A\002\022/\n\007key_set\030\006 \001(\0132\031.goo"
- + "gle.spanner.v1.KeySetB\003\340A\002\022\r\n\005limit\030\010 \001("
- + "\003\022\024\n\014resume_token\030\t \001(\014\022\027\n\017partition_tok"
- + "en\030\n \001(\014\"\217\001\n\027BeginTransactionRequest\0227\n\007"
- + "session\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapi"
- + "s.com/Session\022;\n\007options\030\002 \001(\0132%.google."
- + "spanner.v1.TransactionOptionsB\003\340A\002\"\207\002\n\rC"
- + "ommitRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036s"
- + "panner.googleapis.com/Session\022\030\n\016transac"
- + "tion_id\030\002 \001(\014H\000\022G\n\026single_use_transactio"
- + "n\030\003 \001(\0132%.google.spanner.v1.TransactionO"
- + "ptionsH\000\022.\n\tmutations\030\004 \003(\0132\033.google.spa"
- + "nner.v1.Mutation\022\033\n\023return_commit_stats\030"
- + "\005 \001(\010B\r\n\013transaction\"\262\001\n\016CommitResponse\022"
- + "4\n\020commit_timestamp\030\001 \001(\0132\032.google.proto"
- + "buf.Timestamp\022C\n\014commit_stats\030\002 \001(\0132-.go"
- + "ogle.spanner.v1.CommitResponse.CommitSta"
- + "ts\032%\n\013CommitStats\022\026\n\016mutation_count\030\001 \001("
- + "\003\"g\n\017RollbackRequest\0227\n\007session\030\001 \001(\tB&\340"
- + "A\002\372A \n\036spanner.googleapis.com/Session\022\033\n"
- + "\016transaction_id\030\002 \001(\014B\003\340A\0022\300\026\n\007Spanner\022\246"
- + "\001\n\rCreateSession\022\'.google.spanner.v1.Cre"
- + "ateSessionRequest\032\032.google.spanner.v1.Se"
- + "ssion\"P\202\323\344\223\002?\":/v1/{database=projects/*/"
- + "instances/*/databases/*}/sessions:\001*\332A\010d"
- + "atabase\022\340\001\n\023BatchCreateSessions\022-.google"
- + ".spanner.v1.BatchCreateSessionsRequest\032."
- + ".google.spanner.v1.BatchCreateSessionsRe"
- + "sponse\"j\202\323\344\223\002K\"F/v1/{database=projects/*"
- + "/instances/*/databases/*}/sessions:batch"
- + "Create:\001*\332A\026database,session_count\022\227\001\n\nG"
- + "etSession\022$.google.spanner.v1.GetSession"
- + "Request\032\032.google.spanner.v1.Session\"G\202\323\344"
- + "\223\002:\0228/v1/{name=projects/*/instances/*/da"
- + "tabases/*/sessions/*}\332A\004name\022\256\001\n\014ListSes"
- + "sions\022&.google.spanner.v1.ListSessionsRe"
- + "quest\032\'.google.spanner.v1.ListSessionsRe"
- + "sponse\"M\202\323\344\223\002<\022:/v1/{database=projects/*"
- + "/instances/*/databases/*}/sessions\332A\010dat"
- + "abase\022\231\001\n\rDeleteSession\022\'.google.spanner"
- + ".v1.DeleteSessionRequest\032\026.google.protob"
- + "uf.Empty\"G\202\323\344\223\002:*8/v1/{name=projects/*/i"
- + "nstances/*/databases/*/sessions/*}\332A\004nam"
- + "e\022\243\001\n\nExecuteSql\022$.google.spanner.v1.Exe"
- + "cuteSqlRequest\032\034.google.spanner.v1.Resul"
- + "tSet\"Q\202\323\344\223\002K\"F/v1/{session=projects/*/in"
- + "stances/*/databases/*/sessions/*}:execut"
- + "eSql:\001*\022\276\001\n\023ExecuteStreamingSql\022$.google"
- + ".spanner.v1.ExecuteSqlRequest\032#.google.s"
- + "panner.v1.PartialResultSet\"Z\202\323\344\223\002T\"O/v1/"
- + "{session=projects/*/instances/*/database"
- + "s/*/sessions/*}:executeStreamingSql:\001*0\001"
- + "\022\300\001\n\017ExecuteBatchDml\022).google.spanner.v1"
- + ".ExecuteBatchDmlRequest\032*.google.spanner"
- + ".v1.ExecuteBatchDmlResponse\"V\202\323\344\223\002P\"K/v1"
- + "/{session=projects/*/instances/*/databas"
- + "es/*/sessions/*}:executeBatchDml:\001*\022\221\001\n\004"
- + "Read\022\036.google.spanner.v1.ReadRequest\032\034.g"
- + "oogle.spanner.v1.ResultSet\"K\202\323\344\223\002E\"@/v1/"
- + "{session=projects/*/instances/*/database"
- + "s/*/sessions/*}:read:\001*\022\254\001\n\rStreamingRea"
- + "d\022\036.google.spanner.v1.ReadRequest\032#.goog"
- + "le.spanner.v1.PartialResultSet\"T\202\323\344\223\002N\"I"
- + "/v1/{session=projects/*/instances/*/data"
- + "bases/*/sessions/*}:streamingRead:\001*0\001\022\311"
- + "\001\n\020BeginTransaction\022*.google.spanner.v1."
- + "BeginTransactionRequest\032\036.google.spanner"
- + ".v1.Transaction\"i\202\323\344\223\002Q\"L/v1/{session=pr"
- + "ojects/*/instances/*/databases/*/session"
- + "s/*}:beginTransaction:\001*\332A\017session,optio"
- + "ns\022\353\001\n\006Commit\022 .google.spanner.v1.Commit"
- + "Request\032!.google.spanner.v1.CommitRespon"
- + "se\"\233\001\202\323\344\223\002G\"B/v1/{session=projects/*/ins"
- + "tances/*/databases/*/sessions/*}:commit:"
- + "\001*\332A session,transaction_id,mutations\332A("
- + "session,single_use_transaction,mutations"
- + "\022\260\001\n\010Rollback\022\".google.spanner.v1.Rollba"
- + "ckRequest\032\026.google.protobuf.Empty\"h\202\323\344\223\002"
- + "I\"D/v1/{session=projects/*/instances/*/d"
- + "atabases/*/sessions/*}:rollback:\001*\332A\026ses"
- + "sion,transaction_id\022\267\001\n\016PartitionQuery\022("
- + ".google.spanner.v1.PartitionQueryRequest"
- + "\032$.google.spanner.v1.PartitionResponse\"U"
- + "\202\323\344\223\002O\"J/v1/{session=projects/*/instance"
- + "s/*/databases/*/sessions/*}:partitionQue"
- + "ry:\001*\022\264\001\n\rPartitionRead\022\'.google.spanner"
- + ".v1.PartitionReadRequest\032$.google.spanne"
- + "r.v1.PartitionResponse\"T\202\323\344\223\002N\"I/v1/{ses"
- + "sion=projects/*/instances/*/databases/*/"
- + "sessions/*}:partitionRead:\001*\032w\312A\026spanner"
- + ".googleapis.com\322A[https://www.googleapis"
- + ".com/auth/cloud-platform,https://www.goo"
- + "gleapis.com/auth/spanner.dataB\224\002\n\025com.go"
- + "ogle.spanner.v1B\014SpannerProtoP\001Z8google."
- + "golang.org/genproto/googleapis/spanner/v"
- + "1;spanner\252\002\027Google.Cloud.Spanner.V1\312\002\027Go"
- + "ogle\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::S"
- + "panner::V1\352A_\n\037spanner.googleapis.com/Da"
- + "tabase\022
+ * Read at a timestamp where all previously committed transactions
+ * are visible.
+ *
+ *
+ * bool strong = 1;
+ *
+ * @return Whether the strong field is set.
+ */
+ boolean hasStrong();
/**
*
*
@@ -1754,6 +1767,22 @@ public TimestampBoundCase getTimestampBoundCase() {
}
public static final int STRONG_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * Read at a timestamp where all previously committed transactions
+ * are visible.
+ *
+ *
+ * bool strong = 1;
+ *
+ * @return Whether the strong field is set.
+ */
+ @java.lang.Override
+ public boolean hasStrong() {
+ return timestampBoundCase_ == 1;
+ }
/**
*
*
@@ -2580,6 +2609,21 @@ public Builder clearTimestampBound() {
return this;
}
+ /**
+ *
+ *
+ *
+ * Read at a timestamp where all previously committed transactions
+ * are visible.
+ *
+ *
+ * bool strong = 1;
+ *
+ * @return Whether the strong field is set.
+ */
+ public boolean hasStrong() {
+ return timestampBoundCase_ == 1;
+ }
/**
*
*
@@ -4363,7 +4407,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* [Commit][google.spanner.v1.Spanner.Commit], the client can send a
* [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
* transaction.
- * ### Semantics
+ * ## Semantics
* Cloud Spanner can commit the transaction if all read locks it acquired
* are still valid at commit time, and it is able to acquire write
* locks for all writes. Cloud Spanner can abort the transaction for any
@@ -4373,7 +4417,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* how long the transaction's locks were held for. It is an error to
* use Cloud Spanner locks for any sort of mutual exclusion other than
* between Cloud Spanner transactions themselves.
- * ### Retrying Aborted Transactions
+ * ## Retrying Aborted Transactions
* When a transaction aborts, the application can choose to retry the
* whole transaction again. To maximize the chances of successfully
* committing the retry, the client should execute the retry in the
@@ -4386,7 +4430,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* idea to cap the number of retries a transaction can attempt;
* instead, it is better to limit the total amount of wall time spent
* retrying.
- * ### Idle Transactions
+ * ## Idle Transactions
* A transaction is considered idle if it has no outstanding reads or
* SQL queries and has not started a read or SQL query within the last 10
* seconds. Idle transactions can be aborted by Cloud Spanner so that they
@@ -4423,7 +4467,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* or read-write transaction, because they are able to execute far
* from the leader replica.
* Each type of timestamp bound is discussed in detail below.
- * ### Strong
+ * ## Strong
* Strong reads are guaranteed to see the effects of all transactions
* that have committed before the start of the read. Furthermore, all
* rows yielded by a single read are consistent with each other -- if
@@ -4435,7 +4479,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* reads should be executed within a transaction or at an exact read
* timestamp.
* See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
- * ### Exact Staleness
+ * ## Exact Staleness
* These timestamp bounds execute reads at a user-specified
* timestamp. Reads at a timestamp are guaranteed to see a consistent
* prefix of the global transaction history: they observe
@@ -4452,7 +4496,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* boundedly stale reads usually return fresher results.
* See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and
* [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
- * ### Bounded Staleness
+ * ## Bounded Staleness
* Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
* subject to a user-provided staleness bound. Cloud Spanner chooses the
* newest timestamp within the staleness bound that allows execution
@@ -4475,7 +4519,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* read-only transactions.
* See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and
* [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
- * ### Old Read Timestamps and Garbage Collection
+ * ## Old Read Timestamps and Garbage Collection
* Cloud Spanner continuously garbage collects deleted and overwritten data
* in the background to reclaim storage space. This process is known
* as "version GC". By default, version GC reclaims versions after they
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java
index 6a7adbcfe95..0ea44276aa0 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java
@@ -251,6 +251,21 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getSingleUseOrBuilder()
}
public static final int ID_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ *
+ * Execute the read or SQL query in a previously-started transaction.
+ *
+ *
+ * bytes id = 2;
+ *
+ * @return Whether the id field is set.
+ */
+ @java.lang.Override
+ public boolean hasId() {
+ return selectorCase_ == 2;
+ }
/**
*
*
@@ -965,6 +980,20 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getSingleUseOrBuilder()
return singleUseBuilder_;
}
+ /**
+ *
+ *
+ *
+ * Execute the read or SQL query in a previously-started transaction.
+ *
+ *
+ * bytes id = 2;
+ *
+ * @return Whether the id field is set.
+ */
+ public boolean hasId() {
+ return selectorCase_ == 2;
+ }
/**
*
*
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java
index 2a0a02c62bf..8e33337d0ce 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java
@@ -64,6 +64,18 @@ public interface TransactionSelectorOrBuilder
*/
com.google.spanner.v1.TransactionOptionsOrBuilder getSingleUseOrBuilder();
+ /**
+ *
+ *
+ *
+ * Execute the read or SQL query in a previously-started transaction.
+ *
+ *
+ * bytes id = 2;
+ *
+ * @return Whether the id field is set.
+ */
+ boolean hasId();
/**
*
*
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 267df0d102a..d8ce0d6774f 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
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
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 974a70e6d1c..35f8fe21c55 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
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
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 a87d741fdc0..d6bb9a2831f 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
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
index 8f579e333d3..75d37efd462 100644
--- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
+++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -435,21 +435,50 @@ message ExecuteSqlRequest {
// This parameter allows individual queries to pick different query
// optimizer versions.
//
- // Specifying "latest" as a value instructs Cloud Spanner to use the
+ // Specifying `latest` as a value instructs Cloud Spanner to use the
// latest supported query optimizer version. If not specified, Cloud Spanner
- // uses optimizer version set at the database level options. Any other
+ // uses the optimizer version set at the database level options. Any other
// positive integer (from the list of supported optimizer versions)
// overrides the default optimizer version for query execution.
+ //
// The list of supported optimizer versions can be queried from
- // SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
- // with an invalid optimizer version will fail with a syntax error
- // (`INVALID_ARGUMENT`) status.
+ // SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS.
+ //
+ // Executing a SQL statement with an invalid optimizer version fails with
+ // an `INVALID_ARGUMENT` error.
+ //
// See
// https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
// for more information on managing the query optimizer.
//
// The `optimizer_version` statement hint has precedence over this setting.
string optimizer_version = 1;
+
+ // Query optimizer statistics package to use.
+ //
+ // This parameter allows individual queries to use a different query
+ // optimizer statistics.
+ //
+ // Specifying `latest` as a value instructs Cloud Spanner to use the latest
+ // generated statistics package. If not specified, Cloud Spanner uses
+ // statistics package set at the database level options, or latest if
+ // the database option is not set.
+ //
+ // The statistics package requested by the query has to be exempt from
+ // garbage collection. This can be achieved with the following DDL
+ // statement:
+ //
+ // ```
+ // ALTER STATISTICS SET OPTIONS (allow_gc=false)
+ // ```
+ //
+ // The list of available statistics packages can be queried from
+ // `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`.
+ //
+ // Executing a SQL statement with an invalid optimizer statistics package
+ // or with statistics package that allows garbage collection fails with
+ // an `INVALID_ARGUMENT` error.
+ string optimizer_statistics_package = 2;
}
// Mode in which the statement must be processed.
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 2cafefcb107..30ef9dc84aa 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
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -93,7 +93,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
// [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
// transaction.
//
-// ### Semantics
+// ## Semantics
//
// Cloud Spanner can commit the transaction if all read locks it acquired
// are still valid at commit time, and it is able to acquire write
@@ -106,7 +106,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
// use Cloud Spanner locks for any sort of mutual exclusion other than
// between Cloud Spanner transactions themselves.
//
-// ### Retrying Aborted Transactions
+// ## Retrying Aborted Transactions
//
// When a transaction aborts, the application can choose to retry the
// whole transaction again. To maximize the chances of successfully
@@ -122,7 +122,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
// instead, it is better to limit the total amount of wall time spent
// retrying.
//
-// ### Idle Transactions
+// ## Idle Transactions
//
// A transaction is considered idle if it has no outstanding reads or
// SQL queries and has not started a read or SQL query within the last 10
@@ -172,7 +172,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
//
// Each type of timestamp bound is discussed in detail below.
//
-// ### Strong
+// ## Strong
//
// Strong reads are guaranteed to see the effects of all transactions
// that have committed before the start of the read. Furthermore, all
@@ -188,7 +188,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
//
// See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
//
-// ### Exact Staleness
+// ## Exact Staleness
//
// These timestamp bounds execute reads at a user-specified
// timestamp. Reads at a timestamp are guaranteed to see a consistent
@@ -210,7 +210,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
// See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and
// [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
//
-// ### Bounded Staleness
+// ## Bounded Staleness
//
// Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
// subject to a user-provided staleness bound. Cloud Spanner chooses the
@@ -240,7 +240,7 @@ option ruby_package = "Google::Cloud::Spanner::V1";
// See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and
// [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
//
-// ### Old Read Timestamps and Garbage Collection
+// ## Old Read Timestamps and Garbage Collection
//
// Cloud Spanner continuously garbage collects deleted and overwritten data
// in the background to reclaim storage space. This process is known
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 1b863c0fdf4..4a5afd485d9 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
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index e65799bde27..2e0cc563d0e 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -23,7 +23,7 @@
UTF-8
0.28.3
1.2.13
- 2.0.13
+ 2.0.14
@@ -32,7 +32,7 @@
com.google.cloud
google-cloud-spanner
- 4.0.2
+ 5.0.0
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index fd1fb419b92..c86dfe3e34b 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -23,7 +23,7 @@
UTF-8
0.28.3
1.2.13
- 2.0.13
+ 2.0.14
@@ -31,7 +31,7 @@
com.google.cloud
google-cloud-spanner
- 5.0.0
+ 5.1.0
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index e7fc97cd4d4..6b9351adcc1 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -33,7 +33,7 @@
com.google.cloud
libraries-bom
- 18.0.0
+ 19.0.0
pom
import
diff --git a/samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java b/samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java
new file mode 100644
index 00000000000..1eaa7c403db
--- /dev/null
+++ b/samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.spanner;
+
+// [START spanner_create_database_with_version_retention_period]
+
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.spanner.Database;
+import com.google.cloud.spanner.DatabaseAdminClient;
+import com.google.cloud.spanner.Spanner;
+import com.google.cloud.spanner.SpannerException;
+import com.google.cloud.spanner.SpannerExceptionFactory;
+import com.google.cloud.spanner.SpannerOptions;
+import com.google.spanner.admin.database.v1.CreateDatabaseMetadata;
+import java.util.Arrays;
+import java.util.concurrent.ExecutionException;
+
+public class CreateDatabaseWithVersionRetentionPeriodSample {
+
+ static void createDatabaseWithVersionRetentionPeriod() {
+ // TODO(developer): Replace these variables before running the sample.
+ String projectId = "my-project";
+ String instanceId = "my-instance";
+ String databaseId = "my-database";
+ String versionRetentionPeriod = "7d";
+
+ try (Spanner spanner =
+ SpannerOptions.newBuilder().setProjectId(projectId).build().getService()) {
+ DatabaseAdminClient adminClient = spanner.getDatabaseAdminClient();
+ createDatabaseWithVersionRetentionPeriod(adminClient, instanceId, databaseId,
+ versionRetentionPeriod);
+ }
+ }
+
+ static void createDatabaseWithVersionRetentionPeriod(DatabaseAdminClient adminClient,
+ String instanceId, String databaseId, String versionRetentionPeriod) {
+ OperationFuture op =
+ adminClient.createDatabase(
+ instanceId,
+ databaseId,
+ Arrays.asList(
+ "CREATE TABLE Singers ("
+ + " SingerId INT64 NOT NULL,"
+ + " FirstName STRING(1024),"
+ + " LastName STRING(1024),"
+ + " SingerInfo BYTES(MAX)"
+ + ") PRIMARY KEY (SingerId)",
+ "CREATE TABLE Albums ("
+ + " SingerId INT64 NOT NULL,"
+ + " AlbumId INT64 NOT NULL,"
+ + " AlbumTitle STRING(MAX)"
+ + ") PRIMARY KEY (SingerId, AlbumId),"
+ + " INTERLEAVE IN PARENT Singers ON DELETE CASCADE",
+ "ALTER DATABASE " + "`" + databaseId + "`"
+ + " SET OPTIONS ( version_retention_period = '" + versionRetentionPeriod + "' )"
+ ));
+ try {
+ Database database = op.get();
+ System.out.println("Created database [" + database.getId() + "]");
+ System.out.println("\tVersion retention period: " + database.getVersionRetentionPeriod());
+ System.out.println("\tEarliest version time: " + database.getEarliestVersionTime());
+ } catch (ExecutionException e) {
+ // If the operation failed during execution, expose the cause.
+ throw (SpannerException) e.getCause();
+ } catch (InterruptedException e) {
+ // Throw when a thread is waiting, sleeping, or otherwise occupied,
+ // and the thread is interrupted, either before or during the activity.
+ throw SpannerExceptionFactory.propagateInterrupt(e);
+ }
+ }
+}
+// [END spanner_create_database_with_version_retention_period]
diff --git a/samples/snippets/src/main/java/com/example/spanner/GetCommitStatsSample.java b/samples/snippets/src/main/java/com/example/spanner/GetCommitStatsSample.java
new file mode 100644
index 00000000000..9adb8449020
--- /dev/null
+++ b/samples/snippets/src/main/java/com/example/spanner/GetCommitStatsSample.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.spanner;
+
+// [START spanner_get_commit_stats]
+
+import com.google.cloud.spanner.CommitResponse;
+import com.google.cloud.spanner.DatabaseClient;
+import com.google.cloud.spanner.DatabaseId;
+import com.google.cloud.spanner.Mutation;
+import com.google.cloud.spanner.Options;
+import com.google.cloud.spanner.Spanner;
+import com.google.cloud.spanner.SpannerOptions;
+import java.util.Arrays;
+
+public class GetCommitStatsSample {
+
+ static void getCommitStats() {
+ // TODO(developer): Replace these variables before running the sample.
+ final String projectId = "my-project";
+ final String instanceId = "my-instance";
+ final String databaseId = "my-database";
+
+ try (Spanner spanner =
+ SpannerOptions.newBuilder().setProjectId(projectId).build().getService()) {
+ final DatabaseClient databaseClient = spanner
+ .getDatabaseClient(DatabaseId.of(projectId, instanceId, databaseId));
+ getCommitStats(databaseClient);
+ }
+ }
+
+ static void getCommitStats(DatabaseClient databaseClient) {
+ final CommitResponse commitResponse = databaseClient.writeWithOptions(Arrays.asList(
+ Mutation.newInsertOrUpdateBuilder("Albums")
+ .set("SingerId")
+ .to("1")
+ .set("AlbumId")
+ .to("1")
+ .set("MarketingBudget")
+ .to("200000")
+ .build(),
+ Mutation.newInsertOrUpdateBuilder("Albums")
+ .set("SingerId")
+ .to("2")
+ .set("AlbumId")
+ .to("2")
+ .set("MarketingBudget")
+ .to("400000")
+ .build()
+ ), Options.commitStats());
+
+ System.out.println(
+ "Updated data with " + commitResponse.getCommitStats().getMutationCount() + " mutations.");
+ }
+}
+// [END spanner_get_commit_stats]
diff --git a/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java b/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java
index 874088775b2..f7ac1113c38 100644
--- a/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java
+++ b/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java
@@ -1584,8 +1584,8 @@ static void queryWithQueryOptions(DatabaseClient dbClient) {
// [END spanner_query_with_query_options]
// [START spanner_create_backup]
- static void createBackup(
- DatabaseAdminClient dbAdminClient, DatabaseId databaseId, BackupId backupId) {
+ static void createBackup(DatabaseAdminClient dbAdminClient, DatabaseId databaseId,
+ BackupId backupId, Timestamp versionTime) {
// Set expire time to 14 days from now.
Timestamp expireTime = Timestamp.ofTimeMicroseconds(TimeUnit.MICROSECONDS.convert(
System.currentTimeMillis() + TimeUnit.DAYS.toMillis(14), TimeUnit.MILLISECONDS));
@@ -1594,6 +1594,7 @@ static void createBackup(
.newBackupBuilder(backupId)
.setDatabase(databaseId)
.setExpireTime(expireTime)
+ .setVersionTime(versionTime)
.build();
// Initiate the request which returns an OperationFuture.
System.out.println("Creating backup [" + backup.getId() + "]...");
@@ -1612,13 +1613,18 @@ static void createBackup(
backup = backup.reload();
System.out.println(
String.format(
- "Backup %s of size %d bytes was created at %s",
+ "Backup %s of size %d bytes was created at %s for version of database at %s",
backup.getId().getName(),
backup.getSize(),
LocalDateTime.ofEpochSecond(
backup.getProto().getCreateTime().getSeconds(),
backup.getProto().getCreateTime().getNanos(),
- OffsetDateTime.now().getOffset())).toString());
+ OffsetDateTime.now().getOffset()),
+ LocalDateTime.ofEpochSecond(
+ backup.getProto().getVersionTime().getSeconds(),
+ backup.getProto().getVersionTime().getNanos(),
+ OffsetDateTime.now().getOffset())
+ ));
}
// [END spanner_create_backup]
@@ -1820,12 +1826,16 @@ static void restoreBackup(
Database db = op.get();
// Refresh database metadata and get the restore info.
RestoreInfo restore = db.reload().getRestoreInfo();
+ Timestamp versionTime = Timestamp.fromProto(restore
+ .getProto()
+ .getBackupInfo()
+ .getVersionTime());
System.out.println(
"Restored database ["
+ restore.getSourceDatabase().getName()
+ "] from ["
+ restore.getBackup().getName()
- + "]");
+ + "] with version time [" + versionTime + "]");
} catch (ExecutionException e) {
throw SpannerExceptionFactory.newSpannerException(e.getCause());
} catch (InterruptedException e) {
@@ -2044,7 +2054,7 @@ static void run(
queryWithQueryOptions(dbClient);
break;
case "createbackup":
- createBackup(dbAdminClient, database, backup);
+ createBackup(dbAdminClient, database, backup, getVersionTime(dbClient));
break;
case "cancelcreatebackup":
cancelCreateBackup(
@@ -2079,6 +2089,17 @@ static void run(
}
}
+ static Timestamp getVersionTime(DatabaseClient dbClient) {
+ // Generates a version time for the backup
+ Timestamp versionTime;
+ try (ResultSet resultSet = dbClient.singleUse()
+ .executeQuery(Statement.of("SELECT CURRENT_TIMESTAMP()"))) {
+ resultSet.next();
+ versionTime = resultSet.getTimestamp(0);
+ }
+ return versionTime;
+ }
+
static void printUsageAndExit() {
System.err.println("Usage:");
System.err.println(" SpannerExample ");
@@ -2177,6 +2198,7 @@ public static void main(String[] args) throws Exception {
InstanceAdminClient instanceAdminClient = spanner.getInstanceAdminClient();
// Use client here...
// [END init_client]
+
run(dbClient, dbAdminClient, instanceAdminClient, command, db, backup);
// [START init_client]
} finally {
diff --git a/samples/snippets/src/test/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSampleIT.java
new file mode 100644
index 00000000000..34a732b19ac
--- /dev/null
+++ b/samples/snippets/src/test/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSampleIT.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.spanner;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.cloud.spanner.DatabaseAdminClient;
+import com.google.cloud.spanner.Spanner;
+import com.google.cloud.spanner.SpannerOptions;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/**
+ * Integration tests for {@link CreateDatabaseWithVersionRetentionPeriodSample}
+ */
+@RunWith(JUnit4.class)
+public class CreateDatabaseWithVersionRetentionPeriodSampleIT {
+
+ private static String projectId;
+ private static final String instanceId = System.getProperty("spanner.test.instance");
+ private static final String baseDatabaseId = System.getProperty(
+ "spanner.sample.database",
+ "pitrsample"
+ );
+ private static DatabaseAdminClient databaseAdminClient;
+ private static List databasesToDrop;
+ private static Spanner spanner;
+
+ private String runSample(
+ String databaseId,
+ String versionRetentionPeriod
+ ) {
+ final PrintStream stdOut = System.out;
+ final ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ final PrintStream out = new PrintStream(bout);
+ System.setOut(out);
+ CreateDatabaseWithVersionRetentionPeriodSample.createDatabaseWithVersionRetentionPeriod(
+ databaseAdminClient,
+ instanceId,
+ databaseId,
+ versionRetentionPeriod
+ );
+ System.setOut(stdOut);
+ return bout.toString();
+ }
+
+ @BeforeClass
+ public static void setUp() {
+ final SpannerOptions options = SpannerOptions
+ .newBuilder()
+ .setAutoThrottleAdministrativeRequests()
+ .build();
+ projectId = options.getProjectId();
+ spanner = options.getService();
+ databaseAdminClient = spanner.getDatabaseAdminClient();
+ databasesToDrop = new ArrayList<>();
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ for (String databaseId : databasesToDrop) {
+ try {
+ databaseAdminClient.dropDatabase(instanceId, databaseId);
+ } catch (Exception e) {
+ System.out.println("Failed to drop database " + databaseId + ", skipping...");
+ }
+ }
+ spanner.close();
+ }
+
+ @Test
+ public void createsDatabaseWithVersionRetentionPeriod() {
+ final String databaseId = generateDatabaseId();
+ final String versionRetentionPeriod = "7d";
+
+ final String out = runSample(databaseId, versionRetentionPeriod);
+
+ assertThat(out).contains(
+ "Created database [projects/" + projectId + "/instances/" + instanceId + "/databases/"
+ + databaseId + "]");
+ assertThat(out).contains("Version retention period: " + versionRetentionPeriod);
+ }
+
+ static String generateDatabaseId() {
+ final String databaseId = (
+ baseDatabaseId
+ + "-"
+ + UUID.randomUUID().toString().replaceAll("-", "")
+ ).substring(0, 30);
+ databasesToDrop.add(databaseId);
+ return databaseId;
+ }
+}
diff --git a/samples/snippets/src/test/java/com/example/spanner/GetCommitStatsSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/GetCommitStatsSampleIT.java
new file mode 100644
index 00000000000..895310a2e6b
--- /dev/null
+++ b/samples/snippets/src/test/java/com/example/spanner/GetCommitStatsSampleIT.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.spanner;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.cloud.spanner.DatabaseAdminClient;
+import com.google.cloud.spanner.DatabaseClient;
+import com.google.cloud.spanner.DatabaseId;
+import com.google.cloud.spanner.KeySet;
+import com.google.cloud.spanner.Mutation;
+import com.google.cloud.spanner.Spanner;
+import com.google.cloud.spanner.SpannerOptions;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableList;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.UUID;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/**
+ * Integration tests for {@link GetCommitStatsSample}
+ */
+@RunWith(JUnit4.class)
+public class GetCommitStatsSampleIT {
+
+ private static String instanceId = System.getProperty("spanner.test.instance");
+ private static String databaseId = formatForTest(
+ System.getProperty("spanner.sample.database", "commitstatssample"));
+ private static DatabaseId dbId;
+ private static DatabaseAdminClient dbClient;
+ private static Spanner spanner;
+
+ @BeforeClass
+ public static void createTestDatabase() throws Exception {
+ Preconditions.checkState(instanceId != null, "No instance id set");
+ final SpannerOptions options =
+ SpannerOptions.newBuilder().setAutoThrottleAdministrativeRequests().build();
+ spanner = options.getService();
+ dbClient = spanner.getDatabaseAdminClient();
+ dbId = DatabaseId.of(options.getProjectId(), instanceId, databaseId);
+ dbClient.dropDatabase(dbId.getInstanceId().getInstance(), dbId.getDatabase());
+ dbClient
+ .createDatabase(
+ instanceId,
+ databaseId,
+ ImmutableList.of(
+ "CREATE TABLE Singers ("
+ + " SingerId INT64 NOT NULL,"
+ + " FirstName STRING(1024),"
+ + " LastName STRING(1024),"
+ + " SingerInfo BYTES(MAX)"
+ + ") PRIMARY KEY (SingerId)",
+ "CREATE TABLE Albums ("
+ + " SingerId INT64 NOT NULL,"
+ + " AlbumId INT64 NOT NULL,"
+ + " AlbumTitle STRING(MAX),"
+ + " MarketingBudget INT64"
+ + ") PRIMARY KEY (SingerId, AlbumId),"
+ + " INTERLEAVE IN PARENT Singers ON DELETE CASCADE"))
+ .get();
+ }
+
+ @AfterClass
+ public static void dropTestDatabase() {
+ dbClient.dropDatabase(dbId.getInstanceId().getInstance(), dbId.getDatabase());
+ spanner.close();
+ }
+
+ @Before
+ public void insertTestData() {
+ final DatabaseClient client = spanner.getDatabaseClient(dbId);
+ client.write(Arrays.asList(
+ Mutation.newInsertBuilder("Singers")
+ .set("SingerId")
+ .to(1L)
+ .set("FirstName")
+ .to("first name 1")
+ .set("LastName")
+ .to("last name 1")
+ .build(),
+ Mutation.newInsertBuilder("Singers")
+ .set("SingerId")
+ .to(2L)
+ .set("FirstName")
+ .to("first name 2")
+ .set("LastName")
+ .to("last name 2")
+ .build()
+ ));
+ }
+
+ @After
+ public void removeTestData() {
+ final DatabaseClient client = spanner.getDatabaseClient(dbId);
+ client.write(Collections.singletonList(Mutation.delete("Singers", KeySet.all())));
+ }
+
+ @Test
+ public void testGetCommitStatsSample() {
+ final DatabaseClient client = spanner.getDatabaseClient(dbId);
+ final String out = runExample(client);
+
+ assertThat(out).contains("Updated data with 6 mutations.");
+ }
+
+ private String runExample(DatabaseClient client) {
+ PrintStream stdOut = System.out;
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ PrintStream out = new PrintStream(bout);
+ System.setOut(out);
+ GetCommitStatsSample.getCommitStats(client);
+ System.setOut(stdOut);
+ return bout.toString();
+ }
+
+ private static String formatForTest(String name) {
+ return (
+ name
+ + "-"
+ + UUID.randomUUID().toString().replaceAll("-", "")
+ ).substring(0, 30);
+ }
+}
diff --git a/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java
index dee5816b38c..32feedd9f7e 100644
--- a/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java
+++ b/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java
@@ -439,4 +439,4 @@ private static Pattern getTestDbIdPattern(String baseDbId) {
static String formatForTest(String name) {
return name + "-" + UUID.randomUUID().toString().substring(0, DBID_LENGTH);
}
-}
\ No newline at end of file
+}
diff --git a/synth.metadata b/synth.metadata
index e4f6aa5fa20..c194b99f7b4 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,22 +4,22 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-spanner.git",
- "sha": "9a590000794caef8d7fc00d9083654fe2f0931a3"
+ "sha": "46bd35dc476346a8bf9f97bacfe9ce81621d1649"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb",
- "internalRef": "356341083"
+ "sha": "3befd26ca55723d3e8111909331eac1249837987",
+ "internalRef": "360805639"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2"
+ "sha": "d0bdade9a962042dc0f770cf631086f3db59b5b0"
}
}
],
@@ -114,6 +114,7 @@
"codecov.yaml",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java",
+ "google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java",
@@ -121,6 +122,7 @@
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java",
+ "google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java",
@@ -128,6 +130,7 @@
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java",
+ "google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java",
"google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java",
@@ -154,6 +157,8 @@
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java",
@@ -162,6 +167,8 @@
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CryptoKeyName.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CryptoKeyVersionName.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java",
@@ -169,6 +176,10 @@
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java",
@@ -198,6 +209,8 @@
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java",
+ "proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java",
"proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java",
@@ -338,4 +351,4 @@
"renovate.json",
"samples/pom.xml"
]
-}
\ No newline at end of file
+}
diff --git a/versions.txt b/versions.txt
index f80e59a3a18..c4f15ebd9d4 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,10 +1,10 @@
# Format:
# module:released-version:current-version
-proto-google-cloud-spanner-admin-instance-v1:5.0.0:5.0.0
-proto-google-cloud-spanner-v1:5.0.0:5.0.0
-proto-google-cloud-spanner-admin-database-v1:5.0.0:5.0.0
-grpc-google-cloud-spanner-v1:5.0.0:5.0.0
-grpc-google-cloud-spanner-admin-instance-v1:5.0.0:5.0.0
-grpc-google-cloud-spanner-admin-database-v1:5.0.0:5.0.0
-google-cloud-spanner:5.0.0:5.0.0
\ No newline at end of file
+proto-google-cloud-spanner-admin-instance-v1:5.1.0:5.1.0
+proto-google-cloud-spanner-v1:5.1.0:5.1.0
+proto-google-cloud-spanner-admin-database-v1:5.1.0:5.1.0
+grpc-google-cloud-spanner-v1:5.1.0:5.1.0
+grpc-google-cloud-spanner-admin-instance-v1:5.1.0:5.1.0
+grpc-google-cloud-spanner-admin-database-v1:5.1.0:5.1.0
+google-cloud-spanner:5.1.0:5.1.0
\ No newline at end of file