From 768bb68cf3475104efca0924693e33db018d7398 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 23 Jul 2024 02:15:37 +0000 Subject: [PATCH 01/12] chore: Update generation configuration at Tue Jul 23 02:15:33 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 5db47f1db7..9da2018002 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: 19577edb4d439db98d2fb1f6f48f2e1b29fba099 +googleapis_commitish: d44c3001960c430bc60ac1e1736cebfd8fd45e77 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From 6b4deaa951c081ab6589470e60bd42ba3c8e0ab2 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 24 Jul 2024 02:15:35 +0000 Subject: [PATCH 02/12] chore: Update generation configuration at Wed Jul 24 02:15:30 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 9da2018002..58c19e4980 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: d44c3001960c430bc60ac1e1736cebfd8fd45e77 +googleapis_commitish: 6f0843548b06bfd3368da47ac6c40e77ea6c6109 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From fee32415847c8a4bbacaae9c4bb45e23f2768d77 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 25 Jul 2024 02:15:43 +0000 Subject: [PATCH 03/12] chore: Update generation configuration at Thu Jul 25 02:15:36 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 58c19e4980..c021aabd26 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: 6f0843548b06bfd3368da47ac6c40e77ea6c6109 +googleapis_commitish: a91d1a37cb86a0e49fdc21d8b4416eb1c2a083ec libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From f8329178ef5164a882461d89c5509fce5fca8bc8 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 26 Jul 2024 02:15:33 +0000 Subject: [PATCH 04/12] chore: Update generation configuration at Fri Jul 26 02:15:26 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index c021aabd26..b17bbe308a 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: a91d1a37cb86a0e49fdc21d8b4416eb1c2a083ec +googleapis_commitish: ba245fa19c1e6f1f2a13055a437f0c815c061867 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From 0a00e63fa0efa87bc8224efb9f96f375899b460b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 27 Jul 2024 02:14:45 +0000 Subject: [PATCH 05/12] chore: Update generation configuration at Sat Jul 27 02:14:35 UTC 2024 --- generation_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index b17bbe308a..8083e464c4 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.42.0 -googleapis_commitish: ba245fa19c1e6f1f2a13055a437f0c815c061867 +gapic_generator_version: 2.43.0 +googleapis_commitish: 0fa9ce880be5ea7c3027015849cd4fbfb04812c5 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From f872f1d3f2d49a97bf243535434c6843dab56b93 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 27 Jul 2024 02:17:28 +0000 Subject: [PATCH 06/12] chore: generate libraries at Sat Jul 27 02:15:05 UTC 2024 --- .repo-metadata.json | 2 +- README.md | 2 +- .../executor/v1/stub/SpannerExecutorProxyStubSettings.java | 2 ++ .../admin/database/v1/stub/DatabaseAdminStubSettings.java | 2 ++ .../admin/instance/v1/stub/InstanceAdminStubSettings.java | 2 ++ .../com/google/cloud/spanner/v1/stub/SpannerStubSettings.java | 2 ++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 5a0cd00cfe..7848b32f2b 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -5,7 +5,7 @@ "api_description": "is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, \\nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \\nfor high availability.\\n\\nBe sure to activate the Cloud Spanner API on the Developer's Console to\\nuse Cloud Spanner from your project.", "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history", "release_level": "stable", - "transport": "both", + "transport": "grpc", "language": "java", "repo": "googleapis/java-spanner", "repo_short": "java-spanner", diff --git a/README.md b/README.md index 95846aead8..0d4db4498e 100644 --- a/README.md +++ b/README.md @@ -621,7 +621,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr ## Transport -Cloud Spanner uses both gRPC and HTTP/JSON for the transport layer. +Cloud Spanner uses gRPC for the transport layer. ## Supported Java Versions diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java index 2b8c17ada9..88843026f4 100644 --- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java @@ -17,6 +17,7 @@ package com.google.cloud.spanner.executor.v1.stub; import com.google.api.core.ApiFunction; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -119,6 +120,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "spanner-cloud-executor.googleapis.com:443"; } 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 7ee7568722..2865fcd8d0 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 @@ -26,6 +26,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -774,6 +775,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "spanner.googleapis.com:443"; } 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 9a00b312c6..a74094a314 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 @@ -25,6 +25,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -738,6 +739,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "spanner.googleapis.com:443"; } 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 db96f17542..fa6b86633b 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 @@ -21,6 +21,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -311,6 +312,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "spanner.googleapis.com:443"; } From 223f8cd76e67bde4c8852e629f7c1134fd2c97ff Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 30 Jul 2024 02:15:53 +0000 Subject: [PATCH 07/12] chore: Update generation configuration at Tue Jul 30 02:15:43 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 8083e464c4..0795acbf04 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.43.0 -googleapis_commitish: 0fa9ce880be5ea7c3027015849cd4fbfb04812c5 +googleapis_commitish: 87a20e3098f40a6f2ad3313d6c92a6714cae6c06 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From 0fcc870b0eb08dcae790cfe48cc931bdc99ce33b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 31 Jul 2024 02:03:52 +0000 Subject: [PATCH 08/12] chore: Update generation configuration at Wed Jul 31 02:03:43 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 0795acbf04..39293c5967 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.43.0 -googleapis_commitish: 87a20e3098f40a6f2ad3313d6c92a6714cae6c06 +googleapis_commitish: d8fce50eea92bac3a6612ee61559989ce3b38776 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From 7e08381dbc5ad53e3563109e90c203243d9aa0d6 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Wed, 31 Jul 2024 02:06:32 +0000 Subject: [PATCH 09/12] chore: generate libraries at Wed Jul 31 02:04:08 UTC 2024 --- .../reflect-config.json | 18 + .../reflect-config.json | 18 + .../v1/DatabaseAdminClientHttpJsonTest.java | 44 + .../database/v1/DatabaseAdminClientTest.java | 36 + .../spanner/admin/database/v1/Backup.java | 928 ++++++++++++++++-- .../admin/database/v1/BackupOrBuilder.java | 129 +++ .../admin/database/v1/BackupProto.java | 217 ++-- .../admin/database/v1/BackupSchedule.java | 335 ++++++- .../database/v1/BackupScheduleOrBuilder.java | 39 + .../database/v1/BackupScheduleProto.java | 78 +- .../database/v1/IncrementalBackupSpec.java | 443 +++++++++ .../v1/IncrementalBackupSpecOrBuilder.java | 25 + .../spanner/admin/database/v1/backup.proto | 43 + .../admin/database/v1/backup_schedule.proto | 3 + 14 files changed, 2151 insertions(+), 205 deletions(-) create mode 100644 proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java create mode 100644 proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java diff --git a/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json b/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json index f059459138..e28206a3de 100644 --- a/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json +++ b/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json @@ -2222,6 +2222,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.database.v1.IncrementalBackupSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.IncrementalBackupSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.database.v1.ListBackupOperationsRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json index 51848a4129..37bd9977c1 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json @@ -2159,6 +2159,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.database.v1.IncrementalBackupSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.IncrementalBackupSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.database.v1.ListBackupOperationsRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java index 5e0d53da4c..b5a045b24a 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java @@ -1086,6 +1086,8 @@ public void createBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1093,6 +1095,8 @@ public void createBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1151,6 +1155,8 @@ public void createBackupTest2() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1158,6 +1164,8 @@ public void createBackupTest2() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1216,6 +1224,8 @@ public void copyBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1223,6 +1233,8 @@ public void copyBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1284,6 +1296,8 @@ public void copyBackupTest2() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1291,6 +1305,8 @@ public void copyBackupTest2() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1352,6 +1368,8 @@ public void copyBackupTest3() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1359,6 +1377,8 @@ public void copyBackupTest3() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1420,6 +1440,8 @@ public void copyBackupTest4() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1427,6 +1449,8 @@ public void copyBackupTest4() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1488,6 +1512,8 @@ public void getBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1495,6 +1521,8 @@ public void getBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1544,6 +1572,8 @@ public void getBackupTest2() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1551,6 +1581,8 @@ public void getBackupTest2() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1600,6 +1632,8 @@ public void updateBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1607,6 +1641,8 @@ public void updateBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1618,6 +1654,8 @@ public void updateBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1625,6 +1663,8 @@ public void updateBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1662,6 +1702,8 @@ public void updateBackupExceptionTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1669,6 +1711,8 @@ public void updateBackupExceptionTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateBackup(backup, updateMask); 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 469c0f53a1..a4de864ee6 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 @@ -999,6 +999,8 @@ public void createBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1006,6 +1008,8 @@ public void createBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1063,6 +1067,8 @@ public void createBackupTest2() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1070,6 +1076,8 @@ public void createBackupTest2() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1127,6 +1135,8 @@ public void copyBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1134,6 +1144,8 @@ public void copyBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1195,6 +1207,8 @@ public void copyBackupTest2() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1202,6 +1216,8 @@ public void copyBackupTest2() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1263,6 +1279,8 @@ public void copyBackupTest3() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1270,6 +1288,8 @@ public void copyBackupTest3() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1331,6 +1351,8 @@ public void copyBackupTest4() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1338,6 +1360,8 @@ public void copyBackupTest4() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1399,6 +1423,8 @@ public void getBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1406,6 +1432,8 @@ public void getBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1449,6 +1477,8 @@ public void getBackupTest2() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1456,6 +1486,8 @@ public void getBackupTest2() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); @@ -1499,6 +1531,8 @@ public void updateBackupTest() throws Exception { .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[BACKUP]").toString()) .setCreateTime(Timestamp.newBuilder().build()) .setSizeBytes(-1796325715) + .setFreeableSizeBytes(1302251206) + .setExclusiveSizeBytes(-1085921554) .addAllReferencingDatabases(new ArrayList()) .setEncryptionInfo(EncryptionInfo.newBuilder().build()) .addAllEncryptionInformation(new ArrayList()) @@ -1506,6 +1540,8 @@ public void updateBackupTest() throws Exception { .addAllReferencingBackups(new ArrayList()) .setMaxExpireTime(Timestamp.newBuilder().build()) .addAllBackupSchedules(new ArrayList()) + .setIncrementalBackupChainId("incrementalBackupChainId1926005216") + .setOldestVersionTime(Timestamp.newBuilder().build()) .build(); mockDatabaseAdmin.addResponse(expectedResponse); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java index 813c859b36..96dc6990ec 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java @@ -47,6 +47,7 @@ private Backup() { databaseDialect_ = 0; referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); backupSchedules_ = com.google.protobuf.LazyStringArrayList.emptyList(); + incrementalBackupChainId_ = ""; } @java.lang.Override @@ -565,6 +566,54 @@ public long getSizeBytes() { return sizeBytes_; } + public static final int FREEABLE_SIZE_BYTES_FIELD_NUMBER = 15; + private long freeableSizeBytes_ = 0L; + /** + * + * + *
+   * Output only. The number of bytes that will be freed by deleting this
+   * backup. This value will be zero if, for example, this backup is part of an
+   * incremental backup chain and younger backups in the chain require that we
+   * keep its data. For backups not in an incremental backup chain, this is
+   * always the size of the backup. This value may change if backups on the same
+   * chain get created, deleted or expired.
+   * 
+ * + * int64 freeable_size_bytes = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The freeableSizeBytes. + */ + @java.lang.Override + public long getFreeableSizeBytes() { + return freeableSizeBytes_; + } + + public static final int EXCLUSIVE_SIZE_BYTES_FIELD_NUMBER = 16; + private long exclusiveSizeBytes_ = 0L; + /** + * + * + *
+   * Output only. For a backup in an incremental backup chain, this is the
+   * storage space needed to keep the data that has changed since the previous
+   * backup. For all other backups, this is always the size of the backup. This
+   * value may change if backups on the same chain get deleted or expired.
+   *
+   * This field can be used to calculate the total storage space used by a set
+   * of backups. For example, the total space used by all backups of a database
+   * can be computed by summing up this field.
+   * 
+ * + * int64 exclusive_size_bytes = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The exclusiveSizeBytes. + */ + @java.lang.Override + public long getExclusiveSizeBytes() { + return exclusiveSizeBytes_; + } + public static final int STATE_FIELD_NUMBER = 6; private int state_ = 0; /** @@ -1170,6 +1219,138 @@ public com.google.protobuf.ByteString getBackupSchedulesBytes(int index) { return backupSchedules_.getByteString(index); } + public static final int INCREMENTAL_BACKUP_CHAIN_ID_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private volatile java.lang.Object incrementalBackupChainId_ = ""; + /** + * + * + *
+   * Output only. Populated only for backups in an incremental backup chain.
+   * Backups share the same chain id if and only if they belong to the same
+   * incremental backup chain. Use this field to determine which backups are
+   * part of the same incremental backup chain. The ordering of backups in the
+   * chain can be determined by ordering the backup `version_time`.
+   * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The incrementalBackupChainId. + */ + @java.lang.Override + public java.lang.String getIncrementalBackupChainId() { + java.lang.Object ref = incrementalBackupChainId_; + 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(); + incrementalBackupChainId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Populated only for backups in an incremental backup chain.
+   * Backups share the same chain id if and only if they belong to the same
+   * incremental backup chain. Use this field to determine which backups are
+   * part of the same incremental backup chain. The ordering of backups in the
+   * chain can be determined by ordering the backup `version_time`.
+   * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for incrementalBackupChainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncrementalBackupChainIdBytes() { + java.lang.Object ref = incrementalBackupChainId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + incrementalBackupChainId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OLDEST_VERSION_TIME_FIELD_NUMBER = 18; + private com.google.protobuf.Timestamp oldestVersionTime_; + /** + * + * + *
+   * Output only. Data deleted at a time older than this is guaranteed not to be
+   * retained in order to support this backup. For a backup in an incremental
+   * backup chain, this is the version time of the oldest backup that exists or
+   * ever existed in the chain. For all other backups, this is the version time
+   * of the backup. This field can be used to understand what data is being
+   * retained by the backup system.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestVersionTime field is set. + */ + @java.lang.Override + public boolean hasOldestVersionTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. Data deleted at a time older than this is guaranteed not to be
+   * retained in order to support this backup. For a backup in an incremental
+   * backup chain, this is the version time of the oldest backup that exists or
+   * ever existed in the chain. For all other backups, this is the version time
+   * of the backup. This field can be used to understand what data is being
+   * retained by the backup system.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestVersionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOldestVersionTime() { + return oldestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestVersionTime_; + } + /** + * + * + *
+   * Output only. Data deleted at a time older than this is guaranteed not to be
+   * retained in order to support this backup. For a backup in an incremental
+   * backup chain, this is the version time of the oldest backup that exists or
+   * ever existed in the chain. For all other backups, this is the version time
+   * of the backup. This field can be used to understand what data is being
+   * retained by the backup system.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOldestVersionTimeOrBuilder() { + return oldestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestVersionTime_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1229,6 +1410,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < backupSchedules_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, backupSchedules_.getRaw(i)); } + if (freeableSizeBytes_ != 0L) { + output.writeInt64(15, freeableSizeBytes_); + } + if (exclusiveSizeBytes_ != 0L) { + output.writeInt64(16, exclusiveSizeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(incrementalBackupChainId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, incrementalBackupChainId_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(18, getOldestVersionTime()); + } getUnknownFields().writeTo(output); } @@ -1299,6 +1492,19 @@ public int getSerializedSize() { size += dataSize; size += 1 * getBackupSchedulesList().size(); } + if (freeableSizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(15, freeableSizeBytes_); + } + if (exclusiveSizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, exclusiveSizeBytes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(incrementalBackupChainId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(17, incrementalBackupChainId_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getOldestVersionTime()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1330,6 +1536,8 @@ public boolean equals(final java.lang.Object obj) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (getSizeBytes() != other.getSizeBytes()) return false; + if (getFreeableSizeBytes() != other.getFreeableSizeBytes()) return false; + if (getExclusiveSizeBytes() != other.getExclusiveSizeBytes()) return false; if (state_ != other.state_) return false; if (!getReferencingDatabasesList().equals(other.getReferencingDatabasesList())) return false; if (hasEncryptionInfo() != other.hasEncryptionInfo()) return false; @@ -1344,6 +1552,11 @@ public boolean equals(final java.lang.Object obj) { if (!getMaxExpireTime().equals(other.getMaxExpireTime())) return false; } if (!getBackupSchedulesList().equals(other.getBackupSchedulesList())) return false; + if (!getIncrementalBackupChainId().equals(other.getIncrementalBackupChainId())) return false; + if (hasOldestVersionTime() != other.hasOldestVersionTime()) return false; + if (hasOldestVersionTime()) { + if (!getOldestVersionTime().equals(other.getOldestVersionTime())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1373,6 +1586,10 @@ public int hashCode() { } hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeBytes()); + hash = (37 * hash) + FREEABLE_SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFreeableSizeBytes()); + hash = (37 * hash) + EXCLUSIVE_SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getExclusiveSizeBytes()); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; if (getReferencingDatabasesCount() > 0) { @@ -1401,6 +1618,12 @@ public int hashCode() { hash = (37 * hash) + BACKUP_SCHEDULES_FIELD_NUMBER; hash = (53 * hash) + getBackupSchedulesList().hashCode(); } + hash = (37 * hash) + INCREMENTAL_BACKUP_CHAIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getIncrementalBackupChainId().hashCode(); + if (hasOldestVersionTime()) { + hash = (37 * hash) + OLDEST_VERSION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOldestVersionTime().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1547,6 +1770,7 @@ private void maybeForceBuilderInitialization() { getEncryptionInfoFieldBuilder(); getEncryptionInformationFieldBuilder(); getMaxExpireTimeFieldBuilder(); + getOldestVersionTimeFieldBuilder(); } } @@ -1572,6 +1796,8 @@ public Builder clear() { createTimeBuilder_ = null; } sizeBytes_ = 0L; + freeableSizeBytes_ = 0L; + exclusiveSizeBytes_ = 0L; state_ = 0; referencingDatabases_ = com.google.protobuf.LazyStringArrayList.emptyList(); encryptionInfo_ = null; @@ -1585,7 +1811,7 @@ public Builder clear() { encryptionInformation_ = null; encryptionInformationBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); databaseDialect_ = 0; referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); maxExpireTime_ = null; @@ -1594,6 +1820,12 @@ public Builder clear() { maxExpireTimeBuilder_ = null; } backupSchedules_ = com.google.protobuf.LazyStringArrayList.emptyList(); + incrementalBackupChainId_ = ""; + oldestVersionTime_ = null; + if (oldestVersionTimeBuilder_ != null) { + oldestVersionTimeBuilder_.dispose(); + oldestVersionTimeBuilder_ = null; + } return this; } @@ -1631,9 +1863,9 @@ public com.google.spanner.admin.database.v1.Backup buildPartial() { private void buildPartialRepeatedFields(com.google.spanner.admin.database.v1.Backup result) { if (encryptionInformationBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { encryptionInformation_ = java.util.Collections.unmodifiableList(encryptionInformation_); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); } result.encryptionInformation_ = encryptionInformation_; } else { @@ -1667,33 +1899,49 @@ private void buildPartial0(com.google.spanner.admin.database.v1.Backup result) { result.sizeBytes_ = sizeBytes_; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.state_ = state_; + result.freeableSizeBytes_ = freeableSizeBytes_; } if (((from_bitField0_ & 0x00000080) != 0)) { + result.exclusiveSizeBytes_ = exclusiveSizeBytes_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { referencingDatabases_.makeImmutable(); result.referencingDatabases_ = referencingDatabases_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.encryptionInfo_ = encryptionInfoBuilder_ == null ? encryptionInfo_ : encryptionInfoBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.databaseDialect_ = databaseDialect_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { referencingBackups_.makeImmutable(); result.referencingBackups_ = referencingBackups_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.maxExpireTime_ = maxExpireTimeBuilder_ == null ? maxExpireTime_ : maxExpireTimeBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { backupSchedules_.makeImmutable(); result.backupSchedules_ = backupSchedules_; } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.incrementalBackupChainId_ = incrementalBackupChainId_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.oldestVersionTime_ = + oldestVersionTimeBuilder_ == null + ? oldestVersionTime_ + : oldestVersionTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } result.bitField0_ |= to_bitField0_; } @@ -1764,13 +2012,19 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { if (other.getSizeBytes() != 0L) { setSizeBytes(other.getSizeBytes()); } + if (other.getFreeableSizeBytes() != 0L) { + setFreeableSizeBytes(other.getFreeableSizeBytes()); + } + if (other.getExclusiveSizeBytes() != 0L) { + setExclusiveSizeBytes(other.getExclusiveSizeBytes()); + } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (!other.referencingDatabases_.isEmpty()) { if (referencingDatabases_.isEmpty()) { referencingDatabases_ = other.referencingDatabases_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; } else { ensureReferencingDatabasesIsMutable(); referencingDatabases_.addAll(other.referencingDatabases_); @@ -1784,7 +2038,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { if (!other.encryptionInformation_.isEmpty()) { if (encryptionInformation_.isEmpty()) { encryptionInformation_ = other.encryptionInformation_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); } else { ensureEncryptionInformationIsMutable(); encryptionInformation_.addAll(other.encryptionInformation_); @@ -1797,7 +2051,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { encryptionInformationBuilder_.dispose(); encryptionInformationBuilder_ = null; encryptionInformation_ = other.encryptionInformation_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); encryptionInformationBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEncryptionInformationFieldBuilder() @@ -1813,7 +2067,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { if (!other.referencingBackups_.isEmpty()) { if (referencingBackups_.isEmpty()) { referencingBackups_ = other.referencingBackups_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; } else { ensureReferencingBackupsIsMutable(); referencingBackups_.addAll(other.referencingBackups_); @@ -1826,13 +2080,21 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { if (!other.backupSchedules_.isEmpty()) { if (backupSchedules_.isEmpty()) { backupSchedules_ = other.backupSchedules_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; } else { ensureBackupSchedulesIsMutable(); backupSchedules_.addAll(other.backupSchedules_); } onChanged(); } + if (!other.getIncrementalBackupChainId().isEmpty()) { + incrementalBackupChainId_ = other.incrementalBackupChainId_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (other.hasOldestVersionTime()) { + mergeOldestVersionTime(other.getOldestVersionTime()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1892,7 +2154,7 @@ public Builder mergeFrom( case 48: { state_ = input.readEnum(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; break; } // case 48 case 58: @@ -1905,7 +2167,7 @@ public Builder mergeFrom( case 66: { input.readMessage(getEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; break; } // case 66 case 74: @@ -1917,7 +2179,7 @@ public Builder mergeFrom( case 80: { databaseDialect_ = input.readEnum(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; break; } // case 80 case 90: @@ -1930,7 +2192,7 @@ public Builder mergeFrom( case 98: { input.readMessage(getMaxExpireTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; break; } // case 98 case 106: @@ -1954,6 +2216,31 @@ public Builder mergeFrom( backupSchedules_.add(s); break; } // case 114 + case 120: + { + freeableSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 120 + case 128: + { + exclusiveSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 128 + case 138: + { + incrementalBackupChainId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: + { + input.readMessage( + getOldestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3014,6 +3301,148 @@ public Builder clearSizeBytes() { return this; } + private long freeableSizeBytes_; + /** + * + * + *
+     * Output only. The number of bytes that will be freed by deleting this
+     * backup. This value will be zero if, for example, this backup is part of an
+     * incremental backup chain and younger backups in the chain require that we
+     * keep its data. For backups not in an incremental backup chain, this is
+     * always the size of the backup. This value may change if backups on the same
+     * chain get created, deleted or expired.
+     * 
+ * + * int64 freeable_size_bytes = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The freeableSizeBytes. + */ + @java.lang.Override + public long getFreeableSizeBytes() { + return freeableSizeBytes_; + } + /** + * + * + *
+     * Output only. The number of bytes that will be freed by deleting this
+     * backup. This value will be zero if, for example, this backup is part of an
+     * incremental backup chain and younger backups in the chain require that we
+     * keep its data. For backups not in an incremental backup chain, this is
+     * always the size of the backup. This value may change if backups on the same
+     * chain get created, deleted or expired.
+     * 
+ * + * int64 freeable_size_bytes = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The freeableSizeBytes to set. + * @return This builder for chaining. + */ + public Builder setFreeableSizeBytes(long value) { + + freeableSizeBytes_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of bytes that will be freed by deleting this
+     * backup. This value will be zero if, for example, this backup is part of an
+     * incremental backup chain and younger backups in the chain require that we
+     * keep its data. For backups not in an incremental backup chain, this is
+     * always the size of the backup. This value may change if backups on the same
+     * chain get created, deleted or expired.
+     * 
+ * + * int64 freeable_size_bytes = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFreeableSizeBytes() { + bitField0_ = (bitField0_ & ~0x00000040); + freeableSizeBytes_ = 0L; + onChanged(); + return this; + } + + private long exclusiveSizeBytes_; + /** + * + * + *
+     * Output only. For a backup in an incremental backup chain, this is the
+     * storage space needed to keep the data that has changed since the previous
+     * backup. For all other backups, this is always the size of the backup. This
+     * value may change if backups on the same chain get deleted or expired.
+     *
+     * This field can be used to calculate the total storage space used by a set
+     * of backups. For example, the total space used by all backups of a database
+     * can be computed by summing up this field.
+     * 
+ * + * int64 exclusive_size_bytes = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The exclusiveSizeBytes. + */ + @java.lang.Override + public long getExclusiveSizeBytes() { + return exclusiveSizeBytes_; + } + /** + * + * + *
+     * Output only. For a backup in an incremental backup chain, this is the
+     * storage space needed to keep the data that has changed since the previous
+     * backup. For all other backups, this is always the size of the backup. This
+     * value may change if backups on the same chain get deleted or expired.
+     *
+     * This field can be used to calculate the total storage space used by a set
+     * of backups. For example, the total space used by all backups of a database
+     * can be computed by summing up this field.
+     * 
+ * + * int64 exclusive_size_bytes = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The exclusiveSizeBytes to set. + * @return This builder for chaining. + */ + public Builder setExclusiveSizeBytes(long value) { + + exclusiveSizeBytes_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. For a backup in an incremental backup chain, this is the
+     * storage space needed to keep the data that has changed since the previous
+     * backup. For all other backups, this is always the size of the backup. This
+     * value may change if backups on the same chain get deleted or expired.
+     *
+     * This field can be used to calculate the total storage space used by a set
+     * of backups. For example, the total space used by all backups of a database
+     * can be computed by summing up this field.
+     * 
+ * + * int64 exclusive_size_bytes = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearExclusiveSizeBytes() { + bitField0_ = (bitField0_ & ~0x00000080); + exclusiveSizeBytes_ = 0L; + onChanged(); + return this; + } + private int state_ = 0; /** * @@ -3048,7 +3477,7 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3091,7 +3520,7 @@ public Builder setState(com.google.spanner.admin.database.v1.Backup.State value) if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; state_ = value.getNumber(); onChanged(); return this; @@ -3110,7 +3539,7 @@ public Builder setState(com.google.spanner.admin.database.v1.Backup.State value) * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000100); state_ = 0; onChanged(); return this; @@ -3123,7 +3552,7 @@ private void ensureReferencingDatabasesIsMutable() { if (!referencingDatabases_.isModifiable()) { referencingDatabases_ = new com.google.protobuf.LazyStringArrayList(referencingDatabases_); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; } /** * @@ -3243,7 +3672,7 @@ public Builder setReferencingDatabases(int index, java.lang.String value) { } ensureReferencingDatabasesIsMutable(); referencingDatabases_.set(index, value); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3273,7 +3702,7 @@ public Builder addReferencingDatabases(java.lang.String value) { } ensureReferencingDatabasesIsMutable(); referencingDatabases_.add(value); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3300,7 +3729,7 @@ public Builder addReferencingDatabases(java.lang.String value) { public Builder addAllReferencingDatabases(java.lang.Iterable values) { ensureReferencingDatabasesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingDatabases_); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3325,7 +3754,7 @@ public Builder addAllReferencingDatabases(java.lang.Iterable v */ public Builder clearReferencingDatabases() { referencingDatabases_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000200); ; onChanged(); return this; @@ -3357,7 +3786,7 @@ public Builder addReferencingDatabasesBytes(com.google.protobuf.ByteString value checkByteStringIsUtf8(value); ensureReferencingDatabasesIsMutable(); referencingDatabases_.add(value); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3382,7 +3811,7 @@ public Builder addReferencingDatabasesBytes(com.google.protobuf.ByteString value * @return Whether the encryptionInfo field is set. */ public boolean hasEncryptionInfo() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -3426,7 +3855,7 @@ public Builder setEncryptionInfo(com.google.spanner.admin.database.v1.Encryption } else { encryptionInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3448,7 +3877,7 @@ public Builder setEncryptionInfo( } else { encryptionInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3465,7 +3894,7 @@ public Builder setEncryptionInfo( */ public Builder mergeEncryptionInfo(com.google.spanner.admin.database.v1.EncryptionInfo value) { if (encryptionInfoBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000400) != 0) && encryptionInfo_ != null && encryptionInfo_ != com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance()) { @@ -3477,7 +3906,7 @@ public Builder mergeEncryptionInfo(com.google.spanner.admin.database.v1.Encrypti encryptionInfoBuilder_.mergeFrom(value); } if (encryptionInfo_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -3494,7 +3923,7 @@ public Builder mergeEncryptionInfo(com.google.spanner.admin.database.v1.Encrypti * */ public Builder clearEncryptionInfo() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000400); encryptionInfo_ = null; if (encryptionInfoBuilder_ != null) { encryptionInfoBuilder_.dispose(); @@ -3515,7 +3944,7 @@ public Builder clearEncryptionInfo() { * */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryptionInfoBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return getEncryptionInfoFieldBuilder().getBuilder(); } @@ -3572,11 +4001,11 @@ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryption encryptionInformation_ = java.util.Collections.emptyList(); private void ensureEncryptionInformationIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { + if (!((bitField0_ & 0x00000800) != 0)) { encryptionInformation_ = new java.util.ArrayList( encryptionInformation_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; } } @@ -3873,7 +4302,7 @@ public Builder addAllEncryptionInformation( public Builder clearEncryptionInformation() { if (encryptionInformationBuilder_ == null) { encryptionInformation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); } else { encryptionInformationBuilder_.clear(); @@ -4050,7 +4479,7 @@ public Builder removeEncryptionInformation(int index) { com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>( encryptionInformation_, - ((bitField0_ & 0x00000200) != 0), + ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); encryptionInformation_ = null; @@ -4092,7 +4521,7 @@ public int getDatabaseDialectValue() { */ public Builder setDatabaseDialectValue(int value) { databaseDialect_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4135,7 +4564,7 @@ public Builder setDatabaseDialect(com.google.spanner.admin.database.v1.DatabaseD if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; databaseDialect_ = value.getNumber(); onChanged(); return this; @@ -4154,7 +4583,7 @@ public Builder setDatabaseDialect(com.google.spanner.admin.database.v1.DatabaseD * @return This builder for chaining. */ public Builder clearDatabaseDialect() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00001000); databaseDialect_ = 0; onChanged(); return this; @@ -4167,7 +4596,7 @@ private void ensureReferencingBackupsIsMutable() { if (!referencingBackups_.isModifiable()) { referencingBackups_ = new com.google.protobuf.LazyStringArrayList(referencingBackups_); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; } /** * @@ -4287,7 +4716,7 @@ public Builder setReferencingBackups(int index, java.lang.String value) { } ensureReferencingBackupsIsMutable(); referencingBackups_.set(index, value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4317,7 +4746,7 @@ public Builder addReferencingBackups(java.lang.String value) { } ensureReferencingBackupsIsMutable(); referencingBackups_.add(value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4344,7 +4773,7 @@ public Builder addReferencingBackups(java.lang.String value) { public Builder addAllReferencingBackups(java.lang.Iterable values) { ensureReferencingBackupsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingBackups_); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4369,7 +4798,7 @@ public Builder addAllReferencingBackups(java.lang.Iterable val */ public Builder clearReferencingBackups() { referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00002000); ; onChanged(); return this; @@ -4401,7 +4830,7 @@ public Builder addReferencingBackupsBytes(com.google.protobuf.ByteString value) checkByteStringIsUtf8(value); ensureReferencingBackupsIsMutable(); referencingBackups_.add(value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4430,7 +4859,7 @@ public Builder addReferencingBackupsBytes(com.google.protobuf.ByteString value) * @return Whether the maxExpireTime field is set. */ public boolean hasMaxExpireTime() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -4482,7 +4911,7 @@ public Builder setMaxExpireTime(com.google.protobuf.Timestamp value) { } else { maxExpireTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4507,7 +4936,7 @@ public Builder setMaxExpireTime(com.google.protobuf.Timestamp.Builder builderFor } else { maxExpireTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4528,7 +4957,7 @@ public Builder setMaxExpireTime(com.google.protobuf.Timestamp.Builder builderFor */ public Builder mergeMaxExpireTime(com.google.protobuf.Timestamp value) { if (maxExpireTimeBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00004000) != 0) && maxExpireTime_ != null && maxExpireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getMaxExpireTimeBuilder().mergeFrom(value); @@ -4539,7 +4968,7 @@ public Builder mergeMaxExpireTime(com.google.protobuf.Timestamp value) { maxExpireTimeBuilder_.mergeFrom(value); } if (maxExpireTime_ != null) { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -4560,7 +4989,7 @@ public Builder mergeMaxExpireTime(com.google.protobuf.Timestamp value) { * */ public Builder clearMaxExpireTime() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00004000); maxExpireTime_ = null; if (maxExpireTimeBuilder_ != null) { maxExpireTimeBuilder_.dispose(); @@ -4585,7 +5014,7 @@ public Builder clearMaxExpireTime() { * */ public com.google.protobuf.Timestamp.Builder getMaxExpireTimeBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; onChanged(); return getMaxExpireTimeFieldBuilder().getBuilder(); } @@ -4652,7 +5081,7 @@ private void ensureBackupSchedulesIsMutable() { if (!backupSchedules_.isModifiable()) { backupSchedules_ = new com.google.protobuf.LazyStringArrayList(backupSchedules_); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; } /** * @@ -4777,7 +5206,7 @@ public Builder setBackupSchedules(int index, java.lang.String value) { } ensureBackupSchedulesIsMutable(); backupSchedules_.set(index, value); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4808,7 +5237,7 @@ public Builder addBackupSchedules(java.lang.String value) { } ensureBackupSchedulesIsMutable(); backupSchedules_.add(value); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4836,7 +5265,7 @@ public Builder addBackupSchedules(java.lang.String value) { public Builder addAllBackupSchedules(java.lang.Iterable values) { ensureBackupSchedulesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupSchedules_); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4862,7 +5291,7 @@ public Builder addAllBackupSchedules(java.lang.Iterable values */ public Builder clearBackupSchedules() { backupSchedules_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00008000); ; onChanged(); return this; @@ -4895,10 +5324,389 @@ public Builder addBackupSchedulesBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureBackupSchedulesIsMutable(); backupSchedules_.add(value); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.lang.Object incrementalBackupChainId_ = ""; + /** + * + * + *
+     * Output only. Populated only for backups in an incremental backup chain.
+     * Backups share the same chain id if and only if they belong to the same
+     * incremental backup chain. Use this field to determine which backups are
+     * part of the same incremental backup chain. The ordering of backups in the
+     * chain can be determined by ordering the backup `version_time`.
+     * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The incrementalBackupChainId. + */ + public java.lang.String getIncrementalBackupChainId() { + java.lang.Object ref = incrementalBackupChainId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + incrementalBackupChainId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Populated only for backups in an incremental backup chain.
+     * Backups share the same chain id if and only if they belong to the same
+     * incremental backup chain. Use this field to determine which backups are
+     * part of the same incremental backup chain. The ordering of backups in the
+     * chain can be determined by ordering the backup `version_time`.
+     * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for incrementalBackupChainId. + */ + public com.google.protobuf.ByteString getIncrementalBackupChainIdBytes() { + java.lang.Object ref = incrementalBackupChainId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + incrementalBackupChainId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Populated only for backups in an incremental backup chain.
+     * Backups share the same chain id if and only if they belong to the same
+     * incremental backup chain. Use this field to determine which backups are
+     * part of the same incremental backup chain. The ordering of backups in the
+     * chain can be determined by ordering the backup `version_time`.
+     * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The incrementalBackupChainId to set. + * @return This builder for chaining. + */ + public Builder setIncrementalBackupChainId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + incrementalBackupChainId_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Populated only for backups in an incremental backup chain.
+     * Backups share the same chain id if and only if they belong to the same
+     * incremental backup chain. Use this field to determine which backups are
+     * part of the same incremental backup chain. The ordering of backups in the
+     * chain can be determined by ordering the backup `version_time`.
+     * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncrementalBackupChainId() { + incrementalBackupChainId_ = getDefaultInstance().getIncrementalBackupChainId(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Populated only for backups in an incremental backup chain.
+     * Backups share the same chain id if and only if they belong to the same
+     * incremental backup chain. Use this field to determine which backups are
+     * part of the same incremental backup chain. The ordering of backups in the
+     * chain can be determined by ordering the backup `version_time`.
+     * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for incrementalBackupChainId to set. + * @return This builder for chaining. + */ + public Builder setIncrementalBackupChainIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + incrementalBackupChainId_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp oldestVersionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + oldestVersionTimeBuilder_; + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestVersionTime field is set. + */ + public boolean hasOldestVersionTime() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestVersionTime. + */ + public com.google.protobuf.Timestamp getOldestVersionTime() { + if (oldestVersionTimeBuilder_ == null) { + return oldestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestVersionTime_; + } else { + return oldestVersionTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOldestVersionTime(com.google.protobuf.Timestamp value) { + if (oldestVersionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldestVersionTime_ = value; + } else { + oldestVersionTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOldestVersionTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (oldestVersionTimeBuilder_ == null) { + oldestVersionTime_ = builderForValue.build(); + } else { + oldestVersionTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; onChanged(); return this; } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOldestVersionTime(com.google.protobuf.Timestamp value) { + if (oldestVersionTimeBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && oldestVersionTime_ != null + && oldestVersionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getOldestVersionTimeBuilder().mergeFrom(value); + } else { + oldestVersionTime_ = value; + } + } else { + oldestVersionTimeBuilder_.mergeFrom(value); + } + if (oldestVersionTime_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOldestVersionTime() { + bitField0_ = (bitField0_ & ~0x00020000); + oldestVersionTime_ = null; + if (oldestVersionTimeBuilder_ != null) { + oldestVersionTimeBuilder_.dispose(); + oldestVersionTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getOldestVersionTimeBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getOldestVersionTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOldestVersionTimeOrBuilder() { + if (oldestVersionTimeBuilder_ != null) { + return oldestVersionTimeBuilder_.getMessageOrBuilder(); + } else { + return oldestVersionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestVersionTime_; + } + } + /** + * + * + *
+     * Output only. Data deleted at a time older than this is guaranteed not to be
+     * retained in order to support this backup. For a backup in an incremental
+     * backup chain, this is the version time of the oldest backup that exists or
+     * ever existed in the chain. For all other backups, this is the version time
+     * of the backup. This field can be used to understand what data is being
+     * retained by the backup system.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOldestVersionTimeFieldBuilder() { + if (oldestVersionTimeBuilder_ == null) { + oldestVersionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOldestVersionTime(), getParentForChildren(), isClean()); + oldestVersionTime_ = null; + } + return oldestVersionTimeBuilder_; + } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java index ac1eec6a02..a89a0fdc2f 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 @@ -269,6 +269,44 @@ public interface BackupOrBuilder */ long getSizeBytes(); + /** + * + * + *
+   * Output only. The number of bytes that will be freed by deleting this
+   * backup. This value will be zero if, for example, this backup is part of an
+   * incremental backup chain and younger backups in the chain require that we
+   * keep its data. For backups not in an incremental backup chain, this is
+   * always the size of the backup. This value may change if backups on the same
+   * chain get created, deleted or expired.
+   * 
+ * + * int64 freeable_size_bytes = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The freeableSizeBytes. + */ + long getFreeableSizeBytes(); + + /** + * + * + *
+   * Output only. For a backup in an incremental backup chain, this is the
+   * storage space needed to keep the data that has changed since the previous
+   * backup. For all other backups, this is always the size of the backup. This
+   * value may change if backups on the same chain get deleted or expired.
+   *
+   * This field can be used to calculate the total storage space used by a set
+   * of backups. For example, the total space used by all backups of a database
+   * can be computed by summing up this field.
+   * 
+ * + * int64 exclusive_size_bytes = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The exclusiveSizeBytes. + */ + long getExclusiveSizeBytes(); + /** * * @@ -762,4 +800,95 @@ com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptionInform * @return The bytes of the backupSchedules at the given index. */ com.google.protobuf.ByteString getBackupSchedulesBytes(int index); + + /** + * + * + *
+   * Output only. Populated only for backups in an incremental backup chain.
+   * Backups share the same chain id if and only if they belong to the same
+   * incremental backup chain. Use this field to determine which backups are
+   * part of the same incremental backup chain. The ordering of backups in the
+   * chain can be determined by ordering the backup `version_time`.
+   * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The incrementalBackupChainId. + */ + java.lang.String getIncrementalBackupChainId(); + /** + * + * + *
+   * Output only. Populated only for backups in an incremental backup chain.
+   * Backups share the same chain id if and only if they belong to the same
+   * incremental backup chain. Use this field to determine which backups are
+   * part of the same incremental backup chain. The ordering of backups in the
+   * chain can be determined by ordering the backup `version_time`.
+   * 
+ * + * string incremental_backup_chain_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for incrementalBackupChainId. + */ + com.google.protobuf.ByteString getIncrementalBackupChainIdBytes(); + + /** + * + * + *
+   * Output only. Data deleted at a time older than this is guaranteed not to be
+   * retained in order to support this backup. For a backup in an incremental
+   * backup chain, this is the version time of the oldest backup that exists or
+   * ever existed in the chain. For all other backups, this is the version time
+   * of the backup. This field can be used to understand what data is being
+   * retained by the backup system.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestVersionTime field is set. + */ + boolean hasOldestVersionTime(); + /** + * + * + *
+   * Output only. Data deleted at a time older than this is guaranteed not to be
+   * retained in order to support this backup. For a backup in an incremental
+   * backup chain, this is the version time of the oldest backup that exists or
+   * ever existed in the chain. For all other backups, this is the version time
+   * of the backup. This field can be used to understand what data is being
+   * retained by the backup system.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestVersionTime. + */ + com.google.protobuf.Timestamp getOldestVersionTime(); + /** + * + * + *
+   * Output only. Data deleted at a time older than this is guaranteed not to be
+   * retained in order to support this backup. For a backup in an incremental
+   * backup chain, this is the version time of the oldest backup that exists or
+   * ever existed in the chain. For all other backups, this is the version time
+   * of the backup. This field can be used to understand what data is being
+   * retained by the backup system.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getOldestVersionTimeOrBuilder(); } 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 4f00e1d577..d2f0f5c38e 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 @@ -92,6 +92,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_database_v1_FullBackupSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_database_v1_FullBackupSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -108,111 +112,116 @@ 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\"\271\007\n\006Backup\0226\n\010database\030\002 \001(" + + "common.proto\"\346\010\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\022U\n\026encryption_information\030\r " - + "\003(\01320.google.spanner.admin.database.v1.E" - + "ncryptionInfoB\003\340A\003\022P\n\020database_dialect\030\n" - + " \001(\01621.google.spanner.admin.database.v1." - + "DatabaseDialectB\003\340A\003\022B\n\023referencing_back" - + "ups\030\013 \003(\tB%\340A\003\372A\037\n\035spanner.googleapis.co" - + "m/Backup\0228\n\017max_expire_time\030\014 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022\035\n\020backup_sch" - + "edules\030\016 \003(\tB\003\340A\003\"7\n\005State\022\025\n\021STATE_UNSP" - + "ECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002:\\\352AY\n" - + "\035spanner.googleapis.com/Backup\0228projects" - + "/{project}/instances/{instance}/backups/" - + "{backup}\"\205\002\n\023CreateBackupRequest\0227\n\006pare" - + "nt\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\006bac" - + "kup\030\003 \001(\0132(.google.spanner.admin.databas" - + "e.v1.BackupB\003\340A\002\022^\n\021encryption_config\030\004 " - + "\001(\0132>.google.spanner.admin.database.v1.C" - + "reateBackupEncryptionConfigB\003\340A\001\"\370\001\n\024Cre" - + "ateBackupMetadata\0220\n\004name\030\001 \001(\tB\"\372A\037\n\035sp" - + "anner.googleapis.com/Backup\0226\n\010database\030" - + "\002 \001(\tB$\372A!\n\037spanner.googleapis.com/Datab" - + "ase\022E\n\010progress\030\003 \001(\01323.google.spanner.a" - + "dmin.database.v1.OperationProgress\022/\n\013ca" - + "ncel_time\030\004 \001(\0132\032.google.protobuf.Timest" - + "amp\"\266\002\n\021CopyBackupRequest\0227\n\006parent\030\001 \001(" + + "pB\003\340A\003\022\027\n\nsize_bytes\030\005 \001(\003B\003\340A\003\022 \n\023freea" + + "ble_size_bytes\030\017 \001(\003B\003\340A\003\022!\n\024exclusive_s" + + "ize_bytes\030\020 \001(\003B\003\340A\003\022B\n\005state\030\006 \001(\0162..go" + + "ogle.spanner.admin.database.v1.Backup.St" + + "ateB\003\340A\003\022F\n\025referencing_databases\030\007 \003(\tB" + + "\'\340A\003\372A!\n\037spanner.googleapis.com/Database" + + "\022N\n\017encryption_info\030\010 \001(\01320.google.spann" + + "er.admin.database.v1.EncryptionInfoB\003\340A\003" + + "\022U\n\026encryption_information\030\r \003(\01320.googl" + + "e.spanner.admin.database.v1.EncryptionIn" + + "foB\003\340A\003\022P\n\020database_dialect\030\n \001(\01621.goog" + + "le.spanner.admin.database.v1.DatabaseDia" + + "lectB\003\340A\003\022B\n\023referencing_backups\030\013 \003(\tB%" + + "\340A\003\372A\037\n\035spanner.googleapis.com/Backup\0228\n" + + "\017max_expire_time\030\014 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022\035\n\020backup_schedules\030\016 \003(" + + "\tB\003\340A\003\022(\n\033incremental_backup_chain_id\030\021 " + + "\001(\tB\003\340A\003\022<\n\023oldest_version_time\030\022 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\"7\n\005State\022" + + "\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005" + + "READY\020\002:\\\352AY\n\035spanner.googleapis.com/Bac" + + "kup\0228projects/{project}/instances/{insta" + + "nce}/backups/{backup}\"\205\002\n\023CreateBackupRe" + + "quest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.g" + + "oogleapis.com/Instance\022\026\n\tbackup_id\030\002 \001(" + + "\tB\003\340A\002\022=\n\006backup\030\003 \001(\0132(.google.spanner." + + "admin.database.v1.BackupB\003\340A\002\022^\n\021encrypt" + + "ion_config\030\004 \001(\0132>.google.spanner.admin." + + "database.v1.CreateBackupEncryptionConfig" + + "B\003\340A\001\"\370\001\n\024CreateBackupMetadata\0220\n\004name\030\001" + + " \001(\tB\"\372A\037\n\035spanner.googleapis.com/Backup" + + "\0226\n\010database\030\002 \001(\tB$\372A!\n\037spanner.googlea" + + "pis.com/Database\022E\n\010progress\030\003 \001(\01323.goo" + + "gle.spanner.admin.database.v1.OperationP" + + "rogress\022/\n\013cancel_time\030\004 \001(\0132\032.google.pr" + + "otobuf.Timestamp\"\266\002\n\021CopyBackupRequest\0227" + + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleap" + + "is.com/Instance\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022" + + "<\n\rsource_backup\030\003 \001(\tB%\340A\002\372A\037\n\035spanner." + + "googleapis.com/Backup\0224\n\013expire_time\030\004 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\002\022\\\n\021e" + + "ncryption_config\030\005 \001(\0132<.google.spanner." + + "admin.database.v1.CopyBackupEncryptionCo" + + "nfigB\003\340A\001\"\371\001\n\022CopyBackupMetadata\0220\n\004name" + + "\030\001 \001(\tB\"\372A\037\n\035spanner.googleapis.com/Back" + + "up\0229\n\rsource_backup\030\002 \001(\tB\"\372A\037\n\035spanner." + + "googleapis.com/Backup\022E\n\010progress\030\003 \001(\0132" + + "3.google.spanner.admin.database.v1.Opera" + + "tionProgress\022/\n\013cancel_time\030\004 \001(\0132\032.goog" + + "le.protobuf.Timestamp\"\212\001\n\023UpdateBackupRe" + + "quest\022=\n\006backup\030\001 \001(\0132(.google.spanner.a" + + "dmin.database.v1.BackupB\003\340A\002\0224\n\013update_m" + + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340" + + "A\002\"G\n\020GetBackupRequest\0223\n\004name\030\001 \001(\tB%\340A" + + "\002\372A\037\n\035spanner.googleapis.com/Backup\"J\n\023D" + + "eleteBackupRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037" + + "\n\035spanner.googleapis.com/Backup\"\204\001\n\022List" + + "BackupsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037" + + "spanner.googleapis.com/Instance\022\016\n\006filte" + + "r\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token" + + "\030\004 \001(\t\"i\n\023ListBackupsResponse\0229\n\007backups" + + "\030\001 \003(\0132(.google.spanner.admin.database.v" + + "1.Backup\022\027\n\017next_page_token\030\002 \001(\t\"\215\001\n\033Li" + + "stBackupOperationsRequest\0227\n\006parent\030\001 \001(" + "\tB\'\340A\002\372A!\n\037spanner.googleapis.com/Instan" - + "ce\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022<\n\rsource_bac" - + "kup\030\003 \001(\tB%\340A\002\372A\037\n\035spanner.googleapis.co" - + "m/Backup\0224\n\013expire_time\030\004 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\002\022\\\n\021encryption_con" - + "fig\030\005 \001(\0132<.google.spanner.admin.databas" - + "e.v1.CopyBackupEncryptionConfigB\003\340A\001\"\371\001\n" - + "\022CopyBackupMetadata\0220\n\004name\030\001 \001(\tB\"\372A\037\n\035" - + "spanner.googleapis.com/Backup\0229\n\rsource_" - + "backup\030\002 \001(\tB\"\372A\037\n\035spanner.googleapis.co" - + "m/Backup\022E\n\010progress\030\003 \001(\01323.google.span" - + "ner.admin.database.v1.OperationProgress\022" - + "/\n\013cancel_time\030\004 \001(\0132\032.google.protobuf.T" - + "imestamp\"\212\001\n\023UpdateBackupRequest\022=\n\006back" - + "up\030\001 \001(\0132(.google.spanner.admin.database" - + ".v1.BackupB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\003\340A\002\"G\n\020GetBack" - + "upRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035spanner" - + ".googleapis.com/Backup\"J\n\023DeleteBackupRe" - + "quest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035spanner.goo" - + "gleapis.com/Backup\"\204\001\n\022ListBackupsReques" - + "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\"i\n\023Lis" - + "tBackupsResponse\0229\n\007backups\030\001 \003(\0132(.goog" - + "le.spanner.admin.database.v1.Backup\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"\215\001\n\033ListBackupOpera" - + "tionsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037sp" - + "anner.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\"j\n\034ListBackupOperationsResponse\0221\n\n" - + "operations\030\001 \003(\0132\035.google.longrunning.Op" - + "eration\022\027\n\017next_page_token\030\002 \001(\t\"\342\001\n\nBac" - + "kupInfo\0222\n\006backup\030\001 \001(\tB\"\372A\037\n\035spanner.go" - + "ogleapis.com/Backup\0220\n\014version_time\030\004 \001(" - + "\0132\032.google.protobuf.Timestamp\022/\n\013create_" - + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022=" - + "\n\017source_database\030\003 \001(\tB$\372A!\n\037spanner.go" - + "ogleapis.com/Database\"\237\003\n\034CreateBackupEn" - + "cryptionConfig\022k\n\017encryption_type\030\001 \001(\0162" - + "M.google.spanner.admin.database.v1.Creat" - + "eBackupEncryptionConfig.EncryptionTypeB\003" - + "\340A\002\022?\n\014kms_key_name\030\002 \001(\tB)\340A\001\372A#\n!cloud" - + "kms.googleapis.com/CryptoKey\022@\n\rkms_key_" - + "names\030\003 \003(\tB)\340A\001\372A#\n!cloudkms.googleapis" - + ".com/CryptoKey\"\216\001\n\016EncryptionType\022\037\n\033ENC" - + "RYPTION_TYPE_UNSPECIFIED\020\000\022\033\n\027USE_DATABA" - + "SE_ENCRYPTION\020\001\022\035\n\031GOOGLE_DEFAULT_ENCRYP" - + "TION\020\002\022\037\n\033CUSTOMER_MANAGED_ENCRYPTION\020\003\"" - + "\253\003\n\032CopyBackupEncryptionConfig\022i\n\017encryp" - + "tion_type\030\001 \001(\0162K.google.spanner.admin.d" - + "atabase.v1.CopyBackupEncryptionConfig.En" - + "cryptionTypeB\003\340A\002\022?\n\014kms_key_name\030\002 \001(\tB" - + ")\340A\001\372A#\n!cloudkms.googleapis.com/CryptoK" - + "ey\022@\n\rkms_key_names\030\003 \003(\tB)\340A\001\372A#\n!cloud" - + "kms.googleapis.com/CryptoKey\"\236\001\n\016Encrypt" - + "ionType\022\037\n\033ENCRYPTION_TYPE_UNSPECIFIED\020\000" - + "\022+\n\'USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPT" - + "ION\020\001\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020\002\022\037\n\033" - + "CUSTOMER_MANAGED_ENCRYPTION\020\003\"\020\n\016FullBac" - + "kupSpecB\375\001\n$com.google.spanner.admin.dat" - + "abase.v1B\013BackupProtoP\001ZFcloud.google.co" - + "m/go/spanner/admin/database/apiv1/databa" - + "sepb;databasepb\252\002&Google.Cloud.Spanner.A" - + "dmin.Database.V1\312\002&Google\\Cloud\\Spanner\\" - + "Admin\\Database\\V1\352\002+Google::Cloud::Spann" - + "er::Admin::Database::V1b\006proto3" + + "ce\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\"j\n\034ListBackupOperation" + + "sResponse\0221\n\noperations\030\001 \003(\0132\035.google.l" + + "ongrunning.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\035spanner.googleapis.com/Backup\0220\n\014vers" + + "ion_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mp\022/\n\013create_time\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\022=\n\017source_database\030\003 \001(\tB$\372A" + + "!\n\037spanner.googleapis.com/Database\"\237\003\n\034C" + + "reateBackupEncryptionConfig\022k\n\017encryptio" + + "n_type\030\001 \001(\0162M.google.spanner.admin.data" + + "base.v1.CreateBackupEncryptionConfig.Enc" + + "ryptionTypeB\003\340A\002\022?\n\014kms_key_name\030\002 \001(\tB)" + + "\340A\001\372A#\n!cloudkms.googleapis.com/CryptoKe" + + "y\022@\n\rkms_key_names\030\003 \003(\tB)\340A\001\372A#\n!cloudk" + + "ms.googleapis.com/CryptoKey\"\216\001\n\016Encrypti" + + "onType\022\037\n\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022" + + "\033\n\027USE_DATABASE_ENCRYPTION\020\001\022\035\n\031GOOGLE_D" + + "EFAULT_ENCRYPTION\020\002\022\037\n\033CUSTOMER_MANAGED_" + + "ENCRYPTION\020\003\"\253\003\n\032CopyBackupEncryptionCon" + + "fig\022i\n\017encryption_type\030\001 \001(\0162K.google.sp" + + "anner.admin.database.v1.CopyBackupEncryp" + + "tionConfig.EncryptionTypeB\003\340A\002\022?\n\014kms_ke" + + "y_name\030\002 \001(\tB)\340A\001\372A#\n!cloudkms.googleapi" + + "s.com/CryptoKey\022@\n\rkms_key_names\030\003 \003(\tB)" + + "\340A\001\372A#\n!cloudkms.googleapis.com/CryptoKe" + + "y\"\236\001\n\016EncryptionType\022\037\n\033ENCRYPTION_TYPE_" + + "UNSPECIFIED\020\000\022+\n\'USE_CONFIG_DEFAULT_OR_B" + + "ACKUP_ENCRYPTION\020\001\022\035\n\031GOOGLE_DEFAULT_ENC" + + "RYPTION\020\002\022\037\n\033CUSTOMER_MANAGED_ENCRYPTION" + + "\020\003\"\020\n\016FullBackupSpec\"\027\n\025IncrementalBacku" + + "pSpecB\375\001\n$com.google.spanner.admin.datab" + + "ase.v1B\013BackupProtoP\001ZFcloud.google.com/" + + "go/spanner/admin/database/apiv1/database" + + "pb;databasepb\252\002&Google.Cloud.Spanner.Adm" + + "in.Database.V1\312\002&Google\\Cloud\\Spanner\\Ad" + + "min\\Database\\V1\352\002+Google::Cloud::Spanner" + + "::Admin::Database::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -237,6 +246,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CreateTime", "SizeBytes", + "FreeableSizeBytes", + "ExclusiveSizeBytes", "State", "ReferencingDatabases", "EncryptionInfo", @@ -245,6 +256,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReferencingBackups", "MaxExpireTime", "BackupSchedules", + "IncrementalBackupChainId", + "OldestVersionTime", }); internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -364,6 +377,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_FullBackupSpec_descriptor, new java.lang.String[] {}); + internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java index eb5fc00ab9..c4f5495651 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java @@ -76,6 +76,7 @@ public enum BackupTypeSpecCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { FULL_BACKUP_SPEC(7), + INCREMENTAL_BACKUP_SPEC(8), BACKUPTYPESPEC_NOT_SET(0); private final int value; @@ -96,6 +97,8 @@ public static BackupTypeSpecCase forNumber(int value) { switch (value) { case 7: return FULL_BACKUP_SPEC; + case 8: + return INCREMENTAL_BACKUP_SPEC; case 0: return BACKUPTYPESPEC_NOT_SET; default: @@ -414,6 +417,61 @@ public com.google.spanner.admin.database.v1.FullBackupSpecOrBuilder getFullBacku return com.google.spanner.admin.database.v1.FullBackupSpec.getDefaultInstance(); } + public static final int INCREMENTAL_BACKUP_SPEC_FIELD_NUMBER = 8; + /** + * + * + *
+   * The schedule creates incremental backup chains.
+   * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + * + * @return Whether the incrementalBackupSpec field is set. + */ + @java.lang.Override + public boolean hasIncrementalBackupSpec() { + return backupTypeSpecCase_ == 8; + } + /** + * + * + *
+   * The schedule creates incremental backup chains.
+   * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + * + * @return The incrementalBackupSpec. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpec getIncrementalBackupSpec() { + if (backupTypeSpecCase_ == 8) { + return (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_; + } + return com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } + /** + * + * + *
+   * The schedule creates incremental backup chains.
+   * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder + getIncrementalBackupSpecOrBuilder() { + if (backupTypeSpecCase_ == 8) { + return (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_; + } + return com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } + public static final int UPDATE_TIME_FIELD_NUMBER = 9; private com.google.protobuf.Timestamp updateTime_; /** @@ -498,6 +556,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backupTypeSpecCase_ == 7) { output.writeMessage(7, (com.google.spanner.admin.database.v1.FullBackupSpec) backupTypeSpec_); } + if (backupTypeSpecCase_ == 8) { + output.writeMessage( + 8, (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_); + } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(9, getUpdateTime()); } @@ -527,6 +589,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.spanner.admin.database.v1.FullBackupSpec) backupTypeSpec_); } + if (backupTypeSpecCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_); + } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); } @@ -568,6 +635,9 @@ public boolean equals(final java.lang.Object obj) { case 7: if (!getFullBackupSpec().equals(other.getFullBackupSpec())) return false; break; + case 8: + if (!getIncrementalBackupSpec().equals(other.getIncrementalBackupSpec())) return false; + break; case 0: default: } @@ -605,6 +675,10 @@ public int hashCode() { hash = (37 * hash) + FULL_BACKUP_SPEC_FIELD_NUMBER; hash = (53 * hash) + getFullBackupSpec().hashCode(); break; + case 8: + hash = (37 * hash) + INCREMENTAL_BACKUP_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getIncrementalBackupSpec().hashCode(); + break; case 0: default: } @@ -780,6 +854,9 @@ public Builder clear() { if (fullBackupSpecBuilder_ != null) { fullBackupSpecBuilder_.clear(); } + if (incrementalBackupSpecBuilder_ != null) { + incrementalBackupSpecBuilder_.clear(); + } updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -844,7 +921,7 @@ private void buildPartial0(com.google.spanner.admin.database.v1.BackupSchedule r encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); to_bitField0_ |= 0x00000008; } @@ -857,6 +934,9 @@ private void buildPartialOneofs(com.google.spanner.admin.database.v1.BackupSched if (backupTypeSpecCase_ == 7 && fullBackupSpecBuilder_ != null) { result.backupTypeSpec_ = fullBackupSpecBuilder_.build(); } + if (backupTypeSpecCase_ == 8 && incrementalBackupSpecBuilder_ != null) { + result.backupTypeSpec_ = incrementalBackupSpecBuilder_.build(); + } } @java.lang.Override @@ -928,6 +1008,11 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.BackupSchedule oth mergeFullBackupSpec(other.getFullBackupSpec()); break; } + case INCREMENTAL_BACKUP_SPEC: + { + mergeIncrementalBackupSpec(other.getIncrementalBackupSpec()); + break; + } case BACKUPTYPESPEC_NOT_SET: { break; @@ -991,10 +1076,17 @@ public Builder mergeFrom( backupTypeSpecCase_ = 7; break; } // case 58 + case 66: + { + input.readMessage( + getIncrementalBackupSpecFieldBuilder().getBuilder(), extensionRegistry); + backupTypeSpecCase_ = 8; + break; + } // case 66 case 74: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 74 default: @@ -2051,6 +2143,231 @@ public com.google.spanner.admin.database.v1.FullBackupSpec.Builder getFullBackup return fullBackupSpecBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.IncrementalBackupSpec, + com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder, + com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder> + incrementalBackupSpecBuilder_; + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + * + * @return Whether the incrementalBackupSpec field is set. + */ + @java.lang.Override + public boolean hasIncrementalBackupSpec() { + return backupTypeSpecCase_ == 8; + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + * + * @return The incrementalBackupSpec. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpec getIncrementalBackupSpec() { + if (incrementalBackupSpecBuilder_ == null) { + if (backupTypeSpecCase_ == 8) { + return (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_; + } + return com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } else { + if (backupTypeSpecCase_ == 8) { + return incrementalBackupSpecBuilder_.getMessage(); + } + return com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + public Builder setIncrementalBackupSpec( + com.google.spanner.admin.database.v1.IncrementalBackupSpec value) { + if (incrementalBackupSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupTypeSpec_ = value; + onChanged(); + } else { + incrementalBackupSpecBuilder_.setMessage(value); + } + backupTypeSpecCase_ = 8; + return this; + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + public Builder setIncrementalBackupSpec( + com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder builderForValue) { + if (incrementalBackupSpecBuilder_ == null) { + backupTypeSpec_ = builderForValue.build(); + onChanged(); + } else { + incrementalBackupSpecBuilder_.setMessage(builderForValue.build()); + } + backupTypeSpecCase_ = 8; + return this; + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + public Builder mergeIncrementalBackupSpec( + com.google.spanner.admin.database.v1.IncrementalBackupSpec value) { + if (incrementalBackupSpecBuilder_ == null) { + if (backupTypeSpecCase_ == 8 + && backupTypeSpec_ + != com.google.spanner.admin.database.v1.IncrementalBackupSpec + .getDefaultInstance()) { + backupTypeSpec_ = + com.google.spanner.admin.database.v1.IncrementalBackupSpec.newBuilder( + (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + backupTypeSpec_ = value; + } + onChanged(); + } else { + if (backupTypeSpecCase_ == 8) { + incrementalBackupSpecBuilder_.mergeFrom(value); + } else { + incrementalBackupSpecBuilder_.setMessage(value); + } + } + backupTypeSpecCase_ = 8; + return this; + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + public Builder clearIncrementalBackupSpec() { + if (incrementalBackupSpecBuilder_ == null) { + if (backupTypeSpecCase_ == 8) { + backupTypeSpecCase_ = 0; + backupTypeSpec_ = null; + onChanged(); + } + } else { + if (backupTypeSpecCase_ == 8) { + backupTypeSpecCase_ = 0; + backupTypeSpec_ = null; + } + incrementalBackupSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + public com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder + getIncrementalBackupSpecBuilder() { + return getIncrementalBackupSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder + getIncrementalBackupSpecOrBuilder() { + if ((backupTypeSpecCase_ == 8) && (incrementalBackupSpecBuilder_ != null)) { + return incrementalBackupSpecBuilder_.getMessageOrBuilder(); + } else { + if (backupTypeSpecCase_ == 8) { + return (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_; + } + return com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * The schedule creates incremental backup chains.
+     * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.IncrementalBackupSpec, + com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder, + com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder> + getIncrementalBackupSpecFieldBuilder() { + if (incrementalBackupSpecBuilder_ == null) { + if (!(backupTypeSpecCase_ == 8)) { + backupTypeSpec_ = + com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } + incrementalBackupSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.IncrementalBackupSpec, + com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder, + com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder>( + (com.google.spanner.admin.database.v1.IncrementalBackupSpec) backupTypeSpec_, + getParentForChildren(), + isClean()); + backupTypeSpec_ = null; + } + backupTypeSpecCase_ = 8; + onChanged(); + return incrementalBackupSpecBuilder_; + } + private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -2073,7 +2390,7 @@ public com.google.spanner.admin.database.v1.FullBackupSpec.Builder getFullBackup * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2121,7 +2438,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2144,7 +2461,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2163,7 +2480,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -2174,7 +2491,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -2193,7 +2510,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -2216,7 +2533,7 @@ public Builder clearUpdateTime() { * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java index cb1db14d21..128bc441f7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java @@ -239,6 +239,45 @@ public interface BackupScheduleOrBuilder */ com.google.spanner.admin.database.v1.FullBackupSpecOrBuilder getFullBackupSpecOrBuilder(); + /** + * + * + *
+   * The schedule creates incremental backup chains.
+   * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + * + * @return Whether the incrementalBackupSpec field is set. + */ + boolean hasIncrementalBackupSpec(); + /** + * + * + *
+   * The schedule creates incremental backup chains.
+   * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + * + * @return The incrementalBackupSpec. + */ + com.google.spanner.admin.database.v1.IncrementalBackupSpec getIncrementalBackupSpec(); + /** + * + * + *
+   * The schedule creates incremental backup chains.
+   * 
+ * + * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; + * + */ + com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder + getIncrementalBackupSpecOrBuilder(); + /** * * diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java index d2227049ae..9f018585af 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java @@ -83,7 +83,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/v1/backup.proto\"i\n\022BackupScheduleSpec\022B" + "\n\tcron_spec\030\001 \001(\0132-.google.spanner.admin" + ".database.v1.CrontabSpecH\000B\017\n\rschedule_s" - + "pec\"\310\004\n\016BackupSchedule\022\021\n\004name\030\001 \001(\tB\003\340A" + + "pec\"\244\005\n\016BackupSchedule\022\021\n\004name\030\001 \001(\tB\003\340A" + "\010\022G\n\004spec\030\006 \001(\01324.google.spanner.admin.d" + "atabase.v1.BackupScheduleSpecB\003\340A\001\022:\n\022re" + "tention_duration\030\003 \001(\0132\031.google.protobuf" @@ -91,43 +91,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\0132>.google.spanner.admin.database.v1.Cre" + "ateBackupEncryptionConfigB\003\340A\001\022L\n\020full_b" + "ackup_spec\030\007 \001(\01320.google.spanner.admin." - + "database.v1.FullBackupSpecH\000\0224\n\013update_t" - + "ime\030\t \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003:\245\001\352A\241\001\n%spanner.googleapis.com/Backup" - + "Schedule\022Wprojects/{project}/instances/{" - + "instance}/databases/{database}/backupSch" - + "edules/{schedule}*\017backupSchedules2\016back" - + "upScheduleB\022\n\020backup_type_spec\"q\n\013Cronta" - + "bSpec\022\021\n\004text\030\001 \001(\tB\003\340A\002\022\026\n\ttime_zone\030\002 " - + "\001(\tB\003\340A\003\0227\n\017creation_window\030\003 \001(\0132\031.goog" - + "le.protobuf.DurationB\003\340A\003\"\307\001\n\033CreateBack" - + "upScheduleRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A" - + "!\n\037spanner.googleapis.com/Database\022\037\n\022ba" - + "ckup_schedule_id\030\002 \001(\tB\003\340A\002\022N\n\017backup_sc" - + "hedule\030\003 \001(\01320.google.spanner.admin.data" - + "base.v1.BackupScheduleB\003\340A\002\"W\n\030GetBackup" - + "ScheduleRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%s" - + "panner.googleapis.com/BackupSchedule\"Z\n\033" - + "DeleteBackupScheduleRequest\022;\n\004name\030\001 \001(" + + "database.v1.FullBackupSpecH\000\022Z\n\027incremen" + + "tal_backup_spec\030\010 \001(\01327.google.spanner.a" + + "dmin.database.v1.IncrementalBackupSpecH\000" + + "\0224\n\013update_time\030\t \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003:\245\001\352A\241\001\n%spanner.googleapi" + + "s.com/BackupSchedule\022Wprojects/{project}" + + "/instances/{instance}/databases/{databas" + + "e}/backupSchedules/{schedule}*\017backupSch" + + "edules2\016backupScheduleB\022\n\020backup_type_sp" + + "ec\"q\n\013CrontabSpec\022\021\n\004text\030\001 \001(\tB\003\340A\002\022\026\n\t" + + "time_zone\030\002 \001(\tB\003\340A\003\0227\n\017creation_window\030" + + "\003 \001(\0132\031.google.protobuf.DurationB\003\340A\003\"\307\001" + + "\n\033CreateBackupScheduleRequest\0227\n\006parent\030" + + "\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/Da" + + "tabase\022\037\n\022backup_schedule_id\030\002 \001(\tB\003\340A\002\022" + + "N\n\017backup_schedule\030\003 \001(\01320.google.spanne" + + "r.admin.database.v1.BackupScheduleB\003\340A\002\"" + + "W\n\030GetBackupScheduleRequest\022;\n\004name\030\001 \001(" + "\tB-\340A\002\372A\'\n%spanner.googleapis.com/Backup" - + "Schedule\"\206\001\n\032ListBackupSchedulesRequest\022" - + "7\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googlea" - + "pis.com/Database\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001" - + "\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"\202\001\n\033ListBackup" - + "SchedulesResponse\022J\n\020backup_schedules\030\001 " - + "\003(\01320.google.spanner.admin.database.v1.B" - + "ackupSchedule\022\027\n\017next_page_token\030\002 \001(\t\"\243" - + "\001\n\033UpdateBackupScheduleRequest\022N\n\017backup" - + "_schedule\030\001 \001(\01320.google.spanner.admin.d" - + "atabase.v1.BackupScheduleB\003\340A\002\0224\n\013update" - + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB" - + "\003\340A\002B\205\002\n$com.google.spanner.admin.databa" - + "se.v1B\023BackupScheduleProtoP\001ZFcloud.goog" - + "le.com/go/spanner/admin/database/apiv1/d" - + "atabasepb;databasepb\252\002&Google.Cloud.Span" - + "ner.Admin.Database.V1\312\002&Google\\Cloud\\Spa" - + "nner\\Admin\\Database\\V1\352\002+Google::Cloud::" - + "Spanner::Admin::Database::V1b\006proto3" + + "Schedule\"Z\n\033DeleteBackupScheduleRequest\022" + + ";\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%spanner.googleapi" + + "s.com/BackupSchedule\"\206\001\n\032ListBackupSched" + + "ulesRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spa" + + "nner.googleapis.com/Database\022\026\n\tpage_siz" + + "e\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"\202\001" + + "\n\033ListBackupSchedulesResponse\022J\n\020backup_" + + "schedules\030\001 \003(\01320.google.spanner.admin.d" + + "atabase.v1.BackupSchedule\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"\243\001\n\033UpdateBackupScheduleReque" + + "st\022N\n\017backup_schedule\030\001 \001(\01320.google.spa" + + "nner.admin.database.v1.BackupScheduleB\003\340" + + "A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\002B\205\002\n$com.google.spanner." + + "admin.database.v1B\023BackupScheduleProtoP\001" + + "ZFcloud.google.com/go/spanner/admin/data" + + "base/apiv1/databasepb;databasepb\252\002&Googl" + + "e.Cloud.Spanner.Admin.Database.V1\312\002&Goog" + + "le\\Cloud\\Spanner\\Admin\\Database\\V1\352\002+Goo" + + "gle::Cloud::Spanner::Admin::Database::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -159,6 +162,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RetentionDuration", "EncryptionConfig", "FullBackupSpec", + "IncrementalBackupSpec", "UpdateTime", "BackupTypeSpec", }); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java new file mode 100644 index 0000000000..36a605c8aa --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java @@ -0,0 +1,443 @@ +/* + * Copyright 2024 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 + +// Protobuf Java Version: 3.25.3 +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * The specification for incremental backup chains.
+ * An incremental backup stores the delta of changes between a previous
+ * backup and the database contents at a given version time. An
+ * incremental backup chain consists of a full backup and zero or more
+ * successive incremental backups. The first backup created for an
+ * incremental backup chain is always a full backup.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.IncrementalBackupSpec} + */ +public final class IncrementalBackupSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.IncrementalBackupSpec) + IncrementalBackupSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use IncrementalBackupSpec.newBuilder() to construct. + private IncrementalBackupSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IncrementalBackupSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IncrementalBackupSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_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_IncrementalBackupSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.IncrementalBackupSpec.class, + com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.admin.database.v1.IncrementalBackupSpec)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.IncrementalBackupSpec other = + (com.google.spanner.admin.database.v1.IncrementalBackupSpec) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.IncrementalBackupSpec 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.IncrementalBackupSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.IncrementalBackupSpec 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.IncrementalBackupSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.IncrementalBackupSpec 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.IncrementalBackupSpec 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.IncrementalBackupSpec 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.IncrementalBackupSpec 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.IncrementalBackupSpec 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.IncrementalBackupSpec 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.IncrementalBackupSpec 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.IncrementalBackupSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The specification for incremental backup chains.
+   * An incremental backup stores the delta of changes between a previous
+   * backup and the database contents at a given version time. An
+   * incremental backup chain consists of a full backup and zero or more
+   * successive incremental backups. The first backup created for an
+   * incremental backup chain is always a full backup.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.IncrementalBackupSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.IncrementalBackupSpec) + com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.BackupProto + .internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_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_IncrementalBackupSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.IncrementalBackupSpec.class, + com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.IncrementalBackupSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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_IncrementalBackupSpec_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpec getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpec build() { + com.google.spanner.admin.database.v1.IncrementalBackupSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.IncrementalBackupSpec buildPartial() { + com.google.spanner.admin.database.v1.IncrementalBackupSpec result = + new com.google.spanner.admin.database.v1.IncrementalBackupSpec(this); + 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.IncrementalBackupSpec) { + return mergeFrom((com.google.spanner.admin.database.v1.IncrementalBackupSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.IncrementalBackupSpec other) { + if (other == com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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.IncrementalBackupSpec) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.IncrementalBackupSpec) + private static final com.google.spanner.admin.database.v1.IncrementalBackupSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.IncrementalBackupSpec(); + } + + public static com.google.spanner.admin.database.v1.IncrementalBackupSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IncrementalBackupSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.IncrementalBackupSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java new file mode 100644 index 0000000000..fa0ee3f7e7 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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 + +// Protobuf Java Version: 3.25.3 +package com.google.spanner.admin.database.v1; + +public interface IncrementalBackupSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.IncrementalBackupSpec) + com.google.protobuf.MessageOrBuilder {} 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 f684a4c605..842ab0ff1e 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 @@ -103,6 +103,24 @@ message Backup { // Output only. Size of the backup in bytes. int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The number of bytes that will be freed by deleting this + // backup. This value will be zero if, for example, this backup is part of an + // incremental backup chain and younger backups in the chain require that we + // keep its data. For backups not in an incremental backup chain, this is + // always the size of the backup. This value may change if backups on the same + // chain get created, deleted or expired. + int64 freeable_size_bytes = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. For a backup in an incremental backup chain, this is the + // storage space needed to keep the data that has changed since the previous + // backup. For all other backups, this is always the size of the backup. This + // value may change if backups on the same chain get deleted or expired. + // + // This field can be used to calculate the total storage space used by a set + // of backups. For example, the total space used by all backups of a database + // can be computed by summing up this field. + int64 exclusive_size_bytes = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The current state of the backup. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -168,6 +186,23 @@ message Backup { // single backup schedule URI associated with creating this backup. repeated string backup_schedules = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Populated only for backups in an incremental backup chain. + // Backups share the same chain id if and only if they belong to the same + // incremental backup chain. Use this field to determine which backups are + // part of the same incremental backup chain. The ordering of backups in the + // chain can be determined by ordering the backup `version_time`. + string incremental_backup_chain_id = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Data deleted at a time older than this is guaranteed not to be + // retained in order to support this backup. For a backup in an incremental + // backup chain, this is the version time of the oldest backup that exists or + // ever existed in the chain. For all other backups, this is the version time + // of the backup. This field can be used to understand what data is being + // retained by the backup system. + google.protobuf.Timestamp oldest_version_time = 18 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request for @@ -705,3 +740,11 @@ message CopyBackupEncryptionConfig { // A full backup stores the entire contents of the database at a given // version time. message FullBackupSpec {} + +// The specification for incremental backup chains. +// An incremental backup stores the delta of changes between a previous +// backup and the database contents at a given version time. An +// incremental backup chain consists of a full backup and zero or more +// successive incremental backups. The first backup created for an +// incremental backup chain is always a full backup. +message IncrementalBackupSpec {} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup_schedule.proto b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup_schedule.proto index 9ef4587f81..c9b5e7e3f4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup_schedule.proto +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/backup_schedule.proto @@ -83,6 +83,9 @@ message BackupSchedule { oneof backup_type_spec { // The schedule creates only full backups. FullBackupSpec full_backup_spec = 7; + + // The schedule creates incremental backup chains. + IncrementalBackupSpec incremental_backup_spec = 8; } // Output only. The timestamp at which the schedule was last updated. From ba2d281bacdf9266b9d704c7cabe6301aceac648 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 1 Aug 2024 02:19:36 +0000 Subject: [PATCH 10/12] chore: Update generation configuration at Thu Aug 1 02:19:28 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 39293c5967..9085547ae5 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.43.0 -googleapis_commitish: d8fce50eea92bac3a6612ee61559989ce3b38776 +googleapis_commitish: 24c5ee09178ac7d1387dfa2d6053be2fb93c8dc4 libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From 595bf4bf8339d7859c4c7418ab160adbb251d0a7 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 2 Aug 2024 02:15:51 +0000 Subject: [PATCH 11/12] chore: Update generation configuration at Fri Aug 2 02:15:43 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 9085547ae5..3b4b1202ae 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.43.0 -googleapis_commitish: 24c5ee09178ac7d1387dfa2d6053be2fb93c8dc4 +googleapis_commitish: c37b7f00ae5b9ce0d33ae28473d993cdaa5550cb libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner From c574afd3729deb21052f396542c78c8e809d0245 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 3 Aug 2024 02:14:58 +0000 Subject: [PATCH 12/12] chore: Update generation configuration at Sat Aug 3 02:14:47 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 3b4b1202ae..94e11368e5 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.43.0 -googleapis_commitish: c37b7f00ae5b9ce0d33ae28473d993cdaa5550cb +googleapis_commitish: bc05924644a4bb93c0ac5973a07b83387a93b71f libraries_bom_version: 26.43.0 libraries: - api_shortname: spanner