From 1673fd70df4ebfaa4b5fa07112d152119427699a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:28:26 +0530 Subject: [PATCH] feat: Add SessionPoolOptions, SpannerOptions protos in executor protos (#2932) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add instance partition support to spanner instance proto PiperOrigin-RevId: 611127452 Source-Link: https://github.com/googleapis/googleapis/commit/618d47cf1e3dc4970aaec81e417039fc9d62bfdc Source-Link: https://github.com/googleapis/googleapis-gen/commit/92d855588828430e8b428ed78219e23ee666da78 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTJkODU1NTg4ODI4NDMwZThiNDI4ZWQ3ODIxOWUyM2VlNjY2ZGE3OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix(deps): Update the Java code generator (gapic-generator-java) to 2.37.0 PiperOrigin-RevId: 611816371 Source-Link: https://github.com/googleapis/googleapis/commit/2a40f63ea714c7f4c6856a5db4d1f3cc7d4c4b18 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d30ff0767777b381fb1617f67a90e3abd3bdc6dc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDMwZmYwNzY3Nzc3YjM4MWZiMTYxN2Y2N2E5MGUzYWJkM2JkYzZkYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add SessionPoolOptions, SpannerOptions protos in executor protos PiperOrigin-RevId: 621265883 Source-Link: https://github.com/googleapis/googleapis/commit/fed9845c564d6acf8d03beee69b36666c8bd7fa4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c66a76957e2e16347bc1dd3f4c638223f065ee80 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzY2YTc2OTU3ZTJlMTYzNDdiYzFkZDNmNGM2MzgyMjNmMDY1ZWU4MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../reflect-config.json | 251 +- .../database/v1/DatabaseAdminSettings.java | 2 - .../v1/stub/DatabaseAdminStubSettings.java | 12 - .../HttpJsonDatabaseAdminCallableFactory.java | 4 - .../v1/stub/HttpJsonDatabaseAdminStub.java | 2 - .../instance/v1/InstanceAdminClient.java | 1628 +++++++- .../instance/v1/InstanceAdminSettings.java | 130 +- .../admin/instance/v1/gapic_metadata.json | 18 + .../v1/stub/GrpcInstanceAdminStub.java | 299 ++ .../HttpJsonInstanceAdminCallableFactory.java | 4 - .../v1/stub/HttpJsonInstanceAdminStub.java | 488 ++- .../instance/v1/stub/InstanceAdminStub.java | 71 + .../v1/stub/InstanceAdminStubSettings.java | 461 ++- .../cloud/spanner/v1/SpannerSettings.java | 2 - .../stub/HttpJsonSpannerCallableFactory.java | 4 - .../spanner/v1/stub/HttpJsonSpannerStub.java | 2 - .../reflect-config.json | 207 + .../v1/InstanceAdminClientHttpJsonTest.java | 613 +++ .../instance/v1/InstanceAdminClientTest.java | 550 +++ .../instance/v1/MockInstanceAdminImpl.java | 137 + .../admin/instance/v1/InstanceAdminGrpc.java | 1114 +++++- .../v1/CreateInstancePartitionMetadata.java | 1579 ++++++++ ...ateInstancePartitionMetadataOrBuilder.java | 178 + .../v1/CreateInstancePartitionRequest.java | 1202 ++++++ ...eateInstancePartitionRequestOrBuilder.java | 135 + .../v1/DeleteInstancePartitionRequest.java | 871 +++++ ...leteInstancePartitionRequestOrBuilder.java | 90 + .../v1/GetInstancePartitionRequest.java | 663 ++++ .../GetInstancePartitionRequestOrBuilder.java | 59 + .../admin/instance/v1/InstancePartition.java | 3330 +++++++++++++++++ .../instance/v1/InstancePartitionName.java | 231 ++ .../v1/InstancePartitionOrBuilder.java | 485 +++ ...istInstancePartitionOperationsRequest.java | 1816 +++++++++ ...cePartitionOperationsRequestOrBuilder.java | 266 ++ ...stInstancePartitionOperationsResponse.java | 1571 ++++++++ ...ePartitionOperationsResponseOrBuilder.java | 189 + .../v1/ListInstancePartitionsRequest.java | 1331 +++++++ ...istInstancePartitionsRequestOrBuilder.java | 158 + .../v1/ListInstancePartitionsResponse.java | 1507 ++++++++ ...stInstancePartitionsResponseOrBuilder.java | 177 + .../instance/v1/ListInstancesRequest.java | 343 +- .../v1/ListInstancesRequestOrBuilder.java | 50 + .../instance/v1/ListInstancesResponse.java | 316 ++ .../v1/ListInstancesResponseOrBuilder.java | 63 + .../v1/SpannerInstanceAdminProto.java | 489 ++- .../v1/UpdateInstancePartitionMetadata.java | 1579 ++++++++ ...ateInstancePartitionMetadataOrBuilder.java | 178 + .../v1/UpdateInstancePartitionRequest.java | 1139 ++++++ ...dateInstancePartitionRequestOrBuilder.java | 129 + .../instance/v1/spanner_instance_admin.proto | 558 ++- .../spanner/executor/v1/AdminAction.java | 208 +- .../executor/v1/AdminActionOrBuilder.java | 24 +- ...a => ChangeQuorumCloudDatabaseAction.java} | 146 +- ...geQuorumCloudDatabaseActionOrBuilder.java} | 10 +- .../executor/v1/CloudExecutorProto.java | 905 ++--- .../executor/v1/CreateCloudBackupAction.java | 289 ++ .../v1/CreateCloudBackupActionOrBuilder.java | 38 + .../v1/RestoreCloudDatabaseAction.java | 302 +- .../RestoreCloudDatabaseActionOrBuilder.java | 38 + .../executor/v1/SessionPoolOptions.java | 539 +++ .../v1/SessionPoolOptionsOrBuilder.java | 40 + .../spanner/executor/v1/SpannerAction.java | 284 +- .../executor/v1/SpannerActionOrBuilder.java | 35 + .../spanner/executor/v1/SpannerOptions.java | 730 ++++ .../executor/v1/SpannerOptionsOrBuilder.java | 61 + .../spanner/executor/v1/cloud_executor.proto | 34 +- 66 files changed, 29528 insertions(+), 836 deletions(-) create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java rename proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/{ReconfigureCloudDatabaseAction.java => ChangeQuorumCloudDatabaseAction.java} (80%) rename proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/{ReconfigureCloudDatabaseActionOrBuilder.java => ChangeQuorumCloudDatabaseActionOrBuilder.java} (89%) create mode 100644 proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java create mode 100644 proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java create mode 100644 proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java create mode 100644 proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.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 66b9c40db4..71898e0bba 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 @@ -2600,6 +2600,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.CreateInstanceRequest", "queryAllDeclaredConstructors": true, @@ -2636,6 +2672,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.DeleteInstanceRequest", "queryAllDeclaredConstructors": true, @@ -2672,6 +2726,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.GetInstanceRequest", "queryAllDeclaredConstructors": true, @@ -2753,6 +2825,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.InstancePartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstancePartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstancePartition$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest", "queryAllDeclaredConstructors": true, @@ -2825,6 +2924,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.ListInstancesRequest", "queryAllDeclaredConstructors": true, @@ -2960,6 +3131,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.UpdateInstanceRequest", "queryAllDeclaredConstructors": true, @@ -3068,6 +3275,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.executor.v1.ChangeStreamRecord", "queryAllDeclaredConstructors": true, @@ -4059,7 +4284,7 @@ "allPublicClasses": true }, { - "name": "com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction", + "name": "com.google.spanner.executor.v1.RestoreCloudDatabaseAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4068,7 +4293,7 @@ "allPublicClasses": true }, { - "name": "com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction$Builder", + "name": "com.google.spanner.executor.v1.RestoreCloudDatabaseAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4077,7 +4302,7 @@ "allPublicClasses": true }, { - "name": "com.google.spanner.executor.v1.RestoreCloudDatabaseAction", + "name": "com.google.spanner.executor.v1.SessionPoolOptions", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4086,7 +4311,7 @@ "allPublicClasses": true }, { - "name": "com.google.spanner.executor.v1.RestoreCloudDatabaseAction$Builder", + "name": "com.google.spanner.executor.v1.SessionPoolOptions$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4166,6 +4391,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.executor.v1.SpannerOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.executor.v1.StartBatchTransactionAction", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java index 8cfb9c5455..50d6900e1c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java @@ -317,7 +317,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -359,7 +358,6 @@ private static Builder createDefault() { return new Builder(DatabaseAdminStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(DatabaseAdminStubSettings.newHttpJsonBuilder()); } 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 31da17aad8..68432959c5 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 @@ -1329,8 +1329,6 @@ public UnaryCallSettings.Builder createDatabas } /** Returns the builder for the settings used for calls to createDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder createDatabaseOperationSettings() { return createDatabaseOperationSettings; @@ -1347,8 +1345,6 @@ public UnaryCallSettings.Builder updateDatabas } /** Returns the builder for the settings used for calls to updateDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder updateDatabaseOperationSettings() { return updateDatabaseOperationSettings; @@ -1361,8 +1357,6 @@ public UnaryCallSettings.Builder updateDatabas } /** Returns the builder for the settings used for calls to updateDatabaseDdl. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder updateDatabaseDdlOperationSettings() { return updateDatabaseDdlOperationSettings; @@ -1401,8 +1395,6 @@ public UnaryCallSettings.Builder createBackupSet } /** Returns the builder for the settings used for calls to createBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder createBackupOperationSettings() { return createBackupOperationSettings; @@ -1414,8 +1406,6 @@ public UnaryCallSettings.Builder copyBackupSetting } /** Returns the builder for the settings used for calls to copyBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder copyBackupOperationSettings() { return copyBackupOperationSettings; @@ -1449,8 +1439,6 @@ public UnaryCallSettings.Builder restoreDatab } /** Returns the builder for the settings used for calls to restoreDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder restoreDatabaseOperationSettings() { return restoreDatabaseOperationSettings; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java index c8e151ea68..9f8c8075f6 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.admin.database.v1.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonDatabaseAdminCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java index 9f30149bac..1eaa505513 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java @@ -23,7 +23,6 @@ import static com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient.ListDatabasesPagedResponse; import com.google.api.HttpRule; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -94,7 +93,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonDatabaseAdminStub extends DatabaseAdminStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java index 9461d953b8..2e08751ff1 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java @@ -43,25 +43,37 @@ import com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; import com.google.spanner.admin.instance.v1.InstanceConfigName; import com.google.spanner.admin.instance.v1.InstanceName; +import com.google.spanner.admin.instance.v1.InstancePartition; +import com.google.spanner.admin.instance.v1.InstancePartitionName; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.ProjectName; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import java.io.IOException; import java.util.List; @@ -270,6 +282,26 @@ * * * + *

ListInstancePartitions + *

Lists all instance partitions for the given instance. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listInstancePartitions(ListInstancePartitionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listInstancePartitions(InstanceName parent) + *

  • listInstancePartitions(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listInstancePartitionsPagedCallable() + *

  • listInstancePartitionsCallable() + *

+ * + * + * *

GetInstance *

Gets information about a particular instance. * @@ -425,6 +457,120 @@ * * * + * + *

GetInstancePartition + *

Gets information about a particular instance partition. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getInstancePartition(GetInstancePartitionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getInstancePartition(InstancePartitionName name) + *

  • getInstancePartition(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getInstancePartitionCallable() + *

+ * + * + * + *

CreateInstancePartition + *

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. + *

Immediately upon completion of this request: + *

* The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`. + *

Until completion of the returned operation: + *

* Cancelling the operation renders the instance partition immediately unreadable via the API. * The instance partition can be deleted. * All other attempts to modify the instance partition are rejected. + *

Upon completion of the returned operation: + *

* Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can start using this instance partition. * The instance partition's allocated resource levels are readable via the API. * The instance partition's state becomes `READY`. + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the format `<instance_partition_name>/operations/<operation_id>` and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createInstancePartitionAsync(CreateInstancePartitionRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createInstancePartitionAsync(InstanceName parent, InstancePartition instancePartition, String instancePartitionId) + *

  • createInstancePartitionAsync(String parent, InstancePartition instancePartition, String instancePartitionId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createInstancePartitionOperationCallable() + *

  • createInstancePartitionCallable() + *

+ * + * + * + *

DeleteInstancePartition + *

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. + *

Authorization requires `spanner.instancePartitions.delete` permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteInstancePartition(DeleteInstancePartitionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteInstancePartition(InstancePartitionName name) + *

  • deleteInstancePartition(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteInstancePartitionCallable() + *

+ * + * + * + *

UpdateInstancePartition + *

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns `NOT_FOUND`. + *

Immediately upon completion of this request: + *

* For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level. + *

Until completion of the returned operation: + *

* Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance partition are rejected. * Reading the instance partition via the API continues to give the pre-request resource levels. + *

Upon completion of the returned operation: + *

* Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the format `<instance_partition_name>/operations/<operation_id>` and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + *

Authorization requires `spanner.instancePartitions.update` permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateInstancePartitionAsync(UpdateInstancePartitionRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateInstancePartitionAsync(InstancePartition instancePartition, FieldMask fieldMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateInstancePartitionOperationCallable() + *

  • updateInstancePartitionCallable() + *

+ * + * + * + *

ListInstancePartitionOperations + *

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`. The long-running operation [metadata][google.longrunning.Operation.metadata] field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation. + *

Authorization requires `spanner.instancePartitionOperations.list` permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listInstancePartitionOperations(ListInstancePartitionOperationsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listInstancePartitionOperations(InstanceName parent) + *

  • listInstancePartitionOperations(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listInstancePartitionOperationsPagedCallable() + *

  • listInstancePartitionOperationsCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -1899,6 +2045,7 @@ public final ListInstancesPagedResponse listInstances(String parent) { * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") + * .setInstanceDeadline(Timestamp.newBuilder().build()) * .build(); * for (Instance element : instanceAdminClient.listInstances(request).iterateAll()) { * // doThingsWith(element); @@ -1932,6 +2079,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") + * .setInstanceDeadline(Timestamp.newBuilder().build()) * .build(); * ApiFuture future = * instanceAdminClient.listInstancesPagedCallable().futureCall(request); @@ -1966,6 +2114,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setFilter("filter-1274492040") + * .setInstanceDeadline(Timestamp.newBuilder().build()) * .build(); * while (true) { * ListInstancesResponse response = instanceAdminClient.listInstancesCallable().call(request); @@ -1986,6 +2135,180 @@ public final UnaryCallable listInst return stub.listInstancesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all instance partitions for the given instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   for (InstancePartition element :
+   *       instanceAdminClient.listInstancePartitions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The instance whose instance partitions should be listed. Values are of + * the form `projects/<project>/instances/<instance>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancePartitionsPagedResponse listInstancePartitions(InstanceName parent) { + ListInstancePartitionsRequest request = + ListInstancePartitionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstancePartitions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all instance partitions for the given instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   for (InstancePartition element :
+   *       instanceAdminClient.listInstancePartitions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The instance whose instance partitions should be listed. Values are of + * the form `projects/<project>/instances/<instance>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancePartitionsPagedResponse listInstancePartitions(String parent) { + ListInstancePartitionsRequest request = + ListInstancePartitionsRequest.newBuilder().setParent(parent).build(); + return listInstancePartitions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all instance partitions for the given instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   ListInstancePartitionsRequest request =
+   *       ListInstancePartitionsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setInstancePartitionDeadline(Timestamp.newBuilder().build())
+   *           .build();
+   *   for (InstancePartition element :
+   *       instanceAdminClient.listInstancePartitions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancePartitionsPagedResponse listInstancePartitions( + ListInstancePartitionsRequest request) { + return listInstancePartitionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all instance partitions for the given instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   ListInstancePartitionsRequest request =
+   *       ListInstancePartitionsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setInstancePartitionDeadline(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       instanceAdminClient.listInstancePartitionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (InstancePartition element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancePartitionsPagedCallable() { + return stub.listInstancePartitionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all instance partitions for the given instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   ListInstancePartitionsRequest request =
+   *       ListInstancePartitionsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setInstancePartitionDeadline(Timestamp.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     ListInstancePartitionsResponse response =
+   *         instanceAdminClient.listInstancePartitionsCallable().call(request);
+   *     for (InstancePartition element : response.getInstancePartitionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancePartitionsCallable() { + return stub.listInstancePartitionsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a particular instance. @@ -3227,24 +3550,1116 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq return stub.testIamPermissionsCallable(); } - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a particular instance partition. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   InstancePartitionName name =
+   *       InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
+   *   InstancePartition response = instanceAdminClient.getInstancePartition(name);
+   * }
+   * }
+ * + * @param name Required. The name of the requested instance partition. Values are of the form + * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InstancePartition getInstancePartition(InstancePartitionName name) { + GetInstancePartitionRequest request = + GetInstancePartitionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInstancePartition(request); } - @Override - public boolean isShutdown() { - return stub.isShutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a particular instance partition. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   String name =
+   *       InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]").toString();
+   *   InstancePartition response = instanceAdminClient.getInstancePartition(name);
+   * }
+   * }
+ * + * @param name Required. The name of the requested instance partition. Values are of the form + * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InstancePartition getInstancePartition(String name) { + GetInstancePartitionRequest request = + GetInstancePartitionRequest.newBuilder().setName(name).build(); + return getInstancePartition(request); } - @Override - public boolean isTerminated() { - return stub.isTerminated(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a particular instance partition. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   GetInstancePartitionRequest request =
+   *       GetInstancePartitionRequest.newBuilder()
+   *           .setName(
+   *               InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]")
+   *                   .toString())
+   *           .build();
+   *   InstancePartition response = instanceAdminClient.getInstancePartition(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InstancePartition getInstancePartition(GetInstancePartitionRequest request) { + return getInstancePartitionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a particular instance partition. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   GetInstancePartitionRequest request =
+   *       GetInstancePartitionRequest.newBuilder()
+   *           .setName(
+   *               InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       instanceAdminClient.getInstancePartitionCallable().futureCall(request);
+   *   // Do something.
+   *   InstancePartition response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getInstancePartitionCallable() { + return stub.getInstancePartitionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an instance partition and begins preparing it to be used. The returned [long-running + * operation][google.longrunning.Operation] can be used to track the progress of preparing the new + * instance partition. The instance partition name is assigned by the caller. If the named + * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. + * + *

Immediately upon completion of this request: + * + *

* The instance partition is readable via the API, with all requested attributes but no + * allocated resources. Its state is `CREATING`. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation renders the instance partition immediately unreadable via the + * API. * The instance partition can be deleted. * All other attempts to modify the + * instance partition are rejected. + * + *

Upon completion of the returned operation: + * + *

* Billing for all successfully-allocated resources begins (some types may have lower + * than the requested levels). * Databases can start using this instance partition. * The + * instance partition's allocated resource levels are readable via the API. * The instance + * partition's state becomes `READY`. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] + * field type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   InstancePartition instancePartition = InstancePartition.newBuilder().build();
+   *   String instancePartitionId = "instancePartitionId1364450768";
+   *   InstancePartition response =
+   *       instanceAdminClient
+   *           .createInstancePartitionAsync(parent, instancePartition, instancePartitionId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The name of the instance in which to create the instance partition. + * Values are of the form `projects/<project>/instances/<instance>`. + * @param instancePartition Required. The instance partition to create. The + * instance_partition.name may be omitted, but if specified must be + * `<parent>/instancePartitions/<instance_partition_id>`. + * @param instancePartitionId Required. The ID of the instance partition to create. Valid + * identifiers are of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + * characters in length. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createInstancePartitionAsync( + InstanceName parent, InstancePartition instancePartition, String instancePartitionId) { + CreateInstancePartitionRequest request = + CreateInstancePartitionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInstancePartition(instancePartition) + .setInstancePartitionId(instancePartitionId) + .build(); + return createInstancePartitionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an instance partition and begins preparing it to be used. The returned [long-running + * operation][google.longrunning.Operation] can be used to track the progress of preparing the new + * instance partition. The instance partition name is assigned by the caller. If the named + * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. + * + *

Immediately upon completion of this request: + * + *

* The instance partition is readable via the API, with all requested attributes but no + * allocated resources. Its state is `CREATING`. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation renders the instance partition immediately unreadable via the + * API. * The instance partition can be deleted. * All other attempts to modify the + * instance partition are rejected. + * + *

Upon completion of the returned operation: + * + *

* Billing for all successfully-allocated resources begins (some types may have lower + * than the requested levels). * Databases can start using this instance partition. * The + * instance partition's allocated resource levels are readable via the API. * The instance + * partition's state becomes `READY`. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] + * field type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   InstancePartition instancePartition = InstancePartition.newBuilder().build();
+   *   String instancePartitionId = "instancePartitionId1364450768";
+   *   InstancePartition response =
+   *       instanceAdminClient
+   *           .createInstancePartitionAsync(parent, instancePartition, instancePartitionId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The name of the instance in which to create the instance partition. + * Values are of the form `projects/<project>/instances/<instance>`. + * @param instancePartition Required. The instance partition to create. The + * instance_partition.name may be omitted, but if specified must be + * `<parent>/instancePartitions/<instance_partition_id>`. + * @param instancePartitionId Required. The ID of the instance partition to create. Valid + * identifiers are of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + * characters in length. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createInstancePartitionAsync( + String parent, InstancePartition instancePartition, String instancePartitionId) { + CreateInstancePartitionRequest request = + CreateInstancePartitionRequest.newBuilder() + .setParent(parent) + .setInstancePartition(instancePartition) + .setInstancePartitionId(instancePartitionId) + .build(); + return createInstancePartitionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an instance partition and begins preparing it to be used. The returned [long-running + * operation][google.longrunning.Operation] can be used to track the progress of preparing the new + * instance partition. The instance partition name is assigned by the caller. If the named + * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. + * + *

Immediately upon completion of this request: + * + *

* The instance partition is readable via the API, with all requested attributes but no + * allocated resources. Its state is `CREATING`. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation renders the instance partition immediately unreadable via the + * API. * The instance partition can be deleted. * All other attempts to modify the + * instance partition are rejected. + * + *

Upon completion of the returned operation: + * + *

* Billing for all successfully-allocated resources begins (some types may have lower + * than the requested levels). * Databases can start using this instance partition. * The + * instance partition's allocated resource levels are readable via the API. * The instance + * partition's state becomes `READY`. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] + * field type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   CreateInstancePartitionRequest request =
+   *       CreateInstancePartitionRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setInstancePartitionId("instancePartitionId1364450768")
+   *           .setInstancePartition(InstancePartition.newBuilder().build())
+   *           .build();
+   *   InstancePartition response = instanceAdminClient.createInstancePartitionAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createInstancePartitionAsync(CreateInstancePartitionRequest request) { + return createInstancePartitionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an instance partition and begins preparing it to be used. The returned [long-running + * operation][google.longrunning.Operation] can be used to track the progress of preparing the new + * instance partition. The instance partition name is assigned by the caller. If the named + * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. + * + *

Immediately upon completion of this request: + * + *

* The instance partition is readable via the API, with all requested attributes but no + * allocated resources. Its state is `CREATING`. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation renders the instance partition immediately unreadable via the + * API. * The instance partition can be deleted. * All other attempts to modify the + * instance partition are rejected. + * + *

Upon completion of the returned operation: + * + *

* Billing for all successfully-allocated resources begins (some types may have lower + * than the requested levels). * Databases can start using this instance partition. * The + * instance partition's allocated resource levels are readable via the API. * The instance + * partition's state becomes `READY`. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] + * field type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   CreateInstancePartitionRequest request =
+   *       CreateInstancePartitionRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setInstancePartitionId("instancePartitionId1364450768")
+   *           .setInstancePartition(InstancePartition.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       instanceAdminClient.createInstancePartitionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   InstancePartition response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationCallable() { + return stub.createInstancePartitionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an instance partition and begins preparing it to be used. The returned [long-running + * operation][google.longrunning.Operation] can be used to track the progress of preparing the new + * instance partition. The instance partition name is assigned by the caller. If the named + * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. + * + *

Immediately upon completion of this request: + * + *

* The instance partition is readable via the API, with all requested attributes but no + * allocated resources. Its state is `CREATING`. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation renders the instance partition immediately unreadable via the + * API. * The instance partition can be deleted. * All other attempts to modify the + * instance partition are rejected. + * + *

Upon completion of the returned operation: + * + *

* Billing for all successfully-allocated resources begins (some types may have lower + * than the requested levels). * Databases can start using this instance partition. * The + * instance partition's allocated resource levels are readable via the API. * The instance + * partition's state becomes `READY`. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] + * field type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   CreateInstancePartitionRequest request =
+   *       CreateInstancePartitionRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setInstancePartitionId("instancePartitionId1364450768")
+   *           .setInstancePartition(InstancePartition.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       instanceAdminClient.createInstancePartitionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createInstancePartitionCallable() { + return stub.createInstancePartitionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing instance partition. Requires that the instance partition is not used by any + * database or backup and is not the default instance partition of an instance. + * + *

Authorization requires `spanner.instancePartitions.delete` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   InstancePartitionName name =
+   *       InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
+   *   instanceAdminClient.deleteInstancePartition(name);
+   * }
+   * }
+ * + * @param name Required. The name of the instance partition to be deleted. Values are of the form + * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInstancePartition(InstancePartitionName name) { + DeleteInstancePartitionRequest request = + DeleteInstancePartitionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteInstancePartition(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing instance partition. Requires that the instance partition is not used by any + * database or backup and is not the default instance partition of an instance. + * + *

Authorization requires `spanner.instancePartitions.delete` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   String name =
+   *       InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]").toString();
+   *   instanceAdminClient.deleteInstancePartition(name);
+   * }
+   * }
+ * + * @param name Required. The name of the instance partition to be deleted. Values are of the form + * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInstancePartition(String name) { + DeleteInstancePartitionRequest request = + DeleteInstancePartitionRequest.newBuilder().setName(name).build(); + deleteInstancePartition(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing instance partition. Requires that the instance partition is not used by any + * database or backup and is not the default instance partition of an instance. + * + *

Authorization requires `spanner.instancePartitions.delete` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   DeleteInstancePartitionRequest request =
+   *       DeleteInstancePartitionRequest.newBuilder()
+   *           .setName(
+   *               InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   instanceAdminClient.deleteInstancePartition(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInstancePartition(DeleteInstancePartitionRequest request) { + deleteInstancePartitionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing instance partition. Requires that the instance partition is not used by any + * database or backup and is not the default instance partition of an instance. + * + *

Authorization requires `spanner.instancePartitions.delete` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   DeleteInstancePartitionRequest request =
+   *       DeleteInstancePartitionRequest.newBuilder()
+   *           .setName(
+   *               InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       instanceAdminClient.deleteInstancePartitionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteInstancePartitionCallable() { + return stub.deleteInstancePartitionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an instance partition, and begins allocating or releasing resources as requested. The + * returned [long-running operation][google.longrunning.Operation] can be used to track the + * progress of updating the instance partition. If the named instance partition does not exist, + * returns `NOT_FOUND`. + * + *

Immediately upon completion of this request: + * + *

* For resource types for which a decrease in the instance partition's allocation has + * been requested, billing is based on the newly-requested level. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation sets its metadata's + * [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], + * and begins restoring resources to their pre-request values. The operation is guaranteed to + * succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` + * status. * All other attempts to modify the instance partition are rejected. * Reading + * the instance partition via the API continues to give the pre-request resource levels. + * + *

Upon completion of the returned operation: + * + *

* Billing begins for all successfully-allocated resources (some types may have lower + * than the requested levels). * All newly-reserved resources are available for serving the + * instance partition's tables. * The instance partition's new resource levels are readable + * via the API. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track the instance partition modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Authorization requires `spanner.instancePartitions.update` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   InstancePartition instancePartition = InstancePartition.newBuilder().build();
+   *   FieldMask fieldMask = FieldMask.newBuilder().build();
+   *   InstancePartition response =
+   *       instanceAdminClient.updateInstancePartitionAsync(instancePartition, fieldMask).get();
+   * }
+   * }
+ * + * @param instancePartition Required. The instance partition to update, which must always include + * the instance partition name. Otherwise, only fields mentioned in + * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask] + * need be included. + * @param fieldMask Required. A mask specifying which fields in + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] should be updated. + * The field mask must always be specified; this prevents any future fields in + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] from being erased + * accidentally by clients that do not know about them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateInstancePartitionAsync(InstancePartition instancePartition, FieldMask fieldMask) { + UpdateInstancePartitionRequest request = + UpdateInstancePartitionRequest.newBuilder() + .setInstancePartition(instancePartition) + .setFieldMask(fieldMask) + .build(); + return updateInstancePartitionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an instance partition, and begins allocating or releasing resources as requested. The + * returned [long-running operation][google.longrunning.Operation] can be used to track the + * progress of updating the instance partition. If the named instance partition does not exist, + * returns `NOT_FOUND`. + * + *

Immediately upon completion of this request: + * + *

* For resource types for which a decrease in the instance partition's allocation has + * been requested, billing is based on the newly-requested level. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation sets its metadata's + * [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], + * and begins restoring resources to their pre-request values. The operation is guaranteed to + * succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` + * status. * All other attempts to modify the instance partition are rejected. * Reading + * the instance partition via the API continues to give the pre-request resource levels. + * + *

Upon completion of the returned operation: + * + *

* Billing begins for all successfully-allocated resources (some types may have lower + * than the requested levels). * All newly-reserved resources are available for serving the + * instance partition's tables. * The instance partition's new resource levels are readable + * via the API. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track the instance partition modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Authorization requires `spanner.instancePartitions.update` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   UpdateInstancePartitionRequest request =
+   *       UpdateInstancePartitionRequest.newBuilder()
+   *           .setInstancePartition(InstancePartition.newBuilder().build())
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   InstancePartition response = instanceAdminClient.updateInstancePartitionAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateInstancePartitionAsync(UpdateInstancePartitionRequest request) { + return updateInstancePartitionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an instance partition, and begins allocating or releasing resources as requested. The + * returned [long-running operation][google.longrunning.Operation] can be used to track the + * progress of updating the instance partition. If the named instance partition does not exist, + * returns `NOT_FOUND`. + * + *

Immediately upon completion of this request: + * + *

* For resource types for which a decrease in the instance partition's allocation has + * been requested, billing is based on the newly-requested level. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation sets its metadata's + * [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], + * and begins restoring resources to their pre-request values. The operation is guaranteed to + * succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` + * status. * All other attempts to modify the instance partition are rejected. * Reading + * the instance partition via the API continues to give the pre-request resource levels. + * + *

Upon completion of the returned operation: + * + *

* Billing begins for all successfully-allocated resources (some types may have lower + * than the requested levels). * All newly-reserved resources are available for serving the + * instance partition's tables. * The instance partition's new resource levels are readable + * via the API. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track the instance partition modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Authorization requires `spanner.instancePartitions.update` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   UpdateInstancePartitionRequest request =
+   *       UpdateInstancePartitionRequest.newBuilder()
+   *           .setInstancePartition(InstancePartition.newBuilder().build())
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       instanceAdminClient.updateInstancePartitionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   InstancePartition response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationCallable() { + return stub.updateInstancePartitionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an instance partition, and begins allocating or releasing resources as requested. The + * returned [long-running operation][google.longrunning.Operation] can be used to track the + * progress of updating the instance partition. If the named instance partition does not exist, + * returns `NOT_FOUND`. + * + *

Immediately upon completion of this request: + * + *

* For resource types for which a decrease in the instance partition's allocation has + * been requested, billing is based on the newly-requested level. + * + *

Until completion of the returned operation: + * + *

* Cancelling the operation sets its metadata's + * [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], + * and begins restoring resources to their pre-request values. The operation is guaranteed to + * succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` + * status. * All other attempts to modify the instance partition are rejected. * Reading + * the instance partition via the API continues to give the pre-request resource levels. + * + *

Upon completion of the returned operation: + * + *

* Billing begins for all successfully-allocated resources (some types may have lower + * than the requested levels). * All newly-reserved resources are available for serving the + * instance partition's tables. * The instance partition's new resource levels are readable + * via the API. + * + *

The returned [long-running operation][google.longrunning.Operation] will have a name of the + * format `<instance_partition_name>/operations/<operation_id>` and can be used to + * track the instance partition modification. The + * [metadata][google.longrunning.Operation.metadata] field type is + * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. + * The [response][google.longrunning.Operation.response] field type is + * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful. + * + *

Authorization requires `spanner.instancePartitions.update` permission on the resource + * [name][google.spanner.admin.instance.v1.InstancePartition.name]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   UpdateInstancePartitionRequest request =
+   *       UpdateInstancePartitionRequest.newBuilder()
+   *           .setInstancePartition(InstancePartition.newBuilder().build())
+   *           .setFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       instanceAdminClient.updateInstancePartitionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateInstancePartitionCallable() { + return stub.updateInstancePartitionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instance partition [long-running operations][google.longrunning.Operation] in the given + * instance. An instance partition operation has a name of the form + * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`. + * The long-running operation [metadata][google.longrunning.Operation.metadata] field type + * `metadata.type_url` describes the type of the metadata. Operations returned include those that + * have completed/failed/canceled within the last 7 days, and pending operations. Operations + * returned are ordered by `operation.metadata.value.start_time` in descending order starting from + * the most recently started operation. + * + *

Authorization requires `spanner.instancePartitionOperations.list` permission on the resource + * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   for (Operation element :
+   *       instanceAdminClient.listInstancePartitionOperations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent instance of the instance partition operations. Values are of + * the form `projects/<project>/instances/<instance>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancePartitionOperationsPagedResponse listInstancePartitionOperations( + InstanceName parent) { + ListInstancePartitionOperationsRequest request = + ListInstancePartitionOperationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstancePartitionOperations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instance partition [long-running operations][google.longrunning.Operation] in the given + * instance. An instance partition operation has a name of the form + * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`. + * The long-running operation [metadata][google.longrunning.Operation.metadata] field type + * `metadata.type_url` describes the type of the metadata. Operations returned include those that + * have completed/failed/canceled within the last 7 days, and pending operations. Operations + * returned are ordered by `operation.metadata.value.start_time` in descending order starting from + * the most recently started operation. + * + *

Authorization requires `spanner.instancePartitionOperations.list` permission on the resource + * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   for (Operation element :
+   *       instanceAdminClient.listInstancePartitionOperations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent instance of the instance partition operations. Values are of + * the form `projects/<project>/instances/<instance>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancePartitionOperationsPagedResponse listInstancePartitionOperations( + String parent) { + ListInstancePartitionOperationsRequest request = + ListInstancePartitionOperationsRequest.newBuilder().setParent(parent).build(); + return listInstancePartitionOperations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instance partition [long-running operations][google.longrunning.Operation] in the given + * instance. An instance partition operation has a name of the form + * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`. + * The long-running operation [metadata][google.longrunning.Operation.metadata] field type + * `metadata.type_url` describes the type of the metadata. Operations returned include those that + * have completed/failed/canceled within the last 7 days, and pending operations. Operations + * returned are ordered by `operation.metadata.value.start_time` in descending order starting from + * the most recently started operation. + * + *

Authorization requires `spanner.instancePartitionOperations.list` permission on the resource + * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   ListInstancePartitionOperationsRequest request =
+   *       ListInstancePartitionOperationsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setInstancePartitionDeadline(Timestamp.newBuilder().build())
+   *           .build();
+   *   for (Operation element :
+   *       instanceAdminClient.listInstancePartitionOperations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancePartitionOperationsPagedResponse listInstancePartitionOperations( + ListInstancePartitionOperationsRequest request) { + return listInstancePartitionOperationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instance partition [long-running operations][google.longrunning.Operation] in the given + * instance. An instance partition operation has a name of the form + * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`. + * The long-running operation [metadata][google.longrunning.Operation.metadata] field type + * `metadata.type_url` describes the type of the metadata. Operations returned include those that + * have completed/failed/canceled within the last 7 days, and pending operations. Operations + * returned are ordered by `operation.metadata.value.start_time` in descending order starting from + * the most recently started operation. + * + *

Authorization requires `spanner.instancePartitionOperations.list` permission on the resource + * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   ListInstancePartitionOperationsRequest request =
+   *       ListInstancePartitionOperationsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setInstancePartitionDeadline(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       instanceAdminClient.listInstancePartitionOperationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Operation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsPagedCallable() { + return stub.listInstancePartitionOperationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instance partition [long-running operations][google.longrunning.Operation] in the given + * instance. An instance partition operation has a name of the form + * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`. + * The long-running operation [metadata][google.longrunning.Operation.metadata] field type + * `metadata.type_url` describes the type of the metadata. Operations returned include those that + * have completed/failed/canceled within the last 7 days, and pending operations. Operations + * returned are ordered by `operation.metadata.value.start_time` in descending order starting from + * the most recently started operation. + * + *

Authorization requires `spanner.instancePartitionOperations.list` permission on the resource + * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) {
+   *   ListInstancePartitionOperationsRequest request =
+   *       ListInstancePartitionOperationsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setInstancePartitionDeadline(Timestamp.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     ListInstancePartitionOperationsResponse response =
+   *         instanceAdminClient.listInstancePartitionOperationsCallable().call(request);
+   *     for (Operation element : response.getOperationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsCallable() { + return stub.listInstancePartitionOperationsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); } @Override @@ -3513,4 +4928,189 @@ protected ListInstancesFixedSizeCollection createCollection( return new ListInstancesFixedSizeCollection(pages, collectionSize); } } + + public static class ListInstancePartitionsPagedResponse + extends AbstractPagedListResponse< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + InstancePartition, + ListInstancePartitionsPage, + ListInstancePartitionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListInstancePartitionsRequest, ListInstancePartitionsResponse, InstancePartition> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancePartitionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInstancePartitionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInstancePartitionsPagedResponse(ListInstancePartitionsPage page) { + super(page, ListInstancePartitionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancePartitionsPage + extends AbstractPage< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + InstancePartition, + ListInstancePartitionsPage> { + + private ListInstancePartitionsPage( + PageContext< + ListInstancePartitionsRequest, ListInstancePartitionsResponse, InstancePartition> + context, + ListInstancePartitionsResponse response) { + super(context, response); + } + + private static ListInstancePartitionsPage createEmptyPage() { + return new ListInstancePartitionsPage(null, null); + } + + @Override + protected ListInstancePartitionsPage createPage( + PageContext< + ListInstancePartitionsRequest, ListInstancePartitionsResponse, InstancePartition> + context, + ListInstancePartitionsResponse response) { + return new ListInstancePartitionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListInstancePartitionsRequest, ListInstancePartitionsResponse, InstancePartition> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancePartitionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + InstancePartition, + ListInstancePartitionsPage, + ListInstancePartitionsFixedSizeCollection> { + + private ListInstancePartitionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancePartitionsFixedSizeCollection createEmptyCollection() { + return new ListInstancePartitionsFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancePartitionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancePartitionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstancePartitionOperationsPagedResponse + extends AbstractPagedListResponse< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation, + ListInstancePartitionOperationsPage, + ListInstancePartitionOperationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancePartitionOperationsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInstancePartitionOperationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInstancePartitionOperationsPagedResponse(ListInstancePartitionOperationsPage page) { + super(page, ListInstancePartitionOperationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancePartitionOperationsPage + extends AbstractPage< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation, + ListInstancePartitionOperationsPage> { + + private ListInstancePartitionOperationsPage( + PageContext< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation> + context, + ListInstancePartitionOperationsResponse response) { + super(context, response); + } + + private static ListInstancePartitionOperationsPage createEmptyPage() { + return new ListInstancePartitionOperationsPage(null, null); + } + + @Override + protected ListInstancePartitionOperationsPage createPage( + PageContext< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation> + context, + ListInstancePartitionOperationsResponse response) { + return new ListInstancePartitionOperationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancePartitionOperationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation, + ListInstancePartitionOperationsPage, + ListInstancePartitionOperationsFixedSizeCollection> { + + private ListInstancePartitionOperationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancePartitionOperationsFixedSizeCollection createEmptyCollection() { + return new ListInstancePartitionOperationsFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancePartitionOperationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancePartitionOperationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java index 47b98450c2..cad1b2d7e9 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java @@ -18,6 +18,8 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.core.ApiFunction; @@ -44,22 +46,33 @@ import com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; +import com.google.spanner.admin.instance.v1.InstancePartition; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import java.io.IOException; import java.util.List; @@ -160,6 +173,15 @@ public UnaryCallSettings deleteInstanceConfi return ((InstanceAdminStubSettings) getStubSettings()).listInstancesSettings(); } + /** Returns the object with the settings used for calls to listInstancePartitions. */ + public PagedCallSettings< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + listInstancePartitionsSettings() { + return ((InstanceAdminStubSettings) getStubSettings()).listInstancePartitionsSettings(); + } + /** Returns the object with the settings used for calls to getInstance. */ public UnaryCallSettings getInstanceSettings() { return ((InstanceAdminStubSettings) getStubSettings()).getInstanceSettings(); @@ -208,6 +230,56 @@ public UnaryCallSettings getIamPolicySettings() { return ((InstanceAdminStubSettings) getStubSettings()).testIamPermissionsSettings(); } + /** Returns the object with the settings used for calls to getInstancePartition. */ + public UnaryCallSettings + getInstancePartitionSettings() { + return ((InstanceAdminStubSettings) getStubSettings()).getInstancePartitionSettings(); + } + + /** Returns the object with the settings used for calls to createInstancePartition. */ + public UnaryCallSettings + createInstancePartitionSettings() { + return ((InstanceAdminStubSettings) getStubSettings()).createInstancePartitionSettings(); + } + + /** Returns the object with the settings used for calls to createInstancePartition. */ + public OperationCallSettings< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationSettings() { + return ((InstanceAdminStubSettings) getStubSettings()) + .createInstancePartitionOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstancePartition. */ + public UnaryCallSettings + deleteInstancePartitionSettings() { + return ((InstanceAdminStubSettings) getStubSettings()).deleteInstancePartitionSettings(); + } + + /** Returns the object with the settings used for calls to updateInstancePartition. */ + public UnaryCallSettings + updateInstancePartitionSettings() { + return ((InstanceAdminStubSettings) getStubSettings()).updateInstancePartitionSettings(); + } + + /** Returns the object with the settings used for calls to updateInstancePartition. */ + public OperationCallSettings< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationSettings() { + return ((InstanceAdminStubSettings) getStubSettings()) + .updateInstancePartitionOperationSettings(); + } + + /** Returns the object with the settings used for calls to listInstancePartitionOperations. */ + public PagedCallSettings< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsSettings() { + return ((InstanceAdminStubSettings) getStubSettings()) + .listInstancePartitionOperationsSettings(); + } + public static final InstanceAdminSettings create(InstanceAdminStubSettings stub) throws IOException { return new InstanceAdminSettings.Builder(stub.toBuilder()).build(); @@ -259,7 +331,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -301,7 +372,6 @@ private static Builder createDefault() { return new Builder(InstanceAdminStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(InstanceAdminStubSettings.newHttpJsonBuilder()); } @@ -385,6 +455,15 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listInstancesSettings(); } + /** Returns the builder for the settings used for calls to listInstancePartitions. */ + public PagedCallSettings.Builder< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + listInstancePartitionsSettings() { + return getStubSettingsBuilder().listInstancePartitionsSettings(); + } + /** Returns the builder for the settings used for calls to getInstance. */ public UnaryCallSettings.Builder getInstanceSettings() { return getStubSettingsBuilder().getInstanceSettings(); @@ -433,6 +512,53 @@ public UnaryCallSettings.Builder getIamPolicySettin return getStubSettingsBuilder().testIamPermissionsSettings(); } + /** Returns the builder for the settings used for calls to getInstancePartition. */ + public UnaryCallSettings.Builder + getInstancePartitionSettings() { + return getStubSettingsBuilder().getInstancePartitionSettings(); + } + + /** Returns the builder for the settings used for calls to createInstancePartition. */ + public UnaryCallSettings.Builder + createInstancePartitionSettings() { + return getStubSettingsBuilder().createInstancePartitionSettings(); + } + + /** Returns the builder for the settings used for calls to createInstancePartition. */ + public OperationCallSettings.Builder< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationSettings() { + return getStubSettingsBuilder().createInstancePartitionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstancePartition. */ + public UnaryCallSettings.Builder + deleteInstancePartitionSettings() { + return getStubSettingsBuilder().deleteInstancePartitionSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstancePartition. */ + public UnaryCallSettings.Builder + updateInstancePartitionSettings() { + return getStubSettingsBuilder().updateInstancePartitionSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstancePartition. */ + public OperationCallSettings.Builder< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationSettings() { + return getStubSettingsBuilder().updateInstancePartitionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listInstancePartitionOperations. */ + public PagedCallSettings.Builder< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsSettings() { + return getStubSettingsBuilder().listInstancePartitionOperationsSettings(); + } + @Override public InstanceAdminSettings build() throws IOException { return new InstanceAdminSettings(this); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json index 2296749c13..594176d4e7 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/gapic_metadata.json @@ -16,12 +16,18 @@ "CreateInstanceConfig": { "methods": ["createInstanceConfigAsync", "createInstanceConfigAsync", "createInstanceConfigAsync", "createInstanceConfigOperationCallable", "createInstanceConfigCallable"] }, + "CreateInstancePartition": { + "methods": ["createInstancePartitionAsync", "createInstancePartitionAsync", "createInstancePartitionAsync", "createInstancePartitionOperationCallable", "createInstancePartitionCallable"] + }, "DeleteInstance": { "methods": ["deleteInstance", "deleteInstance", "deleteInstance", "deleteInstanceCallable"] }, "DeleteInstanceConfig": { "methods": ["deleteInstanceConfig", "deleteInstanceConfig", "deleteInstanceConfig", "deleteInstanceConfigCallable"] }, + "DeleteInstancePartition": { + "methods": ["deleteInstancePartition", "deleteInstancePartition", "deleteInstancePartition", "deleteInstancePartitionCallable"] + }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, @@ -31,12 +37,21 @@ "GetInstanceConfig": { "methods": ["getInstanceConfig", "getInstanceConfig", "getInstanceConfig", "getInstanceConfigCallable"] }, + "GetInstancePartition": { + "methods": ["getInstancePartition", "getInstancePartition", "getInstancePartition", "getInstancePartitionCallable"] + }, "ListInstanceConfigOperations": { "methods": ["listInstanceConfigOperations", "listInstanceConfigOperations", "listInstanceConfigOperations", "listInstanceConfigOperationsPagedCallable", "listInstanceConfigOperationsCallable"] }, "ListInstanceConfigs": { "methods": ["listInstanceConfigs", "listInstanceConfigs", "listInstanceConfigs", "listInstanceConfigsPagedCallable", "listInstanceConfigsCallable"] }, + "ListInstancePartitionOperations": { + "methods": ["listInstancePartitionOperations", "listInstancePartitionOperations", "listInstancePartitionOperations", "listInstancePartitionOperationsPagedCallable", "listInstancePartitionOperationsCallable"] + }, + "ListInstancePartitions": { + "methods": ["listInstancePartitions", "listInstancePartitions", "listInstancePartitions", "listInstancePartitionsPagedCallable", "listInstancePartitionsCallable"] + }, "ListInstances": { "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] }, @@ -51,6 +66,9 @@ }, "UpdateInstanceConfig": { "methods": ["updateInstanceConfigAsync", "updateInstanceConfigAsync", "updateInstanceConfigOperationCallable", "updateInstanceConfigCallable"] + }, + "UpdateInstancePartition": { + "methods": ["updateInstancePartitionAsync", "updateInstancePartitionAsync", "updateInstancePartitionOperationCallable", "updateInstancePartitionCallable"] } } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java index 5a34809109..3369a1642b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java @@ -18,6 +18,8 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -39,22 +41,33 @@ import com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; +import com.google.spanner.admin.instance.v1.InstancePartition; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -151,6 +164,20 @@ public class GrpcInstanceAdminStub extends InstanceAdminStub { ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + ListInstancePartitionsRequest, ListInstancePartitionsResponse> + listInstancePartitionsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/ListInstancePartitions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancePartitionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancePartitionsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getInstanceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -217,6 +244,67 @@ public class GrpcInstanceAdminStub extends InstanceAdminStub { ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + getInstancePartitionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/GetInstancePartition") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInstancePartitionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(InstancePartition.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInstancePartitionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/CreateInstancePartition") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstancePartitionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInstancePartitionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/DeleteInstancePartition") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstancePartitionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateInstancePartitionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/UpdateInstancePartition") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInstancePartitionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/ListInstancePartitionOperations") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListInstancePartitionOperationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListInstancePartitionOperationsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable listInstanceConfigsCallable; private final UnaryCallable @@ -240,6 +328,10 @@ public class GrpcInstanceAdminStub extends InstanceAdminStub { private final UnaryCallable listInstancesCallable; private final UnaryCallable listInstancesPagedCallable; + private final UnaryCallable + listInstancePartitionsCallable; + private final UnaryCallable + listInstancePartitionsPagedCallable; private final UnaryCallable getInstanceCallable; private final UnaryCallable createInstanceCallable; private final OperationCallable @@ -252,6 +344,26 @@ public class GrpcInstanceAdminStub extends InstanceAdminStub { private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable + getInstancePartitionCallable; + private final UnaryCallable + createInstancePartitionCallable; + private final OperationCallable< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationCallable; + private final UnaryCallable + deleteInstancePartitionCallable; + private final UnaryCallable + updateInstancePartitionCallable; + private final OperationCallable< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationCallable; + private final UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsCallable; + private final UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -371,6 +483,18 @@ protected GrpcInstanceAdminStub( return builder.build(); }) .build(); + GrpcCallSettings + listInstancePartitionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listInstancePartitionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings getInstanceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getInstanceMethodDescriptor) @@ -442,6 +566,66 @@ protected GrpcInstanceAdminStub( return builder.build(); }) .build(); + GrpcCallSettings + getInstancePartitionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstancePartitionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createInstancePartitionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstancePartitionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteInstancePartitionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstancePartitionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateInstancePartitionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInstancePartitionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "instance_partition.name", + String.valueOf(request.getInstancePartition().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listInstancePartitionOperationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); this.listInstanceConfigsCallable = callableFactory.createUnaryCallable( @@ -501,6 +685,16 @@ protected GrpcInstanceAdminStub( this.listInstancesPagedCallable = callableFactory.createPagedCallable( listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancePartitionsCallable = + callableFactory.createUnaryCallable( + listInstancePartitionsTransportSettings, + settings.listInstancePartitionsSettings(), + clientContext); + this.listInstancePartitionsPagedCallable = + callableFactory.createPagedCallable( + listInstancePartitionsTransportSettings, + settings.listInstancePartitionsSettings(), + clientContext); this.getInstanceCallable = callableFactory.createUnaryCallable( getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); @@ -536,6 +730,48 @@ protected GrpcInstanceAdminStub( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.getInstancePartitionCallable = + callableFactory.createUnaryCallable( + getInstancePartitionTransportSettings, + settings.getInstancePartitionSettings(), + clientContext); + this.createInstancePartitionCallable = + callableFactory.createUnaryCallable( + createInstancePartitionTransportSettings, + settings.createInstancePartitionSettings(), + clientContext); + this.createInstancePartitionOperationCallable = + callableFactory.createOperationCallable( + createInstancePartitionTransportSettings, + settings.createInstancePartitionOperationSettings(), + clientContext, + operationsStub); + this.deleteInstancePartitionCallable = + callableFactory.createUnaryCallable( + deleteInstancePartitionTransportSettings, + settings.deleteInstancePartitionSettings(), + clientContext); + this.updateInstancePartitionCallable = + callableFactory.createUnaryCallable( + updateInstancePartitionTransportSettings, + settings.updateInstancePartitionSettings(), + clientContext); + this.updateInstancePartitionOperationCallable = + callableFactory.createOperationCallable( + updateInstancePartitionTransportSettings, + settings.updateInstancePartitionOperationSettings(), + clientContext, + operationsStub); + this.listInstancePartitionOperationsCallable = + callableFactory.createUnaryCallable( + listInstancePartitionOperationsTransportSettings, + settings.listInstancePartitionOperationsSettings(), + clientContext); + this.listInstancePartitionOperationsPagedCallable = + callableFactory.createPagedCallable( + listInstancePartitionOperationsTransportSettings, + settings.listInstancePartitionOperationsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -615,6 +851,18 @@ public UnaryCallable listInstancesC return listInstancesPagedCallable; } + @Override + public UnaryCallable + listInstancePartitionsCallable() { + return listInstancePartitionsCallable; + } + + @Override + public UnaryCallable + listInstancePartitionsPagedCallable() { + return listInstancePartitionsPagedCallable; + } + @Override public UnaryCallable getInstanceCallable() { return getInstanceCallable; @@ -663,6 +911,57 @@ public UnaryCallable getIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public UnaryCallable + getInstancePartitionCallable() { + return getInstancePartitionCallable; + } + + @Override + public UnaryCallable + createInstancePartitionCallable() { + return createInstancePartitionCallable; + } + + @Override + public OperationCallable< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationCallable() { + return createInstancePartitionOperationCallable; + } + + @Override + public UnaryCallable deleteInstancePartitionCallable() { + return deleteInstancePartitionCallable; + } + + @Override + public UnaryCallable + updateInstancePartitionCallable() { + return updateInstancePartitionCallable; + } + + @Override + public OperationCallable< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationCallable() { + return updateInstancePartitionOperationCallable; + } + + @Override + public UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsCallable() { + return listInstancePartitionOperationsCallable; + } + + @Override + public UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsPagedCallable() { + return listInstancePartitionOperationsPagedCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java index 8858b88216..7aec0755e6 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.admin.instance.v1.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonInstanceAdminCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java index 47d4c7108c..9e530b899e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java @@ -18,10 +18,11 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.HttpRule; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -49,22 +50,33 @@ import com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; +import com.google.spanner.admin.instance.v1.InstancePartition; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import java.io.IOException; import java.util.ArrayList; @@ -81,12 +93,14 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonInstanceAdminStub extends InstanceAdminStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(InstanceConfig.getDescriptor()) + .add(CreateInstancePartitionMetadata.getDescriptor()) + .add(UpdateInstancePartitionMetadata.getDescriptor()) .add(Instance.getDescriptor()) + .add(InstancePartition.getDescriptor()) .add(CreateInstanceConfigMetadata.getDescriptor()) .add(UpdateInstanceMetadata.getDescriptor()) .add(CreateInstanceMetadata.getDescriptor()) @@ -351,6 +365,8 @@ public class HttpJsonInstanceAdminStub extends InstanceAdminStub { ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam( + fields, "instanceDeadline", request.getInstanceDeadline()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); @@ -365,6 +381,49 @@ public class HttpJsonInstanceAdminStub extends InstanceAdminStub { .build()) .build(); + private static final ApiMethodDescriptor< + ListInstancePartitionsRequest, ListInstancePartitionsResponse> + listInstancePartitionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/ListInstancePartitions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/instances/*}/instancePartitions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, + "instancePartitionDeadline", + request.getInstancePartitionDeadline()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInstancePartitionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getInstanceMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -627,6 +686,208 @@ public class HttpJsonInstanceAdminStub extends InstanceAdminStub { .build()) .build(); + private static final ApiMethodDescriptor + getInstancePartitionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/GetInstancePartition") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/instances/*/instancePartitions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InstancePartition.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createInstancePartitionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/CreateInstancePartition") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/instances/*}/instancePartitions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateInstancePartitionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteInstancePartitionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/DeleteInstancePartition") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/instances/*/instancePartitions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateInstancePartitionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/UpdateInstancePartition") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{instancePartition.name=projects/*/instances/*/instancePartitions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "instancePartition.name", + request.getInstancePartition().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateInstancePartitionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.spanner.admin.instance.v1.InstanceAdmin/ListInstancePartitionOperations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/instances/*}/instancePartitionOperations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam( + fields, + "instancePartitionDeadline", + request.getInstancePartitionDeadline()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + ListInstancePartitionOperationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable listInstanceConfigsCallable; private final UnaryCallable @@ -650,6 +911,10 @@ public class HttpJsonInstanceAdminStub extends InstanceAdminStub { private final UnaryCallable listInstancesCallable; private final UnaryCallable listInstancesPagedCallable; + private final UnaryCallable + listInstancePartitionsCallable; + private final UnaryCallable + listInstancePartitionsPagedCallable; private final UnaryCallable getInstanceCallable; private final UnaryCallable createInstanceCallable; private final OperationCallable @@ -662,6 +927,26 @@ public class HttpJsonInstanceAdminStub extends InstanceAdminStub { private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable + getInstancePartitionCallable; + private final UnaryCallable + createInstancePartitionCallable; + private final OperationCallable< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationCallable; + private final UnaryCallable + deleteInstancePartitionCallable; + private final UnaryCallable + updateInstancePartitionCallable; + private final OperationCallable< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationCallable; + private final UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsCallable; + private final UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsPagedCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -838,6 +1123,19 @@ protected HttpJsonInstanceAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listInstancePartitionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listInstancePartitionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings getInstanceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getInstanceMethodDescriptor) @@ -916,6 +1214,71 @@ protected HttpJsonInstanceAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings + getInstancePartitionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInstancePartitionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createInstancePartitionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createInstancePartitionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteInstancePartitionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteInstancePartitionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateInstancePartitionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateInstancePartitionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "instance_partition.name", + String.valueOf(request.getInstancePartition().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listInstancePartitionOperationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); this.listInstanceConfigsCallable = callableFactory.createUnaryCallable( @@ -975,6 +1338,16 @@ protected HttpJsonInstanceAdminStub( this.listInstancesPagedCallable = callableFactory.createPagedCallable( listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancePartitionsCallable = + callableFactory.createUnaryCallable( + listInstancePartitionsTransportSettings, + settings.listInstancePartitionsSettings(), + clientContext); + this.listInstancePartitionsPagedCallable = + callableFactory.createPagedCallable( + listInstancePartitionsTransportSettings, + settings.listInstancePartitionsSettings(), + clientContext); this.getInstanceCallable = callableFactory.createUnaryCallable( getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); @@ -1010,6 +1383,48 @@ protected HttpJsonInstanceAdminStub( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.getInstancePartitionCallable = + callableFactory.createUnaryCallable( + getInstancePartitionTransportSettings, + settings.getInstancePartitionSettings(), + clientContext); + this.createInstancePartitionCallable = + callableFactory.createUnaryCallable( + createInstancePartitionTransportSettings, + settings.createInstancePartitionSettings(), + clientContext); + this.createInstancePartitionOperationCallable = + callableFactory.createOperationCallable( + createInstancePartitionTransportSettings, + settings.createInstancePartitionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteInstancePartitionCallable = + callableFactory.createUnaryCallable( + deleteInstancePartitionTransportSettings, + settings.deleteInstancePartitionSettings(), + clientContext); + this.updateInstancePartitionCallable = + callableFactory.createUnaryCallable( + updateInstancePartitionTransportSettings, + settings.updateInstancePartitionSettings(), + clientContext); + this.updateInstancePartitionOperationCallable = + callableFactory.createOperationCallable( + updateInstancePartitionTransportSettings, + settings.updateInstancePartitionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listInstancePartitionOperationsCallable = + callableFactory.createUnaryCallable( + listInstancePartitionOperationsTransportSettings, + settings.listInstancePartitionOperationsSettings(), + clientContext); + this.listInstancePartitionOperationsPagedCallable = + callableFactory.createPagedCallable( + listInstancePartitionOperationsTransportSettings, + settings.listInstancePartitionOperationsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1025,6 +1440,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(deleteInstanceConfigMethodDescriptor); methodDescriptors.add(listInstanceConfigOperationsMethodDescriptor); methodDescriptors.add(listInstancesMethodDescriptor); + methodDescriptors.add(listInstancePartitionsMethodDescriptor); methodDescriptors.add(getInstanceMethodDescriptor); methodDescriptors.add(createInstanceMethodDescriptor); methodDescriptors.add(updateInstanceMethodDescriptor); @@ -1032,6 +1448,11 @@ public static List getMethodDescriptors() { methodDescriptors.add(setIamPolicyMethodDescriptor); methodDescriptors.add(getIamPolicyMethodDescriptor); methodDescriptors.add(testIamPermissionsMethodDescriptor); + methodDescriptors.add(getInstancePartitionMethodDescriptor); + methodDescriptors.add(createInstancePartitionMethodDescriptor); + methodDescriptors.add(deleteInstancePartitionMethodDescriptor); + methodDescriptors.add(updateInstancePartitionMethodDescriptor); + methodDescriptors.add(listInstancePartitionOperationsMethodDescriptor); return methodDescriptors; } @@ -1109,6 +1530,18 @@ public UnaryCallable listInstancesC return listInstancesPagedCallable; } + @Override + public UnaryCallable + listInstancePartitionsCallable() { + return listInstancePartitionsCallable; + } + + @Override + public UnaryCallable + listInstancePartitionsPagedCallable() { + return listInstancePartitionsPagedCallable; + } + @Override public UnaryCallable getInstanceCallable() { return getInstanceCallable; @@ -1157,6 +1590,57 @@ public UnaryCallable getIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public UnaryCallable + getInstancePartitionCallable() { + return getInstancePartitionCallable; + } + + @Override + public UnaryCallable + createInstancePartitionCallable() { + return createInstancePartitionCallable; + } + + @Override + public OperationCallable< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationCallable() { + return createInstancePartitionOperationCallable; + } + + @Override + public UnaryCallable deleteInstancePartitionCallable() { + return deleteInstancePartitionCallable; + } + + @Override + public UnaryCallable + updateInstancePartitionCallable() { + return updateInstancePartitionCallable; + } + + @Override + public OperationCallable< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationCallable() { + return updateInstancePartitionOperationCallable; + } + + @Override + public UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsCallable() { + return listInstancePartitionOperationsCallable; + } + + @Override + public UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsPagedCallable() { + return listInstancePartitionOperationsPagedCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java index f9929401a6..31d266a67e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java @@ -18,6 +18,8 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -34,22 +36,33 @@ import com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; +import com.google.spanner.admin.instance.v1.InstancePartition; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import javax.annotation.Generated; @@ -132,6 +145,17 @@ public UnaryCallable listInstancesC throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); } + public UnaryCallable + listInstancePartitionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInstancePartitionsPagedCallable()"); + } + + public UnaryCallable + listInstancePartitionsCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancePartitionsCallable()"); + } + public UnaryCallable getInstanceCallable() { throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); } @@ -171,6 +195,53 @@ public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); } + public UnaryCallable + getInstancePartitionCallable() { + throw new UnsupportedOperationException("Not implemented: getInstancePartitionCallable()"); + } + + public OperationCallable< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createInstancePartitionOperationCallable()"); + } + + public UnaryCallable + createInstancePartitionCallable() { + throw new UnsupportedOperationException("Not implemented: createInstancePartitionCallable()"); + } + + public UnaryCallable deleteInstancePartitionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstancePartitionCallable()"); + } + + public OperationCallable< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateInstancePartitionOperationCallable()"); + } + + public UnaryCallable + updateInstancePartitionCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstancePartitionCallable()"); + } + + public UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInstancePartitionOperationsPagedCallable()"); + } + + public UnaryCallable< + ListInstancePartitionOperationsRequest, ListInstancePartitionOperationsResponse> + listInstancePartitionOperationsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInstancePartitionOperationsCallable()"); + } + @Override public abstract void close(); } 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 124c38e7ad..36454ee1a5 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 @@ -18,6 +18,8 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.core.ApiFunction; @@ -63,22 +65,33 @@ import com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; +import com.google.spanner.admin.instance.v1.InstancePartition; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import java.io.IOException; import java.util.List; @@ -155,6 +168,11 @@ public class InstanceAdminStubSettings extends StubSettings listInstancesSettings; + private final PagedCallSettings< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + listInstancePartitionsSettings; private final UnaryCallSettings getInstanceSettings; private final UnaryCallSettings createInstanceSettings; private final OperationCallSettings @@ -167,6 +185,25 @@ public class InstanceAdminStubSettings extends StubSettings getIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; + private final UnaryCallSettings + getInstancePartitionSettings; + private final UnaryCallSettings + createInstancePartitionSettings; + private final OperationCallSettings< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationSettings; + private final UnaryCallSettings + deleteInstancePartitionSettings; + private final UnaryCallSettings + updateInstancePartitionSettings; + private final OperationCallSettings< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationSettings; + private final PagedCallSettings< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsSettings; private static final PagedListDescriptor< ListInstanceConfigsRequest, ListInstanceConfigsResponse, InstanceConfig> @@ -291,6 +328,98 @@ public Iterable extractResources(ListInstancesResponse payload) { } }; + private static final PagedListDescriptor< + ListInstancePartitionsRequest, ListInstancePartitionsResponse, InstancePartition> + LIST_INSTANCE_PARTITIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListInstancePartitionsRequest, ListInstancePartitionsResponse, InstancePartition>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancePartitionsRequest injectToken( + ListInstancePartitionsRequest payload, String token) { + return ListInstancePartitionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancePartitionsRequest injectPageSize( + ListInstancePartitionsRequest payload, int pageSize) { + return ListInstancePartitionsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListInstancePartitionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancePartitionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListInstancePartitionsResponse payload) { + return payload.getInstancePartitionsList() == null + ? ImmutableList.of() + : payload.getInstancePartitionsList(); + } + }; + + private static final PagedListDescriptor< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation> + LIST_INSTANCE_PARTITION_OPERATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancePartitionOperationsRequest injectToken( + ListInstancePartitionOperationsRequest payload, String token) { + return ListInstancePartitionOperationsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListInstancePartitionOperationsRequest injectPageSize( + ListInstancePartitionOperationsRequest payload, int pageSize) { + return ListInstancePartitionOperationsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListInstancePartitionOperationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancePartitionOperationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListInstancePartitionOperationsResponse payload) { + return payload.getOperationsList() == null + ? ImmutableList.of() + : payload.getOperationsList(); + } + }; + private static final PagedListResponseFactory< ListInstanceConfigsRequest, ListInstanceConfigsResponse, ListInstanceConfigsPagedResponse> LIST_INSTANCE_CONFIGS_PAGE_STR_FACT = @@ -361,6 +490,66 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + LIST_INSTANCE_PARTITIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListInstancePartitionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + InstancePartition> + pageContext = + PageContext.create( + callable, LIST_INSTANCE_PARTITIONS_PAGE_STR_DESC, request, context); + return ListInstancePartitionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + LIST_INSTANCE_PARTITION_OPERATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse> + callable, + ListInstancePartitionOperationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + Operation> + pageContext = + PageContext.create( + callable, + LIST_INSTANCE_PARTITION_OPERATIONS_PAGE_STR_DESC, + request, + context); + return ListInstancePartitionOperationsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listInstanceConfigs. */ public PagedCallSettings< ListInstanceConfigsRequest, ListInstanceConfigsResponse, ListInstanceConfigsPagedResponse> @@ -417,6 +606,15 @@ public UnaryCallSettings deleteInstanceConfi return listInstancesSettings; } + /** Returns the object with the settings used for calls to listInstancePartitions. */ + public PagedCallSettings< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + listInstancePartitionsSettings() { + return listInstancePartitionsSettings; + } + /** Returns the object with the settings used for calls to getInstance. */ public UnaryCallSettings getInstanceSettings() { return getInstanceSettings; @@ -465,6 +663,53 @@ public UnaryCallSettings getIamPolicySettings() { return testIamPermissionsSettings; } + /** Returns the object with the settings used for calls to getInstancePartition. */ + public UnaryCallSettings + getInstancePartitionSettings() { + return getInstancePartitionSettings; + } + + /** Returns the object with the settings used for calls to createInstancePartition. */ + public UnaryCallSettings + createInstancePartitionSettings() { + return createInstancePartitionSettings; + } + + /** Returns the object with the settings used for calls to createInstancePartition. */ + public OperationCallSettings< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationSettings() { + return createInstancePartitionOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInstancePartition. */ + public UnaryCallSettings + deleteInstancePartitionSettings() { + return deleteInstancePartitionSettings; + } + + /** Returns the object with the settings used for calls to updateInstancePartition. */ + public UnaryCallSettings + updateInstancePartitionSettings() { + return updateInstancePartitionSettings; + } + + /** Returns the object with the settings used for calls to updateInstancePartition. */ + public OperationCallSettings< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationSettings() { + return updateInstancePartitionOperationSettings; + } + + /** Returns the object with the settings used for calls to listInstancePartitionOperations. */ + public PagedCallSettings< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsSettings() { + return listInstancePartitionOperationsSettings; + } + public InstanceAdminStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -596,6 +841,7 @@ protected InstanceAdminStubSettings(Builder settingsBuilder) throws IOException listInstanceConfigOperationsSettings = settingsBuilder.listInstanceConfigOperationsSettings().build(); listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + listInstancePartitionsSettings = settingsBuilder.listInstancePartitionsSettings().build(); getInstanceSettings = settingsBuilder.getInstanceSettings().build(); createInstanceSettings = settingsBuilder.createInstanceSettings().build(); createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); @@ -605,6 +851,16 @@ protected InstanceAdminStubSettings(Builder settingsBuilder) throws IOException setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + getInstancePartitionSettings = settingsBuilder.getInstancePartitionSettings().build(); + createInstancePartitionSettings = settingsBuilder.createInstancePartitionSettings().build(); + createInstancePartitionOperationSettings = + settingsBuilder.createInstancePartitionOperationSettings().build(); + deleteInstancePartitionSettings = settingsBuilder.deleteInstancePartitionSettings().build(); + updateInstancePartitionSettings = settingsBuilder.updateInstancePartitionSettings().build(); + updateInstancePartitionOperationSettings = + settingsBuilder.updateInstancePartitionOperationSettings().build(); + listInstancePartitionOperationsSettings = + settingsBuilder.listInstancePartitionOperationsSettings().build(); } /** Builder for InstanceAdminStubSettings. */ @@ -637,6 +893,11 @@ public static class Builder extends StubSettings.Builder listInstancesSettings; + private final PagedCallSettings.Builder< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + listInstancePartitionsSettings; private final UnaryCallSettings.Builder getInstanceSettings; private final UnaryCallSettings.Builder createInstanceSettings; @@ -653,6 +914,25 @@ public static class Builder extends StubSettings.Builder getIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; + private final UnaryCallSettings.Builder + getInstancePartitionSettings; + private final UnaryCallSettings.Builder + createInstancePartitionSettings; + private final OperationCallSettings.Builder< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationSettings; + private final UnaryCallSettings.Builder + deleteInstancePartitionSettings; + private final UnaryCallSettings.Builder + updateInstancePartitionSettings; + private final OperationCallSettings.Builder< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationSettings; + private final PagedCallSettings.Builder< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -743,6 +1023,8 @@ protected Builder(ClientContext clientContext) { listInstanceConfigOperationsSettings = PagedCallSettings.newBuilder(LIST_INSTANCE_CONFIG_OPERATIONS_PAGE_STR_FACT); listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + listInstancePartitionsSettings = + PagedCallSettings.newBuilder(LIST_INSTANCE_PARTITIONS_PAGE_STR_FACT); getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createInstanceOperationSettings = OperationCallSettings.newBuilder(); @@ -752,6 +1034,14 @@ protected Builder(ClientContext clientContext) { setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getInstancePartitionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstancePartitionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstancePartitionOperationSettings = OperationCallSettings.newBuilder(); + deleteInstancePartitionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstancePartitionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstancePartitionOperationSettings = OperationCallSettings.newBuilder(); + listInstancePartitionOperationsSettings = + PagedCallSettings.newBuilder(LIST_INSTANCE_PARTITION_OPERATIONS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -762,13 +1052,19 @@ protected Builder(ClientContext clientContext) { deleteInstanceConfigSettings, listInstanceConfigOperationsSettings, listInstancesSettings, + listInstancePartitionsSettings, getInstanceSettings, createInstanceSettings, updateInstanceSettings, deleteInstanceSettings, setIamPolicySettings, getIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + getInstancePartitionSettings, + createInstancePartitionSettings, + deleteInstancePartitionSettings, + updateInstancePartitionSettings, + listInstancePartitionOperationsSettings); initDefaults(this); } @@ -787,6 +1083,7 @@ protected Builder(InstanceAdminStubSettings settings) { listInstanceConfigOperationsSettings = settings.listInstanceConfigOperationsSettings.toBuilder(); listInstancesSettings = settings.listInstancesSettings.toBuilder(); + listInstancePartitionsSettings = settings.listInstancePartitionsSettings.toBuilder(); getInstanceSettings = settings.getInstanceSettings.toBuilder(); createInstanceSettings = settings.createInstanceSettings.toBuilder(); createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); @@ -796,6 +1093,16 @@ protected Builder(InstanceAdminStubSettings settings) { setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + getInstancePartitionSettings = settings.getInstancePartitionSettings.toBuilder(); + createInstancePartitionSettings = settings.createInstancePartitionSettings.toBuilder(); + createInstancePartitionOperationSettings = + settings.createInstancePartitionOperationSettings.toBuilder(); + deleteInstancePartitionSettings = settings.deleteInstancePartitionSettings.toBuilder(); + updateInstancePartitionSettings = settings.updateInstancePartitionSettings.toBuilder(); + updateInstancePartitionOperationSettings = + settings.updateInstancePartitionOperationSettings.toBuilder(); + listInstancePartitionOperationsSettings = + settings.listInstancePartitionOperationsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -806,13 +1113,19 @@ protected Builder(InstanceAdminStubSettings settings) { deleteInstanceConfigSettings, listInstanceConfigOperationsSettings, listInstancesSettings, + listInstancePartitionsSettings, getInstanceSettings, createInstanceSettings, updateInstanceSettings, deleteInstanceSettings, setIamPolicySettings, getIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + getInstancePartitionSettings, + createInstancePartitionSettings, + deleteInstancePartitionSettings, + updateInstancePartitionSettings, + listInstancePartitionOperationsSettings); } private static Builder createDefault() { @@ -875,6 +1188,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .listInstancePartitionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -910,6 +1228,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + builder + .getInstancePartitionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createInstancePartitionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteInstancePartitionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateInstancePartitionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listInstancePartitionOperationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createInstanceConfigOperationSettings() .setInitialCallSettings( @@ -1008,6 +1351,56 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(86400000L)) .build())); + builder + .createInstancePartitionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(InstancePartition.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateInstancePartitionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateInstancePartitionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(InstancePartition.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateInstancePartitionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -1048,8 +1441,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to createInstanceConfig. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< CreateInstanceConfigRequest, InstanceConfig, CreateInstanceConfigMetadata> createInstanceConfigOperationSettings() { @@ -1063,8 +1454,6 @@ public Builder applyToAllUnaryMethods( } /** Returns the builder for the settings used for calls to updateInstanceConfig. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< UpdateInstanceConfigRequest, InstanceConfig, UpdateInstanceConfigMetadata> updateInstanceConfigOperationSettings() { @@ -1093,6 +1482,15 @@ public Builder applyToAllUnaryMethods( return listInstancesSettings; } + /** Returns the builder for the settings used for calls to listInstancePartitions. */ + public PagedCallSettings.Builder< + ListInstancePartitionsRequest, + ListInstancePartitionsResponse, + ListInstancePartitionsPagedResponse> + listInstancePartitionsSettings() { + return listInstancePartitionsSettings; + } + /** Returns the builder for the settings used for calls to getInstance. */ public UnaryCallSettings.Builder getInstanceSettings() { return getInstanceSettings; @@ -1104,8 +1502,6 @@ public UnaryCallSettings.Builder createInstanc } /** Returns the builder for the settings used for calls to createInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder createInstanceOperationSettings() { return createInstanceOperationSettings; @@ -1117,8 +1513,6 @@ public UnaryCallSettings.Builder updateInstanc } /** Returns the builder for the settings used for calls to updateInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder updateInstanceOperationSettings() { return updateInstanceOperationSettings; @@ -1145,6 +1539,53 @@ public UnaryCallSettings.Builder getIamPolicySettin return testIamPermissionsSettings; } + /** Returns the builder for the settings used for calls to getInstancePartition. */ + public UnaryCallSettings.Builder + getInstancePartitionSettings() { + return getInstancePartitionSettings; + } + + /** Returns the builder for the settings used for calls to createInstancePartition. */ + public UnaryCallSettings.Builder + createInstancePartitionSettings() { + return createInstancePartitionSettings; + } + + /** Returns the builder for the settings used for calls to createInstancePartition. */ + public OperationCallSettings.Builder< + CreateInstancePartitionRequest, InstancePartition, CreateInstancePartitionMetadata> + createInstancePartitionOperationSettings() { + return createInstancePartitionOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstancePartition. */ + public UnaryCallSettings.Builder + deleteInstancePartitionSettings() { + return deleteInstancePartitionSettings; + } + + /** Returns the builder for the settings used for calls to updateInstancePartition. */ + public UnaryCallSettings.Builder + updateInstancePartitionSettings() { + return updateInstancePartitionSettings; + } + + /** Returns the builder for the settings used for calls to updateInstancePartition. */ + public OperationCallSettings.Builder< + UpdateInstancePartitionRequest, InstancePartition, UpdateInstancePartitionMetadata> + updateInstancePartitionOperationSettings() { + return updateInstancePartitionOperationSettings; + } + + /** Returns the builder for the settings used for calls to listInstancePartitionOperations. */ + public PagedCallSettings.Builder< + ListInstancePartitionOperationsRequest, + ListInstancePartitionOperationsResponse, + ListInstancePartitionOperationsPagedResponse> + listInstancePartitionOperationsSettings() { + return listInstancePartitionOperationsSettings; + } + /** Returns the endpoint set by the user or the the service's default endpoint. */ @Override public String getEndpoint() { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java index d1502689d8..a785ff6d99 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java @@ -234,7 +234,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -276,7 +275,6 @@ private static Builder createDefault() { return new Builder(SpannerStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(SpannerStubSettings.newHttpJsonBuilder()); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java index aa35e6adbb..4368496c41 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.v1.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonSpannerCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java index 10e6962478..5ba7eb584a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java @@ -18,7 +18,6 @@ import static com.google.cloud.spanner.v1.SpannerClient.ListSessionsPagedResponse; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -73,7 +72,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonSpannerStub extends SpannerStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json index feebefee60..a01e9dbb01 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json @@ -1709,6 +1709,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.CreateInstanceRequest", "queryAllDeclaredConstructors": true, @@ -1745,6 +1781,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.DeleteInstanceRequest", "queryAllDeclaredConstructors": true, @@ -1781,6 +1835,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.GetInstanceRequest", "queryAllDeclaredConstructors": true, @@ -1862,6 +1934,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.InstancePartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstancePartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstancePartition$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest", "queryAllDeclaredConstructors": true, @@ -1934,6 +2033,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.ListInstancesRequest", "queryAllDeclaredConstructors": true, @@ -2069,6 +2240,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.UpdateInstanceRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java index 58505c0a00..99d8138ad9 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java @@ -18,6 +18,8 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -47,8 +49,12 @@ import com.google.spanner.admin.instance.v1.InstanceConfig; import com.google.spanner.admin.instance.v1.InstanceConfigName; import com.google.spanner.admin.instance.v1.InstanceName; +import com.google.spanner.admin.instance.v1.InstancePartition; +import com.google.spanner.admin.instance.v1.InstancePartitionName; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.ProjectName; import com.google.spanner.admin.instance.v1.ReplicaInfo; @@ -793,6 +799,106 @@ public void listInstancesExceptionTest2() throws Exception { } } + @Test + public void listInstancePartitionsTest() throws Exception { + InstancePartition responsesElement = InstancePartition.newBuilder().build(); + ListInstancePartitionsResponse expectedResponse = + ListInstancePartitionsResponse.newBuilder() + .setNextPageToken("") + .addAllInstancePartitions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + ListInstancePartitionsPagedResponse pagedListResponse = client.listInstancePartitions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancePartitionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancePartitionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.listInstancePartitions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancePartitionsTest2() throws Exception { + InstancePartition responsesElement = InstancePartition.newBuilder().build(); + ListInstancePartitionsResponse expectedResponse = + ListInstancePartitionsResponse.newBuilder() + .setNextPageToken("") + .addAllInstancePartitions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-8887/instances/instance-8887"; + + ListInstancePartitionsPagedResponse pagedListResponse = client.listInstancePartitions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancePartitionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancePartitionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8887/instances/instance-8887"; + client.listInstancePartitions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getInstanceTest() throws Exception { Instance expectedResponse = @@ -1466,4 +1572,511 @@ public void testIamPermissionsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void getInstancePartitionTest() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + + InstancePartition actualResponse = client.getInstancePartition(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInstancePartitionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + client.getInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstancePartitionTest2() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9266/instances/instance-9266/instancePartitions/instancePartition-9266"; + + InstancePartition actualResponse = client.getInstancePartition(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInstancePartitionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9266/instances/instance-9266/instancePartitions/instancePartition-9266"; + client.getInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInstancePartitionTest() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstancePartitionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + + InstancePartition actualResponse = + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInstancePartitionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createInstancePartitionTest2() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstancePartitionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-8887/instances/instance-8887"; + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + + InstancePartition actualResponse = + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInstancePartitionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8887/instances/instance-8887"; + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInstancePartitionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + + client.deleteInstancePartition(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteInstancePartitionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + client.deleteInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInstancePartitionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9266/instances/instance-9266/instancePartitions/instancePartition-9266"; + + client.deleteInstancePartition(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteInstancePartitionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9266/instances/instance-9266/instancePartitions/instancePartition-9266"; + client.deleteInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInstancePartitionTest() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInstancePartitionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InstancePartition instancePartition = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + FieldMask fieldMask = FieldMask.newBuilder().build(); + + InstancePartition actualResponse = + client.updateInstancePartitionAsync(instancePartition, fieldMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateInstancePartitionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstancePartition instancePartition = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + FieldMask fieldMask = FieldMask.newBuilder().build(); + client.updateInstancePartitionAsync(instancePartition, fieldMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listInstancePartitionOperationsTest() throws Exception { + Operation responsesElement = Operation.newBuilder().build(); + ListInstancePartitionOperationsResponse expectedResponse = + ListInstancePartitionOperationsResponse.newBuilder() + .setNextPageToken("") + .addAllOperations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + ListInstancePartitionOperationsPagedResponse pagedListResponse = + client.listInstancePartitionOperations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancePartitionOperationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.listInstancePartitionOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancePartitionOperationsTest2() throws Exception { + Operation responsesElement = Operation.newBuilder().build(); + ListInstancePartitionOperationsResponse expectedResponse = + ListInstancePartitionOperationsResponse.newBuilder() + .setNextPageToken("") + .addAllOperations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-8887/instances/instance-8887"; + + ListInstancePartitionOperationsPagedResponse pagedListResponse = + client.listInstancePartitionOperations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancePartitionOperationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8887/instances/instance-8887"; + client.listInstancePartitionOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java index b52443ddac..fbd9ca6c40 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java @@ -18,6 +18,8 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperationsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionOperationsPagedResponse; +import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancePartitionsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -46,24 +48,34 @@ import com.google.protobuf.Timestamp; import com.google.spanner.admin.instance.v1.AutoscalingConfig; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; import com.google.spanner.admin.instance.v1.InstanceConfigName; import com.google.spanner.admin.instance.v1.InstanceName; +import com.google.spanner.admin.instance.v1.InstancePartition; +import com.google.spanner.admin.instance.v1.InstancePartitionName; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.ProjectName; import com.google.spanner.admin.instance.v1.ReplicaInfo; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import io.grpc.StatusRuntimeException; import java.io.IOException; @@ -732,6 +744,96 @@ public void listInstancesExceptionTest2() throws Exception { } } + @Test + public void listInstancePartitionsTest() throws Exception { + InstancePartition responsesElement = InstancePartition.newBuilder().build(); + ListInstancePartitionsResponse expectedResponse = + ListInstancePartitionsResponse.newBuilder() + .setNextPageToken("") + .addAllInstancePartitions(Arrays.asList(responsesElement)) + .build(); + mockInstanceAdmin.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + ListInstancePartitionsPagedResponse pagedListResponse = client.listInstancePartitions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancePartitionsList().get(0), resources.get(0)); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancePartitionsRequest actualRequest = + ((ListInstancePartitionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancePartitionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.listInstancePartitions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancePartitionsTest2() throws Exception { + InstancePartition responsesElement = InstancePartition.newBuilder().build(); + ListInstancePartitionsResponse expectedResponse = + ListInstancePartitionsResponse.newBuilder() + .setNextPageToken("") + .addAllInstancePartitions(Arrays.asList(responsesElement)) + .build(); + mockInstanceAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstancePartitionsPagedResponse pagedListResponse = client.listInstancePartitions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancePartitionsList().get(0), resources.get(0)); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancePartitionsRequest actualRequest = + ((ListInstancePartitionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancePartitionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstancePartitions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getInstanceTest() throws Exception { Instance expectedResponse = @@ -1321,4 +1423,452 @@ public void testIamPermissionsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void getInstancePartitionTest() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockInstanceAdmin.addResponse(expectedResponse); + + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + + InstancePartition actualResponse = client.getInstancePartition(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstancePartitionRequest actualRequest = + ((GetInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstancePartitionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + client.getInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstancePartitionTest2() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + InstancePartition actualResponse = client.getInstancePartition(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstancePartitionRequest actualRequest = + ((GetInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstancePartitionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + client.getInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInstancePartitionTest() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstancePartitionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstanceAdmin.addResponse(resultOperation); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + + InstancePartition actualResponse = + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstancePartitionRequest actualRequest = + ((CreateInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(instancePartition, actualRequest.getInstancePartition()); + Assert.assertEquals(instancePartitionId, actualRequest.getInstancePartitionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstancePartitionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createInstancePartitionTest2() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstancePartitionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstanceAdmin.addResponse(resultOperation); + + String parent = "parent-995424086"; + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + + InstancePartition actualResponse = + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstancePartitionRequest actualRequest = + ((CreateInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instancePartition, actualRequest.getInstancePartition()); + Assert.assertEquals(instancePartitionId, actualRequest.getInstancePartitionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstancePartitionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + String instancePartitionId = "instancePartitionId1364450768"; + client.createInstancePartitionAsync(parent, instancePartition, instancePartitionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInstancePartitionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockInstanceAdmin.addResponse(expectedResponse); + + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + + client.deleteInstancePartition(name); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstancePartitionRequest actualRequest = + ((DeleteInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstancePartitionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + InstancePartitionName name = + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"); + client.deleteInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInstancePartitionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteInstancePartition(name); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstancePartitionRequest actualRequest = + ((DeleteInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstancePartitionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + client.deleteInstancePartition(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInstancePartitionTest() throws Exception { + InstancePartition expectedResponse = + InstancePartition.newBuilder() + .setName( + InstancePartitionName.of("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]") + .toString()) + .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencingDatabases(new ArrayList()) + .addAllReferencingBackups(new ArrayList()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInstancePartitionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInstanceAdmin.addResponse(resultOperation); + + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + FieldMask fieldMask = FieldMask.newBuilder().build(); + + InstancePartition actualResponse = + client.updateInstancePartitionAsync(instancePartition, fieldMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInstancePartitionRequest actualRequest = + ((UpdateInstancePartitionRequest) actualRequests.get(0)); + + Assert.assertEquals(instancePartition, actualRequest.getInstancePartition()); + Assert.assertEquals(fieldMask, actualRequest.getFieldMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInstancePartitionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + InstancePartition instancePartition = InstancePartition.newBuilder().build(); + FieldMask fieldMask = FieldMask.newBuilder().build(); + client.updateInstancePartitionAsync(instancePartition, fieldMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listInstancePartitionOperationsTest() throws Exception { + Operation responsesElement = Operation.newBuilder().build(); + ListInstancePartitionOperationsResponse expectedResponse = + ListInstancePartitionOperationsResponse.newBuilder() + .setNextPageToken("") + .addAllOperations(Arrays.asList(responsesElement)) + .build(); + mockInstanceAdmin.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + ListInstancePartitionOperationsPagedResponse pagedListResponse = + client.listInstancePartitionOperations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperationsList().get(0), resources.get(0)); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancePartitionOperationsRequest actualRequest = + ((ListInstancePartitionOperationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancePartitionOperationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.listInstancePartitionOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancePartitionOperationsTest2() throws Exception { + Operation responsesElement = Operation.newBuilder().build(); + ListInstancePartitionOperationsResponse expectedResponse = + ListInstancePartitionOperationsResponse.newBuilder() + .setNextPageToken("") + .addAllOperations(Arrays.asList(responsesElement)) + .build(); + mockInstanceAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstancePartitionOperationsPagedResponse pagedListResponse = + client.listInstancePartitionOperations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperationsList().get(0), resources.get(0)); + + List actualRequests = mockInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancePartitionOperationsRequest actualRequest = + ((ListInstancePartitionOperationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancePartitionOperationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstancePartitionOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java index c1a9a12227..b6f95a3f50 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java @@ -26,21 +26,30 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceRequest; import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest; import com.google.spanner.admin.instance.v1.GetInstanceRequest; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceAdminGrpc.InstanceAdminImplBase; import com.google.spanner.admin.instance.v1.InstanceConfig; +import com.google.spanner.admin.instance.v1.InstancePartition; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse; import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest; import com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest; +import com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse; import com.google.spanner.admin.instance.v1.ListInstancesRequest; import com.google.spanner.admin.instance.v1.ListInstancesResponse; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; +import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import io.grpc.stub.StreamObserver; import java.util.ArrayList; @@ -230,6 +239,28 @@ public void listInstances( } } + @Override + public void listInstancePartitions( + ListInstancePartitionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancePartitionsResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancePartitionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstancePartitions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancePartitionsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { Object response = responses.poll(); @@ -374,4 +405,110 @@ public void testIamPermissions( Exception.class.getName()))); } } + + @Override + public void getInstancePartition( + GetInstancePartitionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InstancePartition) { + requests.add(request); + responseObserver.onNext(((InstancePartition) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstancePartition, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InstancePartition.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInstancePartition( + CreateInstancePartitionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInstancePartition, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstancePartition( + DeleteInstancePartitionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInstancePartition, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateInstancePartition( + UpdateInstancePartitionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInstancePartition, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstancePartitionOperations( + ListInstancePartitionOperationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancePartitionOperationsResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancePartitionOperationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstancePartitionOperations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancePartitionOperationsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java index 400cb20ae9..260460319f 100644 --- a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java @@ -393,6 +393,56 @@ private InstanceAdminGrpc() {} return getListInstancesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse> + getListInstancePartitionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstancePartitions", + requestType = com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest.class, + responseType = com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse> + getListInstancePartitionsMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse> + getListInstancePartitionsMethod; + if ((getListInstancePartitionsMethod = InstanceAdminGrpc.getListInstancePartitionsMethod) + == null) { + synchronized (InstanceAdminGrpc.class) { + if ((getListInstancePartitionsMethod = InstanceAdminGrpc.getListInstancePartitionsMethod) + == null) { + InstanceAdminGrpc.getListInstancePartitionsMethod = + getListInstancePartitionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListInstancePartitions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new InstanceAdminMethodDescriptorSupplier("ListInstancePartitions")) + .build(); + } + } + } + return getListInstancePartitionsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.spanner.admin.instance.v1.GetInstanceRequest, com.google.spanner.admin.instance.v1.Instance> @@ -694,6 +744,258 @@ private InstanceAdminGrpc() {} return getTestIamPermissionsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest, + com.google.spanner.admin.instance.v1.InstancePartition> + getGetInstancePartitionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstancePartition", + requestType = com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.class, + responseType = com.google.spanner.admin.instance.v1.InstancePartition.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest, + com.google.spanner.admin.instance.v1.InstancePartition> + getGetInstancePartitionMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest, + com.google.spanner.admin.instance.v1.InstancePartition> + getGetInstancePartitionMethod; + if ((getGetInstancePartitionMethod = InstanceAdminGrpc.getGetInstancePartitionMethod) == null) { + synchronized (InstanceAdminGrpc.class) { + if ((getGetInstancePartitionMethod = InstanceAdminGrpc.getGetInstancePartitionMethod) + == null) { + InstanceAdminGrpc.getGetInstancePartitionMethod = + getGetInstancePartitionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetInstancePartition")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.InstancePartition + .getDefaultInstance())) + .setSchemaDescriptor( + new InstanceAdminMethodDescriptorSupplier("GetInstancePartition")) + .build(); + } + } + } + return getGetInstancePartitionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest, + com.google.longrunning.Operation> + getCreateInstancePartitionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInstancePartition", + requestType = com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest, + com.google.longrunning.Operation> + getCreateInstancePartitionMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest, + com.google.longrunning.Operation> + getCreateInstancePartitionMethod; + if ((getCreateInstancePartitionMethod = InstanceAdminGrpc.getCreateInstancePartitionMethod) + == null) { + synchronized (InstanceAdminGrpc.class) { + if ((getCreateInstancePartitionMethod = InstanceAdminGrpc.getCreateInstancePartitionMethod) + == null) { + InstanceAdminGrpc.getCreateInstancePartitionMethod = + getCreateInstancePartitionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateInstancePartition")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new InstanceAdminMethodDescriptorSupplier("CreateInstancePartition")) + .build(); + } + } + } + return getCreateInstancePartitionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest, + com.google.protobuf.Empty> + getDeleteInstancePartitionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstancePartition", + requestType = com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest, + com.google.protobuf.Empty> + getDeleteInstancePartitionMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest, + com.google.protobuf.Empty> + getDeleteInstancePartitionMethod; + if ((getDeleteInstancePartitionMethod = InstanceAdminGrpc.getDeleteInstancePartitionMethod) + == null) { + synchronized (InstanceAdminGrpc.class) { + if ((getDeleteInstancePartitionMethod = InstanceAdminGrpc.getDeleteInstancePartitionMethod) + == null) { + InstanceAdminGrpc.getDeleteInstancePartitionMethod = + getDeleteInstancePartitionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteInstancePartition")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new InstanceAdminMethodDescriptorSupplier("DeleteInstancePartition")) + .build(); + } + } + } + return getDeleteInstancePartitionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest, + com.google.longrunning.Operation> + getUpdateInstancePartitionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateInstancePartition", + requestType = com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest, + com.google.longrunning.Operation> + getUpdateInstancePartitionMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest, + com.google.longrunning.Operation> + getUpdateInstancePartitionMethod; + if ((getUpdateInstancePartitionMethod = InstanceAdminGrpc.getUpdateInstancePartitionMethod) + == null) { + synchronized (InstanceAdminGrpc.class) { + if ((getUpdateInstancePartitionMethod = InstanceAdminGrpc.getUpdateInstancePartitionMethod) + == null) { + InstanceAdminGrpc.getUpdateInstancePartitionMethod = + getUpdateInstancePartitionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateInstancePartition")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new InstanceAdminMethodDescriptorSupplier("UpdateInstancePartition")) + .build(); + } + } + } + return getUpdateInstancePartitionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse> + getListInstancePartitionOperationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstancePartitionOperations", + requestType = + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.class, + responseType = + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse> + getListInstancePartitionOperationsMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse> + getListInstancePartitionOperationsMethod; + if ((getListInstancePartitionOperationsMethod = + InstanceAdminGrpc.getListInstancePartitionOperationsMethod) + == null) { + synchronized (InstanceAdminGrpc.class) { + if ((getListInstancePartitionOperationsMethod = + InstanceAdminGrpc.getListInstancePartitionOperationsMethod) + == null) { + InstanceAdminGrpc.getListInstancePartitionOperationsMethod = + getListInstancePartitionOperationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListInstancePartitionOperations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1 + .ListInstancePartitionOperationsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.instance.v1 + .ListInstancePartitionOperationsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new InstanceAdminMethodDescriptorSupplier( + "ListInstancePartitionOperations")) + .build(); + } + } + } + return getListInstancePartitionOperationsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static InstanceAdminStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -946,6 +1248,22 @@ default void listInstances( getListInstancesMethod(), responseObserver); } + /** + * + * + *

+     * Lists all instance partitions for the given instance.
+     * 
+ */ + default void listInstancePartitions( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest request, + io.grpc.stub.StreamObserver< + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancePartitionsMethod(), responseObserver); + } + /** * * @@ -1118,6 +1436,161 @@ default void testIamPermissions( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getTestIamPermissionsMethod(), responseObserver); } + + /** + * + * + *
+     * Gets information about a particular instance partition.
+     * 
+ */ + default void getInstancePartition( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstancePartitionMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an instance partition and begins preparing it to be used. The
+     * returned [long-running operation][google.longrunning.Operation]
+     * can be used to track the progress of preparing the new instance partition.
+     * The instance partition name is assigned by the caller. If the named
+     * instance partition already exists, `CreateInstancePartition` returns
+     * `ALREADY_EXISTS`.
+     * Immediately upon completion of this request:
+     *   * The instance partition is readable via the API, with all requested
+     *     attributes but no allocated resources. Its state is `CREATING`.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation renders the instance partition immediately
+     *     unreadable via the API.
+     *   * The instance partition can be deleted.
+     *   * All other attempts to modify the instance partition are rejected.
+     * Upon completion of the returned operation:
+     *   * Billing for all successfully-allocated resources begins (some types
+     *     may have lower than the requested levels).
+     *   * Databases can start using this instance partition.
+     *   * The instance partition's allocated resource levels are readable via the
+     *     API.
+     *   * The instance partition's state becomes `READY`.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track creation of the instance partition.  The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * 
+ */ + default void createInstancePartition( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInstancePartitionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an existing instance partition. Requires that the
+     * instance partition is not used by any database or backup and is not the
+     * default instance partition of an instance.
+     * Authorization requires `spanner.instancePartitions.delete` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + default void deleteInstancePartition( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstancePartitionMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an instance partition, and begins allocating or releasing resources
+     * as requested. The returned [long-running
+     * operation][google.longrunning.Operation] can be used to track the
+     * progress of updating the instance partition. If the named instance
+     * partition does not exist, returns `NOT_FOUND`.
+     * Immediately upon completion of this request:
+     *   * For resource types for which a decrease in the instance partition's
+     *   allocation has been requested, billing is based on the newly-requested
+     *   level.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation sets its metadata's
+     *     [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time],
+     *     and begins restoring resources to their pre-request values. The
+     *     operation is guaranteed to succeed at undoing all resource changes,
+     *     after which point it terminates with a `CANCELLED` status.
+     *   * All other attempts to modify the instance partition are rejected.
+     *   * Reading the instance partition via the API continues to give the
+     *     pre-request resource levels.
+     * Upon completion of the returned operation:
+     *   * Billing begins for all successfully-allocated resources (some types
+     *     may have lower than the requested levels).
+     *   * All newly-reserved resources are available for serving the instance
+     *     partition's tables.
+     *   * The instance partition's new resource levels are readable via the API.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track the instance partition modification. The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * Authorization requires `spanner.instancePartitions.update` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + default void updateInstancePartition( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateInstancePartitionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists instance partition [long-running
+     * operations][google.longrunning.Operation] in the given instance.
+     * An instance partition operation has a name of the form
+     * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
+     * The long-running operation
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that have completed/failed/canceled within the last 7 days,
+     * and pending operations. Operations returned are ordered by
+     * `operation.metadata.value.start_time` in descending order starting from the
+     * most recently started operation.
+     * Authorization requires `spanner.instancePartitionOperations.list`
+     * permission on the resource
+     * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
+     * 
+ */ + default void listInstancePartitionOperations( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest request, + io.grpc.stub.StreamObserver< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancePartitionOperationsMethod(), responseObserver); + } } /** @@ -1387,6 +1860,24 @@ public void listInstances( responseObserver); } + /** + * + * + *
+     * Lists all instance partitions for the given instance.
+     * 
+ */ + public void listInstancePartitions( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest request, + io.grpc.stub.StreamObserver< + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancePartitionsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1544,11 +2035,166 @@ public void setIamPolicy( * [resource][google.iam.v1.GetIamPolicyRequest.resource]. * */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns permissions that the caller has on the specified instance resource.
+     * Attempting this RPC on a non-existent Cloud Spanner instance resource will
+     * result in a NOT_FOUND error if the user has `spanner.instances.list`
+     * permission on the containing Google Cloud Project. Otherwise returns an
+     * empty set of permissions.
+     * 
+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets information about a particular instance partition.
+     * 
+ */ + public void getInstancePartition( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstancePartitionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an instance partition and begins preparing it to be used. The
+     * returned [long-running operation][google.longrunning.Operation]
+     * can be used to track the progress of preparing the new instance partition.
+     * The instance partition name is assigned by the caller. If the named
+     * instance partition already exists, `CreateInstancePartition` returns
+     * `ALREADY_EXISTS`.
+     * Immediately upon completion of this request:
+     *   * The instance partition is readable via the API, with all requested
+     *     attributes but no allocated resources. Its state is `CREATING`.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation renders the instance partition immediately
+     *     unreadable via the API.
+     *   * The instance partition can be deleted.
+     *   * All other attempts to modify the instance partition are rejected.
+     * Upon completion of the returned operation:
+     *   * Billing for all successfully-allocated resources begins (some types
+     *     may have lower than the requested levels).
+     *   * Databases can start using this instance partition.
+     *   * The instance partition's allocated resource levels are readable via the
+     *     API.
+     *   * The instance partition's state becomes `READY`.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track creation of the instance partition.  The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * 
+ */ + public void createInstancePartition( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstancePartitionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an existing instance partition. Requires that the
+     * instance partition is not used by any database or backup and is not the
+     * default instance partition of an instance.
+     * Authorization requires `spanner.instancePartitions.delete` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + public void deleteInstancePartition( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstancePartitionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an instance partition, and begins allocating or releasing resources
+     * as requested. The returned [long-running
+     * operation][google.longrunning.Operation] can be used to track the
+     * progress of updating the instance partition. If the named instance
+     * partition does not exist, returns `NOT_FOUND`.
+     * Immediately upon completion of this request:
+     *   * For resource types for which a decrease in the instance partition's
+     *   allocation has been requested, billing is based on the newly-requested
+     *   level.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation sets its metadata's
+     *     [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time],
+     *     and begins restoring resources to their pre-request values. The
+     *     operation is guaranteed to succeed at undoing all resource changes,
+     *     after which point it terminates with a `CANCELLED` status.
+     *   * All other attempts to modify the instance partition are rejected.
+     *   * Reading the instance partition via the API continues to give the
+     *     pre-request resource levels.
+     * Upon completion of the returned operation:
+     *   * Billing begins for all successfully-allocated resources (some types
+     *     may have lower than the requested levels).
+     *   * All newly-reserved resources are available for serving the instance
+     *     partition's tables.
+     *   * The instance partition's new resource levels are readable via the API.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track the instance partition modification. The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * Authorization requires `spanner.instancePartitions.update` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + public void updateInstancePartition( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + getChannel().newCall(getUpdateInstancePartitionMethod(), getCallOptions()), request, responseObserver); } @@ -1557,19 +2203,29 @@ public void getIamPolicy( * * *
-     * Returns permissions that the caller has on the specified instance resource.
-     * Attempting this RPC on a non-existent Cloud Spanner instance resource will
-     * result in a NOT_FOUND error if the user has `spanner.instances.list`
-     * permission on the containing Google Cloud Project. Otherwise returns an
-     * empty set of permissions.
+     * Lists instance partition [long-running
+     * operations][google.longrunning.Operation] in the given instance.
+     * An instance partition operation has a name of the form
+     * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
+     * The long-running operation
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that have completed/failed/canceled within the last 7 days,
+     * and pending operations. Operations returned are ordered by
+     * `operation.metadata.value.start_time` in descending order starting from the
+     * most recently started operation.
+     * Authorization requires `spanner.instancePartitionOperations.list`
+     * permission on the resource
+     * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
      * 
*/ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver + public void listInstancePartitionOperations( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest request, + io.grpc.stub.StreamObserver< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + getChannel().newCall(getListInstancePartitionOperationsMethod(), getCallOptions()), request, responseObserver); } @@ -1784,6 +2440,20 @@ public com.google.spanner.admin.instance.v1.ListInstancesResponse listInstances( getChannel(), getListInstancesMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists all instance partitions for the given instance.
+     * 
+ */ + public com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + listInstancePartitions( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancePartitionsMethod(), getCallOptions(), request); + } + /** * * @@ -1945,6 +2615,154 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets information about a particular instance partition.
+     * 
+ */ + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstancePartitionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an instance partition and begins preparing it to be used. The
+     * returned [long-running operation][google.longrunning.Operation]
+     * can be used to track the progress of preparing the new instance partition.
+     * The instance partition name is assigned by the caller. If the named
+     * instance partition already exists, `CreateInstancePartition` returns
+     * `ALREADY_EXISTS`.
+     * Immediately upon completion of this request:
+     *   * The instance partition is readable via the API, with all requested
+     *     attributes but no allocated resources. Its state is `CREATING`.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation renders the instance partition immediately
+     *     unreadable via the API.
+     *   * The instance partition can be deleted.
+     *   * All other attempts to modify the instance partition are rejected.
+     * Upon completion of the returned operation:
+     *   * Billing for all successfully-allocated resources begins (some types
+     *     may have lower than the requested levels).
+     *   * Databases can start using this instance partition.
+     *   * The instance partition's allocated resource levels are readable via the
+     *     API.
+     *   * The instance partition's state becomes `READY`.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track creation of the instance partition.  The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * 
+ */ + public com.google.longrunning.Operation createInstancePartition( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstancePartitionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an existing instance partition. Requires that the
+     * instance partition is not used by any database or backup and is not the
+     * default instance partition of an instance.
+     * Authorization requires `spanner.instancePartitions.delete` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + public com.google.protobuf.Empty deleteInstancePartition( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstancePartitionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an instance partition, and begins allocating or releasing resources
+     * as requested. The returned [long-running
+     * operation][google.longrunning.Operation] can be used to track the
+     * progress of updating the instance partition. If the named instance
+     * partition does not exist, returns `NOT_FOUND`.
+     * Immediately upon completion of this request:
+     *   * For resource types for which a decrease in the instance partition's
+     *   allocation has been requested, billing is based on the newly-requested
+     *   level.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation sets its metadata's
+     *     [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time],
+     *     and begins restoring resources to their pre-request values. The
+     *     operation is guaranteed to succeed at undoing all resource changes,
+     *     after which point it terminates with a `CANCELLED` status.
+     *   * All other attempts to modify the instance partition are rejected.
+     *   * Reading the instance partition via the API continues to give the
+     *     pre-request resource levels.
+     * Upon completion of the returned operation:
+     *   * Billing begins for all successfully-allocated resources (some types
+     *     may have lower than the requested levels).
+     *   * All newly-reserved resources are available for serving the instance
+     *     partition's tables.
+     *   * The instance partition's new resource levels are readable via the API.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track the instance partition modification. The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * Authorization requires `spanner.instancePartitions.update` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + public com.google.longrunning.Operation updateInstancePartition( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInstancePartitionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists instance partition [long-running
+     * operations][google.longrunning.Operation] in the given instance.
+     * An instance partition operation has a name of the form
+     * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
+     * The long-running operation
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that have completed/failed/canceled within the last 7 days,
+     * and pending operations. Operations returned are ordered by
+     * `operation.metadata.value.start_time` in descending order starting from the
+     * most recently started operation.
+     * Authorization requires `spanner.instancePartitionOperations.list`
+     * permission on the resource
+     * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
+     * 
+ */ + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + listInstancePartitionOperations( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancePartitionOperationsMethod(), getCallOptions(), request); + } } /** @@ -2164,6 +2982,21 @@ protected InstanceAdminFutureStub build( getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Lists all instance partitions for the given instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse> + listInstancePartitions( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancePartitionsMethod(), getCallOptions()), request); + } + /** * * @@ -2329,6 +3162,161 @@ protected InstanceAdminFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets information about a particular instance partition.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.spanner.admin.instance.v1.InstancePartition> + getInstancePartition( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstancePartitionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an instance partition and begins preparing it to be used. The
+     * returned [long-running operation][google.longrunning.Operation]
+     * can be used to track the progress of preparing the new instance partition.
+     * The instance partition name is assigned by the caller. If the named
+     * instance partition already exists, `CreateInstancePartition` returns
+     * `ALREADY_EXISTS`.
+     * Immediately upon completion of this request:
+     *   * The instance partition is readable via the API, with all requested
+     *     attributes but no allocated resources. Its state is `CREATING`.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation renders the instance partition immediately
+     *     unreadable via the API.
+     *   * The instance partition can be deleted.
+     *   * All other attempts to modify the instance partition are rejected.
+     * Upon completion of the returned operation:
+     *   * Billing for all successfully-allocated resources begins (some types
+     *     may have lower than the requested levels).
+     *   * Databases can start using this instance partition.
+     *   * The instance partition's allocated resource levels are readable via the
+     *     API.
+     *   * The instance partition's state becomes `READY`.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track creation of the instance partition.  The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInstancePartition( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInstancePartitionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an existing instance partition. Requires that the
+     * instance partition is not used by any database or backup and is not the
+     * default instance partition of an instance.
+     * Authorization requires `spanner.instancePartitions.delete` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstancePartition( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstancePartitionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an instance partition, and begins allocating or releasing resources
+     * as requested. The returned [long-running
+     * operation][google.longrunning.Operation] can be used to track the
+     * progress of updating the instance partition. If the named instance
+     * partition does not exist, returns `NOT_FOUND`.
+     * Immediately upon completion of this request:
+     *   * For resource types for which a decrease in the instance partition's
+     *   allocation has been requested, billing is based on the newly-requested
+     *   level.
+     * Until completion of the returned operation:
+     *   * Cancelling the operation sets its metadata's
+     *     [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time],
+     *     and begins restoring resources to their pre-request values. The
+     *     operation is guaranteed to succeed at undoing all resource changes,
+     *     after which point it terminates with a `CANCELLED` status.
+     *   * All other attempts to modify the instance partition are rejected.
+     *   * Reading the instance partition via the API continues to give the
+     *     pre-request resource levels.
+     * Upon completion of the returned operation:
+     *   * Billing begins for all successfully-allocated resources (some types
+     *     may have lower than the requested levels).
+     *   * All newly-reserved resources are available for serving the instance
+     *     partition's tables.
+     *   * The instance partition's new resource levels are readable via the API.
+     * The returned [long-running operation][google.longrunning.Operation] will
+     * have a name of the format
+     * `<instance_partition_name>/operations/<operation_id>` and can be used to
+     * track the instance partition modification. The
+     * [metadata][google.longrunning.Operation.metadata] field type is
+     * [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
+     * The [response][google.longrunning.Operation.response] field type is
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
+     * successful.
+     * Authorization requires `spanner.instancePartitions.update` permission on
+     * the resource
+     * [name][google.spanner.admin.instance.v1.InstancePartition.name].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateInstancePartition( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateInstancePartitionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists instance partition [long-running
+     * operations][google.longrunning.Operation] in the given instance.
+     * An instance partition operation has a name of the form
+     * `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
+     * The long-running operation
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata. Operations returned
+     * include those that have completed/failed/canceled within the last 7 days,
+     * and pending operations. Operations returned are ordered by
+     * `operation.metadata.value.start_time` in descending order starting from the
+     * most recently started operation.
+     * Authorization requires `spanner.instancePartitionOperations.list`
+     * permission on the resource
+     * [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse> + listInstancePartitionOperations( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancePartitionOperationsMethod(), getCallOptions()), + request); + } } private static final int METHODID_LIST_INSTANCE_CONFIGS = 0; @@ -2338,13 +3326,19 @@ protected InstanceAdminFutureStub build( private static final int METHODID_DELETE_INSTANCE_CONFIG = 4; private static final int METHODID_LIST_INSTANCE_CONFIG_OPERATIONS = 5; private static final int METHODID_LIST_INSTANCES = 6; - private static final int METHODID_GET_INSTANCE = 7; - private static final int METHODID_CREATE_INSTANCE = 8; - private static final int METHODID_UPDATE_INSTANCE = 9; - private static final int METHODID_DELETE_INSTANCE = 10; - private static final int METHODID_SET_IAM_POLICY = 11; - private static final int METHODID_GET_IAM_POLICY = 12; - private static final int METHODID_TEST_IAM_PERMISSIONS = 13; + private static final int METHODID_LIST_INSTANCE_PARTITIONS = 7; + private static final int METHODID_GET_INSTANCE = 8; + private static final int METHODID_CREATE_INSTANCE = 9; + private static final int METHODID_UPDATE_INSTANCE = 10; + private static final int METHODID_DELETE_INSTANCE = 11; + private static final int METHODID_SET_IAM_POLICY = 12; + private static final int METHODID_GET_IAM_POLICY = 13; + private static final int METHODID_TEST_IAM_PERMISSIONS = 14; + private static final int METHODID_GET_INSTANCE_PARTITION = 15; + private static final int METHODID_CREATE_INSTANCE_PARTITION = 16; + private static final int METHODID_DELETE_INSTANCE_PARTITION = 17; + private static final int METHODID_UPDATE_INSTANCE_PARTITION = 18; + private static final int METHODID_LIST_INSTANCE_PARTITION_OPERATIONS = 19; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2405,6 +3399,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.spanner.admin.instance.v1.ListInstancesResponse>) responseObserver); break; + case METHODID_LIST_INSTANCE_PARTITIONS: + serviceImpl.listInstancePartitions( + (com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse>) + responseObserver); + break; case METHODID_GET_INSTANCE: serviceImpl.getInstance( (com.google.spanner.admin.instance.v1.GetInstanceRequest) request, @@ -2442,6 +3443,34 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_INSTANCE_PARTITION: + serviceImpl.getInstancePartition( + (com.google.spanner.admin.instance.v1.GetInstancePartitionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INSTANCE_PARTITION: + serviceImpl.createInstancePartition( + (com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE_PARTITION: + serviceImpl.deleteInstancePartition( + (com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INSTANCE_PARTITION: + serviceImpl.updateInstancePartition( + (com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INSTANCE_PARTITION_OPERATIONS: + serviceImpl.listInstancePartitionOperations( + (com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -2506,6 +3535,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.spanner.admin.instance.v1.ListInstancesRequest, com.google.spanner.admin.instance.v1.ListInstancesResponse>( service, METHODID_LIST_INSTANCES))) + .addMethod( + getListInstancePartitionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse>( + service, METHODID_LIST_INSTANCE_PARTITIONS))) .addMethod( getGetInstanceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2547,6 +3583,38 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse>( service, METHODID_TEST_IAM_PERMISSIONS))) + .addMethod( + getGetInstancePartitionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest, + com.google.spanner.admin.instance.v1.InstancePartition>( + service, METHODID_GET_INSTANCE_PARTITION))) + .addMethod( + getCreateInstancePartitionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_INSTANCE_PARTITION))) + .addMethod( + getDeleteInstancePartitionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_INSTANCE_PARTITION))) + .addMethod( + getUpdateInstancePartitionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_INSTANCE_PARTITION))) + .addMethod( + getListInstancePartitionOperationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse>( + service, METHODID_LIST_INSTANCE_PARTITION_OPERATIONS))) .build(); } @@ -2605,6 +3673,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteInstanceConfigMethod()) .addMethod(getListInstanceConfigOperationsMethod()) .addMethod(getListInstancesMethod()) + .addMethod(getListInstancePartitionsMethod()) .addMethod(getGetInstanceMethod()) .addMethod(getCreateInstanceMethod()) .addMethod(getUpdateInstanceMethod()) @@ -2612,6 +3681,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getSetIamPolicyMethod()) .addMethod(getGetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) + .addMethod(getGetInstancePartitionMethod()) + .addMethod(getCreateInstancePartitionMethod()) + .addMethod(getDeleteInstancePartitionMethod()) + .addMethod(getUpdateInstancePartitionMethod()) + .addMethod(getListInstancePartitionOperationsMethod()) .build(); } } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java new file mode 100644 index 0000000000..1e2431b6ae --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java @@ -0,0 +1,1579 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * Metadata type for the operation returned by
+ * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionMetadata} + */ +public final class CreateInstancePartitionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + CreateInstancePartitionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstancePartitionMetadata.newBuilder() to construct. + private CreateInstancePartitionMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstancePartitionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInstancePartitionMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata.class, + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_PARTITION_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + /** + * + * + *
+   * The instance partition being created.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return Whether the instancePartition field is set. + */ + @java.lang.Override + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The instance partition being created.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return The instancePartition. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + /** + * + * + *
+   * The instance partition being created.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time at which the
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The time at which the
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time at which the
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int CANCEL_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp cancelTime_; + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return Whether the cancelTime field is set. + */ + @java.lang.Override + public boolean hasCancelTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return The cancelTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCancelTime() { + return cancelTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : cancelTime_; + } + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { + return cancelTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : cancelTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInstancePartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getCancelTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstancePartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCancelTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); + } + 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.instance.v1.CreateInstancePartitionMetadata)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata other = + (com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) obj; + + if (hasInstancePartition() != other.hasInstancePartition()) return false; + if (hasInstancePartition()) { + if (!getInstancePartition().equals(other.getInstancePartition())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasCancelTime() != other.hasCancelTime()) return false; + if (hasCancelTime()) { + if (!getCancelTime().equals(other.getCancelTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstancePartition()) { + hash = (37 * hash) + INSTANCE_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartition().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasCancelTime()) { + hash = (37 * hash) + CANCEL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCancelTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata 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.instance.v1.CreateInstancePartitionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata 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.instance.v1.CreateInstancePartitionMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata 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.instance.v1.CreateInstancePartitionMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata + 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.instance.v1.CreateInstancePartitionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata 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.instance.v1.CreateInstancePartitionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata type for the operation returned by
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata.class, + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancePartitionFieldBuilder(); + getStartTimeFieldBuilder(); + getCancelTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + cancelTime_ = null; + if (cancelTimeBuilder_ != null) { + cancelTimeBuilder_.dispose(); + cancelTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata build() { + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata buildPartial() { + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata result = + new com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instancePartition_ = + instancePartitionBuilder_ == null + ? instancePartition_ + : instancePartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cancelTime_ = cancelTimeBuilder_ == null ? cancelTime_ : cancelTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @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.instance.v1.CreateInstancePartitionMetadata) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata other) { + if (other + == com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata + .getDefaultInstance()) return this; + if (other.hasInstancePartition()) { + mergeInstancePartition(other.getInstancePartition()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasCancelTime()) { + mergeCancelTime(other.getCancelTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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; + case 10: + { + input.readMessage( + getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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; + } + + private int bitField0_; + + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + instancePartitionBuilder_; + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return Whether the instancePartition field is set. + */ + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return The instancePartition. + */ + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + if (instancePartitionBuilder_ == null) { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } else { + return instancePartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePartition_ = value; + } else { + instancePartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionBuilder_ == null) { + instancePartition_ = builderForValue.build(); + } else { + instancePartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder mergeInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && instancePartition_ != null + && instancePartition_ + != com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()) { + getInstancePartitionBuilder().mergeFrom(value); + } else { + instancePartition_ = value; + } + } else { + instancePartitionBuilder_.mergeFrom(value); + } + if (instancePartition_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder clearInstancePartition() { + bitField0_ = (bitField0_ & ~0x00000001); + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + getInstancePartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInstancePartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + if (instancePartitionBuilder_ != null) { + return instancePartitionBuilder_.getMessageOrBuilder(); + } else { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + } + /** + * + * + *
+     * The instance partition being created.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + getInstancePartitionFieldBuilder() { + if (instancePartitionBuilder_ == null) { + instancePartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( + getInstancePartition(), getParentForChildren(), isClean()); + instancePartition_ = null; + } + return instancePartitionBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time at which the
+     * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp cancelTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + cancelTimeBuilder_; + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return Whether the cancelTime field is set. + */ + public boolean hasCancelTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return The cancelTime. + */ + public com.google.protobuf.Timestamp getCancelTime() { + if (cancelTimeBuilder_ == null) { + return cancelTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : cancelTime_; + } else { + return cancelTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder setCancelTime(com.google.protobuf.Timestamp value) { + if (cancelTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cancelTime_ = value; + } else { + cancelTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder setCancelTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (cancelTimeBuilder_ == null) { + cancelTime_ = builderForValue.build(); + } else { + cancelTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder mergeCancelTime(com.google.protobuf.Timestamp value) { + if (cancelTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cancelTime_ != null + && cancelTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCancelTimeBuilder().mergeFrom(value); + } else { + cancelTime_ = value; + } + } else { + cancelTimeBuilder_.mergeFrom(value); + } + if (cancelTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder clearCancelTime() { + bitField0_ = (bitField0_ & ~0x00000004); + cancelTime_ = null; + if (cancelTimeBuilder_ != null) { + cancelTimeBuilder_.dispose(); + cancelTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCancelTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { + if (cancelTimeBuilder_ != null) { + return cancelTimeBuilder_.getMessageOrBuilder(); + } else { + return cancelTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : cancelTime_; + } + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCancelTimeFieldBuilder() { + if (cancelTimeBuilder_ == null) { + cancelTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCancelTime(), getParentForChildren(), isClean()); + cancelTime_ = null; + } + return cancelTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @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.instance.v1.CreateInstancePartitionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + private static final com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata(); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstancePartitionMetadata 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.instance.v1.CreateInstancePartitionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java new file mode 100644 index 0000000000..f29d343bb4 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java @@ -0,0 +1,178 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface CreateInstancePartitionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance partition being created.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return Whether the instancePartition field is set. + */ + boolean hasInstancePartition(); + /** + * + * + *
+   * The instance partition being created.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return The instancePartition. + */ + com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition(); + /** + * + * + *
+   * The instance partition being created.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder getInstancePartitionOrBuilder(); + + /** + * + * + *
+   * The time at which the
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time at which the
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time at which the
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return Whether the cancelTime field is set. + */ + boolean hasCancelTime(); + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return The cancelTime. + */ + com.google.protobuf.Timestamp getCancelTime(); + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder(); + + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java new file mode 100644 index 0000000000..636a12c5ce --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java @@ -0,0 +1,1202 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The request for
+ * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionRequest} + */ +public final class CreateInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) + CreateInstancePartitionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstancePartitionRequest.newBuilder() to construct. + private CreateInstancePartitionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstancePartitionRequest() { + parent_ = ""; + instancePartitionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInstancePartitionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the instance in which to create the instance
+   * partition. Values are of the form
+   * `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the instance in which to create the instance
+   * partition. Values are of the form
+   * `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_PARTITION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instancePartitionId_ = ""; + /** + * + * + *
+   * Required. The ID of the instance partition to create. Valid identifiers are
+   * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+   * characters in length.
+   * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instancePartitionId. + */ + @java.lang.Override + public java.lang.String getInstancePartitionId() { + java.lang.Object ref = instancePartitionId_; + 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(); + instancePartitionId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of the instance partition to create. Valid identifiers are
+   * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+   * characters in length.
+   * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instancePartitionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstancePartitionIdBytes() { + java.lang.Object ref = instancePartitionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instancePartitionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_PARTITION_FIELD_NUMBER = 3; + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + /** + * + * + *
+   * Required. The instance partition to create. The instance_partition.name may
+   * be omitted, but if specified must be
+   * `<parent>/instancePartitions/<instance_partition_id>`.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instancePartition field is set. + */ + @java.lang.Override + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The instance partition to create. The instance_partition.name may
+   * be omitted, but if specified must be
+   * `<parent>/instancePartitions/<instance_partition_id>`.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instancePartition. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + /** + * + * + *
+   * Required. The instance partition to create. The instance_partition.name may
+   * be omitted, but if specified must be
+   * `<parent>/instancePartitions/<instance_partition_id>`.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instancePartitionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instancePartitionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInstancePartition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instancePartitionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instancePartitionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstancePartition()); + } + 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.instance.v1.CreateInstancePartitionRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest other = + (com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInstancePartitionId().equals(other.getInstancePartitionId())) return false; + if (hasInstancePartition() != other.hasInstancePartition()) return false; + if (hasInstancePartition()) { + if (!getInstancePartition().equals(other.getInstancePartition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INSTANCE_PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartitionId().hashCode(); + if (hasInstancePartition()) { + hash = (37 * hash) + INSTANCE_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest 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.instance.v1.CreateInstancePartitionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest 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.instance.v1.CreateInstancePartitionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest 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.instance.v1.CreateInstancePartitionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + 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.instance.v1.CreateInstancePartitionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest 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.instance.v1.CreateInstancePartitionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancePartitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + instancePartitionId_ = ""; + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest build() { + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest buildPartial() { + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest result = + new com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instancePartitionId_ = instancePartitionId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instancePartition_ = + instancePartitionBuilder_ == null + ? instancePartition_ + : instancePartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.instance.v1.CreateInstancePartitionRequest) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest other) { + if (other + == com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstancePartitionId().isEmpty()) { + instancePartitionId_ = other.instancePartitionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInstancePartition()) { + mergeInstancePartition(other.getInstancePartition()); + } + 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; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instancePartitionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the instance in which to create the instance
+     * partition. Values are of the form
+     * `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the instance in which to create the instance
+     * partition. Values are of the form
+     * `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the instance in which to create the instance
+     * partition. Values are of the form
+     * `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the instance in which to create the instance
+     * partition. Values are of the form
+     * `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the instance in which to create the instance
+     * partition. Values are of the form
+     * `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instancePartitionId_ = ""; + /** + * + * + *
+     * Required. The ID of the instance partition to create. Valid identifiers are
+     * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+     * characters in length.
+     * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instancePartitionId. + */ + public java.lang.String getInstancePartitionId() { + java.lang.Object ref = instancePartitionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instancePartitionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of the instance partition to create. Valid identifiers are
+     * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+     * characters in length.
+     * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instancePartitionId. + */ + public com.google.protobuf.ByteString getInstancePartitionIdBytes() { + java.lang.Object ref = instancePartitionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instancePartitionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of the instance partition to create. Valid identifiers are
+     * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+     * characters in length.
+     * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instancePartitionId to set. + * @return This builder for chaining. + */ + public Builder setInstancePartitionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instancePartitionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the instance partition to create. Valid identifiers are
+     * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+     * characters in length.
+     * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstancePartitionId() { + instancePartitionId_ = getDefaultInstance().getInstancePartitionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the instance partition to create. Valid identifiers are
+     * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+     * characters in length.
+     * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instancePartitionId to set. + * @return This builder for chaining. + */ + public Builder setInstancePartitionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instancePartitionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + instancePartitionBuilder_; + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instancePartition field is set. + */ + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instancePartition. + */ + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + if (instancePartitionBuilder_ == null) { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } else { + return instancePartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePartition_ = value; + } else { + instancePartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionBuilder_ == null) { + instancePartition_ = builderForValue.build(); + } else { + instancePartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && instancePartition_ != null + && instancePartition_ + != com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()) { + getInstancePartitionBuilder().mergeFrom(value); + } else { + instancePartition_ = value; + } + } else { + instancePartitionBuilder_.mergeFrom(value); + } + if (instancePartition_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstancePartition() { + bitField0_ = (bitField0_ & ~0x00000004); + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + getInstancePartitionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInstancePartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + if (instancePartitionBuilder_ != null) { + return instancePartitionBuilder_.getMessageOrBuilder(); + } else { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + } + /** + * + * + *
+     * Required. The instance partition to create. The instance_partition.name may
+     * be omitted, but if specified must be
+     * `<parent>/instancePartitions/<instance_partition_id>`.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + getInstancePartitionFieldBuilder() { + if (instancePartitionBuilder_ == null) { + instancePartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( + getInstancePartition(), getParentForChildren(), isClean()); + instancePartition_ = null; + } + return instancePartitionBuilder_; + } + + @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.instance.v1.CreateInstancePartitionRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) + private static final com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest(); + } + + public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstancePartitionRequest 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.instance.v1.CreateInstancePartitionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java new file mode 100644 index 0000000000..fae12b0bfe --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java @@ -0,0 +1,135 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface CreateInstancePartitionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the instance in which to create the instance
+   * partition. Values are of the form
+   * `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the instance in which to create the instance
+   * partition. Values are of the form
+   * `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID of the instance partition to create. Valid identifiers are
+   * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+   * characters in length.
+   * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instancePartitionId. + */ + java.lang.String getInstancePartitionId(); + /** + * + * + *
+   * Required. The ID of the instance partition to create. Valid identifiers are
+   * of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
+   * characters in length.
+   * 
+ * + * string instance_partition_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instancePartitionId. + */ + com.google.protobuf.ByteString getInstancePartitionIdBytes(); + + /** + * + * + *
+   * Required. The instance partition to create. The instance_partition.name may
+   * be omitted, but if specified must be
+   * `<parent>/instancePartitions/<instance_partition_id>`.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instancePartition field is set. + */ + boolean hasInstancePartition(); + /** + * + * + *
+   * Required. The instance partition to create. The instance_partition.name may
+   * be omitted, but if specified must be
+   * `<parent>/instancePartitions/<instance_partition_id>`.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instancePartition. + */ + com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition(); + /** + * + * + *
+   * Required. The instance partition to create. The instance_partition.name may
+   * be omitted, but if specified must be
+   * `<parent>/instancePartitions/<instance_partition_id>`.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder getInstancePartitionOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java new file mode 100644 index 0000000000..c4186941ca --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java @@ -0,0 +1,871 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The request for
+ * [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstancePartitionRequest} + */ +public final class DeleteInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) + DeleteInstancePartitionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInstancePartitionRequest.newBuilder() to construct. + private DeleteInstancePartitionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstancePartitionRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInstancePartitionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the instance partition to be deleted.
+   * Values are of the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the instance partition to be deleted.
+   * Values are of the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. If not empty, the API only deletes the instance partition when
+   * the etag provided matches the current status of the requested instance
+   * partition. Otherwise, deletes the instance partition without checking the
+   * current status of the requested instance partition.
+   * 
+ * + * string etag = 2; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If not empty, the API only deletes the instance partition when
+   * the etag provided matches the current status of the requested instance
+   * partition. Otherwise, deletes the instance partition without checking the
+   * current status of the requested instance partition.
+   * 
+ * + * string etag = 2; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } + 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.instance.v1.DeleteInstancePartitionRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest other = + (com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest 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.instance.v1.DeleteInstancePartitionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest 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.instance.v1.DeleteInstancePartitionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest 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.instance.v1.DeleteInstancePartitionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + 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.instance.v1.DeleteInstancePartitionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest 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.instance.v1.DeleteInstancePartitionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstancePartitionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest build() { + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest buildPartial() { + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest result = + new com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @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.instance.v1.DeleteInstancePartitionRequest) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest other) { + if (other + == com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the instance partition to be deleted.
+     * Values are of the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the instance partition to be deleted.
+     * Values are of the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the instance partition to be deleted.
+     * Values are of the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the instance partition to be deleted.
+     * Values are of the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the instance partition to be deleted.
+     * Values are of the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. If not empty, the API only deletes the instance partition when
+     * the etag provided matches the current status of the requested instance
+     * partition. Otherwise, deletes the instance partition without checking the
+     * current status of the requested instance partition.
+     * 
+ * + * string etag = 2; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If not empty, the API only deletes the instance partition when
+     * the etag provided matches the current status of the requested instance
+     * partition. Otherwise, deletes the instance partition without checking the
+     * current status of the requested instance partition.
+     * 
+ * + * string etag = 2; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If not empty, the API only deletes the instance partition when
+     * the etag provided matches the current status of the requested instance
+     * partition. Otherwise, deletes the instance partition without checking the
+     * current status of the requested instance partition.
+     * 
+ * + * string etag = 2; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If not empty, the API only deletes the instance partition when
+     * the etag provided matches the current status of the requested instance
+     * partition. Otherwise, deletes the instance partition without checking the
+     * current status of the requested instance partition.
+     * 
+ * + * string etag = 2; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If not empty, the API only deletes the instance partition when
+     * the etag provided matches the current status of the requested instance
+     * partition. Otherwise, deletes the instance partition without checking the
+     * current status of the requested instance partition.
+     * 
+ * + * string etag = 2; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) + private static final com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest(); + } + + public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstancePartitionRequest 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.instance.v1.DeleteInstancePartitionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java new file mode 100644 index 0000000000..83b455310a --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface DeleteInstancePartitionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the instance partition to be deleted.
+   * Values are of the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the instance partition to be deleted.
+   * Values are of the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. If not empty, the API only deletes the instance partition when
+   * the etag provided matches the current status of the requested instance
+   * partition. Otherwise, deletes the instance partition without checking the
+   * current status of the requested instance partition.
+   * 
+ * + * string etag = 2; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. If not empty, the API only deletes the instance partition when
+   * the etag provided matches the current status of the requested instance
+   * partition. Otherwise, deletes the instance partition without checking the
+   * current status of the requested instance partition.
+   * 
+ * + * string etag = 2; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java new file mode 100644 index 0000000000..2181f408aa --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java @@ -0,0 +1,663 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The request for
+ * [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.GetInstancePartitionRequest} + */ +public final class GetInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.GetInstancePartitionRequest) + GetInstancePartitionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstancePartitionRequest.newBuilder() to construct. + private GetInstancePartitionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstancePartitionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstancePartitionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the requested instance partition. Values are of
+   * the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the requested instance partition. Values are of
+   * the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.instance.v1.GetInstancePartitionRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest other = + (com.google.spanner.admin.instance.v1.GetInstancePartitionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest 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.instance.v1.GetInstancePartitionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest 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.instance.v1.GetInstancePartitionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest 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.instance.v1.GetInstancePartitionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest 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.instance.v1.GetInstancePartitionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest 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.instance.v1.GetInstancePartitionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.GetInstancePartitionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.GetInstancePartitionRequest) + com.google.spanner.admin.instance.v1.GetInstancePartitionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.Builder.class); + } + + // Construct using com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.GetInstancePartitionRequest + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.GetInstancePartitionRequest build() { + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.GetInstancePartitionRequest buildPartial() { + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest result = + new com.google.spanner.admin.instance.v1.GetInstancePartitionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.instance.v1.GetInstancePartitionRequest) { + return mergeFrom((com.google.spanner.admin.instance.v1.GetInstancePartitionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest other) { + if (other + == com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + 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; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + 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; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the requested instance partition. Values are of
+     * the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the requested instance partition. Values are of
+     * the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the requested instance partition. Values are of
+     * the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the requested instance partition. Values are of
+     * the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the requested instance partition. Values are of
+     * the form
+     * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.GetInstancePartitionRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.GetInstancePartitionRequest) + private static final com.google.spanner.admin.instance.v1.GetInstancePartitionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.GetInstancePartitionRequest(); + } + + public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstancePartitionRequest 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.instance.v1.GetInstancePartitionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java new file mode 100644 index 0000000000..fd816ce8e7 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface GetInstancePartitionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.GetInstancePartitionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the requested instance partition. Values are of
+   * the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the requested instance partition. Values are of
+   * the form
+   * `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java new file mode 100644 index 0000000000..b4ca244120 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java @@ -0,0 +1,3330 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * An isolated set of Cloud Spanner resources that databases can define
+ * placements on.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.InstancePartition} + */ +public final class InstancePartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.InstancePartition) + InstancePartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstancePartition.newBuilder() to construct. + private InstancePartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstancePartition() { + name_ = ""; + config_ = ""; + displayName_ = ""; + state_ = 0; + referencingDatabases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstancePartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.InstancePartition.class, + com.google.spanner.admin.instance.v1.InstancePartition.Builder.class); + } + + /** + * + * + *
+   * Indicates the current state of the instance partition.
+   * 
+ * + * Protobuf enum {@code google.spanner.admin.instance.v1.InstancePartition.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The instance partition is still being created. Resources may not be
+     * available yet, and operations such as creating placements using this
+     * instance partition may not work.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The instance partition is fully created and ready to do work such as
+     * creating placements and using in databases.
+     * 
+ * + * READY = 2; + */ + READY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The instance partition is still being created. Resources may not be
+     * available yet, and operations such as creating placements using this
+     * instance partition may not work.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * The instance partition is fully created and ready to do work such as
+     * creating placements and using in databases.
+     * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return READY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.InstancePartition.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.admin.instance.v1.InstancePartition.State) + } + + private int bitField0_; + private int computeCapacityCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object computeCapacity_; + + public enum ComputeCapacityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NODE_COUNT(5), + PROCESSING_UNITS(6), + COMPUTECAPACITY_NOT_SET(0); + private final int value; + + private ComputeCapacityCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ComputeCapacityCase valueOf(int value) { + return forNumber(value); + } + + public static ComputeCapacityCase forNumber(int value) { + switch (value) { + case 5: + return NODE_COUNT; + case 6: + return PROCESSING_UNITS; + case 0: + return COMPUTECAPACITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ComputeCapacityCase getComputeCapacityCase() { + return ComputeCapacityCase.forNumber(computeCapacityCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. A unique identifier for the instance partition. Values are of the
+   * form
+   * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+   * The final segment of the name must be between 2 and 64 characters in
+   * length. An instance partition's name cannot be changed after the instance
+   * partition is created.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A unique identifier for the instance partition. Values are of the
+   * form
+   * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+   * The final segment of the name must be between 2 and 64 characters in
+   * length. An instance partition's name cannot be changed after the instance
+   * partition is created.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object config_ = ""; + /** + * + * + *
+   * Required. The name of the instance partition's configuration. Values are of
+   * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+   * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+   * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+   * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The config. + */ + @java.lang.Override + public java.lang.String getConfig() { + java.lang.Object ref = config_; + 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(); + config_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the instance partition's configuration. Values are of
+   * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+   * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+   * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+   * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for config. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The descriptive name for this instance partition as it appears in
+   * UIs. Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The descriptive name for this instance partition as it appears in
+   * UIs. Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_COUNT_FIELD_NUMBER = 5; + /** + * + * + *
+   * The number of nodes allocated to this instance partition.
+   *
+   * Users can set the node_count field to specify the target number of nodes
+   * allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 node_count = 5; + * + * @return Whether the nodeCount field is set. + */ + @java.lang.Override + public boolean hasNodeCount() { + return computeCapacityCase_ == 5; + } + /** + * + * + *
+   * The number of nodes allocated to this instance partition.
+   *
+   * Users can set the node_count field to specify the target number of nodes
+   * allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 node_count = 5; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + if (computeCapacityCase_ == 5) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + + public static final int PROCESSING_UNITS_FIELD_NUMBER = 6; + /** + * + * + *
+   * The number of processing units allocated to this instance partition.
+   *
+   * Users can set the processing_units field to specify the target number of
+   * processing units allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 processing_units = 6; + * + * @return Whether the processingUnits field is set. + */ + @java.lang.Override + public boolean hasProcessingUnits() { + return computeCapacityCase_ == 6; + } + /** + * + * + *
+   * The number of processing units allocated to this instance partition.
+   *
+   * Users can set the processing_units field to specify the target number of
+   * processing units allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 processing_units = 6; + * + * @return The processingUnits. + */ + @java.lang.Override + public int getProcessingUnits() { + if (computeCapacityCase_ == 6) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current instance partition state.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current instance partition state.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition.State getState() { + com.google.spanner.admin.instance.v1.InstancePartition.State result = + com.google.spanner.admin.instance.v1.InstancePartition.State.forNumber(state_); + return result == null + ? com.google.spanner.admin.instance.v1.InstancePartition.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which the instance partition was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The time at which the instance partition was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which the instance partition was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which the instance partition was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The time at which the instance partition was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which the instance partition was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int REFERENCING_DATABASES_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencingDatabases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the referencingDatabases. + */ + public com.google.protobuf.ProtocolStringList getReferencingDatabasesList() { + return referencingDatabases_; + } + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of referencingDatabases. + */ + public int getReferencingDatabasesCount() { + return referencingDatabases_.size(); + } + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The referencingDatabases at the given index. + */ + public java.lang.String getReferencingDatabases(int index) { + return referencingDatabases_.get(index); + } + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingDatabases at the given index. + */ + public com.google.protobuf.ByteString getReferencingDatabasesBytes(int index) { + return referencingDatabases_.getByteString(index); + } + + public static final int REFERENCING_BACKUPS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencingBackups_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the referencingBackups. + */ + public com.google.protobuf.ProtocolStringList getReferencingBackupsList() { + return referencingBackups_; + } + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of referencingBackups. + */ + public int getReferencingBackupsCount() { + return referencingBackups_.size(); + } + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The referencingBackups at the given index. + */ + public java.lang.String getReferencingBackups(int index) { + return referencingBackups_.get(index); + } + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingBackups at the given index. + */ + public com.google.protobuf.ByteString getReferencingBackupsBytes(int index) { + return referencingBackups_.getByteString(index); + } + + public static final int ETAG_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Used for optimistic concurrency control as a way
+   * to help prevent simultaneous updates of a instance partition from
+   * overwriting each other. It is strongly suggested that systems make use of
+   * the etag in the read-modify-write cycle to perform instance partition
+   * updates in order to avoid race conditions: An etag is returned in the
+   * response which contains instance partitions, and systems are expected to
+   * put that etag in the request to update instance partitions to ensure that
+   * their change will be applied to the same version of the instance partition.
+   * If no etag is provided in the call to update instance partition, then the
+   * existing instance partition is overwritten blindly.
+   * 
+ * + * string etag = 12; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used for optimistic concurrency control as a way
+   * to help prevent simultaneous updates of a instance partition from
+   * overwriting each other. It is strongly suggested that systems make use of
+   * the etag in the read-modify-write cycle to perform instance partition
+   * updates in order to avoid race conditions: An etag is returned in the
+   * response which contains instance partitions, and systems are expected to
+   * put that etag in the request to update instance partitions to ensure that
+   * their change will be applied to the same version of the instance partition.
+   * If no etag is provided in the call to update instance partition, then the
+   * existing instance partition is overwritten blindly.
+   * 
+ * + * string etag = 12; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (computeCapacityCase_ == 5) { + output.writeInt32(5, (int) ((java.lang.Integer) computeCapacity_)); + } + if (computeCapacityCase_ == 6) { + output.writeInt32(6, (int) ((java.lang.Integer) computeCapacity_)); + } + if (state_ + != com.google.spanner.admin.instance.v1.InstancePartition.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + for (int i = 0; i < referencingDatabases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 10, referencingDatabases_.getRaw(i)); + } + for (int i = 0; i < referencingBackups_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, referencingBackups_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (computeCapacityCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 5, (int) ((java.lang.Integer) computeCapacity_)); + } + if (computeCapacityCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 6, (int) ((java.lang.Integer) computeCapacity_)); + } + if (state_ + != com.google.spanner.admin.instance.v1.InstancePartition.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < referencingDatabases_.size(); i++) { + dataSize += computeStringSizeNoTag(referencingDatabases_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencingDatabasesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < referencingBackups_.size(); i++) { + dataSize += computeStringSizeNoTag(referencingBackups_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencingBackupsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_); + } + 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.instance.v1.InstancePartition)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.InstancePartition other = + (com.google.spanner.admin.instance.v1.InstancePartition) obj; + + if (!getName().equals(other.getName())) return false; + if (!getConfig().equals(other.getConfig())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getReferencingDatabasesList().equals(other.getReferencingDatabasesList())) return false; + if (!getReferencingBackupsList().equals(other.getReferencingBackupsList())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getComputeCapacityCase().equals(other.getComputeCapacityCase())) return false; + switch (computeCapacityCase_) { + case 5: + if (getNodeCount() != other.getNodeCount()) return false; + break; + case 6: + if (getProcessingUnits() != other.getProcessingUnits()) return false; + break; + case 0: + default: + } + 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 = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getReferencingDatabasesCount() > 0) { + hash = (37 * hash) + REFERENCING_DATABASES_FIELD_NUMBER; + hash = (53 * hash) + getReferencingDatabasesList().hashCode(); + } + if (getReferencingBackupsCount() > 0) { + hash = (37 * hash) + REFERENCING_BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getReferencingBackupsList().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + switch (computeCapacityCase_) { + case 5: + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNodeCount(); + break; + case 6: + hash = (37 * hash) + PROCESSING_UNITS_FIELD_NUMBER; + hash = (53 * hash) + getProcessingUnits(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition 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.instance.v1.InstancePartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition 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.instance.v1.InstancePartition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition 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.instance.v1.InstancePartition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition 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.instance.v1.InstancePartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition 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.instance.v1.InstancePartition 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; + } + /** + * + * + *
+   * An isolated set of Cloud Spanner resources that databases can define
+   * placements on.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.InstancePartition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.InstancePartition) + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.InstancePartition.class, + com.google.spanner.admin.instance.v1.InstancePartition.Builder.class); + } + + // Construct using com.google.spanner.admin.instance.v1.InstancePartition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + config_ = ""; + displayName_ = ""; + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + referencingDatabases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + etag_ = ""; + computeCapacityCase_ = 0; + computeCapacity_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition build() { + com.google.spanner.admin.instance.v1.InstancePartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition buildPartial() { + com.google.spanner.admin.instance.v1.InstancePartition result = + new com.google.spanner.admin.instance.v1.InstancePartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.admin.instance.v1.InstancePartition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.config_ = config_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + referencingDatabases_.makeImmutable(); + result.referencingDatabases_ = referencingDatabases_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + referencingBackups_.makeImmutable(); + result.referencingBackups_ = referencingBackups_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.etag_ = etag_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.admin.instance.v1.InstancePartition result) { + result.computeCapacityCase_ = computeCapacityCase_; + result.computeCapacity_ = this.computeCapacity_; + } + + @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.instance.v1.InstancePartition) { + return mergeFrom((com.google.spanner.admin.instance.v1.InstancePartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstancePartition other) { + if (other == com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.referencingDatabases_.isEmpty()) { + if (referencingDatabases_.isEmpty()) { + referencingDatabases_ = other.referencingDatabases_; + bitField0_ |= 0x00000100; + } else { + ensureReferencingDatabasesIsMutable(); + referencingDatabases_.addAll(other.referencingDatabases_); + } + onChanged(); + } + if (!other.referencingBackups_.isEmpty()) { + if (referencingBackups_.isEmpty()) { + referencingBackups_ = other.referencingBackups_; + bitField0_ |= 0x00000200; + } else { + ensureReferencingBackupsIsMutable(); + referencingBackups_.addAll(other.referencingBackups_); + } + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000400; + onChanged(); + } + switch (other.getComputeCapacityCase()) { + case NODE_COUNT: + { + setNodeCount(other.getNodeCount()); + break; + } + case PROCESSING_UNITS: + { + setProcessingUnits(other.getProcessingUnits()); + break; + } + case COMPUTECAPACITY_NOT_SET: + { + break; + } + } + 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; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + config_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 40: + { + computeCapacity_ = input.readInt32(); + computeCapacityCase_ = 5; + break; + } // case 40 + case 48: + { + computeCapacity_ = input.readInt32(); + computeCapacityCase_ = 6; + break; + } // case 48 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 56 + case 66: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencingDatabasesIsMutable(); + referencingDatabases_.add(s); + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencingBackupsIsMutable(); + referencingBackups_.add(s); + break; + } // case 90 + case 98: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + 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; + } + + private int computeCapacityCase_ = 0; + private java.lang.Object computeCapacity_; + + public ComputeCapacityCase getComputeCapacityCase() { + return ComputeCapacityCase.forNumber(computeCapacityCase_); + } + + public Builder clearComputeCapacity() { + computeCapacityCase_ = 0; + computeCapacity_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A unique identifier for the instance partition. Values are of the
+     * form
+     * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+     * The final segment of the name must be between 2 and 64 characters in
+     * length. An instance partition's name cannot be changed after the instance
+     * partition is created.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A unique identifier for the instance partition. Values are of the
+     * form
+     * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+     * The final segment of the name must be between 2 and 64 characters in
+     * length. An instance partition's name cannot be changed after the instance
+     * partition is created.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A unique identifier for the instance partition. Values are of the
+     * form
+     * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+     * The final segment of the name must be between 2 and 64 characters in
+     * length. An instance partition's name cannot be changed after the instance
+     * partition is created.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique identifier for the instance partition. Values are of the
+     * form
+     * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+     * The final segment of the name must be between 2 and 64 characters in
+     * length. An instance partition's name cannot be changed after the instance
+     * partition is created.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique identifier for the instance partition. Values are of the
+     * form
+     * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+     * The final segment of the name must be between 2 and 64 characters in
+     * length. An instance partition's name cannot be changed after the instance
+     * partition is created.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object config_ = ""; + /** + * + * + *
+     * Required. The name of the instance partition's configuration. Values are of
+     * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+     * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+     * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+     * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the instance partition's configuration. Values are of
+     * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+     * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+     * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+     * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for config. + */ + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the instance partition's configuration. Values are of
+     * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+     * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+     * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+     * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The config to set. + * @return This builder for chaining. + */ + public Builder setConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the instance partition's configuration. Values are of
+     * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+     * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+     * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+     * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the instance partition's configuration. Values are of
+     * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+     * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+     * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+     * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for config to set. + * @return This builder for chaining. + */ + public Builder setConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + config_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The descriptive name for this instance partition as it appears in
+     * UIs. Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The descriptive name for this instance partition as it appears in
+     * UIs. Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The descriptive name for this instance partition as it appears in
+     * UIs. Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The descriptive name for this instance partition as it appears in
+     * UIs. Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The descriptive name for this instance partition as it appears in
+     * UIs. Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of nodes allocated to this instance partition.
+     *
+     * Users can set the node_count field to specify the target number of nodes
+     * allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 node_count = 5; + * + * @return Whether the nodeCount field is set. + */ + public boolean hasNodeCount() { + return computeCapacityCase_ == 5; + } + /** + * + * + *
+     * The number of nodes allocated to this instance partition.
+     *
+     * Users can set the node_count field to specify the target number of nodes
+     * allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 node_count = 5; + * + * @return The nodeCount. + */ + public int getNodeCount() { + if (computeCapacityCase_ == 5) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + /** + * + * + *
+     * The number of nodes allocated to this instance partition.
+     *
+     * Users can set the node_count field to specify the target number of nodes
+     * allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 node_count = 5; + * + * @param value The nodeCount to set. + * @return This builder for chaining. + */ + public Builder setNodeCount(int value) { + + computeCapacityCase_ = 5; + computeCapacity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of nodes allocated to this instance partition.
+     *
+     * Users can set the node_count field to specify the target number of nodes
+     * allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 node_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearNodeCount() { + if (computeCapacityCase_ == 5) { + computeCapacityCase_ = 0; + computeCapacity_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The number of processing units allocated to this instance partition.
+     *
+     * Users can set the processing_units field to specify the target number of
+     * processing units allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 processing_units = 6; + * + * @return Whether the processingUnits field is set. + */ + public boolean hasProcessingUnits() { + return computeCapacityCase_ == 6; + } + /** + * + * + *
+     * The number of processing units allocated to this instance partition.
+     *
+     * Users can set the processing_units field to specify the target number of
+     * processing units allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 processing_units = 6; + * + * @return The processingUnits. + */ + public int getProcessingUnits() { + if (computeCapacityCase_ == 6) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + /** + * + * + *
+     * The number of processing units allocated to this instance partition.
+     *
+     * Users can set the processing_units field to specify the target number of
+     * processing units allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 processing_units = 6; + * + * @param value The processingUnits to set. + * @return This builder for chaining. + */ + public Builder setProcessingUnits(int value) { + + computeCapacityCase_ = 6; + computeCapacity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of processing units allocated to this instance partition.
+     *
+     * Users can set the processing_units field to specify the target number of
+     * processing units allocated to the instance partition.
+     *
+     * This may be zero in API responses for instance partitions that are not
+     * yet in state `READY`.
+     * 
+ * + * int32 processing_units = 6; + * + * @return This builder for chaining. + */ + public Builder clearProcessingUnits() { + if (computeCapacityCase_ == 6) { + computeCapacityCase_ = 0; + computeCapacity_ = null; + onChanged(); + } + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current instance partition state.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current instance partition state.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current instance partition state.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition.State getState() { + com.google.spanner.admin.instance.v1.InstancePartition.State result = + com.google.spanner.admin.instance.v1.InstancePartition.State.forNumber(state_); + return result == null + ? com.google.spanner.admin.instance.v1.InstancePartition.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current instance partition state.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.spanner.admin.instance.v1.InstancePartition.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current instance partition state.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the instance partition was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the instance partition was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.LazyStringArrayList referencingDatabases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencingDatabasesIsMutable() { + if (!referencingDatabases_.isModifiable()) { + referencingDatabases_ = new com.google.protobuf.LazyStringArrayList(referencingDatabases_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the referencingDatabases. + */ + public com.google.protobuf.ProtocolStringList getReferencingDatabasesList() { + referencingDatabases_.makeImmutable(); + return referencingDatabases_; + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of referencingDatabases. + */ + public int getReferencingDatabasesCount() { + return referencingDatabases_.size(); + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The referencingDatabases at the given index. + */ + public java.lang.String getReferencingDatabases(int index) { + return referencingDatabases_.get(index); + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingDatabases at the given index. + */ + public com.google.protobuf.ByteString getReferencingDatabasesBytes(int index) { + return referencingDatabases_.getByteString(index); + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The referencingDatabases to set. + * @return This builder for chaining. + */ + public Builder setReferencingDatabases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencingDatabasesIsMutable(); + referencingDatabases_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The referencingDatabases to add. + * @return This builder for chaining. + */ + public Builder addReferencingDatabases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencingDatabasesIsMutable(); + referencingDatabases_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The referencingDatabases to add. + * @return This builder for chaining. + */ + public Builder addAllReferencingDatabases(java.lang.Iterable values) { + ensureReferencingDatabasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingDatabases_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearReferencingDatabases() { + referencingDatabases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the databases that reference this
+     * instance partition. Referencing databases should share the parent instance.
+     * The existence of any referencing database prevents the instance partition
+     * from being deleted.
+     * 
+ * + * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the referencingDatabases to add. + * @return This builder for chaining. + */ + public Builder addReferencingDatabasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencingDatabasesIsMutable(); + referencingDatabases_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList referencingBackups_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencingBackupsIsMutable() { + if (!referencingBackups_.isModifiable()) { + referencingBackups_ = new com.google.protobuf.LazyStringArrayList(referencingBackups_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the referencingBackups. + */ + public com.google.protobuf.ProtocolStringList getReferencingBackupsList() { + referencingBackups_.makeImmutable(); + return referencingBackups_; + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of referencingBackups. + */ + public int getReferencingBackupsCount() { + return referencingBackups_.size(); + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The referencingBackups at the given index. + */ + public java.lang.String getReferencingBackups(int index) { + return referencingBackups_.get(index); + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingBackups at the given index. + */ + public com.google.protobuf.ByteString getReferencingBackupsBytes(int index) { + return referencingBackups_.getByteString(index); + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The referencingBackups to set. + * @return This builder for chaining. + */ + public Builder setReferencingBackups(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencingBackupsIsMutable(); + referencingBackups_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The referencingBackups to add. + * @return This builder for chaining. + */ + public Builder addReferencingBackups(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencingBackupsIsMutable(); + referencingBackups_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The referencingBackups to add. + * @return This builder for chaining. + */ + public Builder addAllReferencingBackups(java.lang.Iterable values) { + ensureReferencingBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingBackups_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearReferencingBackups() { + referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The names of the backups that reference this instance
+     * partition. Referencing backups should share the parent instance. The
+     * existence of any referencing backup prevents the instance partition from
+     * being deleted.
+     * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the referencingBackups to add. + * @return This builder for chaining. + */ + public Builder addReferencingBackupsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencingBackupsIsMutable(); + referencingBackups_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used for optimistic concurrency control as a way
+     * to help prevent simultaneous updates of a instance partition from
+     * overwriting each other. It is strongly suggested that systems make use of
+     * the etag in the read-modify-write cycle to perform instance partition
+     * updates in order to avoid race conditions: An etag is returned in the
+     * response which contains instance partitions, and systems are expected to
+     * put that etag in the request to update instance partitions to ensure that
+     * their change will be applied to the same version of the instance partition.
+     * If no etag is provided in the call to update instance partition, then the
+     * existing instance partition is overwritten blindly.
+     * 
+ * + * string etag = 12; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used for optimistic concurrency control as a way
+     * to help prevent simultaneous updates of a instance partition from
+     * overwriting each other. It is strongly suggested that systems make use of
+     * the etag in the read-modify-write cycle to perform instance partition
+     * updates in order to avoid race conditions: An etag is returned in the
+     * response which contains instance partitions, and systems are expected to
+     * put that etag in the request to update instance partitions to ensure that
+     * their change will be applied to the same version of the instance partition.
+     * If no etag is provided in the call to update instance partition, then the
+     * existing instance partition is overwritten blindly.
+     * 
+ * + * string etag = 12; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used for optimistic concurrency control as a way
+     * to help prevent simultaneous updates of a instance partition from
+     * overwriting each other. It is strongly suggested that systems make use of
+     * the etag in the read-modify-write cycle to perform instance partition
+     * updates in order to avoid race conditions: An etag is returned in the
+     * response which contains instance partitions, and systems are expected to
+     * put that etag in the request to update instance partitions to ensure that
+     * their change will be applied to the same version of the instance partition.
+     * If no etag is provided in the call to update instance partition, then the
+     * existing instance partition is overwritten blindly.
+     * 
+ * + * string etag = 12; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Used for optimistic concurrency control as a way
+     * to help prevent simultaneous updates of a instance partition from
+     * overwriting each other. It is strongly suggested that systems make use of
+     * the etag in the read-modify-write cycle to perform instance partition
+     * updates in order to avoid race conditions: An etag is returned in the
+     * response which contains instance partitions, and systems are expected to
+     * put that etag in the request to update instance partitions to ensure that
+     * their change will be applied to the same version of the instance partition.
+     * If no etag is provided in the call to update instance partition, then the
+     * existing instance partition is overwritten blindly.
+     * 
+ * + * string etag = 12; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Used for optimistic concurrency control as a way
+     * to help prevent simultaneous updates of a instance partition from
+     * overwriting each other. It is strongly suggested that systems make use of
+     * the etag in the read-modify-write cycle to perform instance partition
+     * updates in order to avoid race conditions: An etag is returned in the
+     * response which contains instance partitions, and systems are expected to
+     * put that etag in the request to update instance partitions to ensure that
+     * their change will be applied to the same version of the instance partition.
+     * If no etag is provided in the call to update instance partition, then the
+     * existing instance partition is overwritten blindly.
+     * 
+ * + * string etag = 12; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.InstancePartition) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.InstancePartition) + private static final com.google.spanner.admin.instance.v1.InstancePartition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.InstancePartition(); + } + + public static com.google.spanner.admin.instance.v1.InstancePartition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstancePartition 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.instance.v1.InstancePartition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java new file mode 100644 index 0000000000..a0062eb8f6 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java @@ -0,0 +1,231 @@ +/* + * 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. + */ + +package com.google.spanner.admin.instance.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstancePartitionName implements ResourceName { + private static final PathTemplate PROJECT_INSTANCE_INSTANCE_PARTITION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}"); + private volatile Map fieldValuesMap; + private final String project; + private final String instance; + private final String instancePartition; + + @Deprecated + protected InstancePartitionName() { + project = null; + instance = null; + instancePartition = null; + } + + private InstancePartitionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instance = Preconditions.checkNotNull(builder.getInstance()); + instancePartition = Preconditions.checkNotNull(builder.getInstancePartition()); + } + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getInstancePartition() { + return instancePartition; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstancePartitionName of( + String project, String instance, String instancePartition) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setInstancePartition(instancePartition) + .build(); + } + + public static String format(String project, String instance, String instancePartition) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setInstancePartition(instancePartition) + .build() + .toString(); + } + + public static InstancePartitionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_INSTANCE_INSTANCE_PARTITION.validatedMatch( + formattedString, "InstancePartitionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("instance"), matchMap.get("instance_partition")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstancePartitionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_INSTANCE_INSTANCE_PARTITION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (instancePartition != null) { + fieldMapBuilder.put("instance_partition", instancePartition); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_INSTANCE_INSTANCE_PARTITION.instantiate( + "project", project, "instance", instance, "instance_partition", instancePartition); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InstancePartitionName that = ((InstancePartitionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.instancePartition, that.instancePartition); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(instancePartition); + return h; + } + + /** + * Builder for projects/{project}/instances/{instance}/instancePartitions/{instance_partition}. + */ + public static class Builder { + private String project; + private String instance; + private String instancePartition; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getInstancePartition() { + return instancePartition; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setInstancePartition(String instancePartition) { + this.instancePartition = instancePartition; + return this; + } + + private Builder(InstancePartitionName instancePartitionName) { + this.project = instancePartitionName.project; + this.instance = instancePartitionName.instance; + this.instancePartition = instancePartitionName.instancePartition; + } + + public InstancePartitionName build() { + return new InstancePartitionName(this); + } + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java new file mode 100644 index 0000000000..d8c91e9ab7 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java @@ -0,0 +1,485 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface InstancePartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.InstancePartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A unique identifier for the instance partition. Values are of the
+   * form
+   * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+   * The final segment of the name must be between 2 and 64 characters in
+   * length. An instance partition's name cannot be changed after the instance
+   * partition is created.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A unique identifier for the instance partition. Values are of the
+   * form
+   * `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
+   * The final segment of the name must be between 2 and 64 characters in
+   * length. An instance partition's name cannot be changed after the instance
+   * partition is created.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The name of the instance partition's configuration. Values are of
+   * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+   * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+   * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+   * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The config. + */ + java.lang.String getConfig(); + /** + * + * + *
+   * Required. The name of the instance partition's configuration. Values are of
+   * the form `projects/<project>/instanceConfigs/<configuration>`. See also
+   * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
+   * [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
+   * 
+ * + * + * string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for config. + */ + com.google.protobuf.ByteString getConfigBytes(); + + /** + * + * + *
+   * Required. The descriptive name for this instance partition as it appears in
+   * UIs. Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The descriptive name for this instance partition as it appears in
+   * UIs. Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The number of nodes allocated to this instance partition.
+   *
+   * Users can set the node_count field to specify the target number of nodes
+   * allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 node_count = 5; + * + * @return Whether the nodeCount field is set. + */ + boolean hasNodeCount(); + /** + * + * + *
+   * The number of nodes allocated to this instance partition.
+   *
+   * Users can set the node_count field to specify the target number of nodes
+   * allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 node_count = 5; + * + * @return The nodeCount. + */ + int getNodeCount(); + + /** + * + * + *
+   * The number of processing units allocated to this instance partition.
+   *
+   * Users can set the processing_units field to specify the target number of
+   * processing units allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 processing_units = 6; + * + * @return Whether the processingUnits field is set. + */ + boolean hasProcessingUnits(); + /** + * + * + *
+   * The number of processing units allocated to this instance partition.
+   *
+   * Users can set the processing_units field to specify the target number of
+   * processing units allocated to the instance partition.
+   *
+   * This may be zero in API responses for instance partitions that are not
+   * yet in state `READY`.
+   * 
+ * + * int32 processing_units = 6; + * + * @return The processingUnits. + */ + int getProcessingUnits(); + + /** + * + * + *
+   * Output only. The current instance partition state.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current instance partition state.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.spanner.admin.instance.v1.InstancePartition.State getState(); + + /** + * + * + *
+   * Output only. The time at which the instance partition was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which the instance partition was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which the instance partition was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the instance partition was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which the instance partition was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which the instance partition was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the referencingDatabases. + */ + java.util.List getReferencingDatabasesList(); + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of referencingDatabases. + */ + int getReferencingDatabasesCount(); + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The referencingDatabases at the given index. + */ + java.lang.String getReferencingDatabases(int index); + /** + * + * + *
+   * Output only. The names of the databases that reference this
+   * instance partition. Referencing databases should share the parent instance.
+   * The existence of any referencing database prevents the instance partition
+   * from being deleted.
+   * 
+ * + * repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingDatabases at the given index. + */ + com.google.protobuf.ByteString getReferencingDatabasesBytes(int index); + + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the referencingBackups. + */ + java.util.List getReferencingBackupsList(); + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of referencingBackups. + */ + int getReferencingBackupsCount(); + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The referencingBackups at the given index. + */ + java.lang.String getReferencingBackups(int index); + /** + * + * + *
+   * Output only. The names of the backups that reference this instance
+   * partition. Referencing backups should share the parent instance. The
+   * existence of any referencing backup prevents the instance partition from
+   * being deleted.
+   * 
+ * + * repeated string referencing_backups = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the referencingBackups at the given index. + */ + com.google.protobuf.ByteString getReferencingBackupsBytes(int index); + + /** + * + * + *
+   * Used for optimistic concurrency control as a way
+   * to help prevent simultaneous updates of a instance partition from
+   * overwriting each other. It is strongly suggested that systems make use of
+   * the etag in the read-modify-write cycle to perform instance partition
+   * updates in order to avoid race conditions: An etag is returned in the
+   * response which contains instance partitions, and systems are expected to
+   * put that etag in the request to update instance partitions to ensure that
+   * their change will be applied to the same version of the instance partition.
+   * If no etag is provided in the call to update instance partition, then the
+   * existing instance partition is overwritten blindly.
+   * 
+ * + * string etag = 12; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used for optimistic concurrency control as a way
+   * to help prevent simultaneous updates of a instance partition from
+   * overwriting each other. It is strongly suggested that systems make use of
+   * the etag in the read-modify-write cycle to perform instance partition
+   * updates in order to avoid race conditions: An etag is returned in the
+   * response which contains instance partitions, and systems are expected to
+   * put that etag in the request to update instance partitions to ensure that
+   * their change will be applied to the same version of the instance partition.
+   * If no etag is provided in the call to update instance partition, then the
+   * existing instance partition is overwritten blindly.
+   * 
+ * + * string etag = 12; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + com.google.spanner.admin.instance.v1.InstancePartition.ComputeCapacityCase + getComputeCapacityCase(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java new file mode 100644 index 0000000000..4d7bc75f01 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java @@ -0,0 +1,1816 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The request for
+ * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest} + */ +public final class ListInstancePartitionOperationsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) + ListInstancePartitionOperationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancePartitionOperationsRequest.newBuilder() to construct. + private ListInstancePartitionOperationsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancePartitionOperationsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancePartitionOperationsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent instance of the instance partition operations.
+   * Values are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent instance of the instance partition operations.
+   * Values are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. An expression that filters the list of returned operations.
+   *
+   * A filter expression consists of a field name, a
+   * comparison operator, and a value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Operation][google.longrunning.Operation]
+   * are eligible for filtering:
+   *
+   *   * `name` - The name of the long-running operation
+   *   * `done` - False if the operation is in progress, else true.
+   *   * `metadata.@type` - the type of metadata. For example, the type string
+   *      for
+   *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+   *      is
+   *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+   *   * `metadata.<field_name>` - any field in metadata.value.
+   *      `metadata.@type` must be specified first, if filtering on metadata
+   *      fields.
+   *   * `error` - Error associated with the long-running operation.
+   *   * `response.@type` - the type of response.
+   *   * `response.<field_name>` - any field in response.value.
+   *
+   * You can combine multiple expressions by enclosing each expression in
+   * parentheses. By default, expressions are combined with AND logic. However,
+   * you can specify AND, OR, and NOT logic explicitly.
+   *
+   * Here are a few examples:
+   *
+   *   * `done:true` - The operation is complete.
+   *   * `(metadata.@type=` \
+   *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+   *     AND` \
+   *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+   *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+   *     `(error:*)` - Return operations where:
+   *     * The operation's metadata type is
+   *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+   *     * The instance partition name contains "custom-instance-partition".
+   *     * The operation started before 2021-03-28T14:50:00Z.
+   *     * The operation resulted in an error.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression that filters the list of returned operations.
+   *
+   * A filter expression consists of a field name, a
+   * comparison operator, and a value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Operation][google.longrunning.Operation]
+   * are eligible for filtering:
+   *
+   *   * `name` - The name of the long-running operation
+   *   * `done` - False if the operation is in progress, else true.
+   *   * `metadata.@type` - the type of metadata. For example, the type string
+   *      for
+   *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+   *      is
+   *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+   *   * `metadata.<field_name>` - any field in metadata.value.
+   *      `metadata.@type` must be specified first, if filtering on metadata
+   *      fields.
+   *   * `error` - Error associated with the long-running operation.
+   *   * `response.@type` - the type of response.
+   *   * `response.<field_name>` - any field in response.value.
+   *
+   * You can combine multiple expressions by enclosing each expression in
+   * parentheses. By default, expressions are combined with AND logic. However,
+   * you can specify AND, OR, and NOT logic explicitly.
+   *
+   * Here are a few examples:
+   *
+   *   * `done:true` - The operation is complete.
+   *   * `(metadata.@type=` \
+   *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+   *     AND` \
+   *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+   *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+   *     `(error:*)` - Return operations where:
+   *     * The operation's metadata type is
+   *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+   *     * The instance partition name contains "custom-instance-partition".
+   *     * The operation started before 2021-03-28T14:50:00Z.
+   *     * The operation resulted in an error.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. Number of operations to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+   * to the same `parent` and with the same `filter`.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+   * to the same `parent` and with the same `filter`.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_PARTITION_DEADLINE_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp instancePartitionDeadline_; + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partition
+   * operations. Instance partitions whose operation metadata cannot be
+   * retrieved within this deadline will be added to
+   * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePartitionDeadline field is set. + */ + @java.lang.Override + public boolean hasInstancePartitionDeadline() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partition
+   * operations. Instance partitions whose operation metadata cannot be
+   * retrieved within this deadline will be added to
+   * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePartitionDeadline. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstancePartitionDeadline() { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partition
+   * operations. Instance partitions whose operation metadata cannot be
+   * retrieved within this deadline will be added to
+   * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuilder() { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getInstancePartitionDeadline()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getInstancePartitionDeadline()); + } + 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.instance.v1.ListInstancePartitionOperationsRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest other = + (com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasInstancePartitionDeadline() != other.hasInstancePartitionDeadline()) return false; + if (hasInstancePartitionDeadline()) { + if (!getInstancePartitionDeadline().equals(other.getInstancePartitionDeadline())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasInstancePartitionDeadline()) { + hash = (37 * hash) + INSTANCE_PARTITION_DEADLINE_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartitionDeadline().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + 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.instance.v1.ListInstancePartitionOperationsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + 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.instance.v1.ListInstancePartitionOperationsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + 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.instance.v1.ListInstancePartitionOperationsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + 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.instance.v1.ListInstancePartitionOperationsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + 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.instance.v1.ListInstancePartitionOperationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.Builder + .class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancePartitionDeadlineFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + instancePartitionDeadline_ = null; + if (instancePartitionDeadlineBuilder_ != null) { + instancePartitionDeadlineBuilder_.dispose(); + instancePartitionDeadlineBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest build() { + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + buildPartial() { + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest result = + new com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.instancePartitionDeadline_ = + instancePartitionDeadlineBuilder_ == null + ? instancePartitionDeadline_ + : instancePartitionDeadlineBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.instance.v1.ListInstancePartitionOperationsRequest) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest other) { + if (other + == com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasInstancePartitionDeadline()) { + mergeInstancePartitionDeadline(other.getInstancePartitionDeadline()); + } + 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; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getInstancePartitionDeadlineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent instance of the instance partition operations.
+     * Values are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent instance of the instance partition operations.
+     * Values are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent instance of the instance partition operations.
+     * Values are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent instance of the instance partition operations.
+     * Values are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent instance of the instance partition operations.
+     * Values are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression that filters the list of returned operations.
+     *
+     * A filter expression consists of a field name, a
+     * comparison operator, and a value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Operation][google.longrunning.Operation]
+     * are eligible for filtering:
+     *
+     *   * `name` - The name of the long-running operation
+     *   * `done` - False if the operation is in progress, else true.
+     *   * `metadata.@type` - the type of metadata. For example, the type string
+     *      for
+     *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+     *      is
+     *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+     *   * `metadata.<field_name>` - any field in metadata.value.
+     *      `metadata.@type` must be specified first, if filtering on metadata
+     *      fields.
+     *   * `error` - Error associated with the long-running operation.
+     *   * `response.@type` - the type of response.
+     *   * `response.<field_name>` - any field in response.value.
+     *
+     * You can combine multiple expressions by enclosing each expression in
+     * parentheses. By default, expressions are combined with AND logic. However,
+     * you can specify AND, OR, and NOT logic explicitly.
+     *
+     * Here are a few examples:
+     *
+     *   * `done:true` - The operation is complete.
+     *   * `(metadata.@type=` \
+     *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+     *     AND` \
+     *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+     *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+     *     `(error:*)` - Return operations where:
+     *     * The operation's metadata type is
+     *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     *     * The instance partition name contains "custom-instance-partition".
+     *     * The operation started before 2021-03-28T14:50:00Z.
+     *     * The operation resulted in an error.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression that filters the list of returned operations.
+     *
+     * A filter expression consists of a field name, a
+     * comparison operator, and a value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Operation][google.longrunning.Operation]
+     * are eligible for filtering:
+     *
+     *   * `name` - The name of the long-running operation
+     *   * `done` - False if the operation is in progress, else true.
+     *   * `metadata.@type` - the type of metadata. For example, the type string
+     *      for
+     *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+     *      is
+     *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+     *   * `metadata.<field_name>` - any field in metadata.value.
+     *      `metadata.@type` must be specified first, if filtering on metadata
+     *      fields.
+     *   * `error` - Error associated with the long-running operation.
+     *   * `response.@type` - the type of response.
+     *   * `response.<field_name>` - any field in response.value.
+     *
+     * You can combine multiple expressions by enclosing each expression in
+     * parentheses. By default, expressions are combined with AND logic. However,
+     * you can specify AND, OR, and NOT logic explicitly.
+     *
+     * Here are a few examples:
+     *
+     *   * `done:true` - The operation is complete.
+     *   * `(metadata.@type=` \
+     *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+     *     AND` \
+     *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+     *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+     *     `(error:*)` - Return operations where:
+     *     * The operation's metadata type is
+     *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     *     * The instance partition name contains "custom-instance-partition".
+     *     * The operation started before 2021-03-28T14:50:00Z.
+     *     * The operation resulted in an error.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression that filters the list of returned operations.
+     *
+     * A filter expression consists of a field name, a
+     * comparison operator, and a value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Operation][google.longrunning.Operation]
+     * are eligible for filtering:
+     *
+     *   * `name` - The name of the long-running operation
+     *   * `done` - False if the operation is in progress, else true.
+     *   * `metadata.@type` - the type of metadata. For example, the type string
+     *      for
+     *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+     *      is
+     *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+     *   * `metadata.<field_name>` - any field in metadata.value.
+     *      `metadata.@type` must be specified first, if filtering on metadata
+     *      fields.
+     *   * `error` - Error associated with the long-running operation.
+     *   * `response.@type` - the type of response.
+     *   * `response.<field_name>` - any field in response.value.
+     *
+     * You can combine multiple expressions by enclosing each expression in
+     * parentheses. By default, expressions are combined with AND logic. However,
+     * you can specify AND, OR, and NOT logic explicitly.
+     *
+     * Here are a few examples:
+     *
+     *   * `done:true` - The operation is complete.
+     *   * `(metadata.@type=` \
+     *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+     *     AND` \
+     *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+     *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+     *     `(error:*)` - Return operations where:
+     *     * The operation's metadata type is
+     *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     *     * The instance partition name contains "custom-instance-partition".
+     *     * The operation started before 2021-03-28T14:50:00Z.
+     *     * The operation resulted in an error.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression that filters the list of returned operations.
+     *
+     * A filter expression consists of a field name, a
+     * comparison operator, and a value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Operation][google.longrunning.Operation]
+     * are eligible for filtering:
+     *
+     *   * `name` - The name of the long-running operation
+     *   * `done` - False if the operation is in progress, else true.
+     *   * `metadata.@type` - the type of metadata. For example, the type string
+     *      for
+     *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+     *      is
+     *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+     *   * `metadata.<field_name>` - any field in metadata.value.
+     *      `metadata.@type` must be specified first, if filtering on metadata
+     *      fields.
+     *   * `error` - Error associated with the long-running operation.
+     *   * `response.@type` - the type of response.
+     *   * `response.<field_name>` - any field in response.value.
+     *
+     * You can combine multiple expressions by enclosing each expression in
+     * parentheses. By default, expressions are combined with AND logic. However,
+     * you can specify AND, OR, and NOT logic explicitly.
+     *
+     * Here are a few examples:
+     *
+     *   * `done:true` - The operation is complete.
+     *   * `(metadata.@type=` \
+     *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+     *     AND` \
+     *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+     *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+     *     `(error:*)` - Return operations where:
+     *     * The operation's metadata type is
+     *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     *     * The instance partition name contains "custom-instance-partition".
+     *     * The operation started before 2021-03-28T14:50:00Z.
+     *     * The operation resulted in an error.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression that filters the list of returned operations.
+     *
+     * A filter expression consists of a field name, a
+     * comparison operator, and a value for filtering.
+     * The value must be a string, a number, or a boolean. The comparison operator
+     * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+     * Colon `:` is the contains operator. Filter rules are not case sensitive.
+     *
+     * The following fields in the [Operation][google.longrunning.Operation]
+     * are eligible for filtering:
+     *
+     *   * `name` - The name of the long-running operation
+     *   * `done` - False if the operation is in progress, else true.
+     *   * `metadata.@type` - the type of metadata. For example, the type string
+     *      for
+     *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+     *      is
+     *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+     *   * `metadata.<field_name>` - any field in metadata.value.
+     *      `metadata.@type` must be specified first, if filtering on metadata
+     *      fields.
+     *   * `error` - Error associated with the long-running operation.
+     *   * `response.@type` - the type of response.
+     *   * `response.<field_name>` - any field in response.value.
+     *
+     * You can combine multiple expressions by enclosing each expression in
+     * parentheses. By default, expressions are combined with AND logic. However,
+     * you can specify AND, OR, and NOT logic explicitly.
+     *
+     * Here are a few examples:
+     *
+     *   * `done:true` - The operation is complete.
+     *   * `(metadata.@type=` \
+     *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+     *     AND` \
+     *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+     *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+     *     `(error:*)` - Return operations where:
+     *     * The operation's metadata type is
+     *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+     *     * The instance partition name contains "custom-instance-partition".
+     *     * The operation started before 2021-03-28T14:50:00Z.
+     *     * The operation resulted in an error.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Number of operations to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Number of operations to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Number of operations to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+     * to the same `parent` and with the same `filter`.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+     * to the same `parent` and with the same `filter`.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+     * to the same `parent` and with the same `filter`.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+     * to the same `parent` and with the same `filter`.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+     * to the same `parent` and with the same `filter`.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp instancePartitionDeadline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instancePartitionDeadlineBuilder_; + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePartitionDeadline field is set. + */ + public boolean hasInstancePartitionDeadline() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePartitionDeadline. + */ + public com.google.protobuf.Timestamp getInstancePartitionDeadline() { + if (instancePartitionDeadlineBuilder_ == null) { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } else { + return instancePartitionDeadlineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePartitionDeadline(com.google.protobuf.Timestamp value) { + if (instancePartitionDeadlineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePartitionDeadline_ = value; + } else { + instancePartitionDeadlineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePartitionDeadline( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (instancePartitionDeadlineBuilder_ == null) { + instancePartitionDeadline_ = builderForValue.build(); + } else { + instancePartitionDeadlineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInstancePartitionDeadline(com.google.protobuf.Timestamp value) { + if (instancePartitionDeadlineBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && instancePartitionDeadline_ != null + && instancePartitionDeadline_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstancePartitionDeadlineBuilder().mergeFrom(value); + } else { + instancePartitionDeadline_ = value; + } + } else { + instancePartitionDeadlineBuilder_.mergeFrom(value); + } + if (instancePartitionDeadline_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInstancePartitionDeadline() { + bitField0_ = (bitField0_ & ~0x00000010); + instancePartitionDeadline_ = null; + if (instancePartitionDeadlineBuilder_ != null) { + instancePartitionDeadlineBuilder_.dispose(); + instancePartitionDeadlineBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstancePartitionDeadlineBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getInstancePartitionDeadlineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuilder() { + if (instancePartitionDeadlineBuilder_ != null) { + return instancePartitionDeadlineBuilder_.getMessageOrBuilder(); + } else { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partition
+     * operations. Instance partitions whose operation metadata cannot be
+     * retrieved within this deadline will be added to
+     * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+     * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getInstancePartitionDeadlineFieldBuilder() { + if (instancePartitionDeadlineBuilder_ == null) { + instancePartitionDeadlineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstancePartitionDeadline(), getParentForChildren(), isClean()); + instancePartitionDeadline_ = null; + } + return instancePartitionDeadlineBuilder_; + } + + @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.instance.v1.ListInstancePartitionOperationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) + private static final com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest(); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancePartitionOperationsRequest 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.instance.v1.ListInstancePartitionOperationsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java new file mode 100644 index 0000000000..e6f3e31013 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java @@ -0,0 +1,266 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface ListInstancePartitionOperationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent instance of the instance partition operations.
+   * Values are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent instance of the instance partition operations.
+   * Values are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression that filters the list of returned operations.
+   *
+   * A filter expression consists of a field name, a
+   * comparison operator, and a value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Operation][google.longrunning.Operation]
+   * are eligible for filtering:
+   *
+   *   * `name` - The name of the long-running operation
+   *   * `done` - False if the operation is in progress, else true.
+   *   * `metadata.@type` - the type of metadata. For example, the type string
+   *      for
+   *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+   *      is
+   *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+   *   * `metadata.<field_name>` - any field in metadata.value.
+   *      `metadata.@type` must be specified first, if filtering on metadata
+   *      fields.
+   *   * `error` - Error associated with the long-running operation.
+   *   * `response.@type` - the type of response.
+   *   * `response.<field_name>` - any field in response.value.
+   *
+   * You can combine multiple expressions by enclosing each expression in
+   * parentheses. By default, expressions are combined with AND logic. However,
+   * you can specify AND, OR, and NOT logic explicitly.
+   *
+   * Here are a few examples:
+   *
+   *   * `done:true` - The operation is complete.
+   *   * `(metadata.@type=` \
+   *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+   *     AND` \
+   *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+   *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+   *     `(error:*)` - Return operations where:
+   *     * The operation's metadata type is
+   *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+   *     * The instance partition name contains "custom-instance-partition".
+   *     * The operation started before 2021-03-28T14:50:00Z.
+   *     * The operation resulted in an error.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression that filters the list of returned operations.
+   *
+   * A filter expression consists of a field name, a
+   * comparison operator, and a value for filtering.
+   * The value must be a string, a number, or a boolean. The comparison operator
+   * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
+   * Colon `:` is the contains operator. Filter rules are not case sensitive.
+   *
+   * The following fields in the [Operation][google.longrunning.Operation]
+   * are eligible for filtering:
+   *
+   *   * `name` - The name of the long-running operation
+   *   * `done` - False if the operation is in progress, else true.
+   *   * `metadata.@type` - the type of metadata. For example, the type string
+   *      for
+   *      [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
+   *      is
+   *      `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
+   *   * `metadata.<field_name>` - any field in metadata.value.
+   *      `metadata.@type` must be specified first, if filtering on metadata
+   *      fields.
+   *   * `error` - Error associated with the long-running operation.
+   *   * `response.@type` - the type of response.
+   *   * `response.<field_name>` - any field in response.value.
+   *
+   * You can combine multiple expressions by enclosing each expression in
+   * parentheses. By default, expressions are combined with AND logic. However,
+   * you can specify AND, OR, and NOT logic explicitly.
+   *
+   * Here are a few examples:
+   *
+   *   * `done:true` - The operation is complete.
+   *   * `(metadata.@type=` \
+   *     `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
+   *     AND` \
+   *     `(metadata.instance_partition.name:custom-instance-partition) AND` \
+   *     `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
+   *     `(error:*)` - Return operations where:
+   *     * The operation's metadata type is
+   *     [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
+   *     * The instance partition name contains "custom-instance-partition".
+   *     * The operation started before 2021-03-28T14:50:00Z.
+   *     * The operation resulted in an error.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Number of operations to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+   * to the same `parent` and with the same `filter`.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
+   * to the same `parent` and with the same `filter`.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partition
+   * operations. Instance partitions whose operation metadata cannot be
+   * retrieved within this deadline will be added to
+   * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePartitionDeadline field is set. + */ + boolean hasInstancePartitionDeadline(); + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partition
+   * operations. Instance partitions whose operation metadata cannot be
+   * retrieved within this deadline will be added to
+   * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePartitionDeadline. + */ + com.google.protobuf.Timestamp getInstancePartitionDeadline(); + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partition
+   * operations. Instance partitions whose operation metadata cannot be
+   * retrieved within this deadline will be added to
+   * [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
+   * [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java new file mode 100644 index 0000000000..847e20cd18 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java @@ -0,0 +1,1571 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The response for
+ * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse} + */ +public final class ListInstancePartitionOperationsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) + ListInstancePartitionOperationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancePartitionOperationsResponse.newBuilder() to construct. + private ListInstancePartitionOperationsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancePartitionOperationsResponse() { + operations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachableInstancePartitions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancePartitionOperationsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.Builder + .class); + } + + public static final int OPERATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List operations_; + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + @java.lang.Override + public java.util.List getOperationsList() { + return operations_; + } + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + @java.lang.Override + public java.util.List + getOperationsOrBuilderList() { + return operations_; + } + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + @java.lang.Override + public int getOperationsCount() { + return operations_.size(); + } + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + @java.lang.Override + public com.google.longrunning.Operation getOperations(int index) { + return operations_.get(index); + } + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + @java.lang.Override + public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int index) { + return operations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+   * call to fetch more of the matching metadata.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+   * call to fetch more of the matching metadata.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_INSTANCE_PARTITIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachableInstancePartitions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return A list containing the unreachableInstancePartitions. + */ + public com.google.protobuf.ProtocolStringList getUnreachableInstancePartitionsList() { + return unreachableInstancePartitions_; + } + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return The count of unreachableInstancePartitions. + */ + public int getUnreachableInstancePartitionsCount() { + return unreachableInstancePartitions_.size(); + } + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index of the element to return. + * @return The unreachableInstancePartitions at the given index. + */ + public java.lang.String getUnreachableInstancePartitions(int index) { + return unreachableInstancePartitions_.get(index); + } + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableInstancePartitions at the given index. + */ + public com.google.protobuf.ByteString getUnreachableInstancePartitionsBytes(int index) { + return unreachableInstancePartitions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < operations_.size(); i++) { + output.writeMessage(1, operations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachableInstancePartitions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, unreachableInstancePartitions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < operations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachableInstancePartitions_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachableInstancePartitions_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableInstancePartitionsList().size(); + } + 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.instance.v1.ListInstancePartitionOperationsResponse)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse other = + (com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) obj; + + if (!getOperationsList().equals(other.getOperationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableInstancePartitionsList() + .equals(other.getUnreachableInstancePartitionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOperationsCount() > 0) { + hash = (37 * hash) + OPERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getOperationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableInstancePartitionsCount() > 0) { + hash = (37 * hash) + UNREACHABLE_INSTANCE_PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableInstancePartitionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + 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.instance.v1.ListInstancePartitionOperationsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + 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.instance.v1.ListInstancePartitionOperationsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + 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.instance.v1.ListInstancePartitionOperationsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + 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.instance.v1.ListInstancePartitionOperationsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + 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.instance.v1.ListInstancePartitionOperationsResponse 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 response for
+   * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.Builder + .class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (operationsBuilder_ == null) { + operations_ = java.util.Collections.emptyList(); + } else { + operations_ = null; + operationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachableInstancePartitions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse build() { + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + buildPartial() { + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse result = + new com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse result) { + if (operationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + operations_ = java.util.Collections.unmodifiableList(operations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.operations_ = operations_; + } else { + result.operations_ = operationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachableInstancePartitions_.makeImmutable(); + result.unreachableInstancePartitions_ = unreachableInstancePartitions_; + } + } + + @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.instance.v1.ListInstancePartitionOperationsResponse) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse other) { + if (other + == com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + .getDefaultInstance()) return this; + if (operationsBuilder_ == null) { + if (!other.operations_.isEmpty()) { + if (operations_.isEmpty()) { + operations_ = other.operations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOperationsIsMutable(); + operations_.addAll(other.operations_); + } + onChanged(); + } + } else { + if (!other.operations_.isEmpty()) { + if (operationsBuilder_.isEmpty()) { + operationsBuilder_.dispose(); + operationsBuilder_ = null; + operations_ = other.operations_; + bitField0_ = (bitField0_ & ~0x00000001); + operationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOperationsFieldBuilder() + : null; + } else { + operationsBuilder_.addAllMessages(other.operations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachableInstancePartitions_.isEmpty()) { + if (unreachableInstancePartitions_.isEmpty()) { + unreachableInstancePartitions_ = other.unreachableInstancePartitions_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableInstancePartitionsIsMutable(); + unreachableInstancePartitions_.addAll(other.unreachableInstancePartitions_); + } + onChanged(); + } + 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; + case 10: + { + com.google.longrunning.Operation m = + input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry); + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(m); + } else { + operationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableInstancePartitionsIsMutable(); + unreachableInstancePartitions_.add(s); + break; + } // case 26 + 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; + } + + private int bitField0_; + + private java.util.List operations_ = + java.util.Collections.emptyList(); + + private void ensureOperationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + operations_ = new java.util.ArrayList(operations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + operationsBuilder_; + + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public java.util.List getOperationsList() { + if (operationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operations_); + } else { + return operationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public int getOperationsCount() { + if (operationsBuilder_ == null) { + return operations_.size(); + } else { + return operationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public com.google.longrunning.Operation getOperations(int index) { + if (operationsBuilder_ == null) { + return operations_.get(index); + } else { + return operationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder setOperations(int index, com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.set(index, value); + onChanged(); + } else { + operationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder setOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.set(index, builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder addOperations(com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.add(value); + onChanged(); + } else { + operationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder addOperations(int index, com.google.longrunning.Operation value) { + if (operationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationsIsMutable(); + operations_.add(index, value); + onChanged(); + } else { + operationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder addOperations(com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder addOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(index, builderForValue.build()); + onChanged(); + } else { + operationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder addAllOperations( + java.lang.Iterable values) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, operations_); + onChanged(); + } else { + operationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder clearOperations() { + if (operationsBuilder_ == null) { + operations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + operationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public Builder removeOperations(int index) { + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.remove(index); + onChanged(); + } else { + operationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public com.google.longrunning.Operation.Builder getOperationsBuilder(int index) { + return getOperationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int index) { + if (operationsBuilder_ == null) { + return operations_.get(index); + } else { + return operationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public java.util.List + getOperationsOrBuilderList() { + if (operationsBuilder_ != null) { + return operationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operations_); + } + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public com.google.longrunning.Operation.Builder addOperationsBuilder() { + return getOperationsFieldBuilder() + .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) { + return getOperationsFieldBuilder() + .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * The list of matching instance partition [long-running
+     * operations][google.longrunning.Operation]. Each operation's name will be
+     * prefixed by the instance partition's name. The operation's
+     * [metadata][google.longrunning.Operation.metadata] field type
+     * `metadata.type_url` describes the type of the metadata.
+     * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + public java.util.List getOperationsBuilderList() { + return getOperationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + getOperationsFieldBuilder() { + if (operationsBuilder_ == null) { + operationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder>( + operations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + operations_ = null; + } + return operationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+     * call to fetch more of the matching metadata.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+     * call to fetch more of the matching metadata.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+     * call to fetch more of the matching metadata.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+     * call to fetch more of the matching metadata.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+     * call to fetch more of the matching metadata.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachableInstancePartitions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableInstancePartitionsIsMutable() { + if (!unreachableInstancePartitions_.isModifiable()) { + unreachableInstancePartitions_ = + new com.google.protobuf.LazyStringArrayList(unreachableInstancePartitions_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return A list containing the unreachableInstancePartitions. + */ + public com.google.protobuf.ProtocolStringList getUnreachableInstancePartitionsList() { + unreachableInstancePartitions_.makeImmutable(); + return unreachableInstancePartitions_; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return The count of unreachableInstancePartitions. + */ + public int getUnreachableInstancePartitionsCount() { + return unreachableInstancePartitions_.size(); + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index of the element to return. + * @return The unreachableInstancePartitions at the given index. + */ + public java.lang.String getUnreachableInstancePartitions(int index) { + return unreachableInstancePartitions_.get(index); + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableInstancePartitions at the given index. + */ + public com.google.protobuf.ByteString getUnreachableInstancePartitionsBytes(int index) { + return unreachableInstancePartitions_.getByteString(index); + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index to set the value at. + * @param value The unreachableInstancePartitions to set. + * @return This builder for chaining. + */ + public Builder setUnreachableInstancePartitions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableInstancePartitionsIsMutable(); + unreachableInstancePartitions_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param value The unreachableInstancePartitions to add. + * @return This builder for chaining. + */ + public Builder addUnreachableInstancePartitions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableInstancePartitionsIsMutable(); + unreachableInstancePartitions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param values The unreachableInstancePartitions to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachableInstancePartitions( + java.lang.Iterable values) { + ensureUnreachableInstancePartitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachableInstancePartitions_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachableInstancePartitions() { + unreachableInstancePartitions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose operation metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param value The bytes of the unreachableInstancePartitions to add. + * @return This builder for chaining. + */ + public Builder addUnreachableInstancePartitionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableInstancePartitionsIsMutable(); + unreachableInstancePartitions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) + private static final com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse(); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancePartitionOperationsResponse 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.instance.v1.ListInstancePartitionOperationsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java new file mode 100644 index 0000000000..f0d7b22427 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java @@ -0,0 +1,189 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface ListInstancePartitionOperationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + java.util.List getOperationsList(); + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + com.google.longrunning.Operation getOperations(int index); + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + int getOperationsCount(); + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + java.util.List getOperationsOrBuilderList(); + /** + * + * + *
+   * The list of matching instance partition [long-running
+   * operations][google.longrunning.Operation]. Each operation's name will be
+   * prefixed by the instance partition's name. The operation's
+   * [metadata][google.longrunning.Operation.metadata] field type
+   * `metadata.type_url` describes the type of the metadata.
+   * 
+ * + * repeated .google.longrunning.Operation operations = 1; + */ + com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int index); + + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+   * call to fetch more of the matching metadata.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
+   * call to fetch more of the matching metadata.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return A list containing the unreachableInstancePartitions. + */ + java.util.List getUnreachableInstancePartitionsList(); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @return The count of unreachableInstancePartitions. + */ + int getUnreachableInstancePartitionsCount(); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index of the element to return. + * @return The unreachableInstancePartitions at the given index. + */ + java.lang.String getUnreachableInstancePartitions(int index); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose operation metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable_instance_partitions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableInstancePartitions at the given index. + */ + com.google.protobuf.ByteString getUnreachableInstancePartitionsBytes(int index); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java new file mode 100644 index 0000000000..617de48ebe --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java @@ -0,0 +1,1331 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The request for
+ * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsRequest} + */ +public final class ListInstancePartitionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) + ListInstancePartitionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancePartitionsRequest.newBuilder() to construct. + private ListInstancePartitionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancePartitionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancePartitionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The instance whose instance partitions should be listed. Values
+   * are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The instance whose instance partitions should be listed. Values
+   * are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of instance partitions to be returned in the response. If 0 or less,
+   * defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_PARTITION_DEADLINE_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp instancePartitionDeadline_; + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partitions.
+   * Instance partitions whose metadata cannot be retrieved within this deadline
+   * will be added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+   * in
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePartitionDeadline field is set. + */ + @java.lang.Override + public boolean hasInstancePartitionDeadline() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partitions.
+   * Instance partitions whose metadata cannot be retrieved within this deadline
+   * will be added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+   * in
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePartitionDeadline. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstancePartitionDeadline() { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partitions.
+   * Instance partitions whose metadata cannot be retrieved within this deadline
+   * will be added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+   * in
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuilder() { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getInstancePartitionDeadline()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getInstancePartitionDeadline()); + } + 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.instance.v1.ListInstancePartitionsRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest other = + (com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasInstancePartitionDeadline() != other.hasInstancePartitionDeadline()) return false; + if (hasInstancePartitionDeadline()) { + if (!getInstancePartitionDeadline().equals(other.getInstancePartitionDeadline())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasInstancePartitionDeadline()) { + hash = (37 * hash) + INSTANCE_PARTITION_DEADLINE_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartitionDeadline().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest 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.instance.v1.ListInstancePartitionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest 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.instance.v1.ListInstancePartitionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest 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.instance.v1.ListInstancePartitionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + 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.instance.v1.ListInstancePartitionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest 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.instance.v1.ListInstancePartitionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancePartitionDeadlineFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + instancePartitionDeadline_ = null; + if (instancePartitionDeadlineBuilder_ != null) { + instancePartitionDeadlineBuilder_.dispose(); + instancePartitionDeadlineBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest build() { + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest buildPartial() { + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest result = + new com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.instancePartitionDeadline_ = + instancePartitionDeadlineBuilder_ == null + ? instancePartitionDeadline_ + : instancePartitionDeadlineBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.instance.v1.ListInstancePartitionsRequest) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest other) { + if (other + == com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasInstancePartitionDeadline()) { + mergeInstancePartitionDeadline(other.getInstancePartitionDeadline()); + } + 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; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getInstancePartitionDeadlineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The instance whose instance partitions should be listed. Values
+     * are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The instance whose instance partitions should be listed. Values
+     * are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The instance whose instance partitions should be listed. Values
+     * are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance whose instance partitions should be listed. Values
+     * are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance whose instance partitions should be listed. Values
+     * are of the form `projects/<project>/instances/<instance>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of instance partitions to be returned in the response. If 0 or less,
+     * defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of instance partitions to be returned in the response. If 0 or less,
+     * defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of instance partitions to be returned in the response. If 0 or less,
+     * defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, `page_token` should contain a
+     * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+     * from a previous
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp instancePartitionDeadline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instancePartitionDeadlineBuilder_; + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePartitionDeadline field is set. + */ + public boolean hasInstancePartitionDeadline() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePartitionDeadline. + */ + public com.google.protobuf.Timestamp getInstancePartitionDeadline() { + if (instancePartitionDeadlineBuilder_ == null) { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } else { + return instancePartitionDeadlineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePartitionDeadline(com.google.protobuf.Timestamp value) { + if (instancePartitionDeadlineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePartitionDeadline_ = value; + } else { + instancePartitionDeadlineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstancePartitionDeadline( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (instancePartitionDeadlineBuilder_ == null) { + instancePartitionDeadline_ = builderForValue.build(); + } else { + instancePartitionDeadlineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInstancePartitionDeadline(com.google.protobuf.Timestamp value) { + if (instancePartitionDeadlineBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && instancePartitionDeadline_ != null + && instancePartitionDeadline_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstancePartitionDeadlineBuilder().mergeFrom(value); + } else { + instancePartitionDeadline_ = value; + } + } else { + instancePartitionDeadlineBuilder_.mergeFrom(value); + } + if (instancePartitionDeadline_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInstancePartitionDeadline() { + bitField0_ = (bitField0_ & ~0x00000008); + instancePartitionDeadline_ = null; + if (instancePartitionDeadlineBuilder_ != null) { + instancePartitionDeadlineBuilder_.dispose(); + instancePartitionDeadlineBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstancePartitionDeadlineBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getInstancePartitionDeadlineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuilder() { + if (instancePartitionDeadlineBuilder_ != null) { + return instancePartitionDeadlineBuilder_.getMessageOrBuilder(); + } else { + return instancePartitionDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instancePartitionDeadline_; + } + } + /** + * + * + *
+     * Optional. Deadline used while retrieving metadata for instance partitions.
+     * Instance partitions whose metadata cannot be retrieved within this deadline
+     * will be added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+     * in
+     * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+     * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getInstancePartitionDeadlineFieldBuilder() { + if (instancePartitionDeadlineBuilder_ == null) { + instancePartitionDeadlineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstancePartitionDeadline(), getParentForChildren(), isClean()); + instancePartitionDeadline_ = null; + } + return instancePartitionDeadlineBuilder_; + } + + @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.instance.v1.ListInstancePartitionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) + private static final com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest(); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancePartitionsRequest 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.instance.v1.ListInstancePartitionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java new file mode 100644 index 0000000000..4258e48f6a --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java @@ -0,0 +1,158 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface ListInstancePartitionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The instance whose instance partitions should be listed. Values
+   * are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The instance whose instance partitions should be listed. Values
+   * are of the form `projects/<project>/instances/<instance>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Number of instance partitions to be returned in the response. If 0 or less,
+   * defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, `page_token` should contain a
+   * [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
+   * from a previous
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partitions.
+   * Instance partitions whose metadata cannot be retrieved within this deadline
+   * will be added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+   * in
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instancePartitionDeadline field is set. + */ + boolean hasInstancePartitionDeadline(); + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partitions.
+   * Instance partitions whose metadata cannot be retrieved within this deadline
+   * will be added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+   * in
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instancePartitionDeadline. + */ + com.google.protobuf.Timestamp getInstancePartitionDeadline(); + /** + * + * + *
+   * Optional. Deadline used while retrieving metadata for instance partitions.
+   * Instance partitions whose metadata cannot be retrieved within this deadline
+   * will be added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
+   * in
+   * [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
+   * 
+ * + * + * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java new file mode 100644 index 0000000000..12de299c49 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java @@ -0,0 +1,1507 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The response for
+ * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsResponse} + */ +public final class ListInstancePartitionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) + ListInstancePartitionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancePartitionsResponse.newBuilder() to construct. + private ListInstancePartitionsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancePartitionsResponse() { + instancePartitions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancePartitionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.Builder.class); + } + + public static final int INSTANCE_PARTITIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + instancePartitions_; + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + @java.lang.Override + public java.util.List + getInstancePartitionsList() { + return instancePartitions_; + } + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + @java.lang.Override + public java.util.List + getInstancePartitionsOrBuilderList() { + return instancePartitions_; + } + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + @java.lang.Override + public int getInstancePartitionsCount() { + return instancePartitions_.size(); + } + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartitions(int index) { + return instancePartitions_.get(index); + } + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionsOrBuilder(int index) { + return instancePartitions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+   * call to fetch more of the matching instance partitions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+   * call to fetch more of the matching instance partitions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instancePartitions_.size(); i++) { + output.writeMessage(1, instancePartitions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instancePartitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, instancePartitions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + 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.instance.v1.ListInstancePartitionsResponse)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse other = + (com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse) obj; + + if (!getInstancePartitionsList().equals(other.getInstancePartitionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancePartitionsCount() > 0) { + hash = (37 * hash) + INSTANCE_PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartitionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse 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.instance.v1.ListInstancePartitionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse 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.instance.v1.ListInstancePartitionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse 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.instance.v1.ListInstancePartitionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + 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.instance.v1.ListInstancePartitionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse 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.instance.v1.ListInstancePartitionsResponse 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 response for
+   * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.class, + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (instancePartitionsBuilder_ == null) { + instancePartitions_ = java.util.Collections.emptyList(); + } else { + instancePartitions_ = null; + instancePartitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse build() { + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse buildPartial() { + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse result = + new com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse result) { + if (instancePartitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instancePartitions_ = java.util.Collections.unmodifiableList(instancePartitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instancePartitions_ = instancePartitions_; + } else { + result.instancePartitions_ = instancePartitionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @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.instance.v1.ListInstancePartitionsResponse) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse other) { + if (other + == com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + .getDefaultInstance()) return this; + if (instancePartitionsBuilder_ == null) { + if (!other.instancePartitions_.isEmpty()) { + if (instancePartitions_.isEmpty()) { + instancePartitions_ = other.instancePartitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancePartitionsIsMutable(); + instancePartitions_.addAll(other.instancePartitions_); + } + onChanged(); + } + } else { + if (!other.instancePartitions_.isEmpty()) { + if (instancePartitionsBuilder_.isEmpty()) { + instancePartitionsBuilder_.dispose(); + instancePartitionsBuilder_ = null; + instancePartitions_ = other.instancePartitions_; + bitField0_ = (bitField0_ & ~0x00000001); + instancePartitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancePartitionsFieldBuilder() + : null; + } else { + instancePartitionsBuilder_.addAllMessages(other.instancePartitions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + 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; + case 10: + { + com.google.spanner.admin.instance.v1.InstancePartition m = + input.readMessage( + com.google.spanner.admin.instance.v1.InstancePartition.parser(), + extensionRegistry); + if (instancePartitionsBuilder_ == null) { + ensureInstancePartitionsIsMutable(); + instancePartitions_.add(m); + } else { + instancePartitionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + 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; + } + + private int bitField0_; + + private java.util.List + instancePartitions_ = java.util.Collections.emptyList(); + + private void ensureInstancePartitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instancePartitions_ = + new java.util.ArrayList( + instancePartitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + instancePartitionsBuilder_; + + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public java.util.List + getInstancePartitionsList() { + if (instancePartitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(instancePartitions_); + } else { + return instancePartitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public int getInstancePartitionsCount() { + if (instancePartitionsBuilder_ == null) { + return instancePartitions_.size(); + } else { + return instancePartitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartitions(int index) { + if (instancePartitionsBuilder_ == null) { + return instancePartitions_.get(index); + } else { + return instancePartitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder setInstancePartitions( + int index, com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancePartitionsIsMutable(); + instancePartitions_.set(index, value); + onChanged(); + } else { + instancePartitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder setInstancePartitions( + int index, com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionsBuilder_ == null) { + ensureInstancePartitionsIsMutable(); + instancePartitions_.set(index, builderForValue.build()); + onChanged(); + } else { + instancePartitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder addInstancePartitions( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancePartitionsIsMutable(); + instancePartitions_.add(value); + onChanged(); + } else { + instancePartitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder addInstancePartitions( + int index, com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancePartitionsIsMutable(); + instancePartitions_.add(index, value); + onChanged(); + } else { + instancePartitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder addInstancePartitions( + com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionsBuilder_ == null) { + ensureInstancePartitionsIsMutable(); + instancePartitions_.add(builderForValue.build()); + onChanged(); + } else { + instancePartitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder addInstancePartitions( + int index, com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionsBuilder_ == null) { + ensureInstancePartitionsIsMutable(); + instancePartitions_.add(index, builderForValue.build()); + onChanged(); + } else { + instancePartitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder addAllInstancePartitions( + java.lang.Iterable + values) { + if (instancePartitionsBuilder_ == null) { + ensureInstancePartitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instancePartitions_); + onChanged(); + } else { + instancePartitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder clearInstancePartitions() { + if (instancePartitionsBuilder_ == null) { + instancePartitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancePartitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public Builder removeInstancePartitions(int index) { + if (instancePartitionsBuilder_ == null) { + ensureInstancePartitionsIsMutable(); + instancePartitions_.remove(index); + onChanged(); + } else { + instancePartitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + getInstancePartitionsBuilder(int index) { + return getInstancePartitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionsOrBuilder(int index) { + if (instancePartitionsBuilder_ == null) { + return instancePartitions_.get(index); + } else { + return instancePartitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public java.util.List + getInstancePartitionsOrBuilderList() { + if (instancePartitionsBuilder_ != null) { + return instancePartitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instancePartitions_); + } + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + addInstancePartitionsBuilder() { + return getInstancePartitionsFieldBuilder() + .addBuilder(com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()); + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + addInstancePartitionsBuilder(int index) { + return getInstancePartitionsFieldBuilder() + .addBuilder( + index, com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()); + } + /** + * + * + *
+     * The list of requested instancePartitions.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + public java.util.List + getInstancePartitionsBuilderList() { + return getInstancePartitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + getInstancePartitionsFieldBuilder() { + if (instancePartitionsBuilder_ == null) { + instancePartitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( + instancePartitions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + instancePartitions_ = null; + } + return instancePartitionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+     * call to fetch more of the matching instance partitions.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+     * call to fetch more of the matching instance partitions.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+     * call to fetch more of the matching instance partitions.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+     * call to fetch more of the matching instance partitions.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * `next_page_token` can be sent in a subsequent
+     * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+     * call to fetch more of the matching instance partitions.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instance partitions.
+     * It includes the names of instance partitions whose metadata could
+     * not be retrieved within
+     * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) + private static final com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse(); + } + + public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancePartitionsResponse 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.instance.v1.ListInstancePartitionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java new file mode 100644 index 0000000000..c5b595b14d --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java @@ -0,0 +1,177 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface ListInstancePartitionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + java.util.List + getInstancePartitionsList(); + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + com.google.spanner.admin.instance.v1.InstancePartition getInstancePartitions(int index); + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + int getInstancePartitionsCount(); + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + java.util.List + getInstancePartitionsOrBuilderList(); + /** + * + * + *
+   * The list of requested instancePartitions.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstancePartition instance_partitions = 1; + * + */ + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder getInstancePartitionsOrBuilder( + int index); + + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+   * call to fetch more of the matching instance partitions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * `next_page_token` can be sent in a subsequent
+   * [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
+   * call to fetch more of the matching instance partitions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * The list of unreachable instance partitions.
+   * It includes the names of instance partitions whose metadata could
+   * not be retrieved within
+   * [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java index 7eab505208..0a4bc5959f 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java @@ -66,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.spanner.admin.instance.v1.ListInstancesRequest.Builder.class); } + private int bitField0_; public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -286,6 +287,71 @@ public com.google.protobuf.ByteString getFilterBytes() { } } + public static final int INSTANCE_DEADLINE_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp instanceDeadline_; + /** + * + * + *
+   * Deadline used while retrieving metadata for instances.
+   * Instances whose metadata cannot be retrieved within this deadline will be
+   * added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+   * in
+   * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+   * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + * + * @return Whether the instanceDeadline field is set. + */ + @java.lang.Override + public boolean hasInstanceDeadline() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Deadline used while retrieving metadata for instances.
+   * Instances whose metadata cannot be retrieved within this deadline will be
+   * added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+   * in
+   * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+   * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + * + * @return The instanceDeadline. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstanceDeadline() { + return instanceDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeadline_; + } + /** + * + * + *
+   * Deadline used while retrieving metadata for instances.
+   * Instances whose metadata cannot be retrieved within this deadline will be
+   * added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+   * in
+   * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+   * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstanceDeadlineOrBuilder() { + return instanceDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeadline_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -312,6 +378,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getInstanceDeadline()); + } getUnknownFields().writeTo(output); } @@ -333,6 +402,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInstanceDeadline()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -353,6 +425,10 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; + if (hasInstanceDeadline() != other.hasInstanceDeadline()) return false; + if (hasInstanceDeadline()) { + if (!getInstanceDeadline().equals(other.getInstanceDeadline())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -372,6 +448,10 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); + if (hasInstanceDeadline()) { + hash = (37 * hash) + INSTANCE_DEADLINE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceDeadline().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -503,10 +583,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.spanner.admin.instance.v1.ListInstancesRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstanceDeadlineFieldBuilder(); + } } @java.lang.Override @@ -517,6 +606,11 @@ public Builder clear() { pageSize_ = 0; pageToken_ = ""; filter_ = ""; + instanceDeadline_ = null; + if (instanceDeadlineBuilder_ != null) { + instanceDeadlineBuilder_.dispose(); + instanceDeadlineBuilder_ = null; + } return this; } @@ -565,6 +659,13 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.ListInstancesReq if (((from_bitField0_ & 0x00000008) != 0)) { result.filter_ = filter_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.instanceDeadline_ = + instanceDeadlineBuilder_ == null ? instanceDeadline_ : instanceDeadlineBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -631,6 +732,9 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.ListInstancesReque bitField0_ |= 0x00000008; onChanged(); } + if (other.hasInstanceDeadline()) { + mergeInstanceDeadline(other.getInstanceDeadline()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -681,6 +785,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 42: + { + input.readMessage( + getInstanceDeadlineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1194,6 +1305,236 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Timestamp instanceDeadline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instanceDeadlineBuilder_; + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + * + * @return Whether the instanceDeadline field is set. + */ + public boolean hasInstanceDeadline() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + * + * @return The instanceDeadline. + */ + public com.google.protobuf.Timestamp getInstanceDeadline() { + if (instanceDeadlineBuilder_ == null) { + return instanceDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeadline_; + } else { + return instanceDeadlineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + public Builder setInstanceDeadline(com.google.protobuf.Timestamp value) { + if (instanceDeadlineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceDeadline_ = value; + } else { + instanceDeadlineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + public Builder setInstanceDeadline(com.google.protobuf.Timestamp.Builder builderForValue) { + if (instanceDeadlineBuilder_ == null) { + instanceDeadline_ = builderForValue.build(); + } else { + instanceDeadlineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + public Builder mergeInstanceDeadline(com.google.protobuf.Timestamp value) { + if (instanceDeadlineBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && instanceDeadline_ != null + && instanceDeadline_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstanceDeadlineBuilder().mergeFrom(value); + } else { + instanceDeadline_ = value; + } + } else { + instanceDeadlineBuilder_.mergeFrom(value); + } + if (instanceDeadline_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + public Builder clearInstanceDeadline() { + bitField0_ = (bitField0_ & ~0x00000010); + instanceDeadline_ = null; + if (instanceDeadlineBuilder_ != null) { + instanceDeadlineBuilder_.dispose(); + instanceDeadlineBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + public com.google.protobuf.Timestamp.Builder getInstanceDeadlineBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getInstanceDeadlineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + public com.google.protobuf.TimestampOrBuilder getInstanceDeadlineOrBuilder() { + if (instanceDeadlineBuilder_ != null) { + return instanceDeadlineBuilder_.getMessageOrBuilder(); + } else { + return instanceDeadline_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeadline_; + } + } + /** + * + * + *
+     * Deadline used while retrieving metadata for instances.
+     * Instances whose metadata cannot be retrieved within this deadline will be
+     * added to
+     * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+     * in
+     * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+     * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getInstanceDeadlineFieldBuilder() { + if (instanceDeadlineBuilder_ == null) { + instanceDeadlineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstanceDeadline(), getParentForChildren(), isClean()); + instanceDeadline_ = null; + } + return instanceDeadlineBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java index d419a1b477..db6046fab8 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java @@ -160,4 +160,54 @@ public interface ListInstancesRequestOrBuilder * @return The bytes for filter. */ com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Deadline used while retrieving metadata for instances.
+   * Instances whose metadata cannot be retrieved within this deadline will be
+   * added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+   * in
+   * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+   * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + * + * @return Whether the instanceDeadline field is set. + */ + boolean hasInstanceDeadline(); + /** + * + * + *
+   * Deadline used while retrieving metadata for instances.
+   * Instances whose metadata cannot be retrieved within this deadline will be
+   * added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+   * in
+   * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+   * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + * + * @return The instanceDeadline. + */ + com.google.protobuf.Timestamp getInstanceDeadline(); + /** + * + * + *
+   * Deadline used while retrieving metadata for instances.
+   * Instances whose metadata cannot be retrieved within this deadline will be
+   * added to
+   * [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
+   * in
+   * [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
+   * 
+ * + * .google.protobuf.Timestamp instance_deadline = 5; + */ + com.google.protobuf.TimestampOrBuilder getInstanceDeadlineOrBuilder(); } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java index 5e34fe8c59..806f77bfe9 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java @@ -42,6 +42,7 @@ private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder private ListInstancesResponse() { instances_ = java.util.Collections.emptyList(); nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -191,6 +192,82 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { } } + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -211,6 +288,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -226,6 +306,14 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -244,6 +332,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstancesList().equals(other.getInstancesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,6 +350,10 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -410,6 +503,7 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -463,6 +557,10 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.ListInstancesRes if (((from_bitField0_ & 0x00000002) != 0)) { result.nextPageToken_ = nextPageToken_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } } @java.lang.Override @@ -543,6 +641,16 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.ListInstancesRespo bitField0_ |= 0x00000002; onChanged(); } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -588,6 +696,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1074,6 +1189,207 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of unreachable instances.
+     * It includes the names of instances whose metadata could not be retrieved
+     * within
+     * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java index c28533c7c0..38b12c3faa 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java @@ -104,4 +104,67 @@ public interface ListInstancesResponseOrBuilder * @return The bytes for nextPageToken. */ com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * The list of unreachable instances.
+   * It includes the names of instances whose metadata could not be retrieved
+   * within
+   * [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java index 0a85957e12..01f559e1cb 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java @@ -132,6 +132,50 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -246,129 +290,235 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tB3\340A\002\372A-\n+cloudresourcemanager.googleap" + "is.com/Project\022\030\n\013instance_id\030\002 \001(\tB\003\340A\002" + "\022A\n\010instance\030\003 \001(\0132*.google.spanner.admi" - + "n.instance.v1.InstanceB\003\340A\002\"\222\001\n\024ListInst" + + "n.instance.v1.InstanceB\003\340A\002\"\311\001\n\024ListInst" + "ancesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cl" + "oudresourcemanager.googleapis.com/Projec" + "t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\022\016\n\006filter\030\004 \001(\t\"o\n\025ListInstancesRespons" - + "e\022=\n\tinstances\030\001 \003(\0132*.google.spanner.ad" - + "min.instance.v1.Instance\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"\217\001\n\025UpdateInstanceRequest\022A\n\010i" - + "nstance\030\001 \001(\0132*.google.spanner.admin.ins" - + "tance.v1.InstanceB\003\340A\002\0223\n\nfield_mask\030\002 \001" - + "(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"N\n\025D" - + "eleteInstanceRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372" - + "A!\n\037spanner.googleapis.com/Instance\"\345\001\n\026" - + "CreateInstanceMetadata\022<\n\010instance\030\001 \001(\013" - + "2*.google.spanner.admin.instance.v1.Inst" - + "ance\022.\n\nstart_time\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022,\n\010end_time\030\004 \001(\0132" - + "\032.google.protobuf.Timestamp\"\345\001\n\026UpdateIn" - + "stanceMetadata\022<\n\010instance\030\001 \001(\0132*.googl" - + "e.spanner.admin.instance.v1.Instance\022.\n\n" - + "start_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tamp\022/\n\013cancel_time\030\003 \001(\0132\032.google.proto" - + "buf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.google" - + ".protobuf.Timestamp\"\341\001\n\034CreateInstanceCo" - + "nfigMetadata\022I\n\017instance_config\030\001 \001(\01320." + + "\022\016\n\006filter\030\004 \001(\t\0225\n\021instance_deadline\030\005 " + + "\001(\0132\032.google.protobuf.Timestamp\"\204\001\n\025List" + + "InstancesResponse\022=\n\tinstances\030\001 \003(\0132*.g" + + "oogle.spanner.admin.instance.v1.Instance" + + "\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable" + + "\030\003 \003(\t\"\217\001\n\025UpdateInstanceRequest\022A\n\010inst" + + "ance\030\001 \001(\0132*.google.spanner.admin.instan" + + "ce.v1.InstanceB\003\340A\002\0223\n\nfield_mask\030\002 \001(\0132" + + "\032.google.protobuf.FieldMaskB\003\340A\002\"N\n\025Dele" + + "teInstanceRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n" + + "\037spanner.googleapis.com/Instance\"\345\001\n\026Cre" + + "ateInstanceMetadata\022<\n\010instance\030\001 \001(\0132*." + "google.spanner.admin.instance.v1.Instanc" - + "eConfig\022E\n\010progress\030\002 \001(\01323.google.spann" - + "er.admin.instance.v1.OperationProgress\022/" - + "\n\013cancel_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestamp\"\341\001\n\034UpdateInstanceConfigMetadata" - + "\022I\n\017instance_config\030\001 \001(\01320.google.spann" - + "er.admin.instance.v1.InstanceConfig\022E\n\010p" - + "rogress\030\002 \001(\01323.google.spanner.admin.ins" - + "tance.v1.OperationProgress\022/\n\013cancel_tim" - + "e\030\003 \001(\0132\032.google.protobuf.Timestamp2\362\030\n\r" - + "InstanceAdmin\022\314\001\n\023ListInstanceConfigs\022<." - + "google.spanner.admin.instance.v1.ListIns" - + "tanceConfigsRequest\032=.google.spanner.adm" - + "in.instance.v1.ListInstanceConfigsRespon" - + "se\"8\332A\006parent\202\323\344\223\002)\022\'/v1/{parent=project" - + "s/*}/instanceConfigs\022\271\001\n\021GetInstanceConf" - + "ig\022:.google.spanner.admin.instance.v1.Ge" - + "tInstanceConfigRequest\0320.google.spanner." - + "admin.instance.v1.InstanceConfig\"6\332A\004nam" - + "e\202\323\344\223\002)\022\'/v1/{name=projects/*/instanceCo" - + "nfigs/*}\022\310\002\n\024CreateInstanceConfig\022=.goog" - + "le.spanner.admin.instance.v1.CreateInsta" - + "nceConfigRequest\032\035.google.longrunning.Op" - + "eration\"\321\001\312Ap\n/google.spanner.admin.inst" - + "ance.v1.InstanceConfig\022=google.spanner.a" - + "dmin.instance.v1.CreateInstanceConfigMet" - + "adata\332A)parent,instance_config,instance_" - + "config_id\202\323\344\223\002,\"\'/v1/{parent=projects/*}" - + "/instanceConfigs:\001*\022\312\002\n\024UpdateInstanceCo" - + "nfig\022=.google.spanner.admin.instance.v1." - + "UpdateInstanceConfigRequest\032\035.google.lon" - + "grunning.Operation\"\323\001\312Ap\n/google.spanner" - + ".admin.instance.v1.InstanceConfig\022=googl" - + "e.spanner.admin.instance.v1.UpdateInstan" - + "ceConfigMetadata\332A\033instance_config,updat" - + "e_mask\202\323\344\223\002<27/v1/{instance_config.name=" - + "projects/*/instanceConfigs/*}:\001*\022\245\001\n\024Del" - + "eteInstanceConfig\022=.google.spanner.admin" - + ".instance.v1.DeleteInstanceConfigRequest" - + "\032\026.google.protobuf.Empty\"6\332A\004name\202\323\344\223\002)*" - + "\'/v1/{name=projects/*/instanceConfigs/*}" - + "\022\360\001\n\034ListInstanceConfigOperations\022E.goog" - + "le.spanner.admin.instance.v1.ListInstanc" - + "eConfigOperationsRequest\032F.google.spanne" - + "r.admin.instance.v1.ListInstanceConfigOp" - + "erationsResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{" - + "parent=projects/*}/instanceConfigOperati" - + "ons\022\264\001\n\rListInstances\0226.google.spanner.a" - + "dmin.instance.v1.ListInstancesRequest\0327." + + "e\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf." + + "Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.google." + + "protobuf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\"\345\001\n\026UpdateInsta" + + "nceMetadata\022<\n\010instance\030\001 \001(\0132*.google.s" + + "panner.admin.instance.v1.Instance\022.\n\nsta" + + "rt_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "p\022/\n\013cancel_time\030\003 \001(\0132\032.google.protobuf" + + ".Timestamp\022,\n\010end_time\030\004 \001(\0132\032.google.pr" + + "otobuf.Timestamp\"\341\001\n\034CreateInstanceConfi" + + "gMetadata\022I\n\017instance_config\030\001 \001(\01320.goo" + + "gle.spanner.admin.instance.v1.InstanceCo" + + "nfig\022E\n\010progress\030\002 \001(\01323.google.spanner." + + "admin.instance.v1.OperationProgress\022/\n\013c" + + "ancel_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\"\341\001\n\034UpdateInstanceConfigMetadata\022I\n" + + "\017instance_config\030\001 \001(\01320.google.spanner." + + "admin.instance.v1.InstanceConfig\022E\n\010prog" + + "ress\030\002 \001(\01323.google.spanner.admin.instan" + + "ce.v1.OperationProgress\022/\n\013cancel_time\030\003" + + " \001(\0132\032.google.protobuf.Timestamp\"\216\005\n\021Ins" + + "tancePartition\022\021\n\004name\030\001 \001(\tB\003\340A\002\022=\n\006con" + + "fig\030\002 \001(\tB-\340A\002\372A\'\n%spanner.googleapis.co" + + "m/InstanceConfig\022\031\n\014display_name\030\003 \001(\tB\003" + + "\340A\002\022\024\n\nnode_count\030\005 \001(\005H\000\022\032\n\020processing_" + + "units\030\006 \001(\005H\000\022M\n\005state\030\007 \001(\01629.google.sp" + + "anner.admin.instance.v1.InstancePartitio" + + "n.StateB\003\340A\003\0224\n\013create_time\030\010 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0224\n\013update_tim" + + "e\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022\"\n\025referencing_databases\030\n \003(\tB\003\340A\003\022 \n\023" + + "referencing_backups\030\013 \003(\tB\003\340A\003\022\014\n\004etag\030\014" + + " \001(\t\"7\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010" + + "CREATING\020\001\022\t\n\005READY\020\002:~\352A{\n(spanner.goog" + + "leapis.com/InstancePartition\022Oprojects/{" + + "project}/instances/{instance}/instancePa" + + "rtitions/{instance_partition}B\022\n\020compute" + + "_capacity\"\201\002\n\037CreateInstancePartitionMet" + + "adata\022O\n\022instance_partition\030\001 \001(\01323.goog" + + "le.spanner.admin.instance.v1.InstancePar" + + "tition\022.\n\nstart_time\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022,\n\010end_time\030\004 \001(" + + "\0132\032.google.protobuf.Timestamp\"\323\001\n\036Create" + + "InstancePartitionRequest\0227\n\006parent\030\001 \001(\t" + + "B\'\340A\002\372A!\n\037spanner.googleapis.com/Instanc" + + "e\022\"\n\025instance_partition_id\030\002 \001(\tB\003\340A\002\022T\n" + + "\022instance_partition\030\003 \001(\01323.google.spann" + + "er.admin.instance.v1.InstancePartitionB\003" + + "\340A\002\"n\n\036DeleteInstancePartitionRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n(spanner.googleapis." + + "com/InstancePartition\022\014\n\004etag\030\002 \001(\t\"]\n\033G" + + "etInstancePartitionRequest\022>\n\004name\030\001 \001(\t" + + "B0\340A\002\372A*\n(spanner.googleapis.com/Instanc" + + "ePartition\"\253\001\n\036UpdateInstancePartitionRe" + + "quest\022T\n\022instance_partition\030\001 \001(\01323.goog" + + "le.spanner.admin.instance.v1.InstancePar" + + "titionB\003\340A\002\0223\n\nfield_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMaskB\003\340A\002\"\201\002\n\037UpdateInsta" + + "ncePartitionMetadata\022O\n\022instance_partiti" + + "on\030\001 \001(\01323.google.spanner.admin.instance" + + ".v1.InstancePartition\022.\n\nstart_time\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\022/\n\013cancel_" + + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022," + + "\n\010end_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tamp\"\305\001\n\035ListInstancePartitionsRequest\0227" + + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleap" + + "is.com/Instance\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\022D\n\033instance_partition_dea" + + "dline\030\004 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\001\"\240\001\n\036ListInstancePartitionsResponse\022" + + "P\n\023instance_partitions\030\001 \003(\01323.google.sp" + + "anner.admin.instance.v1.InstancePartitio" + + "n\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" + + "e\030\003 \003(\t\"\355\001\n&ListInstancePartitionOperati" + + "onsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037span" + + "ner.googleapis.com/Instance\022\023\n\006filter\030\002 " + + "\001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\npage" + + "_token\030\004 \001(\tB\003\340A\001\022D\n\033instance_partition_" + + "deadline\030\005 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\001\"\236\001\n\'ListInstancePartitionOperati" + + "onsResponse\0221\n\noperations\030\001 \003(\0132\035.google" + + ".longrunning.Operation\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\022\'\n\037unreachable_instance_partitio" + + "ns\030\003 \003(\t2\316%\n\rInstanceAdmin\022\314\001\n\023ListInsta" + + "nceConfigs\022<.google.spanner.admin.instan" + + "ce.v1.ListInstanceConfigsRequest\032=.googl" + + "e.spanner.admin.instance.v1.ListInstance" + + "ConfigsResponse\"8\332A\006parent\202\323\344\223\002)\022\'/v1/{p" + + "arent=projects/*}/instanceConfigs\022\271\001\n\021Ge" + + "tInstanceConfig\022:.google.spanner.admin.i" + + "nstance.v1.GetInstanceConfigRequest\0320.go" + + "ogle.spanner.admin.instance.v1.InstanceC" + + "onfig\"6\332A\004name\202\323\344\223\002)\022\'/v1/{name=projects" + + "/*/instanceConfigs/*}\022\310\002\n\024CreateInstance" + + "Config\022=.google.spanner.admin.instance.v" + + "1.CreateInstanceConfigRequest\032\035.google.l" + + "ongrunning.Operation\"\321\001\312Ap\n/google.spann" + + "er.admin.instance.v1.InstanceConfig\022=goo" + + "gle.spanner.admin.instance.v1.CreateInst" + + "anceConfigMetadata\332A)parent,instance_con" + + "fig,instance_config_id\202\323\344\223\002,\"\'/v1/{paren" + + "t=projects/*}/instanceConfigs:\001*\022\312\002\n\024Upd" + + "ateInstanceConfig\022=.google.spanner.admin" + + ".instance.v1.UpdateInstanceConfigRequest" + + "\032\035.google.longrunning.Operation\"\323\001\312Ap\n/g" + + "oogle.spanner.admin.instance.v1.Instance" + + "Config\022=google.spanner.admin.instance.v1" + + ".UpdateInstanceConfigMetadata\332A\033instance" + + "_config,update_mask\202\323\344\223\002<27/v1/{instance" + + "_config.name=projects/*/instanceConfigs/" + + "*}:\001*\022\245\001\n\024DeleteInstanceConfig\022=.google." + + "spanner.admin.instance.v1.DeleteInstance" + + "ConfigRequest\032\026.google.protobuf.Empty\"6\332" + + "A\004name\202\323\344\223\002)*\'/v1/{name=projects/*/insta" + + "nceConfigs/*}\022\360\001\n\034ListInstanceConfigOper" + + "ations\022E.google.spanner.admin.instance.v" + + "1.ListInstanceConfigOperationsRequest\032F." + "google.spanner.admin.instance.v1.ListIns" - + "tancesResponse\"2\332A\006parent\202\323\344\223\002#\022!/v1/{pa" - + "rent=projects/*}/instances\022\241\001\n\013GetInstan" - + "ce\0224.google.spanner.admin.instance.v1.Ge" - + "tInstanceRequest\032*.google.spanner.admin." - + "instance.v1.Instance\"0\332A\004name\202\323\344\223\002#\022!/v1" - + "/{name=projects/*/instances/*}\022\234\002\n\016Creat" - + "eInstance\0227.google.spanner.admin.instanc" - + "e.v1.CreateInstanceRequest\032\035.google.long" - + "running.Operation\"\261\001\312Ad\n)google.spanner." - + "admin.instance.v1.Instance\0227google.spann" - + "er.admin.instance.v1.CreateInstanceMetad" - + "ata\332A\033parent,instance_id,instance\202\323\344\223\002&\"" - + "!/v1/{parent=projects/*}/instances:\001*\022\235\002" - + "\n\016UpdateInstance\0227.google.spanner.admin." - + "instance.v1.UpdateInstanceRequest\032\035.goog" - + "le.longrunning.Operation\"\262\001\312Ad\n)google.s" - + "panner.admin.instance.v1.Instance\0227googl" - + "e.spanner.admin.instance.v1.UpdateInstan" - + "ceMetadata\332A\023instance,field_mask\202\323\344\223\002/2*" - + "/v1/{instance.name=projects/*/instances/" - + "*}:\001*\022\223\001\n\016DeleteInstance\0227.google.spanne" - + "r.admin.instance.v1.DeleteInstanceReques" - + "t\032\026.google.protobuf.Empty\"0\332A\004name\202\323\344\223\002#" - + "*!/v1/{name=projects/*/instances/*}\022\232\001\n\014" - + "SetIamPolicy\022\".google.iam.v1.SetIamPolic" - + "yRequest\032\025.google.iam.v1.Policy\"O\332A\017reso" - + "urce,policy\202\323\344\223\0027\"2/v1/{resource=project" - + "s/*/instances/*}:setIamPolicy:\001*\022\223\001\n\014Get" - + "IamPolicy\022\".google.iam.v1.GetIamPolicyRe" - + "quest\032\025.google.iam.v1.Policy\"H\332A\010resourc" - + "e\202\323\344\223\0027\"2/v1/{resource=projects/*/instan" - + "ces/*}:getIamPolicy:\001*\022\305\001\n\022TestIamPermis" - + "sions\022(.google.iam.v1.TestIamPermissions" - + "Request\032).google.iam.v1.TestIamPermissio" - + "nsResponse\"Z\332A\024resource,permissions\202\323\344\223\002" - + "=\"8/v1/{resource=projects/*/instances/*}" - + ":testIamPermissions:\001*\032x\312A\026spanner.googl" - + "eapis.com\322A\\https://www.googleapis.com/a" - + "uth/cloud-platform,https://www.googleapi" - + "s.com/auth/spanner.adminB\213\002\n$com.google." - + "spanner.admin.instance.v1B\031SpannerInstan" - + "ceAdminProtoP\001ZFcloud.google.com/go/span" - + "ner/admin/instance/apiv1/instancepb;inst" - + "ancepb\252\002&Google.Cloud.Spanner.Admin.Inst" - + "ance.V1\312\002&Google\\Cloud\\Spanner\\Admin\\Ins" - + "tance\\V1\352\002+Google::Cloud::Spanner::Admin" - + "::Instance::V1b\006proto3" + + "tanceConfigOperationsResponse\"A\332A\006parent" + + "\202\323\344\223\0022\0220/v1/{parent=projects/*}/instance" + + "ConfigOperations\022\264\001\n\rListInstances\0226.goo" + + "gle.spanner.admin.instance.v1.ListInstan" + + "cesRequest\0327.google.spanner.admin.instan" + + "ce.v1.ListInstancesResponse\"2\332A\006parent\202\323" + + "\344\223\002#\022!/v1/{parent=projects/*}/instances\022" + + "\344\001\n\026ListInstancePartitions\022?.google.span" + + "ner.admin.instance.v1.ListInstancePartit" + + "ionsRequest\032@.google.spanner.admin.insta" + + "nce.v1.ListInstancePartitionsResponse\"G\332" + + "A\006parent\202\323\344\223\0028\0226/v1/{parent=projects/*/i" + + "nstances/*}/instancePartitions\022\241\001\n\013GetIn" + + "stance\0224.google.spanner.admin.instance.v" + + "1.GetInstanceRequest\032*.google.spanner.ad" + + "min.instance.v1.Instance\"0\332A\004name\202\323\344\223\002#\022" + + "!/v1/{name=projects/*/instances/*}\022\234\002\n\016C" + + "reateInstance\0227.google.spanner.admin.ins" + + "tance.v1.CreateInstanceRequest\032\035.google." + + "longrunning.Operation\"\261\001\312Ad\n)google.span" + + "ner.admin.instance.v1.Instance\0227google.s" + + "panner.admin.instance.v1.CreateInstanceM" + + "etadata\332A\033parent,instance_id,instance\202\323\344" + + "\223\002&\"!/v1/{parent=projects/*}/instances:\001" + + "*\022\235\002\n\016UpdateInstance\0227.google.spanner.ad" + + "min.instance.v1.UpdateInstanceRequest\032\035." + + "google.longrunning.Operation\"\262\001\312Ad\n)goog" + + "le.spanner.admin.instance.v1.Instance\0227g" + + "oogle.spanner.admin.instance.v1.UpdateIn" + + "stanceMetadata\332A\023instance,field_mask\202\323\344\223" + + "\002/2*/v1/{instance.name=projects/*/instan" + + "ces/*}:\001*\022\223\001\n\016DeleteInstance\0227.google.sp" + + "anner.admin.instance.v1.DeleteInstanceRe" + + "quest\032\026.google.protobuf.Empty\"0\332A\004name\202\323" + + "\344\223\002#*!/v1/{name=projects/*/instances/*}\022" + + "\232\001\n\014SetIamPolicy\022\".google.iam.v1.SetIamP" + + "olicyRequest\032\025.google.iam.v1.Policy\"O\332A\017" + + "resource,policy\202\323\344\223\0027\"2/v1/{resource=pro" + + "jects/*/instances/*}:setIamPolicy:\001*\022\223\001\n" + + "\014GetIamPolicy\022\".google.iam.v1.GetIamPoli" + + "cyRequest\032\025.google.iam.v1.Policy\"H\332A\010res" + + "ource\202\323\344\223\0027\"2/v1/{resource=projects/*/in" + + "stances/*}:getIamPolicy:\001*\022\305\001\n\022TestIamPe" + + "rmissions\022(.google.iam.v1.TestIamPermiss" + + "ionsRequest\032).google.iam.v1.TestIamPermi" + + "ssionsResponse\"Z\332A\024resource,permissions\202" + + "\323\344\223\002=\"8/v1/{resource=projects/*/instance" + + "s/*}:testIamPermissions:\001*\022\321\001\n\024GetInstan" + + "cePartition\022=.google.spanner.admin.insta" + + "nce.v1.GetInstancePartitionRequest\0323.goo" + + "gle.spanner.admin.instance.v1.InstancePa" + + "rtition\"E\332A\004name\202\323\344\223\0028\0226/v1/{name=projec" + + "ts/*/instances/*/instancePartitions/*}\022\351" + + "\002\n\027CreateInstancePartition\022@.google.span" + + "ner.admin.instance.v1.CreateInstancePart" + + "itionRequest\032\035.google.longrunning.Operat" + + "ion\"\354\001\312Av\n2google.spanner.admin.instance" + + ".v1.InstancePartition\022@google.spanner.ad" + + "min.instance.v1.CreateInstancePartitionM" + + "etadata\332A/parent,instance_partition,inst" + + "ance_partition_id\202\323\344\223\002;\"6/v1/{parent=pro" + + "jects/*/instances/*}/instancePartitions:" + + "\001*\022\272\001\n\027DeleteInstancePartition\022@.google." + + "spanner.admin.instance.v1.DeleteInstance" + + "PartitionRequest\032\026.google.protobuf.Empty" + + "\"E\332A\004name\202\323\344\223\0028*6/v1/{name=projects/*/in" + + "stances/*/instancePartitions/*}\022\352\002\n\027Upda" + + "teInstancePartition\022@.google.spanner.adm" + + "in.instance.v1.UpdateInstancePartitionRe" + + "quest\032\035.google.longrunning.Operation\"\355\001\312" + + "Av\n2google.spanner.admin.instance.v1.Ins" + + "tancePartition\022@google.spanner.admin.ins" + + "tance.v1.UpdateInstancePartitionMetadata" + + "\332A\035instance_partition,field_mask\202\323\344\223\002N2I" + + "/v1/{instance_partition.name=projects/*/" + + "instances/*/instancePartitions/*}:\001*\022\210\002\n" + + "\037ListInstancePartitionOperations\022H.googl" + + "e.spanner.admin.instance.v1.ListInstance" + + "PartitionOperationsRequest\032I.google.span" + + "ner.admin.instance.v1.ListInstancePartit" + + "ionOperationsResponse\"P\332A\006parent\202\323\344\223\002A\022?" + + "/v1/{parent=projects/*/instances/*}/inst" + + "ancePartitionOperations\032x\312A\026spanner.goog" + + "leapis.com\322A\\https://www.googleapis.com/" + + "auth/cloud-platform,https://www.googleap" + + "is.com/auth/spanner.adminB\213\002\n$com.google" + + ".spanner.admin.instance.v1B\031SpannerInsta" + + "nceAdminProtoP\001ZFcloud.google.com/go/spa" + + "nner/admin/instance/apiv1/instancepb;ins" + + "tancepb\252\002&Google.Cloud.Spanner.Admin.Ins" + + "tance.V1\312\002&Google\\Cloud\\Spanner\\Admin\\In" + + "stance\\V1\352\002+Google::Cloud::Spanner::Admi" + + "n::Instance::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -569,7 +719,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", + "Parent", "PageSize", "PageToken", "Filter", "InstanceDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor = getDescriptor().getMessageTypes().get(15); @@ -577,7 +727,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor, new java.lang.String[] { - "Instances", "NextPageToken", + "Instances", "NextPageToken", "Unreachable", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor = getDescriptor().getMessageTypes().get(16); @@ -627,6 +777,105 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "InstanceConfig", "Progress", "CancelTime", }); + internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor, + new java.lang.String[] { + "Name", + "Config", + "DisplayName", + "NodeCount", + "ProcessingUnits", + "State", + "CreateTime", + "UpdateTime", + "ReferencingDatabases", + "ReferencingBackups", + "Etag", + "ComputeCapacity", + }); + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor, + new java.lang.String[] { + "InstancePartition", "StartTime", "CancelTime", "EndTime", + }); + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor, + new java.lang.String[] { + "Parent", "InstancePartitionId", "InstancePartition", + }); + internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor, + new java.lang.String[] { + "InstancePartition", "FieldMask", + }); + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor, + new java.lang.String[] { + "InstancePartition", "StartTime", "CancelTime", "EndTime", + }); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "InstancePartitionDeadline", + }); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor, + new java.lang.String[] { + "InstancePartitions", "NextPageToken", "Unreachable", + }); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "InstancePartitionDeadline", + }); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor, + new java.lang.String[] { + "Operations", "NextPageToken", "UnreachableInstancePartitions", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java new file mode 100644 index 0000000000..ffd1dc8214 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java @@ -0,0 +1,1579 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * Metadata type for the operation returned by
+ * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata} + */ +public final class UpdateInstancePartitionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) + UpdateInstancePartitionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInstancePartitionMetadata.newBuilder() to construct. + private UpdateInstancePartitionMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInstancePartitionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInstancePartitionMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.class, + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_PARTITION_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + /** + * + * + *
+   * The desired end state of the update.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return Whether the instancePartition field is set. + */ + @java.lang.Override + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The desired end state of the update.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return The instancePartition. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + /** + * + * + *
+   * The desired end state of the update.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time at which
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The time at which
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time at which
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int CANCEL_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp cancelTime_; + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return Whether the cancelTime field is set. + */ + @java.lang.Override + public boolean hasCancelTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return The cancelTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCancelTime() { + return cancelTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : cancelTime_; + } + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { + return cancelTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : cancelTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInstancePartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getCancelTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstancePartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCancelTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); + } + 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.instance.v1.UpdateInstancePartitionMetadata)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata other = + (com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) obj; + + if (hasInstancePartition() != other.hasInstancePartition()) return false; + if (hasInstancePartition()) { + if (!getInstancePartition().equals(other.getInstancePartition())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasCancelTime() != other.hasCancelTime()) return false; + if (hasCancelTime()) { + if (!getCancelTime().equals(other.getCancelTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstancePartition()) { + hash = (37 * hash) + INSTANCE_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartition().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasCancelTime()) { + hash = (37 * hash) + CANCEL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCancelTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata 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.instance.v1.UpdateInstancePartitionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata 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.instance.v1.UpdateInstancePartitionMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata 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.instance.v1.UpdateInstancePartitionMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata + 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.instance.v1.UpdateInstancePartitionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata 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.instance.v1.UpdateInstancePartitionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata type for the operation returned by
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.class, + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancePartitionFieldBuilder(); + getStartTimeFieldBuilder(); + getCancelTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + cancelTime_ = null; + if (cancelTimeBuilder_ != null) { + cancelTimeBuilder_.dispose(); + cancelTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata build() { + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata buildPartial() { + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata result = + new com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instancePartition_ = + instancePartitionBuilder_ == null + ? instancePartition_ + : instancePartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cancelTime_ = cancelTimeBuilder_ == null ? cancelTime_ : cancelTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @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.instance.v1.UpdateInstancePartitionMetadata) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata other) { + if (other + == com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata + .getDefaultInstance()) return this; + if (other.hasInstancePartition()) { + mergeInstancePartition(other.getInstancePartition()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasCancelTime()) { + mergeCancelTime(other.getCancelTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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; + case 10: + { + input.readMessage( + getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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; + } + + private int bitField0_; + + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + instancePartitionBuilder_; + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return Whether the instancePartition field is set. + */ + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return The instancePartition. + */ + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + if (instancePartitionBuilder_ == null) { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } else { + return instancePartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePartition_ = value; + } else { + instancePartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionBuilder_ == null) { + instancePartition_ = builderForValue.build(); + } else { + instancePartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder mergeInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && instancePartition_ != null + && instancePartition_ + != com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()) { + getInstancePartitionBuilder().mergeFrom(value); + } else { + instancePartition_ = value; + } + } else { + instancePartitionBuilder_.mergeFrom(value); + } + if (instancePartition_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public Builder clearInstancePartition() { + bitField0_ = (bitField0_ & ~0x00000001); + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + getInstancePartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInstancePartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + if (instancePartitionBuilder_ != null) { + return instancePartitionBuilder_.getMessageOrBuilder(); + } else { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + } + /** + * + * + *
+     * The desired end state of the update.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + getInstancePartitionFieldBuilder() { + if (instancePartitionBuilder_ == null) { + instancePartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( + getInstancePartition(), getParentForChildren(), isClean()); + instancePartition_ = null; + } + return instancePartitionBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time at which
+     * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+     * request was received.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp cancelTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + cancelTimeBuilder_; + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return Whether the cancelTime field is set. + */ + public boolean hasCancelTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return The cancelTime. + */ + public com.google.protobuf.Timestamp getCancelTime() { + if (cancelTimeBuilder_ == null) { + return cancelTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : cancelTime_; + } else { + return cancelTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder setCancelTime(com.google.protobuf.Timestamp value) { + if (cancelTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cancelTime_ = value; + } else { + cancelTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder setCancelTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (cancelTimeBuilder_ == null) { + cancelTime_ = builderForValue.build(); + } else { + cancelTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder mergeCancelTime(com.google.protobuf.Timestamp value) { + if (cancelTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cancelTime_ != null + && cancelTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCancelTimeBuilder().mergeFrom(value); + } else { + cancelTime_ = value; + } + } else { + cancelTimeBuilder_.mergeFrom(value); + } + if (cancelTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public Builder clearCancelTime() { + bitField0_ = (bitField0_ & ~0x00000004); + cancelTime_ = null; + if (cancelTimeBuilder_ != null) { + cancelTimeBuilder_.dispose(); + cancelTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCancelTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { + if (cancelTimeBuilder_ != null) { + return cancelTimeBuilder_.getMessageOrBuilder(); + } else { + return cancelTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : cancelTime_; + } + } + /** + * + * + *
+     * The time at which this operation was cancelled. If set, this operation is
+     * in the process of undoing itself (which is guaranteed to succeed) and
+     * cannot be cancelled again.
+     * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCancelTimeFieldBuilder() { + if (cancelTimeBuilder_ == null) { + cancelTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCancelTime(), getParentForChildren(), isClean()); + cancelTime_ = null; + } + return cancelTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time at which this operation failed or was completed successfully.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @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.instance.v1.UpdateInstancePartitionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) + private static final com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata(); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInstancePartitionMetadata 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.instance.v1.UpdateInstancePartitionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java new file mode 100644 index 0000000000..94ed05800b --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java @@ -0,0 +1,178 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface UpdateInstancePartitionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The desired end state of the update.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return Whether the instancePartition field is set. + */ + boolean hasInstancePartition(); + /** + * + * + *
+   * The desired end state of the update.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + * + * @return The instancePartition. + */ + com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition(); + /** + * + * + *
+   * The desired end state of the update.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; + */ + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder getInstancePartitionOrBuilder(); + + /** + * + * + *
+   * The time at which
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time at which
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time at which
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
+   * request was received.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return Whether the cancelTime field is set. + */ + boolean hasCancelTime(); + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + * + * @return The cancelTime. + */ + com.google.protobuf.Timestamp getCancelTime(); + /** + * + * + *
+   * The time at which this operation was cancelled. If set, this operation is
+   * in the process of undoing itself (which is guaranteed to succeed) and
+   * cannot be cancelled again.
+   * 
+ * + * .google.protobuf.Timestamp cancel_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder(); + + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time at which this operation failed or was completed successfully.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java new file mode 100644 index 0000000000..8ddc1564de --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java @@ -0,0 +1,1139 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * The request for
+ * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionRequest} + */ +public final class UpdateInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) + UpdateInstancePartitionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInstancePartitionRequest.newBuilder() to construct. + private UpdateInstancePartitionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInstancePartitionRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInstancePartitionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_PARTITION_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + /** + * + * + *
+   * Required. The instance partition to update, which must always include the
+   * instance partition name. Otherwise, only fields mentioned in
+   * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+   * need be included.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instancePartition field is set. + */ + @java.lang.Override + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The instance partition to update, which must always include the
+   * instance partition name. Otherwise, only fields mentioned in
+   * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+   * need be included.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instancePartition. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + /** + * + * + *
+   * Required. The instance partition to update, which must always include the
+   * instance partition name. Otherwise, only fields mentioned in
+   * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+   * need be included.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + + public static final int FIELD_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask fieldMask_; + /** + * + * + *
+   * Required. A mask specifying which fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * should be updated. The field mask must always be specified; this prevents
+   * any future fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * from being erased accidentally by clients that do not know about them.
+   * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fieldMask field is set. + */ + @java.lang.Override + public boolean hasFieldMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. A mask specifying which fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * should be updated. The field mask must always be specified; this prevents
+   * any future fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * from being erased accidentally by clients that do not know about them.
+   * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fieldMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getFieldMask() { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } + /** + * + * + *
+   * Required. A mask specifying which fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * should be updated. The field mask must always be specified; this prevents
+   * any future fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * from being erased accidentally by clients that do not know about them.
+   * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInstancePartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getFieldMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstancePartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); + } + 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.instance.v1.UpdateInstancePartitionRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest other = + (com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) obj; + + if (hasInstancePartition() != other.hasInstancePartition()) return false; + if (hasInstancePartition()) { + if (!getInstancePartition().equals(other.getInstancePartition())) return false; + } + if (hasFieldMask() != other.hasFieldMask()) return false; + if (hasFieldMask()) { + if (!getFieldMask().equals(other.getFieldMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstancePartition()) { + hash = (37 * hash) + INSTANCE_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getInstancePartition().hashCode(); + } + if (hasFieldMask()) { + hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; + hash = (53 * hash) + getFieldMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest 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.instance.v1.UpdateInstancePartitionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest 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.instance.v1.UpdateInstancePartitionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest 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.instance.v1.UpdateInstancePartitionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + 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.instance.v1.UpdateInstancePartitionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest 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.instance.v1.UpdateInstancePartitionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.class, + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancePartitionFieldBuilder(); + getFieldMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + fieldMask_ = null; + if (fieldMaskBuilder_ != null) { + fieldMaskBuilder_.dispose(); + fieldMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest build() { + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest buildPartial() { + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest result = + new com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instancePartition_ = + instancePartitionBuilder_ == null + ? instancePartition_ + : instancePartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fieldMask_ = fieldMaskBuilder_ == null ? fieldMask_ : fieldMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.instance.v1.UpdateInstancePartitionRequest) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest other) { + if (other + == com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + .getDefaultInstance()) return this; + if (other.hasInstancePartition()) { + mergeInstancePartition(other.getInstancePartition()); + } + if (other.hasFieldMask()) { + mergeFieldMask(other.getFieldMask()); + } + 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; + case 10: + { + input.readMessage( + getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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; + } + + private int bitField0_; + + private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + instancePartitionBuilder_; + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instancePartition field is set. + */ + public boolean hasInstancePartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instancePartition. + */ + public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition() { + if (instancePartitionBuilder_ == null) { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } else { + return instancePartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancePartition_ = value; + } else { + instancePartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition.Builder builderForValue) { + if (instancePartitionBuilder_ == null) { + instancePartition_ = builderForValue.build(); + } else { + instancePartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstancePartition( + com.google.spanner.admin.instance.v1.InstancePartition value) { + if (instancePartitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && instancePartition_ != null + && instancePartition_ + != com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()) { + getInstancePartitionBuilder().mergeFrom(value); + } else { + instancePartition_ = value; + } + } else { + instancePartitionBuilder_.mergeFrom(value); + } + if (instancePartition_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstancePartition() { + bitField0_ = (bitField0_ & ~0x00000001); + instancePartition_ = null; + if (instancePartitionBuilder_ != null) { + instancePartitionBuilder_.dispose(); + instancePartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartition.Builder + getInstancePartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInstancePartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder + getInstancePartitionOrBuilder() { + if (instancePartitionBuilder_ != null) { + return instancePartitionBuilder_.getMessageOrBuilder(); + } else { + return instancePartition_ == null + ? com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance() + : instancePartition_; + } + } + /** + * + * + *
+     * Required. The instance partition to update, which must always include the
+     * instance partition name. Otherwise, only fields mentioned in
+     * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+     * need be included.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> + getInstancePartitionFieldBuilder() { + if (instancePartitionBuilder_ == null) { + instancePartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstancePartition, + com.google.spanner.admin.instance.v1.InstancePartition.Builder, + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( + getInstancePartition(), getParentForChildren(), isClean()); + instancePartition_ = null; + } + return instancePartitionBuilder_; + } + + private com.google.protobuf.FieldMask fieldMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + fieldMaskBuilder_; + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fieldMask field is set. + */ + public boolean hasFieldMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fieldMask. + */ + public com.google.protobuf.FieldMask getFieldMask() { + if (fieldMaskBuilder_ == null) { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } else { + return fieldMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFieldMask(com.google.protobuf.FieldMask value) { + if (fieldMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldMask_ = value; + } else { + fieldMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (fieldMaskBuilder_ == null) { + fieldMask_ = builderForValue.build(); + } else { + fieldMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { + if (fieldMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fieldMask_ != null + && fieldMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getFieldMaskBuilder().mergeFrom(value); + } else { + fieldMask_ = value; + } + } else { + fieldMaskBuilder_.mergeFrom(value); + } + if (fieldMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFieldMask() { + bitField0_ = (bitField0_ & ~0x00000002); + fieldMask_ = null; + if (fieldMaskBuilder_ != null) { + fieldMaskBuilder_.dispose(); + fieldMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFieldMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { + if (fieldMaskBuilder_ != null) { + return fieldMaskBuilder_.getMessageOrBuilder(); + } else { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } + } + /** + * + * + *
+     * Required. A mask specifying which fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * should be updated. The field mask must always be specified; this prevents
+     * any future fields in
+     * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+     * from being erased accidentally by clients that do not know about them.
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getFieldMaskFieldBuilder() { + if (fieldMaskBuilder_ == null) { + fieldMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getFieldMask(), getParentForChildren(), isClean()); + fieldMask_ = null; + } + return fieldMaskBuilder_; + } + + @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.instance.v1.UpdateInstancePartitionRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) + private static final com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest(); + } + + public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInstancePartitionRequest 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.instance.v1.UpdateInstancePartitionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java new file mode 100644 index 0000000000..ffeebecf28 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * 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/instance/v1/spanner_instance_admin.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.admin.instance.v1; + +public interface UpdateInstancePartitionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The instance partition to update, which must always include the
+   * instance partition name. Otherwise, only fields mentioned in
+   * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+   * need be included.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instancePartition field is set. + */ + boolean hasInstancePartition(); + /** + * + * + *
+   * Required. The instance partition to update, which must always include the
+   * instance partition name. Otherwise, only fields mentioned in
+   * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+   * need be included.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instancePartition. + */ + com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition(); + /** + * + * + *
+   * Required. The instance partition to update, which must always include the
+   * instance partition name. Otherwise, only fields mentioned in
+   * [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
+   * need be included.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder getInstancePartitionOrBuilder(); + + /** + * + * + *
+   * Required. A mask specifying which fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * should be updated. The field mask must always be specified; this prevents
+   * any future fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * from being erased accidentally by clients that do not know about them.
+   * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fieldMask field is set. + */ + boolean hasFieldMask(); + /** + * + * + *
+   * Required. A mask specifying which fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * should be updated. The field mask must always be specified; this prevents
+   * any future fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * from being erased accidentally by clients that do not know about them.
+   * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fieldMask. + */ + com.google.protobuf.FieldMask getFieldMask(); + /** + * + * + *
+   * Required. A mask specifying which fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * should be updated. The field mask must always be specified; this prevents
+   * any future fields in
+   * [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
+   * from being erased accidentally by clients that do not know about them.
+   * 
+ * + * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto index 58051df00f..836b9063fb 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// 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. @@ -235,6 +235,15 @@ service InstanceAdmin { option (google.api.method_signature) = "parent"; } + // Lists all instance partitions for the given instance. + rpc ListInstancePartitions(ListInstancePartitionsRequest) + returns (ListInstancePartitionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/instances/*}/instancePartitions" + }; + option (google.api.method_signature) = "parent"; + } + // Gets information about a particular instance. rpc GetInstance(GetInstanceRequest) returns (Instance) { option (google.api.http) = { @@ -403,6 +412,161 @@ service InstanceAdmin { }; option (google.api.method_signature) = "resource,permissions"; } + + // Gets information about a particular instance partition. + rpc GetInstancePartition(GetInstancePartitionRequest) + returns (InstancePartition) { + option (google.api.http) = { + get: "/v1/{name=projects/*/instances/*/instancePartitions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an instance partition and begins preparing it to be used. The + // returned [long-running operation][google.longrunning.Operation] + // can be used to track the progress of preparing the new instance partition. + // The instance partition name is assigned by the caller. If the named + // instance partition already exists, `CreateInstancePartition` returns + // `ALREADY_EXISTS`. + // + // Immediately upon completion of this request: + // + // * The instance partition is readable via the API, with all requested + // attributes but no allocated resources. Its state is `CREATING`. + // + // Until completion of the returned operation: + // + // * Cancelling the operation renders the instance partition immediately + // unreadable via the API. + // * The instance partition can be deleted. + // * All other attempts to modify the instance partition are rejected. + // + // Upon completion of the returned operation: + // + // * Billing for all successfully-allocated resources begins (some types + // may have lower than the requested levels). + // * Databases can start using this instance partition. + // * The instance partition's allocated resource levels are readable via the + // API. + // * The instance partition's state becomes `READY`. + // + // The returned [long-running operation][google.longrunning.Operation] will + // have a name of the format + // `/operations/` and can be used to + // track creation of the instance partition. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + // The [response][google.longrunning.Operation.response] field type is + // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if + // successful. + rpc CreateInstancePartition(CreateInstancePartitionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/instances/*}/instancePartitions" + body: "*" + }; + option (google.api.method_signature) = + "parent,instance_partition,instance_partition_id"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.instance.v1.InstancePartition" + metadata_type: "google.spanner.admin.instance.v1.CreateInstancePartitionMetadata" + }; + } + + // Deletes an existing instance partition. Requires that the + // instance partition is not used by any database or backup and is not the + // default instance partition of an instance. + // + // Authorization requires `spanner.instancePartitions.delete` permission on + // the resource + // [name][google.spanner.admin.instance.v1.InstancePartition.name]. + rpc DeleteInstancePartition(DeleteInstancePartitionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/instances/*/instancePartitions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an instance partition, and begins allocating or releasing resources + // as requested. The returned [long-running + // operation][google.longrunning.Operation] can be used to track the + // progress of updating the instance partition. If the named instance + // partition does not exist, returns `NOT_FOUND`. + // + // Immediately upon completion of this request: + // + // * For resource types for which a decrease in the instance partition's + // allocation has been requested, billing is based on the newly-requested + // level. + // + // Until completion of the returned operation: + // + // * Cancelling the operation sets its metadata's + // [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], + // and begins restoring resources to their pre-request values. The + // operation is guaranteed to succeed at undoing all resource changes, + // after which point it terminates with a `CANCELLED` status. + // * All other attempts to modify the instance partition are rejected. + // * Reading the instance partition via the API continues to give the + // pre-request resource levels. + // + // Upon completion of the returned operation: + // + // * Billing begins for all successfully-allocated resources (some types + // may have lower than the requested levels). + // * All newly-reserved resources are available for serving the instance + // partition's tables. + // * The instance partition's new resource levels are readable via the API. + // + // The returned [long-running operation][google.longrunning.Operation] will + // have a name of the format + // `/operations/` and can be used to + // track the instance partition modification. The + // [metadata][google.longrunning.Operation.metadata] field type is + // [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. + // The [response][google.longrunning.Operation.response] field type is + // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if + // successful. + // + // Authorization requires `spanner.instancePartitions.update` permission on + // the resource + // [name][google.spanner.admin.instance.v1.InstancePartition.name]. + rpc UpdateInstancePartition(UpdateInstancePartitionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{instance_partition.name=projects/*/instances/*/instancePartitions/*}" + body: "*" + }; + option (google.api.method_signature) = "instance_partition,field_mask"; + option (google.longrunning.operation_info) = { + response_type: "google.spanner.admin.instance.v1.InstancePartition" + metadata_type: "google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata" + }; + } + + // Lists instance partition [long-running + // operations][google.longrunning.Operation] in the given instance. + // An instance partition operation has a name of the form + // `projects//instances//instancePartitions//operations/`. + // The long-running operation + // [metadata][google.longrunning.Operation.metadata] field type + // `metadata.type_url` describes the type of the metadata. Operations returned + // include those that have completed/failed/canceled within the last 7 days, + // and pending operations. Operations returned are ordered by + // `operation.metadata.value.start_time` in descending order starting from the + // most recently started operation. + // + // Authorization requires `spanner.instancePartitionOperations.list` + // permission on the resource + // [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + rpc ListInstancePartitionOperations(ListInstancePartitionOperationsRequest) + returns (ListInstancePartitionOperationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/instances/*}/instancePartitionOperations" + }; + option (google.api.method_signature) = "parent"; + } } message ReplicaInfo { @@ -1041,6 +1205,14 @@ message ListInstancesRequest { // it has the label "env" with its value // containing "dev". string filter = 4; + + // Deadline used while retrieving metadata for instances. + // Instances whose metadata cannot be retrieved within this deadline will be + // added to + // [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable] + // in + // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse]. + google.protobuf.Timestamp instance_deadline = 5; } // The response for @@ -1053,6 +1225,12 @@ message ListInstancesResponse { // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances] // call to fetch more of the matching instances. string next_page_token = 2; + + // The list of unreachable instances. + // It includes the names of instances whose metadata could not be retrieved + // within + // [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline]. + repeated string unreachable = 3; } // The request for @@ -1155,3 +1333,381 @@ message UpdateInstanceConfigMetadata { // The time at which this operation was cancelled. google.protobuf.Timestamp cancel_time = 3; } + +// An isolated set of Cloud Spanner resources that databases can define +// placements on. +message InstancePartition { + option (google.api.resource) = { + type: "spanner.googleapis.com/InstancePartition" + pattern: "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}" + }; + + // Indicates the current state of the instance partition. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The instance partition is still being created. Resources may not be + // available yet, and operations such as creating placements using this + // instance partition may not work. + CREATING = 1; + + // The instance partition is fully created and ready to do work such as + // creating placements and using in databases. + READY = 2; + } + + // Required. A unique identifier for the instance partition. Values are of the + // form + // `projects//instances//instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`. + // The final segment of the name must be between 2 and 64 characters in + // length. An instance partition's name cannot be changed after the instance + // partition is created. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the instance partition's configuration. Values are of + // the form `projects//instanceConfigs/`. See also + // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and + // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. + string config = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/InstanceConfig" + } + ]; + + // Required. The descriptive name for this instance partition as it appears in + // UIs. Must be unique per project and between 4 and 30 characters in length. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Compute capacity defines amount of server and storage resources that are + // available to the databases in an instance partition. At most one of either + // node_count or processing_units should be present in the message. See [the + // documentation](https://cloud.google.com/spanner/docs/compute-capacity) + // for more information about nodes and processing units. + oneof compute_capacity { + // The number of nodes allocated to this instance partition. + // + // Users can set the node_count field to specify the target number of nodes + // allocated to the instance partition. + // + // This may be zero in API responses for instance partitions that are not + // yet in state `READY`. + int32 node_count = 5; + + // The number of processing units allocated to this instance partition. + // + // Users can set the processing_units field to specify the target number of + // processing units allocated to the instance partition. + // + // This may be zero in API responses for instance partitions that are not + // yet in state `READY`. + int32 processing_units = 6; + } + + // Output only. The current instance partition state. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the instance partition was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the instance partition was most recently + // updated. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The names of the databases that reference this + // instance partition. Referencing databases should share the parent instance. + // The existence of any referencing database prevents the instance partition + // from being deleted. + repeated string referencing_databases = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The names of the backups that reference this instance + // partition. Referencing backups should share the parent instance. The + // existence of any referencing backup prevents the instance partition from + // being deleted. + repeated string referencing_backups = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Used for optimistic concurrency control as a way + // to help prevent simultaneous updates of a instance partition from + // overwriting each other. It is strongly suggested that systems make use of + // the etag in the read-modify-write cycle to perform instance partition + // updates in order to avoid race conditions: An etag is returned in the + // response which contains instance partitions, and systems are expected to + // put that etag in the request to update instance partitions to ensure that + // their change will be applied to the same version of the instance partition. + // If no etag is provided in the call to update instance partition, then the + // existing instance partition is overwritten blindly. + string etag = 12; +} + +// Metadata type for the operation returned by +// [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]. +message CreateInstancePartitionMetadata { + // The instance partition being created. + InstancePartition instance_partition = 1; + + // The time at which the + // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition] + // request was received. + google.protobuf.Timestamp start_time = 2; + + // The time at which this operation was cancelled. If set, this operation is + // in the process of undoing itself (which is guaranteed to succeed) and + // cannot be cancelled again. + google.protobuf.Timestamp cancel_time = 3; + + // The time at which this operation failed or was completed successfully. + google.protobuf.Timestamp end_time = 4; +} + +// The request for +// [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]. +message CreateInstancePartitionRequest { + // Required. The name of the instance in which to create the instance + // partition. Values are of the form + // `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // Required. The ID of the instance partition to create. Valid identifiers are + // of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + // characters in length. + string instance_partition_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The instance partition to create. The instance_partition.name may + // be omitted, but if specified must be + // `/instancePartitions/`. + InstancePartition instance_partition = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request for +// [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition]. +message DeleteInstancePartitionRequest { + // Required. The name of the instance partition to be deleted. + // Values are of the form + // `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/InstancePartition" + } + ]; + + // Optional. If not empty, the API only deletes the instance partition when + // the etag provided matches the current status of the requested instance + // partition. Otherwise, deletes the instance partition without checking the + // current status of the requested instance partition. + string etag = 2; +} + +// The request for +// [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition]. +message GetInstancePartitionRequest { + // Required. The name of the requested instance partition. Values are of + // the form + // `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/InstancePartition" + } + ]; +} + +// The request for +// [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]. +message UpdateInstancePartitionRequest { + // Required. The instance partition to update, which must always include the + // instance partition name. Otherwise, only fields mentioned in + // [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask] + // need be included. + InstancePartition instance_partition = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A mask specifying which fields in + // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] + // should be updated. The field mask must always be specified; this prevents + // any future fields in + // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] + // from being erased accidentally by clients that do not know about them. + google.protobuf.FieldMask field_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata type for the operation returned by +// [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]. +message UpdateInstancePartitionMetadata { + // The desired end state of the update. + InstancePartition instance_partition = 1; + + // The time at which + // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition] + // request was received. + google.protobuf.Timestamp start_time = 2; + + // The time at which this operation was cancelled. If set, this operation is + // in the process of undoing itself (which is guaranteed to succeed) and + // cannot be cancelled again. + google.protobuf.Timestamp cancel_time = 3; + + // The time at which this operation failed or was completed successfully. + google.protobuf.Timestamp end_time = 4; +} + +// The request for +// [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]. +message ListInstancePartitionsRequest { + // Required. The instance whose instance partitions should be listed. Values + // are of the form `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // Number of instance partitions to be returned in the response. If 0 or less, + // defaults to the server's maximum allowed page size. + int32 page_size = 2; + + // If non-empty, `page_token` should contain a + // [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token] + // from a previous + // [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse]. + string page_token = 3; + + // Optional. Deadline used while retrieving metadata for instance partitions. + // Instance partitions whose metadata cannot be retrieved within this deadline + // will be added to + // [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable] + // in + // [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse]. + google.protobuf.Timestamp instance_partition_deadline = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for +// [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]. +message ListInstancePartitionsResponse { + // The list of requested instancePartitions. + repeated InstancePartition instance_partitions = 1; + + // `next_page_token` can be sent in a subsequent + // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions] + // call to fetch more of the matching instance partitions. + string next_page_token = 2; + + // The list of unreachable instance partitions. + // It includes the names of instance partitions whose metadata could + // not be retrieved within + // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline]. + repeated string unreachable = 3; +} + +// The request for +// [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]. +message ListInstancePartitionOperationsRequest { + // Required. The parent instance of the instance partition operations. + // Values are of the form `projects//instances/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Instance" + } + ]; + + // Optional. An expression that filters the list of returned operations. + // + // A filter expression consists of a field name, a + // comparison operator, and a value for filtering. + // The value must be a string, a number, or a boolean. The comparison operator + // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + // Colon `:` is the contains operator. Filter rules are not case sensitive. + // + // The following fields in the [Operation][google.longrunning.Operation] + // are eligible for filtering: + // + // * `name` - The name of the long-running operation + // * `done` - False if the operation is in progress, else true. + // * `metadata.@type` - the type of metadata. For example, the type string + // for + // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + // is + // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + // * `metadata.` - any field in metadata.value. + // `metadata.@type` must be specified first, if filtering on metadata + // fields. + // * `error` - Error associated with the long-running operation. + // * `response.@type` - the type of response. + // * `response.` - any field in response.value. + // + // You can combine multiple expressions by enclosing each expression in + // parentheses. By default, expressions are combined with AND logic. However, + // you can specify AND, OR, and NOT logic explicitly. + // + // Here are a few examples: + // + // * `done:true` - The operation is complete. + // * `(metadata.@type=` \ + // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + // AND` \ + // `(metadata.instance_partition.name:custom-instance-partition) AND` \ + // `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + // `(error:*)` - Return operations where: + // * The operation's metadata type is + // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + // * The instance partition name contains "custom-instance-partition". + // * The operation started before 2021-03-28T14:50:00Z. + // * The operation resulted in an error. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of operations to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If non-empty, `page_token` should contain a + // [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token] + // from a previous + // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse] + // to the same `parent` and with the same `filter`. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Deadline used while retrieving metadata for instance partition + // operations. Instance partitions whose operation metadata cannot be + // retrieved within this deadline will be added to + // [unreachable][ListInstancePartitionOperationsResponse.unreachable] in + // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]. + google.protobuf.Timestamp instance_partition_deadline = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for +// [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]. +message ListInstancePartitionOperationsResponse { + // The list of matching instance partition [long-running + // operations][google.longrunning.Operation]. Each operation's name will be + // prefixed by the instance partition's name. The operation's + // [metadata][google.longrunning.Operation.metadata] field type + // `metadata.type_url` describes the type of the metadata. + repeated google.longrunning.Operation operations = 1; + + // `next_page_token` can be sent in a subsequent + // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations] + // call to fetch more of the matching metadata. + string next_page_token = 2; + + // The list of unreachable instance partitions. + // It includes the names of instance partitions whose operation metadata could + // not be retrieved within + // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline]. + repeated string unreachable_instance_partitions = 3; +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java index 4f3bcefbdb..7d745e8ea4 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java @@ -98,7 +98,7 @@ public enum ActionCase LIST_CLOUD_BACKUP_OPERATIONS(24), GET_OPERATION(25), CANCEL_OPERATION(26), - RECONFIGURE_CLOUD_DATABASE(28), + CHANGE_QUORUM_CLOUD_DATABASE(28), ACTION_NOT_SET(0); private final int value; @@ -172,7 +172,7 @@ public static ActionCase forNumber(int value) { case 26: return CANCEL_OPERATION; case 28: - return RECONFIGURE_CLOUD_DATABASE; + return CHANGE_QUORUM_CLOUD_DATABASE; case 0: return ACTION_NOT_SET; default: @@ -1638,63 +1638,63 @@ public com.google.spanner.executor.v1.CancelOperationAction getCancelOperation() return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); } - public static final int RECONFIGURE_CLOUD_DATABASE_FIELD_NUMBER = 28; + public static final int CHANGE_QUORUM_CLOUD_DATABASE_FIELD_NUMBER = 28; /** * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * * - * @return Whether the reconfigureCloudDatabase field is set. + * @return Whether the changeQuorumCloudDatabase field is set. */ @java.lang.Override - public boolean hasReconfigureCloudDatabase() { + public boolean hasChangeQuorumCloudDatabase() { return actionCase_ == 28; } /** * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * * - * @return The reconfigureCloudDatabase. + * @return The changeQuorumCloudDatabase. */ @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction - getReconfigureCloudDatabase() { + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction + getChangeQuorumCloudDatabase() { if (actionCase_ == 28) { - return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + return (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_; } - return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } /** * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder - getReconfigureCloudDatabaseOrBuilder() { + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder + getChangeQuorumCloudDatabaseOrBuilder() { if (actionCase_ == 28) { - return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + return (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_; } - return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -1801,7 +1801,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } if (actionCase_ == 28) { output.writeMessage( - 28, (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_); + 28, (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_); } getUnknownFields().writeTo(output); } @@ -1950,7 +1950,7 @@ public int getSerializedSize() { if (actionCase_ == 28) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 28, (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_); + 28, (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2057,7 +2057,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCancelOperation().equals(other.getCancelOperation())) return false; break; case 28: - if (!getReconfigureCloudDatabase().equals(other.getReconfigureCloudDatabase())) + if (!getChangeQuorumCloudDatabase().equals(other.getChangeQuorumCloudDatabase())) return false; break; case 0: @@ -2184,8 +2184,8 @@ public int hashCode() { hash = (53 * hash) + getCancelOperation().hashCode(); break; case 28: - hash = (37 * hash) + RECONFIGURE_CLOUD_DATABASE_FIELD_NUMBER; - hash = (53 * hash) + getReconfigureCloudDatabase().hashCode(); + hash = (37 * hash) + CHANGE_QUORUM_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getChangeQuorumCloudDatabase().hashCode(); break; case 0: default: @@ -2411,8 +2411,8 @@ public Builder clear() { if (cancelOperationBuilder_ != null) { cancelOperationBuilder_.clear(); } - if (reconfigureCloudDatabaseBuilder_ != null) { - reconfigureCloudDatabaseBuilder_.clear(); + if (changeQuorumCloudDatabaseBuilder_ != null) { + changeQuorumCloudDatabaseBuilder_.clear(); } actionCase_ = 0; action_ = null; @@ -2539,8 +2539,8 @@ private void buildPartialOneofs(com.google.spanner.executor.v1.AdminAction resul if (actionCase_ == 26 && cancelOperationBuilder_ != null) { result.action_ = cancelOperationBuilder_.build(); } - if (actionCase_ == 28 && reconfigureCloudDatabaseBuilder_ != null) { - result.action_ = reconfigureCloudDatabaseBuilder_.build(); + if (actionCase_ == 28 && changeQuorumCloudDatabaseBuilder_ != null) { + result.action_ = changeQuorumCloudDatabaseBuilder_.build(); } } @@ -2725,9 +2725,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.AdminAction other) { mergeCancelOperation(other.getCancelOperation()); break; } - case RECONFIGURE_CLOUD_DATABASE: + case CHANGE_QUORUM_CLOUD_DATABASE: { - mergeReconfigureCloudDatabase(other.getReconfigureCloudDatabase()); + mergeChangeQuorumCloudDatabase(other.getChangeQuorumCloudDatabase()); break; } case ACTION_NOT_SET: @@ -2949,7 +2949,7 @@ public Builder mergeFrom( case 226: { input.readMessage( - getReconfigureCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + getChangeQuorumCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 28; break; } // case 226 @@ -8932,76 +8932,76 @@ public Builder clearCancelOperation() { } private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder> - reconfigureCloudDatabaseBuilder_; + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder> + changeQuorumCloudDatabaseBuilder_; /** * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * * - * @return Whether the reconfigureCloudDatabase field is set. + * @return Whether the changeQuorumCloudDatabase field is set. */ @java.lang.Override - public boolean hasReconfigureCloudDatabase() { + public boolean hasChangeQuorumCloudDatabase() { return actionCase_ == 28; } /** * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * * - * @return The reconfigureCloudDatabase. + * @return The changeQuorumCloudDatabase. */ @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction - getReconfigureCloudDatabase() { - if (reconfigureCloudDatabaseBuilder_ == null) { + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction + getChangeQuorumCloudDatabase() { + if (changeQuorumCloudDatabaseBuilder_ == null) { if (actionCase_ == 28) { - return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + return (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_; } - return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } else { if (actionCase_ == 28) { - return reconfigureCloudDatabaseBuilder_.getMessage(); + return changeQuorumCloudDatabaseBuilder_.getMessage(); } - return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } } /** * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - public Builder setReconfigureCloudDatabase( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction value) { - if (reconfigureCloudDatabaseBuilder_ == null) { + public Builder setChangeQuorumCloudDatabase( + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction value) { + if (changeQuorumCloudDatabaseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { - reconfigureCloudDatabaseBuilder_.setMessage(value); + changeQuorumCloudDatabaseBuilder_.setMessage(value); } actionCase_ = 28; return this; @@ -9010,20 +9010,20 @@ public Builder setReconfigureCloudDatabase( * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - public Builder setReconfigureCloudDatabase( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder builderForValue) { - if (reconfigureCloudDatabaseBuilder_ == null) { + public Builder setChangeQuorumCloudDatabase( + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder builderForValue) { + if (changeQuorumCloudDatabaseBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { - reconfigureCloudDatabaseBuilder_.setMessage(builderForValue.build()); + changeQuorumCloudDatabaseBuilder_.setMessage(builderForValue.build()); } actionCase_ = 28; return this; @@ -9032,23 +9032,23 @@ public Builder setReconfigureCloudDatabase( * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - public Builder mergeReconfigureCloudDatabase( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction value) { - if (reconfigureCloudDatabaseBuilder_ == null) { + public Builder mergeChangeQuorumCloudDatabase( + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction value) { + if (changeQuorumCloudDatabaseBuilder_ == null) { if (actionCase_ == 28 && action_ - != com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + != com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction .getDefaultInstance()) { action_ = - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.newBuilder( - (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_) + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_) .mergeFrom(value) .buildPartial(); } else { @@ -9057,9 +9057,9 @@ public Builder mergeReconfigureCloudDatabase( onChanged(); } else { if (actionCase_ == 28) { - reconfigureCloudDatabaseBuilder_.mergeFrom(value); + changeQuorumCloudDatabaseBuilder_.mergeFrom(value); } else { - reconfigureCloudDatabaseBuilder_.setMessage(value); + changeQuorumCloudDatabaseBuilder_.setMessage(value); } } actionCase_ = 28; @@ -9069,15 +9069,15 @@ public Builder mergeReconfigureCloudDatabase( * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - public Builder clearReconfigureCloudDatabase() { - if (reconfigureCloudDatabaseBuilder_ == null) { + public Builder clearChangeQuorumCloudDatabase() { + if (changeQuorumCloudDatabaseBuilder_ == null) { if (actionCase_ == 28) { actionCase_ = 0; action_ = null; @@ -9088,7 +9088,7 @@ public Builder clearReconfigureCloudDatabase() { actionCase_ = 0; action_ = null; } - reconfigureCloudDatabaseBuilder_.clear(); + changeQuorumCloudDatabaseBuilder_.clear(); } return this; } @@ -9096,74 +9096,74 @@ public Builder clearReconfigureCloudDatabase() { * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder - getReconfigureCloudDatabaseBuilder() { - return getReconfigureCloudDatabaseFieldBuilder().getBuilder(); + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder + getChangeQuorumCloudDatabaseBuilder() { + return getChangeQuorumCloudDatabaseFieldBuilder().getBuilder(); } /** * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder - getReconfigureCloudDatabaseOrBuilder() { - if ((actionCase_ == 28) && (reconfigureCloudDatabaseBuilder_ != null)) { - return reconfigureCloudDatabaseBuilder_.getMessageOrBuilder(); + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder + getChangeQuorumCloudDatabaseOrBuilder() { + if ((actionCase_ == 28) && (changeQuorumCloudDatabaseBuilder_ != null)) { + return changeQuorumCloudDatabaseBuilder_.getMessageOrBuilder(); } else { if (actionCase_ == 28) { - return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + return (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_; } - return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } } /** * * *
-     * Action that reconfigures a Cloud Spanner database.
+     * Action that changes quorum of a Cloud Spanner database.
      * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder> - getReconfigureCloudDatabaseFieldBuilder() { - if (reconfigureCloudDatabaseBuilder_ == null) { + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder> + getChangeQuorumCloudDatabaseFieldBuilder() { + if (changeQuorumCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 28)) { action_ = - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } - reconfigureCloudDatabaseBuilder_ = + changeQuorumCloudDatabaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder>( - (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_, getParentForChildren(), isClean()); action_ = null; } actionCase_ = 28; onChanged(); - return reconfigureCloudDatabaseBuilder_; + return changeQuorumCloudDatabaseBuilder_; } @java.lang.Override diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java index 123e08d163..a7279dc6cb 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java @@ -1029,43 +1029,43 @@ public interface AdminActionOrBuilder * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * * - * @return Whether the reconfigureCloudDatabase field is set. + * @return Whether the changeQuorumCloudDatabase field is set. */ - boolean hasReconfigureCloudDatabase(); + boolean hasChangeQuorumCloudDatabase(); /** * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * * - * @return The reconfigureCloudDatabase. + * @return The changeQuorumCloudDatabase. */ - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction getReconfigureCloudDatabase(); + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction getChangeQuorumCloudDatabase(); /** * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* * - * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder - getReconfigureCloudDatabaseOrBuilder(); + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder + getChangeQuorumCloudDatabaseOrBuilder(); com.google.spanner.executor.v1.AdminAction.ActionCase getActionCase(); } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java similarity index 80% rename from proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseAction.java rename to proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java index 74a5837699..88b3c28899 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java @@ -23,23 +23,23 @@ * * *
- * Action that reconfigures a Cloud Spanner database.
+ * Action that changes quorum of a Cloud Spanner database.
  * 
* - * Protobuf type {@code google.spanner.executor.v1.ReconfigureCloudDatabaseAction} + * Protobuf type {@code google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction} */ -public final class ReconfigureCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +public final class ChangeQuorumCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) - ReconfigureCloudDatabaseActionOrBuilder { + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) + ChangeQuorumCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; - // Use ReconfigureCloudDatabaseAction.newBuilder() to construct. - private ReconfigureCloudDatabaseAction( + // Use ChangeQuorumCloudDatabaseAction.newBuilder() to construct. + private ChangeQuorumCloudDatabaseAction( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ReconfigureCloudDatabaseAction() { + private ChangeQuorumCloudDatabaseAction() { databaseUri_ = ""; servingLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @@ -47,22 +47,22 @@ private ReconfigureCloudDatabaseAction() { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReconfigureCloudDatabaseAction(); + return new ChangeQuorumCloudDatabaseAction(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.executor.v1.CloudExecutorProto - .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto - .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable + .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.class, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder.class); + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.class, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder.class); } private int bitField0_; @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The fully qualified uri of the database to be reconfigured.
+   * The fully qualified uri of the database whose quorum has to be changed.
    * 
* * optional string database_uri = 1; @@ -89,7 +89,7 @@ public boolean hasDatabaseUri() { * * *
-   * The fully qualified uri of the database to be reconfigured.
+   * The fully qualified uri of the database whose quorum has to be changed.
    * 
* * optional string database_uri = 1; @@ -112,7 +112,7 @@ public java.lang.String getDatabaseUri() { * * *
-   * The fully qualified uri of the database to be reconfigured.
+   * The fully qualified uri of the database whose quorum has to be changed.
    * 
* * optional string database_uri = 1; @@ -246,11 +246,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction)) { + if (!(obj instanceof com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction)) { return super.equals(obj); } - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction other = - (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) obj; + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction other = + (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) obj; if (hasDatabaseUri() != other.hasDatabaseUri()) return false; if (hasDatabaseUri()) { @@ -281,71 +281,71 @@ public int hashCode() { return hash; } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseDelimitedFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseDelimitedFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -363,7 +363,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction prototype) { + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -381,31 +381,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Action that reconfigures a Cloud Spanner database.
+   * Action that changes quorum of a Cloud Spanner database.
    * 
* - * Protobuf type {@code google.spanner.executor.v1.ReconfigureCloudDatabaseAction} + * Protobuf type {@code google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) - com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.executor.v1.CloudExecutorProto - .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto - .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable + .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.class, - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder.class); + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.class, + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder.class); } - // Construct using com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.newBuilder() + // Construct using com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -424,18 +424,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.spanner.executor.v1.CloudExecutorProto - .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor; } @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction getDefaultInstanceForType() { - return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction build() { - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction result = buildPartial(); + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction build() { + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -443,9 +443,9 @@ public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction build() { } @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction buildPartial() { - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction result = - new com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction(this); + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction result = + new com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -454,7 +454,7 @@ public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction buildPartia } private void buildPartial0( - com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction result) { + com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -503,17 +503,17 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) { - return mergeFrom((com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) other); + if (other instanceof com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction other) { + public Builder mergeFrom(com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction other) { if (other - == com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance()) + == com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance()) return this; if (other.hasDatabaseUri()) { databaseUri_ = other.databaseUri_; @@ -593,7 +593,7 @@ public Builder mergeFrom( * * *
-     * The fully qualified uri of the database to be reconfigured.
+     * The fully qualified uri of the database whose quorum has to be changed.
      * 
* * optional string database_uri = 1; @@ -607,7 +607,7 @@ public boolean hasDatabaseUri() { * * *
-     * The fully qualified uri of the database to be reconfigured.
+     * The fully qualified uri of the database whose quorum has to be changed.
      * 
* * optional string database_uri = 1; @@ -629,7 +629,7 @@ public java.lang.String getDatabaseUri() { * * *
-     * The fully qualified uri of the database to be reconfigured.
+     * The fully qualified uri of the database whose quorum has to be changed.
      * 
* * optional string database_uri = 1; @@ -651,7 +651,7 @@ public com.google.protobuf.ByteString getDatabaseUriBytes() { * * *
-     * The fully qualified uri of the database to be reconfigured.
+     * The fully qualified uri of the database whose quorum has to be changed.
      * 
* * optional string database_uri = 1; @@ -672,7 +672,7 @@ public Builder setDatabaseUri(java.lang.String value) { * * *
-     * The fully qualified uri of the database to be reconfigured.
+     * The fully qualified uri of the database whose quorum has to be changed.
      * 
* * optional string database_uri = 1; @@ -689,7 +689,7 @@ public Builder clearDatabaseUri() { * * *
-     * The fully qualified uri of the database to be reconfigured.
+     * The fully qualified uri of the database whose quorum has to be changed.
      * 
* * optional string database_uri = 1; @@ -893,25 +893,26 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) } - // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) - private static final com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) + private static final com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction(); + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction(); } - public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction getDefaultInstance() { + public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ReconfigureCloudDatabaseAction parsePartialFrom( + public ChangeQuorumCloudDatabaseAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -930,17 +931,18 @@ public ReconfigureCloudDatabaseAction parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction getDefaultInstanceForType() { + public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java similarity index 89% rename from proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseActionOrBuilder.java rename to proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java index 97a1ff2c5e..772e94530b 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java @@ -19,16 +19,16 @@ // Protobuf Java Version: 3.25.2 package com.google.spanner.executor.v1; -public interface ReconfigureCloudDatabaseActionOrBuilder +public interface ChangeQuorumCloudDatabaseActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) com.google.protobuf.MessageOrBuilder { /** * * *
-   * The fully qualified uri of the database to be reconfigured.
+   * The fully qualified uri of the database whose quorum has to be changed.
    * 
* * optional string database_uri = 1; @@ -40,7 +40,7 @@ public interface ReconfigureCloudDatabaseActionOrBuilder * * *
-   * The fully qualified uri of the database to be reconfigured.
+   * The fully qualified uri of the database whose quorum has to be changed.
    * 
* * optional string database_uri = 1; @@ -52,7 +52,7 @@ public interface ReconfigureCloudDatabaseActionOrBuilder * * *
-   * The fully qualified uri of the database to be reconfigured.
+   * The fully qualified uri of the database whose quorum has to be changed.
    * 
* * optional string database_uri = 1; diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java index 67a4167e50..bd615eaeeb 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java @@ -193,9 +193,9 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable; + internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -348,6 +348,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_SpannerOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -375,430 +383,439 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tor.v1.SpannerAction\"r\n\032SpannerAsyncActi" + "onResponse\022\021\n\taction_id\030\001 \001(\005\022A\n\007outcome" + "\030\002 \001(\01320.google.spanner.executor.v1.Span" - + "nerActionOutcome\"\331\t\n\rSpannerAction\022\025\n\rda" - + "tabase_path\030\001 \001(\t\022C\n\005start\030\n \001(\01322.googl" - + "e.spanner.executor.v1.StartTransactionAc" - + "tionH\000\022E\n\006finish\030\013 \001(\01323.google.spanner." - + "executor.v1.FinishTransactionActionH\000\0226\n" - + "\004read\030\024 \001(\0132&.google.spanner.executor.v1" - + ".ReadActionH\000\0228\n\005query\030\025 \001(\0132\'.google.sp" - + "anner.executor.v1.QueryActionH\000\022>\n\010mutat" - + "ion\030\026 \001(\0132*.google.spanner.executor.v1.M" - + "utationActionH\000\0224\n\003dml\030\027 \001(\0132%.google.sp" - + "anner.executor.v1.DmlActionH\000\022?\n\tbatch_d" - + "ml\030\030 \001(\0132*.google.spanner.executor.v1.Ba" - + "tchDmlActionH\000\022A\n\005write\030\031 \001(\01320.google.s" - + "panner.executor.v1.WriteMutationsActionH" - + "\000\022Q\n\022partitioned_update\030\033 \001(\01323.google.s" - + "panner.executor.v1.PartitionedUpdateActi" - + "onH\000\0228\n\005admin\030\036 \001(\0132\'.google.spanner.exe" - + "cutor.v1.AdminActionH\000\022R\n\017start_batch_tx" - + "n\030( \001(\01327.google.spanner.executor.v1.Sta" - + "rtBatchTransactionActionH\000\022R\n\017close_batc" - + "h_txn\030) \001(\01327.google.spanner.executor.v1" - + ".CloseBatchTransactionActionH\000\022d\n\033genera" - + "te_db_partitions_read\030* \001(\0132=.google.spa" - + "nner.executor.v1.GenerateDbPartitionsFor" - + "ReadActionH\000\022f\n\034generate_db_partitions_q" - + "uery\030+ \001(\0132>.google.spanner.executor.v1." - + "GenerateDbPartitionsForQueryActionH\000\022O\n\021" - + "execute_partition\030, \001(\01322.google.spanner" - + ".executor.v1.ExecutePartitionActionH\000\022[\n" - + "\033execute_change_stream_query\0302 \001(\01324.goo" - + "gle.spanner.executor.v1.ExecuteChangeStr" - + "eamQueryH\000B\010\n\006action\"\212\001\n\nReadAction\022\r\n\005t" - + "able\030\001 \001(\t\022\022\n\005index\030\002 \001(\tH\000\210\001\001\022\016\n\006column" - + "\030\003 \003(\t\0220\n\004keys\030\004 \001(\0132\".google.spanner.ex" - + "ecutor.v1.KeySet\022\r\n\005limit\030\005 \001(\005B\010\n\006_inde" - + "x\"\321\001\n\013QueryAction\022\013\n\003sql\030\001 \001(\t\022A\n\006params" - + "\030\002 \003(\01321.google.spanner.executor.v1.Quer" - + "yAction.Parameter\032r\n\tParameter\022\014\n\004name\030\001" - + " \001(\t\022%\n\004type\030\002 \001(\0132\027.google.spanner.v1.T" - + "ype\0220\n\005value\030\003 \001(\0132!.google.spanner.exec" - + "utor.v1.Value\"\206\001\n\tDmlAction\0227\n\006update\030\001 " - + "\001(\0132\'.google.spanner.executor.v1.QueryAc" - + "tion\022$\n\027autocommit_if_supported\030\002 \001(\010H\000\210" - + "\001\001B\032\n\030_autocommit_if_supported\"J\n\016BatchD" - + "mlAction\0228\n\007updates\030\001 \003(\0132\'.google.spann" - + "er.executor.v1.QueryAction\"\311\003\n\005Value\022\021\n\007" - + "is_null\030\001 \001(\010H\000\022\023\n\tint_value\030\002 \001(\003H\000\022\024\n\n" - + "bool_value\030\003 \001(\010H\000\022\026\n\014double_value\030\004 \001(\001" - + "H\000\022\025\n\013bytes_value\030\005 \001(\014H\000\022\026\n\014string_valu" - + "e\030\006 \001(\tH\000\022=\n\014struct_value\030\007 \001(\0132%.google" - + ".spanner.executor.v1.ValueListH\000\0225\n\017time" - + "stamp_value\030\010 \001(\0132\032.google.protobuf.Time" - + "stampH\000\022\031\n\017date_days_value\030\t \001(\005H\000\022\035\n\023is" - + "_commit_timestamp\030\n \001(\010H\000\022<\n\013array_value" - + "\030\013 \001(\0132%.google.spanner.executor.v1.Valu" - + "eListH\000\0220\n\narray_type\030\014 \001(\0132\027.google.spa" - + "nner.v1.TypeH\001\210\001\001B\014\n\nvalue_typeB\r\n\013_arra" - + "y_type\"\237\002\n\010KeyRange\0224\n\005start\030\001 \001(\0132%.goo" - + "gle.spanner.executor.v1.ValueList\0224\n\005lim" - + "it\030\002 \001(\0132%.google.spanner.executor.v1.Va" - + "lueList\022<\n\004type\030\003 \001(\0162).google.spanner.e" - + "xecutor.v1.KeyRange.TypeH\000\210\001\001\"`\n\004Type\022\024\n" - + "\020TYPE_UNSPECIFIED\020\000\022\021\n\rCLOSED_CLOSED\020\001\022\017" - + "\n\013CLOSED_OPEN\020\002\022\017\n\013OPEN_CLOSED\020\003\022\r\n\tOPEN" - + "_OPEN\020\004B\007\n\005_type\"\200\001\n\006KeySet\0224\n\005point\030\001 \003" - + "(\0132%.google.spanner.executor.v1.ValueLis" - + "t\0223\n\005range\030\002 \003(\0132$.google.spanner.execut" - + "or.v1.KeyRange\022\013\n\003all\030\003 \001(\010\"=\n\tValueList" - + "\0220\n\005value\030\001 \003(\0132!.google.spanner.executo" - + "r.v1.Value\"\274\005\n\016MutationAction\022;\n\003mod\030\001 \003" - + "(\0132..google.spanner.executor.v1.Mutation" - + "Action.Mod\032z\n\nInsertArgs\022\016\n\006column\030\001 \003(\t" - + "\022%\n\004type\030\002 \003(\0132\027.google.spanner.v1.Type\022" - + "5\n\006values\030\003 \003(\0132%.google.spanner.executo" - + "r.v1.ValueList\032z\n\nUpdateArgs\022\016\n\006column\030\001" - + " \003(\t\022%\n\004type\030\002 \003(\0132\027.google.spanner.v1.T" - + "ype\0225\n\006values\030\003 \003(\0132%.google.spanner.exe" - + "cutor.v1.ValueList\032\364\002\n\003Mod\022\r\n\005table\030\001 \001(" - + "\t\022E\n\006insert\030\002 \001(\01325.google.spanner.execu" - + "tor.v1.MutationAction.InsertArgs\022E\n\006upda" - + "te\030\003 \001(\01325.google.spanner.executor.v1.Mu" - + "tationAction.UpdateArgs\022O\n\020insert_or_upd" - + "ate\030\004 \001(\01325.google.spanner.executor.v1.M" - + "utationAction.InsertArgs\022F\n\007replace\030\005 \001(" - + "\01325.google.spanner.executor.v1.MutationA" - + "ction.InsertArgs\0227\n\013delete_keys\030\006 \001(\0132\"." - + "google.spanner.executor.v1.KeySet\"T\n\024Wri" - + "teMutationsAction\022<\n\010mutation\030\001 \001(\0132*.go" - + "ogle.spanner.executor.v1.MutationAction\"" - + "\337\002\n\027PartitionedUpdateAction\022i\n\007options\030\001" - + " \001(\0132S.google.spanner.executor.v1.Partit" - + "ionedUpdateAction.ExecutePartitionedUpda" - + "teOptionsH\000\210\001\001\0227\n\006update\030\002 \001(\0132\'.google." - + "spanner.executor.v1.QueryAction\032\223\001\n\037Exec" - + "utePartitionedUpdateOptions\022E\n\014rpc_prior" - + "ity\030\001 \001(\0162*.google.spanner.v1.RequestOpt" - + "ions.PriorityH\000\210\001\001\022\020\n\003tag\030\002 \001(\tH\001\210\001\001B\017\n\r" - + "_rpc_priorityB\006\n\004_tagB\n\n\010_options\"\256\002\n\026St" - + "artTransactionAction\022A\n\013concurrency\030\001 \001(" - + "\0132\'.google.spanner.executor.v1.Concurren" - + "cyH\000\210\001\001\0228\n\005table\030\002 \003(\0132).google.spanner." - + "executor.v1.TableMetadata\022\030\n\020transaction" - + "_seed\030\003 \001(\t\022W\n\021execution_options\030\004 \001(\01327" - + ".google.spanner.executor.v1.TransactionE" - + "xecutionOptionsH\001\210\001\001B\016\n\014_concurrencyB\024\n\022" - + "_execution_options\"\256\002\n\013Concurrency\022\033\n\021st" - + "aleness_seconds\030\001 \001(\001H\000\022#\n\031min_read_time" - + "stamp_micros\030\002 \001(\003H\000\022\037\n\025max_staleness_se" - + "conds\030\003 \001(\001H\000\022 \n\026exact_timestamp_micros\030" - + "\004 \001(\003H\000\022\020\n\006strong\030\005 \001(\010H\000\022\017\n\005batch\030\006 \001(\010" - + "H\000\022\033\n\023snapshot_epoch_read\030\007 \001(\010\022!\n\031snaps" - + "hot_epoch_root_table\030\010 \001(\t\022#\n\033batch_read" - + "_timestamp_micros\030\t \001(\003B\022\n\020concurrency_m" - + "ode\"\231\001\n\rTableMetadata\022\014\n\004name\030\001 \001(\t\022:\n\006c" - + "olumn\030\002 \003(\0132*.google.spanner.executor.v1" - + ".ColumnMetadata\022>\n\nkey_column\030\003 \003(\0132*.go" - + "ogle.spanner.executor.v1.ColumnMetadata\"" - + "E\n\016ColumnMetadata\022\014\n\004name\030\001 \001(\t\022%\n\004type\030" - + "\002 \001(\0132\027.google.spanner.v1.Type\"1\n\033Transa" - + "ctionExecutionOptions\022\022\n\noptimistic\030\001 \001(" - + "\010\"\230\001\n\027FinishTransactionAction\022F\n\004mode\030\001 " - + "\001(\01628.google.spanner.executor.v1.FinishT" - + "ransactionAction.Mode\"5\n\004Mode\022\024\n\020MODE_UN" - + "SPECIFIED\020\000\022\n\n\006COMMIT\020\001\022\013\n\007ABANDON\020\002\"\305\023\n" - + "\013AdminAction\022a\n\033create_user_instance_con" - + "fig\030\001 \001(\0132:.google.spanner.executor.v1.C" - + "reateUserInstanceConfigActionH\000\022a\n\033updat" - + "e_user_instance_config\030\002 \001(\0132:.google.sp" - + "anner.executor.v1.UpdateUserInstanceConf" - + "igActionH\000\022a\n\033delete_user_instance_confi" - + "g\030\003 \001(\0132:.google.spanner.executor.v1.Del" - + "eteUserInstanceConfigActionH\000\022]\n\031get_clo" - + "ud_instance_config\030\004 \001(\01328.google.spanne" - + "r.executor.v1.GetCloudInstanceConfigActi" - + "onH\000\022[\n\025list_instance_configs\030\005 \001(\0132:.go" - + "ogle.spanner.executor.v1.ListCloudInstan" - + "ceConfigsActionH\000\022V\n\025create_cloud_instan" - + "ce\030\006 \001(\01325.google.spanner.executor.v1.Cr" - + "eateCloudInstanceActionH\000\022V\n\025update_clou" - + "d_instance\030\007 \001(\01325.google.spanner.execut" - + "or.v1.UpdateCloudInstanceActionH\000\022V\n\025del" - + "ete_cloud_instance\030\010 \001(\01325.google.spanne" - + "r.executor.v1.DeleteCloudInstanceActionH" - + "\000\022T\n\024list_cloud_instances\030\t \001(\01324.google" - + ".spanner.executor.v1.ListCloudInstancesA" - + "ctionH\000\022P\n\022get_cloud_instance\030\n \001(\01322.go" - + "ogle.spanner.executor.v1.GetCloudInstanc" - + "eActionH\000\022V\n\025create_cloud_database\030\013 \001(\013" - + "25.google.spanner.executor.v1.CreateClou" - + "dDatabaseActionH\000\022]\n\031update_cloud_databa" - + "se_ddl\030\014 \001(\01328.google.spanner.executor.v" - + "1.UpdateCloudDatabaseDdlActionH\000\022V\n\025upda" - + "te_cloud_database\030\033 \001(\01325.google.spanner" - + ".executor.v1.UpdateCloudDatabaseActionH\000" - + "\022R\n\023drop_cloud_database\030\r \001(\01323.google.s" - + "panner.executor.v1.DropCloudDatabaseActi" - + "onH\000\022T\n\024list_cloud_databases\030\016 \001(\01324.goo" - + "gle.spanner.executor.v1.ListCloudDatabas" - + "esActionH\000\022g\n\036list_cloud_database_operat" - + "ions\030\017 \001(\0132=.google.spanner.executor.v1." - + "ListCloudDatabaseOperationsActionH\000\022X\n\026r" - + "estore_cloud_database\030\020 \001(\01326.google.spa" - + "nner.executor.v1.RestoreCloudDatabaseAct" - + "ionH\000\022P\n\022get_cloud_database\030\021 \001(\01322.goog" - + "le.spanner.executor.v1.GetCloudDatabaseA" - + "ctionH\000\022R\n\023create_cloud_backup\030\022 \001(\01323.g" - + "oogle.spanner.executor.v1.CreateCloudBac" - + "kupActionH\000\022N\n\021copy_cloud_backup\030\023 \001(\01321" - + ".google.spanner.executor.v1.CopyCloudBac" - + "kupActionH\000\022L\n\020get_cloud_backup\030\024 \001(\01320." - + "google.spanner.executor.v1.GetCloudBacku" - + "pActionH\000\022R\n\023update_cloud_backup\030\025 \001(\01323" - + ".google.spanner.executor.v1.UpdateCloudB" - + "ackupActionH\000\022R\n\023delete_cloud_backup\030\026 \001" - + "(\01323.google.spanner.executor.v1.DeleteCl" - + "oudBackupActionH\000\022P\n\022list_cloud_backups\030" - + "\027 \001(\01322.google.spanner.executor.v1.ListC" - + "loudBackupsActionH\000\022c\n\034list_cloud_backup" - + "_operations\030\030 \001(\0132;.google.spanner.execu" - + "tor.v1.ListCloudBackupOperationsActionH\000" - + "\022G\n\rget_operation\030\031 \001(\0132..google.spanner" - + ".executor.v1.GetOperationActionH\000\022M\n\020can" - + "cel_operation\030\032 \001(\01321.google.spanner.exe" - + "cutor.v1.CancelOperationActionH\000\022`\n\032reco" - + "nfigure_cloud_database\030\034 \001(\0132:.google.sp" - + "anner.executor.v1.ReconfigureCloudDataba" - + "seActionH\000B\010\n\006action\"\245\001\n\036CreateUserInsta" + + "nerActionOutcome\"\236\n\n\rSpannerAction\022\025\n\rda" + + "tabase_path\030\001 \001(\t\022C\n\017spanner_options\030\002 \001" + + "(\0132*.google.spanner.executor.v1.SpannerO" + + "ptions\022C\n\005start\030\n \001(\01322.google.spanner.e" + + "xecutor.v1.StartTransactionActionH\000\022E\n\006f" + + "inish\030\013 \001(\01323.google.spanner.executor.v1" + + ".FinishTransactionActionH\000\0226\n\004read\030\024 \001(\013" + + "2&.google.spanner.executor.v1.ReadAction" + + "H\000\0228\n\005query\030\025 \001(\0132\'.google.spanner.execu" + + "tor.v1.QueryActionH\000\022>\n\010mutation\030\026 \001(\0132*" + + ".google.spanner.executor.v1.MutationActi" + + "onH\000\0224\n\003dml\030\027 \001(\0132%.google.spanner.execu" + + "tor.v1.DmlActionH\000\022?\n\tbatch_dml\030\030 \001(\0132*." + + "google.spanner.executor.v1.BatchDmlActio" + + "nH\000\022A\n\005write\030\031 \001(\01320.google.spanner.exec" + + "utor.v1.WriteMutationsActionH\000\022Q\n\022partit" + + "ioned_update\030\033 \001(\01323.google.spanner.exec" + + "utor.v1.PartitionedUpdateActionH\000\0228\n\005adm" + + "in\030\036 \001(\0132\'.google.spanner.executor.v1.Ad" + + "minActionH\000\022R\n\017start_batch_txn\030( \001(\01327.g" + + "oogle.spanner.executor.v1.StartBatchTran" + + "sactionActionH\000\022R\n\017close_batch_txn\030) \001(\013" + + "27.google.spanner.executor.v1.CloseBatch" + + "TransactionActionH\000\022d\n\033generate_db_parti" + + "tions_read\030* \001(\0132=.google.spanner.execut" + + "or.v1.GenerateDbPartitionsForReadActionH" + + "\000\022f\n\034generate_db_partitions_query\030+ \001(\0132" + + ">.google.spanner.executor.v1.GenerateDbP" + + "artitionsForQueryActionH\000\022O\n\021execute_par" + + "tition\030, \001(\01322.google.spanner.executor.v" + + "1.ExecutePartitionActionH\000\022[\n\033execute_ch" + + "ange_stream_query\0302 \001(\01324.google.spanner" + + ".executor.v1.ExecuteChangeStreamQueryH\000B" + + "\010\n\006action\"\212\001\n\nReadAction\022\r\n\005table\030\001 \001(\t\022" + + "\022\n\005index\030\002 \001(\tH\000\210\001\001\022\016\n\006column\030\003 \003(\t\0220\n\004k" + + "eys\030\004 \001(\0132\".google.spanner.executor.v1.K" + + "eySet\022\r\n\005limit\030\005 \001(\005B\010\n\006_index\"\321\001\n\013Query" + + "Action\022\013\n\003sql\030\001 \001(\t\022A\n\006params\030\002 \003(\01321.go" + + "ogle.spanner.executor.v1.QueryAction.Par" + + "ameter\032r\n\tParameter\022\014\n\004name\030\001 \001(\t\022%\n\004typ" + + "e\030\002 \001(\0132\027.google.spanner.v1.Type\0220\n\005valu" + + "e\030\003 \001(\0132!.google.spanner.executor.v1.Val" + + "ue\"\206\001\n\tDmlAction\0227\n\006update\030\001 \001(\0132\'.googl" + + "e.spanner.executor.v1.QueryAction\022$\n\027aut" + + "ocommit_if_supported\030\002 \001(\010H\000\210\001\001B\032\n\030_auto" + + "commit_if_supported\"J\n\016BatchDmlAction\0228\n" + + "\007updates\030\001 \003(\0132\'.google.spanner.executor" + + ".v1.QueryAction\"\311\003\n\005Value\022\021\n\007is_null\030\001 \001" + + "(\010H\000\022\023\n\tint_value\030\002 \001(\003H\000\022\024\n\nbool_value\030" + + "\003 \001(\010H\000\022\026\n\014double_value\030\004 \001(\001H\000\022\025\n\013bytes" + + "_value\030\005 \001(\014H\000\022\026\n\014string_value\030\006 \001(\tH\000\022=" + + "\n\014struct_value\030\007 \001(\0132%.google.spanner.ex" + + "ecutor.v1.ValueListH\000\0225\n\017timestamp_value" + + "\030\010 \001(\0132\032.google.protobuf.TimestampH\000\022\031\n\017" + + "date_days_value\030\t \001(\005H\000\022\035\n\023is_commit_tim" + + "estamp\030\n \001(\010H\000\022<\n\013array_value\030\013 \001(\0132%.go" + + "ogle.spanner.executor.v1.ValueListH\000\0220\n\n" + + "array_type\030\014 \001(\0132\027.google.spanner.v1.Typ" + + "eH\001\210\001\001B\014\n\nvalue_typeB\r\n\013_array_type\"\237\002\n\010" + + "KeyRange\0224\n\005start\030\001 \001(\0132%.google.spanner" + + ".executor.v1.ValueList\0224\n\005limit\030\002 \001(\0132%." + + "google.spanner.executor.v1.ValueList\022<\n\004" + + "type\030\003 \001(\0162).google.spanner.executor.v1." + + "KeyRange.TypeH\000\210\001\001\"`\n\004Type\022\024\n\020TYPE_UNSPE" + + "CIFIED\020\000\022\021\n\rCLOSED_CLOSED\020\001\022\017\n\013CLOSED_OP" + + "EN\020\002\022\017\n\013OPEN_CLOSED\020\003\022\r\n\tOPEN_OPEN\020\004B\007\n\005" + + "_type\"\200\001\n\006KeySet\0224\n\005point\030\001 \003(\0132%.google" + + ".spanner.executor.v1.ValueList\0223\n\005range\030" + + "\002 \003(\0132$.google.spanner.executor.v1.KeyRa" + + "nge\022\013\n\003all\030\003 \001(\010\"=\n\tValueList\0220\n\005value\030\001" + + " \003(\0132!.google.spanner.executor.v1.Value\"" + + "\274\005\n\016MutationAction\022;\n\003mod\030\001 \003(\0132..google" + + ".spanner.executor.v1.MutationAction.Mod\032" + + "z\n\nInsertArgs\022\016\n\006column\030\001 \003(\t\022%\n\004type\030\002 " + + "\003(\0132\027.google.spanner.v1.Type\0225\n\006values\030\003" + + " \003(\0132%.google.spanner.executor.v1.ValueL" + + "ist\032z\n\nUpdateArgs\022\016\n\006column\030\001 \003(\t\022%\n\004typ" + + "e\030\002 \003(\0132\027.google.spanner.v1.Type\0225\n\006valu" + + "es\030\003 \003(\0132%.google.spanner.executor.v1.Va" + + "lueList\032\364\002\n\003Mod\022\r\n\005table\030\001 \001(\t\022E\n\006insert" + + "\030\002 \001(\01325.google.spanner.executor.v1.Muta" + + "tionAction.InsertArgs\022E\n\006update\030\003 \001(\01325." + + "google.spanner.executor.v1.MutationActio" + + "n.UpdateArgs\022O\n\020insert_or_update\030\004 \001(\01325" + + ".google.spanner.executor.v1.MutationActi" + + "on.InsertArgs\022F\n\007replace\030\005 \001(\01325.google." + + "spanner.executor.v1.MutationAction.Inser" + + "tArgs\0227\n\013delete_keys\030\006 \001(\0132\".google.span" + + "ner.executor.v1.KeySet\"T\n\024WriteMutations" + + "Action\022<\n\010mutation\030\001 \001(\0132*.google.spanne" + + "r.executor.v1.MutationAction\"\337\002\n\027Partiti" + + "onedUpdateAction\022i\n\007options\030\001 \001(\0132S.goog" + + "le.spanner.executor.v1.PartitionedUpdate" + + "Action.ExecutePartitionedUpdateOptionsH\000" + + "\210\001\001\0227\n\006update\030\002 \001(\0132\'.google.spanner.exe" + + "cutor.v1.QueryAction\032\223\001\n\037ExecutePartitio" + + "nedUpdateOptions\022E\n\014rpc_priority\030\001 \001(\0162*" + + ".google.spanner.v1.RequestOptions.Priori" + + "tyH\000\210\001\001\022\020\n\003tag\030\002 \001(\tH\001\210\001\001B\017\n\r_rpc_priori" + + "tyB\006\n\004_tagB\n\n\010_options\"\256\002\n\026StartTransact" + + "ionAction\022A\n\013concurrency\030\001 \001(\0132\'.google." + + "spanner.executor.v1.ConcurrencyH\000\210\001\001\0228\n\005" + + "table\030\002 \003(\0132).google.spanner.executor.v1" + + ".TableMetadata\022\030\n\020transaction_seed\030\003 \001(\t" + + "\022W\n\021execution_options\030\004 \001(\01327.google.spa" + + "nner.executor.v1.TransactionExecutionOpt" + + "ionsH\001\210\001\001B\016\n\014_concurrencyB\024\n\022_execution_" + + "options\"\256\002\n\013Concurrency\022\033\n\021staleness_sec" + + "onds\030\001 \001(\001H\000\022#\n\031min_read_timestamp_micro" + + "s\030\002 \001(\003H\000\022\037\n\025max_staleness_seconds\030\003 \001(\001" + + "H\000\022 \n\026exact_timestamp_micros\030\004 \001(\003H\000\022\020\n\006" + + "strong\030\005 \001(\010H\000\022\017\n\005batch\030\006 \001(\010H\000\022\033\n\023snaps" + + "hot_epoch_read\030\007 \001(\010\022!\n\031snapshot_epoch_r" + + "oot_table\030\010 \001(\t\022#\n\033batch_read_timestamp_" + + "micros\030\t \001(\003B\022\n\020concurrency_mode\"\231\001\n\rTab" + + "leMetadata\022\014\n\004name\030\001 \001(\t\022:\n\006column\030\002 \003(\013" + + "2*.google.spanner.executor.v1.ColumnMeta" + + "data\022>\n\nkey_column\030\003 \003(\0132*.google.spanne" + + "r.executor.v1.ColumnMetadata\"E\n\016ColumnMe" + + "tadata\022\014\n\004name\030\001 \001(\t\022%\n\004type\030\002 \001(\0132\027.goo" + + "gle.spanner.v1.Type\"1\n\033TransactionExecut" + + "ionOptions\022\022\n\noptimistic\030\001 \001(\010\"\230\001\n\027Finis" + + "hTransactionAction\022F\n\004mode\030\001 \001(\01628.googl" + + "e.spanner.executor.v1.FinishTransactionA" + + "ction.Mode\"5\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000" + + "\022\n\n\006COMMIT\020\001\022\013\n\007ABANDON\020\002\"\310\023\n\013AdminActio" + + "n\022a\n\033create_user_instance_config\030\001 \001(\0132:" + + ".google.spanner.executor.v1.CreateUserIn" + + "stanceConfigActionH\000\022a\n\033update_user_inst" + + "ance_config\030\002 \001(\0132:.google.spanner.execu" + + "tor.v1.UpdateUserInstanceConfigActionH\000\022" + + "a\n\033delete_user_instance_config\030\003 \001(\0132:.g" + + "oogle.spanner.executor.v1.DeleteUserInst" + + "anceConfigActionH\000\022]\n\031get_cloud_instance" + + "_config\030\004 \001(\01328.google.spanner.executor." + + "v1.GetCloudInstanceConfigActionH\000\022[\n\025lis" + + "t_instance_configs\030\005 \001(\0132:.google.spanne" + + "r.executor.v1.ListCloudInstanceConfigsAc" + + "tionH\000\022V\n\025create_cloud_instance\030\006 \001(\01325." + + "google.spanner.executor.v1.CreateCloudIn" + + "stanceActionH\000\022V\n\025update_cloud_instance\030" + + "\007 \001(\01325.google.spanner.executor.v1.Updat" + + "eCloudInstanceActionH\000\022V\n\025delete_cloud_i" + + "nstance\030\010 \001(\01325.google.spanner.executor." + + "v1.DeleteCloudInstanceActionH\000\022T\n\024list_c" + + "loud_instances\030\t \001(\01324.google.spanner.ex" + + "ecutor.v1.ListCloudInstancesActionH\000\022P\n\022" + + "get_cloud_instance\030\n \001(\01322.google.spanne" + + "r.executor.v1.GetCloudInstanceActionH\000\022V" + + "\n\025create_cloud_database\030\013 \001(\01325.google.s" + + "panner.executor.v1.CreateCloudDatabaseAc" + + "tionH\000\022]\n\031update_cloud_database_ddl\030\014 \001(" + + "\01328.google.spanner.executor.v1.UpdateClo" + + "udDatabaseDdlActionH\000\022V\n\025update_cloud_da" + + "tabase\030\033 \001(\01325.google.spanner.executor.v" + + "1.UpdateCloudDatabaseActionH\000\022R\n\023drop_cl" + + "oud_database\030\r \001(\01323.google.spanner.exec" + + "utor.v1.DropCloudDatabaseActionH\000\022T\n\024lis" + + "t_cloud_databases\030\016 \001(\01324.google.spanner" + + ".executor.v1.ListCloudDatabasesActionH\000\022" + + "g\n\036list_cloud_database_operations\030\017 \001(\0132" + + "=.google.spanner.executor.v1.ListCloudDa" + + "tabaseOperationsActionH\000\022X\n\026restore_clou" + + "d_database\030\020 \001(\01326.google.spanner.execut" + + "or.v1.RestoreCloudDatabaseActionH\000\022P\n\022ge" + + "t_cloud_database\030\021 \001(\01322.google.spanner." + + "executor.v1.GetCloudDatabaseActionH\000\022R\n\023" + + "create_cloud_backup\030\022 \001(\01323.google.spann" + + "er.executor.v1.CreateCloudBackupActionH\000" + + "\022N\n\021copy_cloud_backup\030\023 \001(\01321.google.spa" + + "nner.executor.v1.CopyCloudBackupActionH\000" + + "\022L\n\020get_cloud_backup\030\024 \001(\01320.google.span" + + "ner.executor.v1.GetCloudBackupActionH\000\022R" + + "\n\023update_cloud_backup\030\025 \001(\01323.google.spa" + + "nner.executor.v1.UpdateCloudBackupAction" + + "H\000\022R\n\023delete_cloud_backup\030\026 \001(\01323.google" + + ".spanner.executor.v1.DeleteCloudBackupAc" + + "tionH\000\022P\n\022list_cloud_backups\030\027 \001(\01322.goo" + + "gle.spanner.executor.v1.ListCloudBackups" + + "ActionH\000\022c\n\034list_cloud_backup_operations" + + "\030\030 \001(\0132;.google.spanner.executor.v1.List" + + "CloudBackupOperationsActionH\000\022G\n\rget_ope" + + "ration\030\031 \001(\0132..google.spanner.executor.v" + + "1.GetOperationActionH\000\022M\n\020cancel_operati" + + "on\030\032 \001(\01321.google.spanner.executor.v1.Ca" + + "ncelOperationActionH\000\022c\n\034change_quorum_c" + + "loud_database\030\034 \001(\0132;.google.spanner.exe" + + "cutor.v1.ChangeQuorumCloudDatabaseAction" + + "H\000B\010\n\006action\"\245\001\n\036CreateUserInstanceConfi" + + "gAction\022\026\n\016user_config_id\030\001 \001(\t\022\022\n\nproje" + + "ct_id\030\002 \001(\t\022\026\n\016base_config_id\030\003 \001(\t\022?\n\010r" + + "eplicas\030\004 \003(\0132-.google.spanner.admin.ins" + + "tance.v1.ReplicaInfo\"\377\001\n\036UpdateUserInsta" + "nceConfigAction\022\026\n\016user_config_id\030\001 \001(\t\022" - + "\022\n\nproject_id\030\002 \001(\t\022\026\n\016base_config_id\030\003 " - + "\001(\t\022?\n\010replicas\030\004 \003(\0132-.google.spanner.a" - + "dmin.instance.v1.ReplicaInfo\"\377\001\n\036UpdateU" - + "serInstanceConfigAction\022\026\n\016user_config_i" - + "d\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\031\n\014display_n" - + "ame\030\003 \001(\tH\000\210\001\001\022V\n\006labels\030\004 \003(\0132F.google." - + "spanner.executor.v1.UpdateUserInstanceCo" - + "nfigAction.LabelsEntry\032-\n\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\r_displa" - + "y_name\"N\n\034GetCloudInstanceConfigAction\022\032" - + "\n\022instance_config_id\030\001 \001(\t\022\022\n\nproject_id" - + "\030\002 \001(\t\"L\n\036DeleteUserInstanceConfigAction" - + "\022\026\n\016user_config_id\030\001 \001(\t\022\022\n\nproject_id\030\002" - + " \001(\t\"\202\001\n\036ListCloudInstanceConfigsAction\022" - + "\022\n\nproject_id\030\001 \001(\t\022\026\n\tpage_size\030\002 \001(\005H\000" - + "\210\001\001\022\027\n\npage_token\030\003 \001(\tH\001\210\001\001B\014\n\n_page_si" - + "zeB\r\n\013_page_token\"\253\003\n\031CreateCloudInstanc" - + "eAction\022\023\n\013instance_id\030\001 \001(\t\022\022\n\nproject_" - + "id\030\002 \001(\t\022\032\n\022instance_config_id\030\003 \001(\t\022\027\n\n" - + "node_count\030\004 \001(\005H\000\210\001\001\022\035\n\020processing_unit" - + "s\030\006 \001(\005H\001\210\001\001\022T\n\022autoscaling_config\030\007 \001(\013" - + "23.google.spanner.admin.instance.v1.Auto" - + "scalingConfigH\002\210\001\001\022Q\n\006labels\030\005 \003(\0132A.goo" - + "gle.spanner.executor.v1.CreateCloudInsta" - + "nceAction.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\r\n\013_node_co" - + "untB\023\n\021_processing_unitsB\025\n\023_autoscaling" - + "_config\"\273\003\n\031UpdateCloudInstanceAction\022\023\n" - + "\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\031" - + "\n\014display_name\030\003 \001(\tH\000\210\001\001\022\027\n\nnode_count\030" - + "\004 \001(\005H\001\210\001\001\022\035\n\020processing_units\030\005 \001(\005H\002\210\001" - + "\001\022T\n\022autoscaling_config\030\007 \001(\01323.google.s" - + "panner.admin.instance.v1.AutoscalingConf" - + "igH\003\210\001\001\022Q\n\006labels\030\006 \003(\0132A.google.spanner" - + ".executor.v1.UpdateCloudInstanceAction.L" - + "abelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001B\017\n\r_display_nameB\r\n\013_n" - + "ode_countB\023\n\021_processing_unitsB\025\n\023_autos" - + "caling_config\"D\n\031DeleteCloudInstanceActi" - + "on\022\023\n\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 " - + "\001(\t\"\227\002\n\031CreateCloudDatabaseAction\022\023\n\013ins" - + "tance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013da" - + "tabase_id\030\003 \001(\t\022\025\n\rsdl_statement\030\004 \003(\t\022M" - + "\n\021encryption_config\030\005 \001(\01322.google.spann" - + "er.admin.database.v1.EncryptionConfig\022\024\n" - + "\007dialect\030\006 \001(\tH\000\210\001\001\022\036\n\021proto_descriptors" - + "\030\007 \001(\014H\001\210\001\001B\n\n\010_dialectB\024\n\022_proto_descri" - + "ptors\"\277\001\n\034UpdateCloudDatabaseDdlAction\022\023" - + "\n\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022" - + "\023\n\013database_id\030\003 \001(\t\022\025\n\rsdl_statement\030\004 " - + "\003(\t\022\024\n\014operation_id\030\005 \001(\t\022\036\n\021proto_descr" - + "iptors\030\006 \001(\014H\000\210\001\001B\024\n\022_proto_descriptors\"" - + "{\n\031UpdateCloudDatabaseAction\022\023\n\013instance" - + "_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\025\n\rdatabas" - + "e_name\030\003 \001(\t\022\036\n\026enable_drop_protection\030\004" - + " \001(\010\"W\n\027DropCloudDatabaseAction\022\023\n\013insta" - + "nce_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013data" - + "base_id\030\003 \001(\t\"g\n\036ReconfigureCloudDatabas" - + "eAction\022\031\n\014database_uri\030\001 \001(\tH\000\210\001\001\022\031\n\021se" - + "rving_locations\030\002 \003(\tB\017\n\r_database_uri\"j" - + "\n\030ListCloudDatabasesAction\022\022\n\nproject_id" - + "\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021\n\tpage_size" - + "\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"\234\001\n\030ListCloud" - + "InstancesAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\006f" - + "ilter\030\002 \001(\tH\000\210\001\001\022\026\n\tpage_size\030\003 \001(\005H\001\210\001\001" - + "\022\027\n\npage_token\030\004 \001(\tH\002\210\001\001B\t\n\007_filterB\014\n\n" - + "_page_sizeB\r\n\013_page_token\"A\n\026GetCloudIns" - + "tanceAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013insta" - + "nce_id\030\002 \001(\t\"\203\001\n!ListCloudDatabaseOperat" - + "ionsAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instan" - + "ce_id\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size" - + "\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"\222\001\n\032RestoreCl" - + "oudDatabaseAction\022\022\n\nproject_id\030\001 \001(\t\022\032\n" - + "\022backup_instance_id\030\002 \001(\t\022\021\n\tbackup_id\030\003" - + " \001(\t\022\034\n\024database_instance_id\030\004 \001(\t\022\023\n\013da" - + "tabase_id\030\005 \001(\t\"V\n\026GetCloudDatabaseActio" - + "n\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001" - + "(\t\022\023\n\013database_id\030\003 \001(\t\"\350\001\n\027CreateCloudB" - + "ackupAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013insta" - + "nce_id\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\022\023\n\013datab" - + "ase_id\030\004 \001(\t\0224\n\013expire_time\030\005 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\0225\n\014version_ti" - + "me\030\006 \001(\0132\032.google.protobuf.TimestampH\000\210\001" - + "\001B\017\n\r_version_time\"\240\001\n\025CopyCloudBackupAc" + + "\022\n\nproject_id\030\002 \001(\t\022\031\n\014display_name\030\003 \001(" + + "\tH\000\210\001\001\022V\n\006labels\030\004 \003(\0132F.google.spanner." + + "executor.v1.UpdateUserInstanceConfigActi" + + "on.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\r_display_name\"N" + + "\n\034GetCloudInstanceConfigAction\022\032\n\022instan" + + "ce_config_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\"L" + + "\n\036DeleteUserInstanceConfigAction\022\026\n\016user" + + "_config_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\"\202\001\n" + + "\036ListCloudInstanceConfigsAction\022\022\n\nproje" + + "ct_id\030\001 \001(\t\022\026\n\tpage_size\030\002 \001(\005H\000\210\001\001\022\027\n\np" + + "age_token\030\003 \001(\tH\001\210\001\001B\014\n\n_page_sizeB\r\n\013_p" + + "age_token\"\253\003\n\031CreateCloudInstanceAction\022" + + "\023\n\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t" + + "\022\032\n\022instance_config_id\030\003 \001(\t\022\027\n\nnode_cou" + + "nt\030\004 \001(\005H\000\210\001\001\022\035\n\020processing_units\030\006 \001(\005H" + + "\001\210\001\001\022T\n\022autoscaling_config\030\007 \001(\01323.googl" + + "e.spanner.admin.instance.v1.AutoscalingC" + + "onfigH\002\210\001\001\022Q\n\006labels\030\005 \003(\0132A.google.span" + + "ner.executor.v1.CreateCloudInstanceActio" + + "n.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001B\r\n\013_node_countB\023\n\021_" + + "processing_unitsB\025\n\023_autoscaling_config\"" + + "\273\003\n\031UpdateCloudInstanceAction\022\023\n\013instanc" + + "e_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\031\n\014displa" + + "y_name\030\003 \001(\tH\000\210\001\001\022\027\n\nnode_count\030\004 \001(\005H\001\210" + + "\001\001\022\035\n\020processing_units\030\005 \001(\005H\002\210\001\001\022T\n\022aut" + + "oscaling_config\030\007 \001(\01323.google.spanner.a" + + "dmin.instance.v1.AutoscalingConfigH\003\210\001\001\022" + + "Q\n\006labels\030\006 \003(\0132A.google.spanner.executo" + + "r.v1.UpdateCloudInstanceAction.LabelsEnt" + + "ry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001B\017\n\r_display_nameB\r\n\013_node_coun" + + "tB\023\n\021_processing_unitsB\025\n\023_autoscaling_c" + + "onfig\"D\n\031DeleteCloudInstanceAction\022\023\n\013in" + + "stance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\"\227\002\n\031" + + "CreateCloudDatabaseAction\022\023\n\013instance_id" + + "\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013database_i" + + "d\030\003 \001(\t\022\025\n\rsdl_statement\030\004 \003(\t\022M\n\021encryp" + + "tion_config\030\005 \001(\01322.google.spanner.admin" + + ".database.v1.EncryptionConfig\022\024\n\007dialect" + + "\030\006 \001(\tH\000\210\001\001\022\036\n\021proto_descriptors\030\007 \001(\014H\001" + + "\210\001\001B\n\n\010_dialectB\024\n\022_proto_descriptors\"\277\001" + + "\n\034UpdateCloudDatabaseDdlAction\022\023\n\013instan" + + "ce_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013datab" + + "ase_id\030\003 \001(\t\022\025\n\rsdl_statement\030\004 \003(\t\022\024\n\014o" + + "peration_id\030\005 \001(\t\022\036\n\021proto_descriptors\030\006" + + " \001(\014H\000\210\001\001B\024\n\022_proto_descriptors\"{\n\031Updat" + + "eCloudDatabaseAction\022\023\n\013instance_id\030\001 \001(" + + "\t\022\022\n\nproject_id\030\002 \001(\t\022\025\n\rdatabase_name\030\003" + + " \001(\t\022\036\n\026enable_drop_protection\030\004 \001(\010\"W\n\027" + + "DropCloudDatabaseAction\022\023\n\013instance_id\030\001" + + " \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013database_id\030" + + "\003 \001(\t\"h\n\037ChangeQuorumCloudDatabaseAction" + + "\022\031\n\014database_uri\030\001 \001(\tH\000\210\001\001\022\031\n\021serving_l" + + "ocations\030\002 \003(\tB\017\n\r_database_uri\"j\n\030ListC" + + "loudDatabasesAction\022\022\n\nproject_id\030\001 \001(\t\022" + + "\023\n\013instance_id\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" + + "\022\n\npage_token\030\004 \001(\t\"\234\001\n\030ListCloudInstanc" + + "esAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\006filter\030\002" + + " \001(\tH\000\210\001\001\022\026\n\tpage_size\030\003 \001(\005H\001\210\001\001\022\027\n\npag" + + "e_token\030\004 \001(\tH\002\210\001\001B\t\n\007_filterB\014\n\n_page_s" + + "izeB\r\n\013_page_token\"A\n\026GetCloudInstanceAc" + + "tion\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030" + + "\002 \001(\t\"\203\001\n!ListCloudDatabaseOperationsAct" + + "ion\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002" + + " \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022" + + "\022\n\npage_token\030\005 \001(\t\"\341\001\n\032RestoreCloudData" + + "baseAction\022\022\n\nproject_id\030\001 \001(\t\022\032\n\022backup" + + "_instance_id\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\022\034\n" + + "\024database_instance_id\030\004 \001(\t\022\023\n\013database_" + + "id\030\005 \001(\t\022M\n\021encryption_config\030\007 \001(\01322.go" + + "ogle.spanner.admin.database.v1.Encryptio" + + "nConfig\"V\n\026GetCloudDatabaseAction\022\022\n\npro" + + "ject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\023\n\013da" + + "tabase_id\030\003 \001(\t\"\267\002\n\027CreateCloudBackupAct" + + "ion\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002" + + " \001(\t\022\021\n\tbackup_id\030\003 \001(\t\022\023\n\013database_id\030\004" + + " \001(\t\0224\n\013expire_time\030\005 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\0225\n\014version_time\030\006 \001(\013" + + "2\032.google.protobuf.TimestampH\000\210\001\001\022M\n\021enc" + + "ryption_config\030\007 \001(\01322.google.spanner.ad" + + "min.database.v1.EncryptionConfigB\017\n\r_ver" + + "sion_time\"\240\001\n\025CopyCloudBackupAction\022\022\n\np" + + "roject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021\n\t" + + "backup_id\030\003 \001(\t\022\025\n\rsource_backup\030\004 \001(\t\0224" + + "\n\013expire_time\030\005 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\"R\n\024GetCloudBackupAction\022\022\n\n" + + "project_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021\n" + + "\tbackup_id\030\003 \001(\t\"\213\001\n\027UpdateCloudBackupAc" + "tion\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030" - + "\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\022\025\n\rsource_backu" - + "p\030\004 \001(\t\0224\n\013expire_time\030\005 \001(\0132\032.google.pr" - + "otobuf.TimestampB\003\340A\003\"R\n\024GetCloudBackupA" - + "ction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id" - + "\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\"\213\001\n\027UpdateClou" - + "dBackupAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013ins" - + "tance_id\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\0224\n\013exp" - + "ire_time\030\004 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\"U\n\027DeleteCloudBackupAction\022\022\n\npr" - + "oject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021\n\tb" - + "ackup_id\030\003 \001(\t\"x\n\026ListCloudBackupsAction" - + "\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(" - + "\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\n" - + "page_token\030\005 \001(\t\"\201\001\n\037ListCloudBackupOper" - + "ationsAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013inst" - + "ance_id\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_si" - + "ze\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"\'\n\022GetOpera" - + "tionAction\022\021\n\toperation\030\001 \001(\t\"*\n\025CancelO" - + "perationAction\022\021\n\toperation\030\001 \001(\t\"\210\001\n\033St" - + "artBatchTransactionAction\0224\n\016batch_txn_t" - + "ime\030\001 \001(\0132\032.google.protobuf.TimestampH\000\022" - + "\r\n\003tid\030\002 \001(\014H\000\022\033\n\023cloud_database_role\030\003 " - + "\001(\tB\007\n\005param\".\n\033CloseBatchTransactionAct" - + "ion\022\017\n\007cleanup\030\001 \001(\010\"\227\002\n!GenerateDbParti" - + "tionsForReadAction\0224\n\004read\030\001 \001(\0132&.googl" - + "e.spanner.executor.v1.ReadAction\0228\n\005tabl" - + "e\030\002 \003(\0132).google.spanner.executor.v1.Tab" - + "leMetadata\022(\n\033desired_bytes_per_partitio" - + "n\030\003 \001(\003H\000\210\001\001\022 \n\023max_partition_count\030\004 \001(" - + "\003H\001\210\001\001B\036\n\034_desired_bytes_per_partitionB\026" - + "\n\024_max_partition_count\"\246\001\n\"GenerateDbPar" - + "titionsForQueryAction\0226\n\005query\030\001 \001(\0132\'.g" - + "oogle.spanner.executor.v1.QueryAction\022(\n" - + "\033desired_bytes_per_partition\030\002 \001(\003H\000\210\001\001B" - + "\036\n\034_desired_bytes_per_partition\"x\n\016Batch" - + "Partition\022\021\n\tpartition\030\001 \001(\014\022\027\n\017partitio" - + "n_token\030\002 \001(\014\022\022\n\005table\030\003 \001(\tH\000\210\001\001\022\022\n\005ind" - + "ex\030\004 \001(\tH\001\210\001\001B\010\n\006_tableB\010\n\006_index\"W\n\026Exe" - + "cutePartitionAction\022=\n\tpartition\030\001 \001(\0132*" - + ".google.spanner.executor.v1.BatchPartiti" - + "on\"\216\003\n\030ExecuteChangeStreamQuery\022\014\n\004name\030" - + "\001 \001(\t\022.\n\nstart_time\030\002 \001(\0132\032.google.proto" - + "buf.Timestamp\0221\n\010end_time\030\003 \001(\0132\032.google" - + ".protobuf.TimestampH\000\210\001\001\022\034\n\017partition_to" - + "ken\030\004 \001(\tH\001\210\001\001\022\024\n\014read_options\030\005 \003(\t\022#\n\026" - + "heartbeat_milliseconds\030\006 \001(\005H\002\210\001\001\022\035\n\020dea" - + "dline_seconds\030\007 \001(\003H\003\210\001\001\022 \n\023cloud_databa" - + "se_role\030\010 \001(\tH\004\210\001\001B\013\n\t_end_timeB\022\n\020_part" - + "ition_tokenB\031\n\027_heartbeat_millisecondsB\023" - + "\n\021_deadline_secondsB\026\n\024_cloud_database_r" - + "ole\"\242\005\n\024SpannerActionOutcome\022\'\n\006status\030\001" - + " \001(\0132\022.google.rpc.StatusH\000\210\001\001\0224\n\013commit_" - + "time\030\002 \001(\0132\032.google.protobuf.TimestampH\001" - + "\210\001\001\022@\n\013read_result\030\003 \001(\0132&.google.spanne" - + "r.executor.v1.ReadResultH\002\210\001\001\022B\n\014query_r" - + "esult\030\004 \001(\0132\'.google.spanner.executor.v1" - + ".QueryResultH\003\210\001\001\022\"\n\025transaction_restart" - + "ed\030\005 \001(\010H\004\210\001\001\022\031\n\014batch_txn_id\030\006 \001(\014H\005\210\001\001" - + "\022@\n\014db_partition\030\007 \003(\0132*.google.spanner." - + "executor.v1.BatchPartition\022B\n\014admin_resu" - + "lt\030\010 \001(\0132\'.google.spanner.executor.v1.Ad" - + "minResultH\006\210\001\001\022\031\n\021dml_rows_modified\030\t \003(" - + "\003\022M\n\025change_stream_records\030\n \003(\0132..googl" - + "e.spanner.executor.v1.ChangeStreamRecord" - + "B\t\n\007_statusB\016\n\014_commit_timeB\016\n\014_read_res" - + "ultB\017\n\r_query_resultB\030\n\026_transaction_res" - + "tartedB\017\n\r_batch_txn_idB\017\n\r_admin_result" - + "\"\231\003\n\013AdminResult\022H\n\017backup_response\030\001 \001(" - + "\0132/.google.spanner.executor.v1.CloudBack" - + "upResponse\022I\n\022operation_response\030\002 \001(\0132-" - + ".google.spanner.executor.v1.OperationRes" - + "ponse\022L\n\021database_response\030\003 \001(\01321.googl" - + "e.spanner.executor.v1.CloudDatabaseRespo" - + "nse\022L\n\021instance_response\030\004 \001(\01321.google." - + "spanner.executor.v1.CloudInstanceRespons" - + "e\022Y\n\030instance_config_response\030\005 \001(\01327.go" - + "ogle.spanner.executor.v1.CloudInstanceCo" - + "nfigResponse\"\353\001\n\023CloudBackupResponse\022@\n\016" - + "listed_backups\030\001 \003(\0132(.google.spanner.ad" - + "min.database.v1.Backup\022?\n\030listed_backup_" - + "operations\030\002 \003(\0132\035.google.longrunning.Op" - + "eration\022\027\n\017next_page_token\030\003 \001(\t\0228\n\006back" - + "up\030\004 \001(\0132(.google.spanner.admin.database" - + ".v1.Backup\"\230\001\n\021OperationResponse\0228\n\021list" - + "ed_operations\030\001 \003(\0132\035.google.longrunning" - + ".Operation\022\027\n\017next_page_token\030\002 \001(\t\0220\n\to" - + "peration\030\003 \001(\0132\035.google.longrunning.Oper" - + "ation\"\264\001\n\025CloudInstanceResponse\022D\n\020liste" - + "d_instances\030\001 \003(\0132*.google.spanner.admin" - + ".instance.v1.Instance\022\027\n\017next_page_token" - + "\030\002 \001(\t\022<\n\010instance\030\003 \001(\0132*.google.spanne" - + "r.admin.instance.v1.Instance\"\324\001\n\033CloudIn" - + "stanceConfigResponse\022Q\n\027listed_instance_" - + "configs\030\001 \003(\01320.google.spanner.admin.ins" - + "tance.v1.InstanceConfig\022\027\n\017next_page_tok" - + "en\030\002 \001(\t\022I\n\017instance_config\030\003 \001(\01320.goog" - + "le.spanner.admin.instance.v1.InstanceCon" - + "fig\"\367\001\n\025CloudDatabaseResponse\022D\n\020listed_" - + "databases\030\001 \003(\0132*.google.spanner.admin.d" - + "atabase.v1.Database\022A\n\032listed_database_o" - + "perations\030\002 \003(\0132\035.google.longrunning.Ope" - + "ration\022\027\n\017next_page_token\030\003 \001(\t\022<\n\010datab" - + "ase\030\004 \001(\0132*.google.spanner.admin.databas" - + "e.v1.Database\"\336\001\n\nReadResult\022\r\n\005table\030\001 " - + "\001(\t\022\022\n\005index\030\002 \001(\tH\000\210\001\001\022\032\n\rrequest_index" - + "\030\003 \001(\005H\001\210\001\001\0222\n\003row\030\004 \003(\0132%.google.spanne" - + "r.executor.v1.ValueList\0224\n\010row_type\030\005 \001(" - + "\0132\035.google.spanner.v1.StructTypeH\002\210\001\001B\010\n" - + "\006_indexB\020\n\016_request_indexB\013\n\t_row_type\"\204", - "\001\n\013QueryResult\0222\n\003row\030\001 \003(\0132%.google.spa" - + "nner.executor.v1.ValueList\0224\n\010row_type\030\002" - + " \001(\0132\035.google.spanner.v1.StructTypeH\000\210\001\001" - + "B\013\n\t_row_type\"\363\001\n\022ChangeStreamRecord\022C\n\013" - + "data_change\030\001 \001(\0132,.google.spanner.execu" - + "tor.v1.DataChangeRecordH\000\022L\n\017child_parti" - + "tion\030\002 \001(\01321.google.spanner.executor.v1." - + "ChildPartitionsRecordH\000\022@\n\theartbeat\030\003 \001" - + "(\0132+.google.spanner.executor.v1.Heartbea" - + "tRecordH\000B\010\n\006record\"\330\004\n\020DataChangeRecord" - + "\022/\n\013commit_time\030\001 \001(\0132\032.google.protobuf." - + "Timestamp\022\027\n\017record_sequence\030\002 \001(\t\022\026\n\016tr" - + "ansaction_id\030\003 \001(\t\022\026\n\016is_last_record\030\004 \001" - + "(\010\022\r\n\005table\030\005 \001(\t\022M\n\014column_types\030\006 \003(\0132" - + "7.google.spanner.executor.v1.DataChangeR" - + "ecord.ColumnType\022>\n\004mods\030\007 \003(\01320.google." - + "spanner.executor.v1.DataChangeRecord.Mod" - + "\022\020\n\010mod_type\030\010 \001(\t\022\032\n\022value_capture_type" - + "\030\t \001(\t\022\024\n\014record_count\030\n \001(\003\022\027\n\017partitio" - + "n_count\030\013 \001(\003\022\027\n\017transaction_tag\030\014 \001(\t\022\035" - + "\n\025is_system_transaction\030\r \001(\010\032Z\n\nColumnT" - + "ype\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\026\n\016is_pr" - + "imary_key\030\003 \001(\010\022\030\n\020ordinal_position\030\004 \001(" - + "\003\032;\n\003Mod\022\014\n\004keys\030\001 \001(\t\022\022\n\nnew_values\030\002 \001" - + "(\t\022\022\n\nold_values\030\003 \001(\t\"\376\001\n\025ChildPartitio" - + "nsRecord\022.\n\nstart_time\030\001 \001(\0132\032.google.pr" - + "otobuf.Timestamp\022\027\n\017record_sequence\030\002 \001(" - + "\t\022Z\n\020child_partitions\030\003 \003(\0132@.google.spa" - + "nner.executor.v1.ChildPartitionsRecord.C" - + "hildPartition\032@\n\016ChildPartition\022\r\n\005token" - + "\030\001 \001(\t\022\037\n\027parent_partition_tokens\030\002 \003(\t\"" - + "E\n\017HeartbeatRecord\0222\n\016heartbeat_time\030\001 \001" - + "(\0132\032.google.protobuf.Timestamp2\314\001\n\024Spann" - + "erExecutorProxy\022\211\001\n\022ExecuteActionAsync\0225" - + ".google.spanner.executor.v1.SpannerAsync" - + "ActionRequest\0326.google.spanner.executor." - + "v1.SpannerAsyncActionResponse\"\000(\0010\001\032(\312A%" - + "spanner-cloud-executor.googleapis.comBx\n" - + "\036com.google.spanner.executor.v1B\022CloudEx" - + "ecutorProtoP\001Z@cloud.google.com/go/spann" - + "er/executor/apiv1/executorpb;executorpbb" - + "\006proto3" + + "\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\0224\n\013expire_time\030" + + "\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"U" + + "\n\027DeleteCloudBackupAction\022\022\n\nproject_id\030" + + "\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021\n\tbackup_id\030" + + "\003 \001(\t\"x\n\026ListCloudBackupsAction\022\022\n\nproje" + + "ct_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\016\n\006filt" + + "er\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_toke" + + "n\030\005 \001(\t\"\201\001\n\037ListCloudBackupOperationsAct" + + "ion\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002" + + " \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022" + + "\022\n\npage_token\030\005 \001(\t\"\'\n\022GetOperationActio" + + "n\022\021\n\toperation\030\001 \001(\t\"*\n\025CancelOperationA" + + "ction\022\021\n\toperation\030\001 \001(\t\"\210\001\n\033StartBatchT" + + "ransactionAction\0224\n\016batch_txn_time\030\001 \001(\013" + + "2\032.google.protobuf.TimestampH\000\022\r\n\003tid\030\002 " + + "\001(\014H\000\022\033\n\023cloud_database_role\030\003 \001(\tB\007\n\005pa" + + "ram\".\n\033CloseBatchTransactionAction\022\017\n\007cl" + + "eanup\030\001 \001(\010\"\227\002\n!GenerateDbPartitionsForR" + + "eadAction\0224\n\004read\030\001 \001(\0132&.google.spanner" + + ".executor.v1.ReadAction\0228\n\005table\030\002 \003(\0132)" + + ".google.spanner.executor.v1.TableMetadat" + + "a\022(\n\033desired_bytes_per_partition\030\003 \001(\003H\000" + + "\210\001\001\022 \n\023max_partition_count\030\004 \001(\003H\001\210\001\001B\036\n" + + "\034_desired_bytes_per_partitionB\026\n\024_max_pa" + + "rtition_count\"\246\001\n\"GenerateDbPartitionsFo" + + "rQueryAction\0226\n\005query\030\001 \001(\0132\'.google.spa" + + "nner.executor.v1.QueryAction\022(\n\033desired_" + + "bytes_per_partition\030\002 \001(\003H\000\210\001\001B\036\n\034_desir" + + "ed_bytes_per_partition\"x\n\016BatchPartition" + + "\022\021\n\tpartition\030\001 \001(\014\022\027\n\017partition_token\030\002" + + " \001(\014\022\022\n\005table\030\003 \001(\tH\000\210\001\001\022\022\n\005index\030\004 \001(\tH" + + "\001\210\001\001B\010\n\006_tableB\010\n\006_index\"W\n\026ExecuteParti" + + "tionAction\022=\n\tpartition\030\001 \001(\0132*.google.s" + + "panner.executor.v1.BatchPartition\"\216\003\n\030Ex" + + "ecuteChangeStreamQuery\022\014\n\004name\030\001 \001(\t\022.\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tamp\0221\n\010end_time\030\003 \001(\0132\032.google.protobuf" + + ".TimestampH\000\210\001\001\022\034\n\017partition_token\030\004 \001(\t" + + "H\001\210\001\001\022\024\n\014read_options\030\005 \003(\t\022#\n\026heartbeat" + + "_milliseconds\030\006 \001(\005H\002\210\001\001\022\035\n\020deadline_sec" + + "onds\030\007 \001(\003H\003\210\001\001\022 \n\023cloud_database_role\030\010" + + " \001(\tH\004\210\001\001B\013\n\t_end_timeB\022\n\020_partition_tok" + + "enB\031\n\027_heartbeat_millisecondsB\023\n\021_deadli" + + "ne_secondsB\026\n\024_cloud_database_role\"\242\005\n\024S" + + "pannerActionOutcome\022\'\n\006status\030\001 \001(\0132\022.go" + + "ogle.rpc.StatusH\000\210\001\001\0224\n\013commit_time\030\002 \001(" + + "\0132\032.google.protobuf.TimestampH\001\210\001\001\022@\n\013re" + + "ad_result\030\003 \001(\0132&.google.spanner.executo" + + "r.v1.ReadResultH\002\210\001\001\022B\n\014query_result\030\004 \001" + + "(\0132\'.google.spanner.executor.v1.QueryRes" + + "ultH\003\210\001\001\022\"\n\025transaction_restarted\030\005 \001(\010H" + + "\004\210\001\001\022\031\n\014batch_txn_id\030\006 \001(\014H\005\210\001\001\022@\n\014db_pa" + + "rtition\030\007 \003(\0132*.google.spanner.executor." + + "v1.BatchPartition\022B\n\014admin_result\030\010 \001(\0132" + + "\'.google.spanner.executor.v1.AdminResult" + + "H\006\210\001\001\022\031\n\021dml_rows_modified\030\t \003(\003\022M\n\025chan" + + "ge_stream_records\030\n \003(\0132..google.spanner" + + ".executor.v1.ChangeStreamRecordB\t\n\007_stat" + + "usB\016\n\014_commit_timeB\016\n\014_read_resultB\017\n\r_q" + + "uery_resultB\030\n\026_transaction_restartedB\017\n" + + "\r_batch_txn_idB\017\n\r_admin_result\"\231\003\n\013Admi" + + "nResult\022H\n\017backup_response\030\001 \001(\0132/.googl" + + "e.spanner.executor.v1.CloudBackupRespons" + + "e\022I\n\022operation_response\030\002 \001(\0132-.google.s" + + "panner.executor.v1.OperationResponse\022L\n\021" + + "database_response\030\003 \001(\01321.google.spanner" + + ".executor.v1.CloudDatabaseResponse\022L\n\021in" + + "stance_response\030\004 \001(\01321.google.spanner.e" + + "xecutor.v1.CloudInstanceResponse\022Y\n\030inst" + + "ance_config_response\030\005 \001(\01327.google.span" + + "ner.executor.v1.CloudInstanceConfigRespo" + + "nse\"\353\001\n\023CloudBackupResponse\022@\n\016listed_ba" + + "ckups\030\001 \003(\0132(.google.spanner.admin.datab" + + "ase.v1.Backup\022?\n\030listed_backup_operation" + + "s\030\002 \003(\0132\035.google.longrunning.Operation\022\027" + + "\n\017next_page_token\030\003 \001(\t\0228\n\006backup\030\004 \001(\0132" + + "(.google.spanner.admin.database.v1.Backu" + + "p\"\230\001\n\021OperationResponse\0228\n\021listed_operat" + + "ions\030\001 \003(\0132\035.google.longrunning.Operatio" + + "n\022\027\n\017next_page_token\030\002 \001(\t\0220\n\toperation\030" + + "\003 \001(\0132\035.google.longrunning.Operation\"\264\001\n" + + "\025CloudInstanceResponse\022D\n\020listed_instanc" + + "es\030\001 \003(\0132*.google.spanner.admin.instance" + + ".v1.Instance\022\027\n\017next_page_token\030\002 \001(\t\022<\n" + + "\010instance\030\003 \001(\0132*.google.spanner.admin.i" + + "nstance.v1.Instance\"\324\001\n\033CloudInstanceCon" + + "figResponse\022Q\n\027listed_instance_configs\030\001" + + " \003(\01320.google.spanner.admin.instance.v1." + + "InstanceConfig\022\027\n\017next_page_token\030\002 \001(\t\022" + + "I\n\017instance_config\030\003 \001(\01320.google.spanne" + + "r.admin.instance.v1.InstanceConfig\"\367\001\n\025C" + + "loudDatabaseResponse\022D\n\020listed_databases" + + "\030\001 \003(\0132*.google.spanner.admin.database.v" + + "1.Database\022A\n\032listed_database_operations" + + "\030\002 \003(\0132\035.google.longrunning.Operation\022\027\n" + + "\017next_page_token\030\003 \001(\t\022<\n\010database\030\004 \001(\013" + + "2*.google.spanner.admin.database.v1.Data", + "base\"\336\001\n\nReadResult\022\r\n\005table\030\001 \001(\t\022\022\n\005in" + + "dex\030\002 \001(\tH\000\210\001\001\022\032\n\rrequest_index\030\003 \001(\005H\001\210" + + "\001\001\0222\n\003row\030\004 \003(\0132%.google.spanner.executo" + + "r.v1.ValueList\0224\n\010row_type\030\005 \001(\0132\035.googl" + + "e.spanner.v1.StructTypeH\002\210\001\001B\010\n\006_indexB\020" + + "\n\016_request_indexB\013\n\t_row_type\"\204\001\n\013QueryR" + + "esult\0222\n\003row\030\001 \003(\0132%.google.spanner.exec" + + "utor.v1.ValueList\0224\n\010row_type\030\002 \001(\0132\035.go" + + "ogle.spanner.v1.StructTypeH\000\210\001\001B\013\n\t_row_" + + "type\"\363\001\n\022ChangeStreamRecord\022C\n\013data_chan" + + "ge\030\001 \001(\0132,.google.spanner.executor.v1.Da" + + "taChangeRecordH\000\022L\n\017child_partition\030\002 \001(" + + "\01321.google.spanner.executor.v1.ChildPart" + + "itionsRecordH\000\022@\n\theartbeat\030\003 \001(\0132+.goog" + + "le.spanner.executor.v1.HeartbeatRecordH\000" + + "B\010\n\006record\"\330\004\n\020DataChangeRecord\022/\n\013commi" + + "t_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "\022\027\n\017record_sequence\030\002 \001(\t\022\026\n\016transaction" + + "_id\030\003 \001(\t\022\026\n\016is_last_record\030\004 \001(\010\022\r\n\005tab" + + "le\030\005 \001(\t\022M\n\014column_types\030\006 \003(\01327.google." + + "spanner.executor.v1.DataChangeRecord.Col" + + "umnType\022>\n\004mods\030\007 \003(\01320.google.spanner.e" + + "xecutor.v1.DataChangeRecord.Mod\022\020\n\010mod_t" + + "ype\030\010 \001(\t\022\032\n\022value_capture_type\030\t \001(\t\022\024\n" + + "\014record_count\030\n \001(\003\022\027\n\017partition_count\030\013" + + " \001(\003\022\027\n\017transaction_tag\030\014 \001(\t\022\035\n\025is_syst" + + "em_transaction\030\r \001(\010\032Z\n\nColumnType\022\014\n\004na" + + "me\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\026\n\016is_primary_key" + + "\030\003 \001(\010\022\030\n\020ordinal_position\030\004 \001(\003\032;\n\003Mod\022" + + "\014\n\004keys\030\001 \001(\t\022\022\n\nnew_values\030\002 \001(\t\022\022\n\nold" + + "_values\030\003 \001(\t\"\376\001\n\025ChildPartitionsRecord\022" + + ".\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022\027\n\017record_sequence\030\002 \001(\t\022Z\n\020chil" + + "d_partitions\030\003 \003(\0132@.google.spanner.exec" + + "utor.v1.ChildPartitionsRecord.ChildParti" + + "tion\032@\n\016ChildPartition\022\r\n\005token\030\001 \001(\t\022\037\n" + + "\027parent_partition_tokens\030\002 \003(\t\"E\n\017Heartb" + + "eatRecord\0222\n\016heartbeat_time\030\001 \001(\0132\032.goog" + + "le.protobuf.Timestamp\"^\n\016SpannerOptions\022" + + "L\n\024session_pool_options\030\001 \001(\0132..google.s" + + "panner.executor.v1.SessionPoolOptions\"-\n" + + "\022SessionPoolOptions\022\027\n\017use_multiplexed\030\001" + + " \001(\0102\314\001\n\024SpannerExecutorProxy\022\211\001\n\022Execut" + + "eActionAsync\0225.google.spanner.executor.v" + + "1.SpannerAsyncActionRequest\0326.google.spa" + + "nner.executor.v1.SpannerAsyncActionRespo" + + "nse\"\000(\0010\001\032(\312A%spanner-cloud-executor.goo" + + "gleapis.comBx\n\036com.google.spanner.execut" + + "or.v1B\022CloudExecutorProtoP\001Z@cloud.googl" + + "e.com/go/spanner/executor/apiv1/executor" + + "pb;executorpbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -839,6 +856,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_spanner_executor_v1_SpannerAction_descriptor, new java.lang.String[] { "DatabasePath", + "SpannerOptions", "Start", "Finish", "Read", @@ -1095,7 +1113,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ListCloudBackupOperations", "GetOperation", "CancelOperation", - "ReconfigureCloudDatabase", + "ChangeQuorumCloudDatabase", "Action", }); internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor = @@ -1247,11 +1265,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "InstanceId", "ProjectId", "DatabaseId", }); - internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor = + internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor = getDescriptor().getMessageTypes().get(33); - internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable = + internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor, + internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor, new java.lang.String[] { "DatabaseUri", "ServingLocations", }); @@ -1293,7 +1311,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor, new java.lang.String[] { - "ProjectId", "BackupInstanceId", "BackupId", "DatabaseInstanceId", "DatabaseId", + "ProjectId", + "BackupInstanceId", + "BackupId", + "DatabaseInstanceId", + "DatabaseId", + "EncryptionConfig", }); internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor = getDescriptor().getMessageTypes().get(39); @@ -1309,7 +1332,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor, new java.lang.String[] { - "ProjectId", "InstanceId", "BackupId", "DatabaseId", "ExpireTime", "VersionTime", + "ProjectId", + "InstanceId", + "BackupId", + "DatabaseId", + "ExpireTime", + "VersionTime", + "EncryptionConfig", }); internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor = getDescriptor().getMessageTypes().get(41); @@ -1597,6 +1626,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "HeartbeatTime", }); + internal_static_google_spanner_executor_v1_SpannerOptions_descriptor = + getDescriptor().getMessageTypes().get(69); + internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_SpannerOptions_descriptor, + new java.lang.String[] { + "SessionPoolOptions", + }); + internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor = + getDescriptor().getMessageTypes().get(70); + internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor, + new java.lang.String[] { + "UseMultiplexed", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java index f972e1a3e4..0db92886e4 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java @@ -379,6 +379,60 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { return versionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : versionTime_; } + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 7; + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * The KMS key(s) used to encrypt the backup to be created if the backup
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The KMS key(s) used to encrypt the backup to be created if the backup
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * The KMS key(s) used to encrypt the backup to be created if the backup
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -411,6 +465,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getVersionTime()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getEncryptionConfig()); + } getUnknownFields().writeTo(output); } @@ -438,6 +495,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getVersionTime()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEncryptionConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -466,6 +526,10 @@ public boolean equals(final java.lang.Object obj) { if (hasVersionTime()) { if (!getVersionTime().equals(other.getVersionTime())) return false; } + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -493,6 +557,10 @@ public int hashCode() { hash = (37 * hash) + VERSION_TIME_FIELD_NUMBER; hash = (53 * hash) + getVersionTime().hashCode(); } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -636,6 +704,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getExpireTimeFieldBuilder(); getVersionTimeFieldBuilder(); + getEncryptionConfigFieldBuilder(); } } @@ -657,6 +726,11 @@ public Builder clear() { versionTimeBuilder_.dispose(); versionTimeBuilder_ = null; } + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } return this; } @@ -715,6 +789,11 @@ private void buildPartial0(com.google.spanner.executor.v1.CreateCloudBackupActio versionTimeBuilder_ == null ? versionTime_ : versionTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -790,6 +869,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CreateCloudBackupAction if (other.hasVersionTime()) { mergeVersionTime(other.getVersionTime()); } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -852,6 +934,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 50 + case 58: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1720,6 +1809,206 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { return versionTimeBuilder_; } + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return The encryptionConfig. + */ + public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder mergeEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + if (encryptionConfig_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00000040); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public com.google.spanner.admin.database.v1.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the backup to be created if the backup
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java index 1059f9cf08..4e6a7b5314 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java @@ -209,4 +209,42 @@ public interface CreateCloudBackupActionOrBuilder * optional .google.protobuf.Timestamp version_time = 6; */ com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder(); + + /** + * + * + *
+   * The KMS key(s) used to encrypt the backup to be created if the backup
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * The KMS key(s) used to encrypt the backup to be created if the backup
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return The encryptionConfig. + */ + com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * The KMS key(s) used to encrypt the backup to be created if the backup
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java index f511d86774..111f8441da 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java @@ -67,6 +67,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder.class); } + private int bitField0_; public static final int PROJECT_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -326,6 +327,60 @@ public com.google.protobuf.ByteString getDatabaseIdBytes() { } } + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 7; + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * The KMS key(s) used to encrypt the restored database to be created if the
+   * restored database should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The KMS key(s) used to encrypt the restored database to be created if the
+   * restored database should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * The KMS key(s) used to encrypt the restored database to be created if the
+   * restored database should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -355,6 +410,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, databaseId_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getEncryptionConfig()); + } getUnknownFields().writeTo(output); } @@ -379,6 +437,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, databaseId_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEncryptionConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -400,6 +461,10 @@ public boolean equals(final java.lang.Object obj) { if (!getBackupId().equals(other.getBackupId())) return false; if (!getDatabaseInstanceId().equals(other.getDatabaseInstanceId())) return false; if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -421,6 +486,10 @@ public int hashCode() { hash = (53 * hash) + getDatabaseInstanceId().hashCode(); hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; hash = (53 * hash) + getDatabaseId().hashCode(); + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -551,10 +620,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.spanner.executor.v1.RestoreCloudDatabaseAction.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEncryptionConfigFieldBuilder(); + } } @java.lang.Override @@ -566,6 +644,11 @@ public Builder clear() { backupId_ = ""; databaseInstanceId_ = ""; databaseId_ = ""; + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } return this; } @@ -617,6 +700,13 @@ private void buildPartial0(com.google.spanner.executor.v1.RestoreCloudDatabaseAc if (((from_bitField0_ & 0x00000010) != 0)) { result.databaseId_ = databaseId_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -690,6 +780,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.RestoreCloudDatabaseActi bitField0_ |= 0x00000010; onChanged(); } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -746,6 +839,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 42 + case 58: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1305,6 +1405,206 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return The encryptionConfig. + */ + public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder mergeEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + if (encryptionConfig_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public com.google.spanner.admin.database.v1.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * The KMS key(s) used to encrypt the restored database to be created if the
+     * restored database should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java index 478a9aa81f..7bfa056971 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java @@ -152,4 +152,42 @@ public interface RestoreCloudDatabaseActionOrBuilder * @return The bytes for databaseId. */ com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * The KMS key(s) used to encrypt the restored database to be created if the
+   * restored database should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * The KMS key(s) used to encrypt the restored database to be created if the
+   * restored database should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + * + * @return The encryptionConfig. + */ + com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * The KMS key(s) used to encrypt the restored database to be created if the
+   * restored database should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; + */ + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java new file mode 100644 index 0000000000..1e6fbffd39 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java @@ -0,0 +1,539 @@ +/* + * 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/executor/v1/cloud_executor.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Options for the session pool used by the DatabaseClient.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SessionPoolOptions} + */ +public final class SessionPoolOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SessionPoolOptions) + SessionPoolOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SessionPoolOptions.newBuilder() to construct. + private SessionPoolOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SessionPoolOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SessionPoolOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SessionPoolOptions.class, + com.google.spanner.executor.v1.SessionPoolOptions.Builder.class); + } + + public static final int USE_MULTIPLEXED_FIELD_NUMBER = 1; + private boolean useMultiplexed_ = false; + /** + * + * + *
+   * passing this as true, will make applicable RPCs use multiplexed sessions
+   * instead of regular sessions
+   * 
+ * + * bool use_multiplexed = 1; + * + * @return The useMultiplexed. + */ + @java.lang.Override + public boolean getUseMultiplexed() { + return useMultiplexed_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (useMultiplexed_ != false) { + output.writeBool(1, useMultiplexed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (useMultiplexed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, useMultiplexed_); + } + 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.executor.v1.SessionPoolOptions)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.SessionPoolOptions other = + (com.google.spanner.executor.v1.SessionPoolOptions) obj; + + if (getUseMultiplexed() != other.getUseMultiplexed()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USE_MULTIPLEXED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseMultiplexed()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions 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.executor.v1.SessionPoolOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions 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.executor.v1.SessionPoolOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions 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.executor.v1.SessionPoolOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions 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.executor.v1.SessionPoolOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions 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.executor.v1.SessionPoolOptions 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; + } + /** + * + * + *
+   * Options for the session pool used by the DatabaseClient.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SessionPoolOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SessionPoolOptions) + com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SessionPoolOptions.class, + com.google.spanner.executor.v1.SessionPoolOptions.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.SessionPoolOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + useMultiplexed_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SessionPoolOptions getDefaultInstanceForType() { + return com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.SessionPoolOptions build() { + com.google.spanner.executor.v1.SessionPoolOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SessionPoolOptions buildPartial() { + com.google.spanner.executor.v1.SessionPoolOptions result = + new com.google.spanner.executor.v1.SessionPoolOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.SessionPoolOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.useMultiplexed_ = useMultiplexed_; + } + } + + @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.executor.v1.SessionPoolOptions) { + return mergeFrom((com.google.spanner.executor.v1.SessionPoolOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.SessionPoolOptions other) { + if (other == com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance()) + return this; + if (other.getUseMultiplexed() != false) { + setUseMultiplexed(other.getUseMultiplexed()); + } + 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; + case 8: + { + useMultiplexed_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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; + } + + private int bitField0_; + + private boolean useMultiplexed_; + /** + * + * + *
+     * passing this as true, will make applicable RPCs use multiplexed sessions
+     * instead of regular sessions
+     * 
+ * + * bool use_multiplexed = 1; + * + * @return The useMultiplexed. + */ + @java.lang.Override + public boolean getUseMultiplexed() { + return useMultiplexed_; + } + /** + * + * + *
+     * passing this as true, will make applicable RPCs use multiplexed sessions
+     * instead of regular sessions
+     * 
+ * + * bool use_multiplexed = 1; + * + * @param value The useMultiplexed to set. + * @return This builder for chaining. + */ + public Builder setUseMultiplexed(boolean value) { + + useMultiplexed_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * passing this as true, will make applicable RPCs use multiplexed sessions
+     * instead of regular sessions
+     * 
+ * + * bool use_multiplexed = 1; + * + * @return This builder for chaining. + */ + public Builder clearUseMultiplexed() { + bitField0_ = (bitField0_ & ~0x00000001); + useMultiplexed_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.SessionPoolOptions) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.SessionPoolOptions) + private static final com.google.spanner.executor.v1.SessionPoolOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.SessionPoolOptions(); + } + + public static com.google.spanner.executor.v1.SessionPoolOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionPoolOptions 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.executor.v1.SessionPoolOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java new file mode 100644 index 0000000000..b9d4f00a03 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java @@ -0,0 +1,40 @@ +/* + * 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/executor/v1/cloud_executor.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.executor.v1; + +public interface SessionPoolOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SessionPoolOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * passing this as true, will make applicable RPCs use multiplexed sessions
+   * instead of regular sessions
+   * 
+ * + * bool use_multiplexed = 1; + * + * @return The useMultiplexed. + */ + boolean getUseMultiplexed(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java index f98b6eb2f3..45af616c4e 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java @@ -65,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.spanner.executor.v1.SpannerAction.Builder.class); } + private int bitField0_; private int actionCase_ = 0; @SuppressWarnings("serial") @@ -211,6 +212,56 @@ public com.google.protobuf.ByteString getDatabasePathBytes() { } } + public static final int SPANNER_OPTIONS_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.SpannerOptions spannerOptions_; + /** + * + * + *
+   * Configuration options for Spanner backend
+   * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + * + * @return Whether the spannerOptions field is set. + */ + @java.lang.Override + public boolean hasSpannerOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Configuration options for Spanner backend
+   * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + * + * @return The spannerOptions. + */ + @java.lang.Override + public com.google.spanner.executor.v1.SpannerOptions getSpannerOptions() { + return spannerOptions_ == null + ? com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance() + : spannerOptions_; + } + /** + * + * + *
+   * Configuration options for Spanner backend
+   * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.SpannerOptionsOrBuilder getSpannerOptionsOrBuilder() { + return spannerOptions_ == null + ? com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance() + : spannerOptions_; + } + public static final int START_FIELD_NUMBER = 10; /** * @@ -1071,6 +1122,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databasePath_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, databasePath_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSpannerOptions()); + } if (actionCase_ == 10) { output.writeMessage(10, (com.google.spanner.executor.v1.StartTransactionAction) action_); } @@ -1133,6 +1187,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databasePath_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databasePath_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpannerOptions()); + } if (actionCase_ == 10) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1230,6 +1287,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.spanner.executor.v1.SpannerAction) obj; if (!getDatabasePath().equals(other.getDatabasePath())) return false; + if (hasSpannerOptions() != other.hasSpannerOptions()) return false; + if (hasSpannerOptions()) { + if (!getSpannerOptions().equals(other.getSpannerOptions())) return false; + } if (!getActionCase().equals(other.getActionCase())) return false; switch (actionCase_) { case 10: @@ -1299,6 +1360,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DATABASE_PATH_FIELD_NUMBER; hash = (53 * hash) + getDatabasePath().hashCode(); + if (hasSpannerOptions()) { + hash = (37 * hash) + SPANNER_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getSpannerOptions().hashCode(); + } switch (actionCase_) { case 10: hash = (37 * hash) + START_FIELD_NUMBER; @@ -1498,10 +1563,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.spanner.executor.v1.SpannerAction.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSpannerOptionsFieldBuilder(); + } } @java.lang.Override @@ -1509,6 +1583,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; databasePath_ = ""; + spannerOptions_ = null; + if (spannerOptionsBuilder_ != null) { + spannerOptionsBuilder_.dispose(); + spannerOptionsBuilder_ = null; + } if (startBuilder_ != null) { startBuilder_.clear(); } @@ -1599,6 +1678,13 @@ private void buildPartial0(com.google.spanner.executor.v1.SpannerAction result) if (((from_bitField0_ & 0x00000001) != 0)) { result.databasePath_ = databasePath_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spannerOptions_ = + spannerOptionsBuilder_ == null ? spannerOptions_ : spannerOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.spanner.executor.v1.SpannerAction result) { @@ -1704,6 +1790,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.SpannerAction other) { bitField0_ |= 0x00000001; onChanged(); } + if (other.hasSpannerOptions()) { + mergeSpannerOptions(other.getSpannerOptions()); + } switch (other.getActionCase()) { case START: { @@ -1822,6 +1911,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + input.readMessage(getSpannerOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 case 82: { input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); @@ -2072,6 +2167,193 @@ public Builder setDatabasePathBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.spanner.executor.v1.SpannerOptions spannerOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerOptions, + com.google.spanner.executor.v1.SpannerOptions.Builder, + com.google.spanner.executor.v1.SpannerOptionsOrBuilder> + spannerOptionsBuilder_; + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + * + * @return Whether the spannerOptions field is set. + */ + public boolean hasSpannerOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + * + * @return The spannerOptions. + */ + public com.google.spanner.executor.v1.SpannerOptions getSpannerOptions() { + if (spannerOptionsBuilder_ == null) { + return spannerOptions_ == null + ? com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance() + : spannerOptions_; + } else { + return spannerOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + public Builder setSpannerOptions(com.google.spanner.executor.v1.SpannerOptions value) { + if (spannerOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spannerOptions_ = value; + } else { + spannerOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + public Builder setSpannerOptions( + com.google.spanner.executor.v1.SpannerOptions.Builder builderForValue) { + if (spannerOptionsBuilder_ == null) { + spannerOptions_ = builderForValue.build(); + } else { + spannerOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + public Builder mergeSpannerOptions(com.google.spanner.executor.v1.SpannerOptions value) { + if (spannerOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && spannerOptions_ != null + && spannerOptions_ + != com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance()) { + getSpannerOptionsBuilder().mergeFrom(value); + } else { + spannerOptions_ = value; + } + } else { + spannerOptionsBuilder_.mergeFrom(value); + } + if (spannerOptions_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + public Builder clearSpannerOptions() { + bitField0_ = (bitField0_ & ~0x00000002); + spannerOptions_ = null; + if (spannerOptionsBuilder_ != null) { + spannerOptionsBuilder_.dispose(); + spannerOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + public com.google.spanner.executor.v1.SpannerOptions.Builder getSpannerOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSpannerOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + public com.google.spanner.executor.v1.SpannerOptionsOrBuilder getSpannerOptionsOrBuilder() { + if (spannerOptionsBuilder_ != null) { + return spannerOptionsBuilder_.getMessageOrBuilder(); + } else { + return spannerOptions_ == null + ? com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance() + : spannerOptions_; + } + } + /** + * + * + *
+     * Configuration options for Spanner backend
+     * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerOptions, + com.google.spanner.executor.v1.SpannerOptions.Builder, + com.google.spanner.executor.v1.SpannerOptionsOrBuilder> + getSpannerOptionsFieldBuilder() { + if (spannerOptionsBuilder_ == null) { + spannerOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerOptions, + com.google.spanner.executor.v1.SpannerOptions.Builder, + com.google.spanner.executor.v1.SpannerOptionsOrBuilder>( + getSpannerOptions(), getParentForChildren(), isClean()); + spannerOptions_ = null; + } + return spannerOptionsBuilder_; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.spanner.executor.v1.StartTransactionAction, com.google.spanner.executor.v1.StartTransactionAction.Builder, diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java index 32aaf468a2..61e481d803 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java @@ -53,6 +53,41 @@ public interface SpannerActionOrBuilder */ com.google.protobuf.ByteString getDatabasePathBytes(); + /** + * + * + *
+   * Configuration options for Spanner backend
+   * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + * + * @return Whether the spannerOptions field is set. + */ + boolean hasSpannerOptions(); + /** + * + * + *
+   * Configuration options for Spanner backend
+   * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + * + * @return The spannerOptions. + */ + com.google.spanner.executor.v1.SpannerOptions getSpannerOptions(); + /** + * + * + *
+   * Configuration options for Spanner backend
+   * 
+ * + * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; + */ + com.google.spanner.executor.v1.SpannerOptionsOrBuilder getSpannerOptionsOrBuilder(); + /** * * diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java new file mode 100644 index 0000000000..1ff00f038f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java @@ -0,0 +1,730 @@ +/* + * 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/executor/v1/cloud_executor.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Options for Cloud Spanner Service.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerOptions} + */ +public final class SpannerOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerOptions) + SpannerOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpannerOptions.newBuilder() to construct. + private SpannerOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpannerOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpannerOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerOptions.class, + com.google.spanner.executor.v1.SpannerOptions.Builder.class); + } + + private int bitField0_; + public static final int SESSION_POOL_OPTIONS_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.SessionPoolOptions sessionPoolOptions_; + /** + * + * + *
+   * Options for configuring the session pool
+   * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + * + * @return Whether the sessionPoolOptions field is set. + */ + @java.lang.Override + public boolean hasSessionPoolOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Options for configuring the session pool
+   * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + * + * @return The sessionPoolOptions. + */ + @java.lang.Override + public com.google.spanner.executor.v1.SessionPoolOptions getSessionPoolOptions() { + return sessionPoolOptions_ == null + ? com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance() + : sessionPoolOptions_; + } + /** + * + * + *
+   * Options for configuring the session pool
+   * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder + getSessionPoolOptionsOrBuilder() { + return sessionPoolOptions_ == null + ? com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance() + : sessionPoolOptions_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSessionPoolOptions()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSessionPoolOptions()); + } + 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.executor.v1.SpannerOptions)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.SpannerOptions other = + (com.google.spanner.executor.v1.SpannerOptions) obj; + + if (hasSessionPoolOptions() != other.hasSessionPoolOptions()) return false; + if (hasSessionPoolOptions()) { + if (!getSessionPoolOptions().equals(other.getSessionPoolOptions())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSessionPoolOptions()) { + hash = (37 * hash) + SESSION_POOL_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getSessionPoolOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.SpannerOptions parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerOptions 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.executor.v1.SpannerOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerOptions 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.executor.v1.SpannerOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.SpannerOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerOptions 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.executor.v1.SpannerOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerOptions 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.executor.v1.SpannerOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerOptions 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.executor.v1.SpannerOptions 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; + } + /** + * + * + *
+   * Options for Cloud Spanner Service.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerOptions) + com.google.spanner.executor.v1.SpannerOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerOptions.class, + com.google.spanner.executor.v1.SpannerOptions.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.SpannerOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSessionPoolOptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sessionPoolOptions_ = null; + if (sessionPoolOptionsBuilder_ != null) { + sessionPoolOptionsBuilder_.dispose(); + sessionPoolOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerOptions_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerOptions getDefaultInstanceForType() { + return com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerOptions build() { + com.google.spanner.executor.v1.SpannerOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerOptions buildPartial() { + com.google.spanner.executor.v1.SpannerOptions result = + new com.google.spanner.executor.v1.SpannerOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.SpannerOptions result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sessionPoolOptions_ = + sessionPoolOptionsBuilder_ == null + ? sessionPoolOptions_ + : sessionPoolOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @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.executor.v1.SpannerOptions) { + return mergeFrom((com.google.spanner.executor.v1.SpannerOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.SpannerOptions other) { + if (other == com.google.spanner.executor.v1.SpannerOptions.getDefaultInstance()) return this; + if (other.hasSessionPoolOptions()) { + mergeSessionPoolOptions(other.getSessionPoolOptions()); + } + 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; + case 10: + { + input.readMessage( + getSessionPoolOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + 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; + } + + private int bitField0_; + + private com.google.spanner.executor.v1.SessionPoolOptions sessionPoolOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SessionPoolOptions, + com.google.spanner.executor.v1.SessionPoolOptions.Builder, + com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder> + sessionPoolOptionsBuilder_; + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + * + * @return Whether the sessionPoolOptions field is set. + */ + public boolean hasSessionPoolOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + * + * @return The sessionPoolOptions. + */ + public com.google.spanner.executor.v1.SessionPoolOptions getSessionPoolOptions() { + if (sessionPoolOptionsBuilder_ == null) { + return sessionPoolOptions_ == null + ? com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance() + : sessionPoolOptions_; + } else { + return sessionPoolOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + public Builder setSessionPoolOptions(com.google.spanner.executor.v1.SessionPoolOptions value) { + if (sessionPoolOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionPoolOptions_ = value; + } else { + sessionPoolOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + public Builder setSessionPoolOptions( + com.google.spanner.executor.v1.SessionPoolOptions.Builder builderForValue) { + if (sessionPoolOptionsBuilder_ == null) { + sessionPoolOptions_ = builderForValue.build(); + } else { + sessionPoolOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + public Builder mergeSessionPoolOptions( + com.google.spanner.executor.v1.SessionPoolOptions value) { + if (sessionPoolOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sessionPoolOptions_ != null + && sessionPoolOptions_ + != com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance()) { + getSessionPoolOptionsBuilder().mergeFrom(value); + } else { + sessionPoolOptions_ = value; + } + } else { + sessionPoolOptionsBuilder_.mergeFrom(value); + } + if (sessionPoolOptions_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + public Builder clearSessionPoolOptions() { + bitField0_ = (bitField0_ & ~0x00000001); + sessionPoolOptions_ = null; + if (sessionPoolOptionsBuilder_ != null) { + sessionPoolOptionsBuilder_.dispose(); + sessionPoolOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + public com.google.spanner.executor.v1.SessionPoolOptions.Builder + getSessionPoolOptionsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSessionPoolOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + public com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder + getSessionPoolOptionsOrBuilder() { + if (sessionPoolOptionsBuilder_ != null) { + return sessionPoolOptionsBuilder_.getMessageOrBuilder(); + } else { + return sessionPoolOptions_ == null + ? com.google.spanner.executor.v1.SessionPoolOptions.getDefaultInstance() + : sessionPoolOptions_; + } + } + /** + * + * + *
+     * Options for configuring the session pool
+     * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SessionPoolOptions, + com.google.spanner.executor.v1.SessionPoolOptions.Builder, + com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder> + getSessionPoolOptionsFieldBuilder() { + if (sessionPoolOptionsBuilder_ == null) { + sessionPoolOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SessionPoolOptions, + com.google.spanner.executor.v1.SessionPoolOptions.Builder, + com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder>( + getSessionPoolOptions(), getParentForChildren(), isClean()); + sessionPoolOptions_ = null; + } + return sessionPoolOptionsBuilder_; + } + + @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.executor.v1.SpannerOptions) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.SpannerOptions) + private static final com.google.spanner.executor.v1.SpannerOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.SpannerOptions(); + } + + public static com.google.spanner.executor.v1.SpannerOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpannerOptions 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.executor.v1.SpannerOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java new file mode 100644 index 0000000000..39d05d1b24 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java @@ -0,0 +1,61 @@ +/* + * 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/executor/v1/cloud_executor.proto + +// Protobuf Java Version: 3.25.2 +package com.google.spanner.executor.v1; + +public interface SpannerOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Options for configuring the session pool
+   * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + * + * @return Whether the sessionPoolOptions field is set. + */ + boolean hasSessionPoolOptions(); + /** + * + * + *
+   * Options for configuring the session pool
+   * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + * + * @return The sessionPoolOptions. + */ + com.google.spanner.executor.v1.SessionPoolOptions getSessionPoolOptions(); + /** + * + * + *
+   * Options for configuring the session pool
+   * 
+ * + * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; + */ + com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder getSessionPoolOptionsOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto b/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto index 56332dc0e8..3ad36e3ee3 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto +++ b/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto @@ -78,6 +78,9 @@ message SpannerAction { // database path if it applies to the same database as the previous action. string database_path = 1; + // Configuration options for Spanner backend + SpannerOptions spanner_options = 2; + // Action represents a spanner action kind, there will only be one action kind // per SpannerAction. oneof action { @@ -565,8 +568,8 @@ message AdminAction { // Action that cancels an operation. CancelOperationAction cancel_operation = 26; - // Action that reconfigures a Cloud Spanner database. - ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + // Action that changes quorum of a Cloud Spanner database. + ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; } } @@ -772,9 +775,9 @@ message DropCloudDatabaseAction { string database_id = 3; } -// Action that reconfigures a Cloud Spanner database. -message ReconfigureCloudDatabaseAction { - // The fully qualified uri of the database to be reconfigured. +// Action that changes quorum of a Cloud Spanner database. +message ChangeQuorumCloudDatabaseAction { + // The fully qualified uri of the database whose quorum has to be changed. optional string database_uri = 1; // The locations of the serving regions, e.g. "asia-south1". @@ -877,6 +880,10 @@ message RestoreCloudDatabaseAction { // The id of the database to create and restore to, e.g. "db0". Note that this // database must not already exist. string database_id = 5; + + // The KMS key(s) used to encrypt the restored database to be created if the + // restored database should be CMEK protected. + google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; } // Action that gets a Cloud Spanner database. @@ -916,6 +923,10 @@ message CreateCloudBackupAction { // [earliest_version_time, NOW], where earliest_version_time is retrieved by // cloud spanner frontend API (See details: go/cs-pitr-lite-design). optional google.protobuf.Timestamp version_time = 6; + + // The KMS key(s) used to encrypt the backup to be created if the backup + // should be CMEK protected. + google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; } // Action that copies a Cloud Spanner database backup. @@ -1481,3 +1492,16 @@ message HeartbeatRecord { // Timestamp for this heartbeat check. google.protobuf.Timestamp heartbeat_time = 1; } + +// Options for Cloud Spanner Service. +message SpannerOptions { + // Options for configuring the session pool + SessionPoolOptions session_pool_options = 1; +} + +// Options for the session pool used by the DatabaseClient. +message SessionPoolOptions { + // passing this as true, will make applicable RPCs use multiplexed sessions + // instead of regular sessions + bool use_multiplexed = 1; +}