diff --git a/generation_config.yaml b/generation_config.yaml index a2188111195..6c476f6f865 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.52.0 -googleapis_commitish: 2a3db2e19f48a139db9f40278c0217df110add9b +googleapis_commitish: 3cf61b2df20eace09e6336c23f9e08859c0d87ae libraries_bom_version: 26.53.0 libraries: - api_shortname: spanner 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 25668dd3de8..1b9c4de2d83 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 @@ -1700,6 +1700,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.database.v1.Backup", "queryAllDeclaredConstructors": true, @@ -2618,6 +2654,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints$Key", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints$Key$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.database.v1.UpdateBackupRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java index 416913e22f7..b91188619aa 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java @@ -41,6 +41,8 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupName; import com.google.spanner.admin.database.v1.BackupSchedule; @@ -78,6 +80,7 @@ import com.google.spanner.admin.database.v1.ListDatabasesResponse; import com.google.spanner.admin.database.v1.RestoreDatabaseMetadata; import com.google.spanner.admin.database.v1.RestoreDatabaseRequest; +import com.google.spanner.admin.database.v1.SplitPoints; import com.google.spanner.admin.database.v1.UpdateBackupRequest; import com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest; import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata; @@ -524,6 +527,25 @@ * * * + *

AddSplitPoints + *

Adds split points to specified tables, indexes of a database. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * *

CreateBackupSchedule *

Creates a new backup schedule. * @@ -4318,6 +4340,137 @@ public final ListDatabaseRolesPagedResponse listDatabaseRoles(ListDatabaseRolesR return stub.listDatabaseRolesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds split points to specified tables, indexes of a database. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]");
+   *   List splitPoints = new ArrayList<>();
+   *   AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(database, splitPoints);
+   * }
+   * }
+ * + * @param database Required. The database on whose tables/indexes split points are to be added. + * Values are of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + * @param splitPoints Required. The split points to add. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AddSplitPointsResponse addSplitPoints( + DatabaseName database, List splitPoints) { + AddSplitPointsRequest request = + AddSplitPointsRequest.newBuilder() + .setDatabase(database == null ? null : database.toString()) + .addAllSplitPoints(splitPoints) + .build(); + return addSplitPoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds split points to specified tables, indexes of a database. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   String database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString();
+   *   List splitPoints = new ArrayList<>();
+   *   AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(database, splitPoints);
+   * }
+   * }
+ * + * @param database Required. The database on whose tables/indexes split points are to be added. + * Values are of the form + * `projects/<project>/instances/<instance>/databases/<database>`. + * @param splitPoints Required. The split points to add. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AddSplitPointsResponse addSplitPoints( + String database, List splitPoints) { + AddSplitPointsRequest request = + AddSplitPointsRequest.newBuilder() + .setDatabase(database) + .addAllSplitPoints(splitPoints) + .build(); + return addSplitPoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds split points to specified tables, indexes of a database. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   AddSplitPointsRequest request =
+   *       AddSplitPointsRequest.newBuilder()
+   *           .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString())
+   *           .addAllSplitPoints(new ArrayList())
+   *           .setInitiator("initiator-248987089")
+   *           .build();
+   *   AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(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 AddSplitPointsResponse addSplitPoints(AddSplitPointsRequest request) { + return addSplitPointsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds split points to specified tables, indexes of a database. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) {
+   *   AddSplitPointsRequest request =
+   *       AddSplitPointsRequest.newBuilder()
+   *           .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString())
+   *           .addAllSplitPoints(new ArrayList())
+   *           .setInitiator("initiator-248987089")
+   *           .build();
+   *   ApiFuture future =
+   *       databaseAdminClient.addSplitPointsCallable().futureCall(request);
+   *   // Do something.
+   *   AddSplitPointsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + addSplitPointsCallable() { + return stub.addSplitPointsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new backup schedule. 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 097695ebece..399dcbf38c8 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 @@ -44,6 +44,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupSchedule; import com.google.spanner.admin.database.v1.CopyBackupMetadata; @@ -312,6 +314,11 @@ public UnaryCallSettings restoreDatabaseSetti return ((DatabaseAdminStubSettings) getStubSettings()).listDatabaseRolesSettings(); } + /** Returns the object with the settings used for calls to addSplitPoints. */ + public UnaryCallSettings addSplitPointsSettings() { + return ((DatabaseAdminStubSettings) getStubSettings()).addSplitPointsSettings(); + } + /** Returns the object with the settings used for calls to createBackupSchedule. */ public UnaryCallSettings createBackupScheduleSettings() { @@ -606,6 +613,12 @@ public UnaryCallSettings.Builder restoreDatab return getStubSettingsBuilder().listDatabaseRolesSettings(); } + /** Returns the builder for the settings used for calls to addSplitPoints. */ + public UnaryCallSettings.Builder + addSplitPointsSettings() { + return getStubSettingsBuilder().addSplitPointsSettings(); + } + /** Returns the builder for the settings used for calls to createBackupSchedule. */ public UnaryCallSettings.Builder createBackupScheduleSettings() { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json index 7d6c894d7b6..96dc31e91d7 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "DatabaseAdminClient", "rpcs": { + "AddSplitPoints": { + "methods": ["addSplitPoints", "addSplitPoints", "addSplitPoints", "addSplitPointsCallable"] + }, "CopyBackup": { "methods": ["copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupOperationCallable", "copyBackupCallable"] }, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java index 7250a8c60f6..7926008bab3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java @@ -34,6 +34,8 @@ import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupSchedule; import com.google.spanner.admin.database.v1.CopyBackupMetadata; @@ -231,6 +233,10 @@ public UnaryCallable restoreDatabaseCallable( throw new UnsupportedOperationException("Not implemented: listDatabaseRolesCallable()"); } + public UnaryCallable addSplitPointsCallable() { + throw new UnsupportedOperationException("Not implemented: addSplitPointsCallable()"); + } + public UnaryCallable createBackupScheduleCallable() { throw new UnsupportedOperationException("Not implemented: createBackupScheduleCallable()"); } 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 246e44438ef..b2624c5a9a9 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 @@ -64,6 +64,8 @@ import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupSchedule; import com.google.spanner.admin.database.v1.CopyBackupMetadata; @@ -240,6 +242,8 @@ public class DatabaseAdminStubSettings extends StubSettings listDatabaseRolesSettings; + private final UnaryCallSettings + addSplitPointsSettings; private final UnaryCallSettings createBackupScheduleSettings; private final UnaryCallSettings @@ -745,6 +749,11 @@ public UnaryCallSettings restoreDatabaseSetti return listDatabaseRolesSettings; } + /** Returns the object with the settings used for calls to addSplitPoints. */ + public UnaryCallSettings addSplitPointsSettings() { + return addSplitPointsSettings; + } + /** Returns the object with the settings used for calls to createBackupSchedule. */ public UnaryCallSettings createBackupScheduleSettings() { @@ -912,6 +921,7 @@ protected DatabaseAdminStubSettings(Builder settingsBuilder) throws IOException listDatabaseOperationsSettings = settingsBuilder.listDatabaseOperationsSettings().build(); listBackupOperationsSettings = settingsBuilder.listBackupOperationsSettings().build(); listDatabaseRolesSettings = settingsBuilder.listDatabaseRolesSettings().build(); + addSplitPointsSettings = settingsBuilder.addSplitPointsSettings().build(); createBackupScheduleSettings = settingsBuilder.createBackupScheduleSettings().build(); getBackupScheduleSettings = settingsBuilder.getBackupScheduleSettings().build(); updateBackupScheduleSettings = settingsBuilder.updateBackupScheduleSettings().build(); @@ -978,6 +988,8 @@ public static class Builder extends StubSettings.Builder listDatabaseRolesSettings; + private final UnaryCallSettings.Builder + addSplitPointsSettings; private final UnaryCallSettings.Builder createBackupScheduleSettings; private final UnaryCallSettings.Builder @@ -1095,6 +1107,7 @@ protected Builder(ClientContext clientContext) { listBackupOperationsSettings = PagedCallSettings.newBuilder(LIST_BACKUP_OPERATIONS_PAGE_STR_FACT); listDatabaseRolesSettings = PagedCallSettings.newBuilder(LIST_DATABASE_ROLES_PAGE_STR_FACT); + addSplitPointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createBackupScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getBackupScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateBackupScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1124,6 +1137,7 @@ protected Builder(ClientContext clientContext) { listDatabaseOperationsSettings, listBackupOperationsSettings, listDatabaseRolesSettings, + addSplitPointsSettings, createBackupScheduleSettings, getBackupScheduleSettings, updateBackupScheduleSettings, @@ -1161,6 +1175,7 @@ protected Builder(DatabaseAdminStubSettings settings) { listDatabaseOperationsSettings = settings.listDatabaseOperationsSettings.toBuilder(); listBackupOperationsSettings = settings.listBackupOperationsSettings.toBuilder(); listDatabaseRolesSettings = settings.listDatabaseRolesSettings.toBuilder(); + addSplitPointsSettings = settings.addSplitPointsSettings.toBuilder(); createBackupScheduleSettings = settings.createBackupScheduleSettings.toBuilder(); getBackupScheduleSettings = settings.getBackupScheduleSettings.toBuilder(); updateBackupScheduleSettings = settings.updateBackupScheduleSettings.toBuilder(); @@ -1189,6 +1204,7 @@ protected Builder(DatabaseAdminStubSettings settings) { listDatabaseOperationsSettings, listBackupOperationsSettings, listDatabaseRolesSettings, + addSplitPointsSettings, createBackupScheduleSettings, getBackupScheduleSettings, updateBackupScheduleSettings, @@ -1321,6 +1337,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 + .addSplitPointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createBackupScheduleSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -1661,6 +1682,12 @@ public UnaryCallSettings.Builder restoreDatab return listDatabaseRolesSettings; } + /** Returns the builder for the settings used for calls to addSplitPoints. */ + public UnaryCallSettings.Builder + addSplitPointsSettings() { + return addSplitPointsSettings; + } + /** Returns the builder for the settings used for calls to createBackupSchedule. */ public UnaryCallSettings.Builder createBackupScheduleSettings() { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java index 5726370d364..9e6270f3c24 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java @@ -39,6 +39,8 @@ import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupSchedule; import com.google.spanner.admin.database.v1.CopyBackupMetadata; @@ -285,6 +287,17 @@ public class GrpcDatabaseAdminStub extends DatabaseAdminStub { ProtoUtils.marshaller(ListDatabaseRolesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + addSplitPointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.spanner.admin.database.v1.DatabaseAdmin/AddSplitPoints") + .setRequestMarshaller( + ProtoUtils.marshaller(AddSplitPointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AddSplitPointsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor createBackupScheduleMethodDescriptor = MethodDescriptor.newBuilder() @@ -386,6 +399,7 @@ public class GrpcDatabaseAdminStub extends DatabaseAdminStub { listDatabaseRolesCallable; private final UnaryCallable listDatabaseRolesPagedCallable; + private final UnaryCallable addSplitPointsCallable; private final UnaryCallable createBackupScheduleCallable; private final UnaryCallable getBackupScheduleCallable; @@ -645,6 +659,17 @@ protected GrpcDatabaseAdminStub( return builder.build(); }) .build(); + GrpcCallSettings + addSplitPointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addSplitPointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("database", String.valueOf(request.getDatabase())); + return builder.build(); + }) + .build(); GrpcCallSettings createBackupScheduleTransportSettings = GrpcCallSettings.newBuilder() @@ -828,6 +853,9 @@ protected GrpcDatabaseAdminStub( listDatabaseRolesTransportSettings, settings.listDatabaseRolesSettings(), clientContext); + this.addSplitPointsCallable = + callableFactory.createUnaryCallable( + addSplitPointsTransportSettings, settings.addSplitPointsSettings(), clientContext); this.createBackupScheduleCallable = callableFactory.createUnaryCallable( createBackupScheduleTransportSettings, @@ -1036,6 +1064,11 @@ public UnaryCallable restoreDatabaseCallable( return listDatabaseRolesPagedCallable; } + @Override + public UnaryCallable addSplitPointsCallable() { + return addSplitPointsCallable; + } + @Override public UnaryCallable createBackupScheduleCallable() { return createBackupScheduleCallable; 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 db4f8c7b960..038c51b144e 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 @@ -48,6 +48,8 @@ import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupSchedule; import com.google.spanner.admin.database.v1.CopyBackupMetadata; @@ -879,6 +881,43 @@ public class HttpJsonDatabaseAdminStub extends DatabaseAdminStub { .build()) .build(); + private static final ApiMethodDescriptor + addSplitPointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.spanner.admin.database.v1.DatabaseAdmin/AddSplitPoints") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "database", request.getDatabase()); + 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().clearDatabase().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AddSplitPointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor createBackupScheduleMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1113,6 +1152,7 @@ public class HttpJsonDatabaseAdminStub extends DatabaseAdminStub { listDatabaseRolesCallable; private final UnaryCallable listDatabaseRolesPagedCallable; + private final UnaryCallable addSplitPointsCallable; private final UnaryCallable createBackupScheduleCallable; private final UnaryCallable getBackupScheduleCallable; @@ -1474,6 +1514,18 @@ protected HttpJsonDatabaseAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings + addSplitPointsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addSplitPointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("database", String.valueOf(request.getDatabase())); + return builder.build(); + }) + .build(); HttpJsonCallSettings createBackupScheduleTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1664,6 +1716,9 @@ protected HttpJsonDatabaseAdminStub( listDatabaseRolesTransportSettings, settings.listDatabaseRolesSettings(), clientContext); + this.addSplitPointsCallable = + callableFactory.createUnaryCallable( + addSplitPointsTransportSettings, settings.addSplitPointsSettings(), clientContext); this.createBackupScheduleCallable = callableFactory.createUnaryCallable( createBackupScheduleTransportSettings, @@ -1722,6 +1777,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listDatabaseOperationsMethodDescriptor); methodDescriptors.add(listBackupOperationsMethodDescriptor); methodDescriptors.add(listDatabaseRolesMethodDescriptor); + methodDescriptors.add(addSplitPointsMethodDescriptor); methodDescriptors.add(createBackupScheduleMethodDescriptor); methodDescriptors.add(getBackupScheduleMethodDescriptor); methodDescriptors.add(updateBackupScheduleMethodDescriptor); @@ -1903,6 +1959,11 @@ public UnaryCallable restoreDatabaseCallable( return listDatabaseRolesPagedCallable; } + @Override + public UnaryCallable addSplitPointsCallable() { + return addSplitPointsCallable; + } + @Override public UnaryCallable createBackupScheduleCallable() { return createBackupScheduleCallable; diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json index 15e53bae299..3b456d976d0 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json @@ -1601,6 +1601,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.Timestamp", "queryAllDeclaredConstructors": true, @@ -1619,6 +1664,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.rpc.Status", "queryAllDeclaredConstructors": true, @@ -1637,6 +1700,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.AddSplitPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.database.v1.Backup", "queryAllDeclaredConstructors": true, @@ -2555,6 +2654,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints$Key", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.SplitPoints$Key$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.database.v1.UpdateBackupRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java index 948d3345143..5d476f914a8 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java @@ -46,6 +46,7 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupName; import com.google.spanner.admin.database.v1.BackupSchedule; @@ -67,6 +68,7 @@ import com.google.spanner.admin.database.v1.ListDatabaseRolesResponse; import com.google.spanner.admin.database.v1.ListDatabasesResponse; import com.google.spanner.admin.database.v1.RestoreInfo; +import com.google.spanner.admin.database.v1.SplitPoints; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -2454,6 +2456,92 @@ public void listDatabaseRolesExceptionTest2() throws Exception { } } + @Test + public void addSplitPointsTest() throws Exception { + AddSplitPointsResponse expectedResponse = AddSplitPointsResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + List splitPoints = new ArrayList<>(); + + AddSplitPointsResponse actualResponse = client.addSplitPoints(database, splitPoints); + 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 addSplitPointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + List splitPoints = new ArrayList<>(); + client.addSplitPoints(database, splitPoints); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addSplitPointsTest2() throws Exception { + AddSplitPointsResponse expectedResponse = AddSplitPointsResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String database = "projects/project-3102/instances/instance-3102/databases/database-3102"; + List splitPoints = new ArrayList<>(); + + AddSplitPointsResponse actualResponse = client.addSplitPoints(database, splitPoints); + 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 addSplitPointsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String database = "projects/project-3102/instances/instance-3102/databases/database-3102"; + List splitPoints = new ArrayList<>(); + client.addSplitPoints(database, splitPoints); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createBackupScheduleTest() throws Exception { BackupSchedule expectedResponse = diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java index 33143d458f6..2424ad7bc27 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java @@ -48,6 +48,8 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupName; import com.google.spanner.admin.database.v1.BackupSchedule; @@ -87,6 +89,7 @@ import com.google.spanner.admin.database.v1.ListDatabasesResponse; import com.google.spanner.admin.database.v1.RestoreDatabaseRequest; import com.google.spanner.admin.database.v1.RestoreInfo; +import com.google.spanner.admin.database.v1.SplitPoints; import com.google.spanner.admin.database.v1.UpdateBackupRequest; import com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest; import com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest; @@ -2250,6 +2253,82 @@ public void listDatabaseRolesExceptionTest2() throws Exception { } } + @Test + public void addSplitPointsTest() throws Exception { + AddSplitPointsResponse expectedResponse = AddSplitPointsResponse.newBuilder().build(); + mockDatabaseAdmin.addResponse(expectedResponse); + + DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + List splitPoints = new ArrayList<>(); + + AddSplitPointsResponse actualResponse = client.addSplitPoints(database, splitPoints); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatabaseAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddSplitPointsRequest actualRequest = ((AddSplitPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(database.toString(), actualRequest.getDatabase()); + Assert.assertEquals(splitPoints, actualRequest.getSplitPointsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addSplitPointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatabaseAdmin.addException(exception); + + try { + DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + List splitPoints = new ArrayList<>(); + client.addSplitPoints(database, splitPoints); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addSplitPointsTest2() throws Exception { + AddSplitPointsResponse expectedResponse = AddSplitPointsResponse.newBuilder().build(); + mockDatabaseAdmin.addResponse(expectedResponse); + + String database = "database1789464955"; + List splitPoints = new ArrayList<>(); + + AddSplitPointsResponse actualResponse = client.addSplitPoints(database, splitPoints); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatabaseAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddSplitPointsRequest actualRequest = ((AddSplitPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(database, actualRequest.getDatabase()); + Assert.assertEquals(splitPoints, actualRequest.getSplitPointsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addSplitPointsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDatabaseAdmin.addException(exception); + + try { + String database = "database1789464955"; + List splitPoints = new ArrayList<>(); + client.addSplitPoints(database, splitPoints); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createBackupScheduleTest() throws Exception { BackupSchedule expectedResponse = diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java index 1d904eed413..57ff0fa3819 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java @@ -25,6 +25,8 @@ import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; import com.google.spanner.admin.database.v1.Backup; import com.google.spanner.admin.database.v1.BackupSchedule; import com.google.spanner.admin.database.v1.CopyBackupRequest; @@ -513,6 +515,27 @@ public void listDatabaseRoles( } } + @Override + public void addSplitPoints( + AddSplitPointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AddSplitPointsResponse) { + requests.add(request); + responseObserver.onNext(((AddSplitPointsResponse) 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 AddSplitPoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AddSplitPointsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createBackupSchedule( CreateBackupScheduleRequest request, StreamObserver responseObserver) { diff --git a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java index 0089e1c9345..d8ad23a2bdb 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java @@ -943,6 +943,53 @@ private DatabaseAdminGrpc() {} return getListDatabaseRolesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.admin.database.v1.AddSplitPointsRequest, + com.google.spanner.admin.database.v1.AddSplitPointsResponse> + getAddSplitPointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddSplitPoints", + requestType = com.google.spanner.admin.database.v1.AddSplitPointsRequest.class, + responseType = com.google.spanner.admin.database.v1.AddSplitPointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.spanner.admin.database.v1.AddSplitPointsRequest, + com.google.spanner.admin.database.v1.AddSplitPointsResponse> + getAddSplitPointsMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.admin.database.v1.AddSplitPointsRequest, + com.google.spanner.admin.database.v1.AddSplitPointsResponse> + getAddSplitPointsMethod; + if ((getAddSplitPointsMethod = DatabaseAdminGrpc.getAddSplitPointsMethod) == null) { + synchronized (DatabaseAdminGrpc.class) { + if ((getAddSplitPointsMethod = DatabaseAdminGrpc.getAddSplitPointsMethod) == null) { + DatabaseAdminGrpc.getAddSplitPointsMethod = + getAddSplitPointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddSplitPoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.database.v1.AddSplitPointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.admin.database.v1.AddSplitPointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DatabaseAdminMethodDescriptorSupplier("AddSplitPoints")) + .build(); + } + } + } + return getAddSplitPointsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.spanner.admin.database.v1.CreateBackupScheduleRequest, com.google.spanner.admin.database.v1.BackupSchedule> @@ -1657,6 +1704,21 @@ default void listDatabaseRoles( getListDatabaseRolesMethod(), responseObserver); } + /** + * + * + *
+     * Adds split points to specified tables, indexes of a database.
+     * 
+ */ + default void addSplitPoints( + com.google.spanner.admin.database.v1.AddSplitPointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAddSplitPointsMethod(), responseObserver); + } + /** * * @@ -2232,6 +2294,23 @@ public void listDatabaseRoles( responseObserver); } + /** + * + * + *
+     * Adds split points to specified tables, indexes of a database.
+     * 
+ */ + public void addSplitPoints( + com.google.spanner.admin.database.v1.AddSplitPointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddSplitPointsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2730,6 +2809,19 @@ public com.google.spanner.admin.database.v1.ListDatabaseRolesResponse listDataba getChannel(), getListDatabaseRolesMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Adds split points to specified tables, indexes of a database.
+     * 
+ */ + public com.google.spanner.admin.database.v1.AddSplitPointsResponse addSplitPoints( + com.google.spanner.admin.database.v1.AddSplitPointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddSplitPointsMethod(), getCallOptions(), request); + } + /** * * @@ -3221,6 +3313,20 @@ protected DatabaseAdminFutureStub build( getChannel().newCall(getListDatabaseRolesMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Adds split points to specified tables, indexes of a database.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.spanner.admin.database.v1.AddSplitPointsResponse> + addSplitPoints(com.google.spanner.admin.database.v1.AddSplitPointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddSplitPointsMethod(), getCallOptions()), request); + } + /** * * @@ -3315,11 +3421,12 @@ protected DatabaseAdminFutureStub build( private static final int METHODID_LIST_DATABASE_OPERATIONS = 17; private static final int METHODID_LIST_BACKUP_OPERATIONS = 18; private static final int METHODID_LIST_DATABASE_ROLES = 19; - private static final int METHODID_CREATE_BACKUP_SCHEDULE = 20; - private static final int METHODID_GET_BACKUP_SCHEDULE = 21; - private static final int METHODID_UPDATE_BACKUP_SCHEDULE = 22; - private static final int METHODID_DELETE_BACKUP_SCHEDULE = 23; - private static final int METHODID_LIST_BACKUP_SCHEDULES = 24; + private static final int METHODID_ADD_SPLIT_POINTS = 20; + private static final int METHODID_CREATE_BACKUP_SCHEDULE = 21; + private static final int METHODID_GET_BACKUP_SCHEDULE = 22; + private static final int METHODID_UPDATE_BACKUP_SCHEDULE = 23; + private static final int METHODID_DELETE_BACKUP_SCHEDULE = 24; + private static final int METHODID_LIST_BACKUP_SCHEDULES = 25; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3454,6 +3561,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.spanner.admin.database.v1.ListDatabaseRolesResponse>) responseObserver); break; + case METHODID_ADD_SPLIT_POINTS: + serviceImpl.addSplitPoints( + (com.google.spanner.admin.database.v1.AddSplitPointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.spanner.admin.database.v1.AddSplitPointsResponse>) + responseObserver); + break; case METHODID_CREATE_BACKUP_SCHEDULE: serviceImpl.createBackupSchedule( (com.google.spanner.admin.database.v1.CreateBackupScheduleRequest) request, @@ -3627,6 +3741,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.spanner.admin.database.v1.ListDatabaseRolesRequest, com.google.spanner.admin.database.v1.ListDatabaseRolesResponse>( service, METHODID_LIST_DATABASE_ROLES))) + .addMethod( + getAddSplitPointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.spanner.admin.database.v1.AddSplitPointsRequest, + com.google.spanner.admin.database.v1.AddSplitPointsResponse>( + service, METHODID_ADD_SPLIT_POINTS))) .addMethod( getCreateBackupScheduleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -3732,6 +3853,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListDatabaseOperationsMethod()) .addMethod(getListBackupOperationsMethod()) .addMethod(getListDatabaseRolesMethod()) + .addMethod(getAddSplitPointsMethod()) .addMethod(getCreateBackupScheduleMethod()) .addMethod(getGetBackupScheduleMethod()) .addMethod(getUpdateBackupScheduleMethod()) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java new file mode 100644 index 00000000000..ebcd880bf0d --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java @@ -0,0 +1,1414 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/admin/database/v1/spanner_database_admin.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * The request for
+ * [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsRequest} + */ +public final class AddSplitPointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.AddSplitPointsRequest) + AddSplitPointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddSplitPointsRequest.newBuilder() to construct. + private AddSplitPointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddSplitPointsRequest() { + database_ = ""; + splitPoints_ = java.util.Collections.emptyList(); + initiator_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddSplitPointsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.AddSplitPointsRequest.class, + com.google.spanner.admin.database.v1.AddSplitPointsRequest.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + /** + * + * + *
+   * Required. The database on whose tables/indexes split points are to be
+   * added. Values are of the form
+   * `projects/<project>/instances/<instance>/databases/<database>`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + 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(); + database_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The database on whose tables/indexes split points are to be
+   * added. Values are of the form
+   * `projects/<project>/instances/<instance>/databases/<database>`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPLIT_POINTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List splitPoints_; + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getSplitPointsList() { + return splitPoints_; + } + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getSplitPointsOrBuilderList() { + return splitPoints_; + } + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getSplitPointsCount() { + return splitPoints_.size(); + } + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints getSplitPoints(int index) { + return splitPoints_.get(index); + } + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsOrBuilder( + int index) { + return splitPoints_.get(index); + } + + public static final int INITIATOR_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object initiator_ = ""; + /** + * + * + *
+   * Optional. A user-supplied tag associated with the split points.
+   * For example, "intital_data_load", "special_event_1".
+   * Defaults to "CloudAddSplitPointsAPI" if not specified.
+   * The length of the tag must not exceed 50 characters,else will be trimmed.
+   * Only valid UTF8 characters are allowed.
+   * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The initiator. + */ + @java.lang.Override + public java.lang.String getInitiator() { + java.lang.Object ref = initiator_; + 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(); + initiator_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A user-supplied tag associated with the split points.
+   * For example, "intital_data_load", "special_event_1".
+   * Defaults to "CloudAddSplitPointsAPI" if not specified.
+   * The length of the tag must not exceed 50 characters,else will be trimmed.
+   * Only valid UTF8 characters are allowed.
+   * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for initiator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInitiatorBytes() { + java.lang.Object ref = initiator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + initiator_ = 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(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + for (int i = 0; i < splitPoints_.size(); i++) { + output.writeMessage(2, splitPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initiator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, initiator_); + } + 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(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + for (int i = 0; i < splitPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, splitPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initiator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, initiator_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.admin.database.v1.AddSplitPointsRequest)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.AddSplitPointsRequest other = + (com.google.spanner.admin.database.v1.AddSplitPointsRequest) obj; + + if (!getDatabase().equals(other.getDatabase())) return false; + if (!getSplitPointsList().equals(other.getSplitPointsList())) return false; + if (!getInitiator().equals(other.getInitiator())) 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) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + if (getSplitPointsCount() > 0) { + hash = (37 * hash) + SPLIT_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getSplitPointsList().hashCode(); + } + hash = (37 * hash) + INITIATOR_FIELD_NUMBER; + hash = (53 * hash) + getInitiator().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.admin.database.v1.AddSplitPointsRequest 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
+   * [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.AddSplitPointsRequest) + com.google.spanner.admin.database.v1.AddSplitPointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.AddSplitPointsRequest.class, + com.google.spanner.admin.database.v1.AddSplitPointsRequest.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.AddSplitPointsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + database_ = ""; + if (splitPointsBuilder_ == null) { + splitPoints_ = java.util.Collections.emptyList(); + } else { + splitPoints_ = null; + splitPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + initiator_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsRequest getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.AddSplitPointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsRequest build() { + com.google.spanner.admin.database.v1.AddSplitPointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsRequest buildPartial() { + com.google.spanner.admin.database.v1.AddSplitPointsRequest result = + new com.google.spanner.admin.database.v1.AddSplitPointsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.admin.database.v1.AddSplitPointsRequest result) { + if (splitPointsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + splitPoints_ = java.util.Collections.unmodifiableList(splitPoints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.splitPoints_ = splitPoints_; + } else { + result.splitPoints_ = splitPointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.admin.database.v1.AddSplitPointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.initiator_ = initiator_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.admin.database.v1.AddSplitPointsRequest) { + return mergeFrom((com.google.spanner.admin.database.v1.AddSplitPointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.AddSplitPointsRequest other) { + if (other == com.google.spanner.admin.database.v1.AddSplitPointsRequest.getDefaultInstance()) + return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (splitPointsBuilder_ == null) { + if (!other.splitPoints_.isEmpty()) { + if (splitPoints_.isEmpty()) { + splitPoints_ = other.splitPoints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSplitPointsIsMutable(); + splitPoints_.addAll(other.splitPoints_); + } + onChanged(); + } + } else { + if (!other.splitPoints_.isEmpty()) { + if (splitPointsBuilder_.isEmpty()) { + splitPointsBuilder_.dispose(); + splitPointsBuilder_ = null; + splitPoints_ = other.splitPoints_; + bitField0_ = (bitField0_ & ~0x00000002); + splitPointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSplitPointsFieldBuilder() + : null; + } else { + splitPointsBuilder_.addAllMessages(other.splitPoints_); + } + } + } + if (!other.getInitiator().isEmpty()) { + initiator_ = other.initiator_; + bitField0_ |= 0x00000004; + 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: + { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.spanner.admin.database.v1.SplitPoints m = + input.readMessage( + com.google.spanner.admin.database.v1.SplitPoints.parser(), + extensionRegistry); + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.add(m); + } else { + splitPointsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + initiator_ = input.readStringRequireUtf8(); + 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 database_ = ""; + /** + * + * + *
+     * Required. The database on whose tables/indexes split points are to be
+     * added. Values are of the form
+     * `projects/<project>/instances/<instance>/databases/<database>`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The database on whose tables/indexes split points are to be
+     * added. Values are of the form
+     * `projects/<project>/instances/<instance>/databases/<database>`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for database. + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The database on whose tables/indexes split points are to be
+     * added. Values are of the form
+     * `projects/<project>/instances/<instance>/databases/<database>`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database on whose tables/indexes split points are to be
+     * added. Values are of the form
+     * `projects/<project>/instances/<instance>/databases/<database>`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database on whose tables/indexes split points are to be
+     * added. Values are of the form
+     * `projects/<project>/instances/<instance>/databases/<database>`.
+     * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List splitPoints_ = + java.util.Collections.emptyList(); + + private void ensureSplitPointsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + splitPoints_ = + new java.util.ArrayList(splitPoints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.SplitPoints, + com.google.spanner.admin.database.v1.SplitPoints.Builder, + com.google.spanner.admin.database.v1.SplitPointsOrBuilder> + splitPointsBuilder_; + + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getSplitPointsList() { + if (splitPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(splitPoints_); + } else { + return splitPointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getSplitPointsCount() { + if (splitPointsBuilder_ == null) { + return splitPoints_.size(); + } else { + return splitPointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints getSplitPoints(int index) { + if (splitPointsBuilder_ == null) { + return splitPoints_.get(index); + } else { + return splitPointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints value) { + if (splitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.set(index, value); + onChanged(); + } else { + splitPointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints.Builder builderForValue) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + splitPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addSplitPoints(com.google.spanner.admin.database.v1.SplitPoints value) { + if (splitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.add(value); + onChanged(); + } else { + splitPointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints value) { + if (splitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.add(index, value); + onChanged(); + } else { + splitPointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addSplitPoints( + com.google.spanner.admin.database.v1.SplitPoints.Builder builderForValue) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.add(builderForValue.build()); + onChanged(); + } else { + splitPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints.Builder builderForValue) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + splitPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllSplitPoints( + java.lang.Iterable values) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, splitPoints_); + onChanged(); + } else { + splitPointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSplitPoints() { + if (splitPointsBuilder_ == null) { + splitPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + splitPointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeSplitPoints(int index) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.remove(index); + onChanged(); + } else { + splitPointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Builder getSplitPointsBuilder( + int index) { + return getSplitPointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsOrBuilder( + int index) { + if (splitPointsBuilder_ == null) { + return splitPoints_.get(index); + } else { + return splitPointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getSplitPointsOrBuilderList() { + if (splitPointsBuilder_ != null) { + return splitPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(splitPoints_); + } + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBuilder() { + return getSplitPointsFieldBuilder() + .addBuilder(com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBuilder( + int index) { + return getSplitPointsFieldBuilder() + .addBuilder(index, com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The split points to add.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getSplitPointsBuilderList() { + return getSplitPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.SplitPoints, + com.google.spanner.admin.database.v1.SplitPoints.Builder, + com.google.spanner.admin.database.v1.SplitPointsOrBuilder> + getSplitPointsFieldBuilder() { + if (splitPointsBuilder_ == null) { + splitPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.SplitPoints, + com.google.spanner.admin.database.v1.SplitPoints.Builder, + com.google.spanner.admin.database.v1.SplitPointsOrBuilder>( + splitPoints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + splitPoints_ = null; + } + return splitPointsBuilder_; + } + + private java.lang.Object initiator_ = ""; + /** + * + * + *
+     * Optional. A user-supplied tag associated with the split points.
+     * For example, "intital_data_load", "special_event_1".
+     * Defaults to "CloudAddSplitPointsAPI" if not specified.
+     * The length of the tag must not exceed 50 characters,else will be trimmed.
+     * Only valid UTF8 characters are allowed.
+     * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The initiator. + */ + public java.lang.String getInitiator() { + java.lang.Object ref = initiator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + initiator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A user-supplied tag associated with the split points.
+     * For example, "intital_data_load", "special_event_1".
+     * Defaults to "CloudAddSplitPointsAPI" if not specified.
+     * The length of the tag must not exceed 50 characters,else will be trimmed.
+     * Only valid UTF8 characters are allowed.
+     * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for initiator. + */ + public com.google.protobuf.ByteString getInitiatorBytes() { + java.lang.Object ref = initiator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + initiator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A user-supplied tag associated with the split points.
+     * For example, "intital_data_load", "special_event_1".
+     * Defaults to "CloudAddSplitPointsAPI" if not specified.
+     * The length of the tag must not exceed 50 characters,else will be trimmed.
+     * Only valid UTF8 characters are allowed.
+     * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The initiator to set. + * @return This builder for chaining. + */ + public Builder setInitiator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + initiator_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A user-supplied tag associated with the split points.
+     * For example, "intital_data_load", "special_event_1".
+     * Defaults to "CloudAddSplitPointsAPI" if not specified.
+     * The length of the tag must not exceed 50 characters,else will be trimmed.
+     * Only valid UTF8 characters are allowed.
+     * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInitiator() { + initiator_ = getDefaultInstance().getInitiator(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A user-supplied tag associated with the split points.
+     * For example, "intital_data_load", "special_event_1".
+     * Defaults to "CloudAddSplitPointsAPI" if not specified.
+     * The length of the tag must not exceed 50 characters,else will be trimmed.
+     * Only valid UTF8 characters are allowed.
+     * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for initiator to set. + * @return This builder for chaining. + */ + public Builder setInitiatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + initiator_ = 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.database.v1.AddSplitPointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.AddSplitPointsRequest) + private static final com.google.spanner.admin.database.v1.AddSplitPointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.AddSplitPointsRequest(); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddSplitPointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java new file mode 100644 index 00000000000..d03cb8c611d --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/admin/database/v1/spanner_database_admin.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.database.v1; + +public interface AddSplitPointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.AddSplitPointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The database on whose tables/indexes split points are to be
+   * added. Values are of the form
+   * `projects/<project>/instances/<instance>/databases/<database>`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The database. + */ + java.lang.String getDatabase(); + /** + * + * + *
+   * Required. The database on whose tables/indexes split points are to be
+   * added. Values are of the form
+   * `projects/<project>/instances/<instance>/databases/<database>`.
+   * 
+ * + * + * string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for database. + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getSplitPointsList(); + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.database.v1.SplitPoints getSplitPoints(int index); + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getSplitPointsCount(); + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getSplitPointsOrBuilderList(); + /** + * + * + *
+   * Required. The split points to add.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A user-supplied tag associated with the split points.
+   * For example, "intital_data_load", "special_event_1".
+   * Defaults to "CloudAddSplitPointsAPI" if not specified.
+   * The length of the tag must not exceed 50 characters,else will be trimmed.
+   * Only valid UTF8 characters are allowed.
+   * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The initiator. + */ + java.lang.String getInitiator(); + /** + * + * + *
+   * Optional. A user-supplied tag associated with the split points.
+   * For example, "intital_data_load", "special_event_1".
+   * Defaults to "CloudAddSplitPointsAPI" if not specified.
+   * The length of the tag must not exceed 50 characters,else will be trimmed.
+   * Only valid UTF8 characters are allowed.
+   * 
+ * + * string initiator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for initiator. + */ + com.google.protobuf.ByteString getInitiatorBytes(); +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java new file mode 100644 index 00000000000..a78c8b880e4 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java @@ -0,0 +1,435 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/admin/database/v1/spanner_database_admin.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * The response for
+ * [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsResponse} + */ +public final class AddSplitPointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.AddSplitPointsResponse) + AddSplitPointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddSplitPointsResponse.newBuilder() to construct. + private AddSplitPointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddSplitPointsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddSplitPointsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.AddSplitPointsResponse.class, + com.google.spanner.admin.database.v1.AddSplitPointsResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.admin.database.v1.AddSplitPointsResponse)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.AddSplitPointsResponse other = + (com.google.spanner.admin.database.v1.AddSplitPointsResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.admin.database.v1.AddSplitPointsResponse 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
+   * [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.AddSplitPointsResponse) + com.google.spanner.admin.database.v1.AddSplitPointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.AddSplitPointsResponse.class, + com.google.spanner.admin.database.v1.AddSplitPointsResponse.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.AddSplitPointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsResponse getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.AddSplitPointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsResponse build() { + com.google.spanner.admin.database.v1.AddSplitPointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsResponse buildPartial() { + com.google.spanner.admin.database.v1.AddSplitPointsResponse result = + new com.google.spanner.admin.database.v1.AddSplitPointsResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.admin.database.v1.AddSplitPointsResponse) { + return mergeFrom((com.google.spanner.admin.database.v1.AddSplitPointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.AddSplitPointsResponse other) { + if (other == com.google.spanner.admin.database.v1.AddSplitPointsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.database.v1.AddSplitPointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.AddSplitPointsResponse) + private static final com.google.spanner.admin.database.v1.AddSplitPointsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.AddSplitPointsResponse(); + } + + public static com.google.spanner.admin.database.v1.AddSplitPointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddSplitPointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.AddSplitPointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java new file mode 100644 index 00000000000..bc6192ab7b7 --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/admin/database/v1/spanner_database_admin.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.database.v1; + +public interface AddSplitPointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.AddSplitPointsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java index 507aa4a281f..06a130a7002 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java @@ -124,6 +124,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -142,301 +158,319 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\032\032google/iam/v1/policy.proto\032#google" + "/longrunning/operations.proto\032\033google/pr" + "otobuf/empty.proto\032 google/protobuf/fiel" - + "d_mask.proto\032\037google/protobuf/timestamp." - + "proto\032-google/spanner/admin/database/v1/" - + "backup.proto\0326google/spanner/admin/datab" - + "ase/v1/backup_schedule.proto\032-google/spa" - + "nner/admin/database/v1/common.proto\"\253\001\n\013" - + "RestoreInfo\022H\n\013source_type\030\001 \001(\01623.googl" - + "e.spanner.admin.database.v1.RestoreSourc" - + "eType\022C\n\013backup_info\030\002 \001(\0132,.google.span" - + "ner.admin.database.v1.BackupInfoH\000B\r\n\013so" - + "urce_info\"\312\006\n\010Database\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\002\022D\n\005state\030\002 \001(\01620.google.spanner.admin." - + "database.v1.Database.StateB\003\340A\003\0224\n\013creat" - + "e_time\030\003 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022H\n\014restore_info\030\004 \001(\0132-.google.spa" - + "nner.admin.database.v1.RestoreInfoB\003\340A\003\022" - + "R\n\021encryption_config\030\005 \001(\01322.google.span" - + "ner.admin.database.v1.EncryptionConfigB\003" - + "\340A\003\022N\n\017encryption_info\030\010 \003(\01320.google.sp" - + "anner.admin.database.v1.EncryptionInfoB\003" - + "\340A\003\022%\n\030version_retention_period\030\006 \001(\tB\003\340" - + "A\003\022>\n\025earliest_version_time\030\007 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022\033\n\016default_le" - + "ader\030\t \001(\tB\003\340A\003\022P\n\020database_dialect\030\n \001(" - + "\01621.google.spanner.admin.database.v1.Dat" - + "abaseDialectB\003\340A\003\022\036\n\026enable_drop_protect" - + "ion\030\013 \001(\010\022\030\n\013reconciling\030\014 \001(\010B\003\340A\003\"M\n\005S" - + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020" - + "\001\022\t\n\005READY\020\002\022\024\n\020READY_OPTIMIZING\020\003:b\352A_\n" - + "\037spanner.googleapis.com/Database\022\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projec" - + "ts/*/instances/*}/databases\022\244\002\n\016CreateDa" - + "tabase\0227.google.spanner.admin.database.v" - + "1.CreateDatabaseRequest\032\035.google.longrun" - + "ning.Operation\"\271\001\312Ad\n)google.spanner.adm" - + "in.database.v1.Database\0227google.spanner." - + "admin.database.v1.CreateDatabaseMetadata" - + "\332A\027parent,create_statement\202\323\344\223\0022\"-/v1/{p" - + "arent=projects/*/instances/*}/databases:" - + "\001*\022\255\001\n\013GetDatabase\0224.google.spanner.admi" - + "n.database.v1.GetDatabaseRequest\032*.googl" - + "e.spanner.admin.database.v1.Database\"<\332A" - + "\004name\202\323\344\223\002/\022-/v1/{name=projects/*/instan" - + "ces/*/databases/*}\022\357\001\n\016UpdateDatabase\0227." - + "google.spanner.admin.database.v1.UpdateD" - + "atabaseRequest\032\035.google.longrunning.Oper" - + "ation\"\204\001\312A\"\n\010Database\022\026UpdateDatabaseMet" - + "adata\332A\024database,update_mask\202\323\344\223\002B26/v1/" - + "{database.name=projects/*/instances/*/da" - + "tabases/*}:\010database\022\235\002\n\021UpdateDatabaseD" - + "dl\022:.google.spanner.admin.database.v1.Up" - + "dateDatabaseDdlRequest\032\035.google.longrunn" - + "ing.Operation\"\254\001\312AS\n\025google.protobuf.Emp" - + "ty\022:google.spanner.admin.database.v1.Upd" - + "ateDatabaseDdlMetadata\332A\023database,statem" - + "ents\202\323\344\223\002:25/v1/{database=projects/*/ins" - + "tances/*/databases/*}/ddl:\001*\022\243\001\n\014DropDat" - + "abase\0225.google.spanner.admin.database.v1" - + ".DropDatabaseRequest\032\026.google.protobuf.E" - + "mpty\"D\332A\010database\202\323\344\223\0023*1/v1/{database=p" - + "rojects/*/instances/*/databases/*}\022\315\001\n\016G" - + "etDatabaseDdl\0227.google.spanner.admin.dat" - + "abase.v1.GetDatabaseDdlRequest\0328.google." - + "spanner.admin.database.v1.GetDatabaseDdl" - + "Response\"H\332A\010database\202\323\344\223\0027\0225/v1/{databa" - + "se=projects/*/instances/*/databases/*}/d" - + "dl\022\302\002\n\014SetIamPolicy\022\".google.iam.v1.SetI" - + "amPolicyRequest\032\025.google.iam.v1.Policy\"\366" - + "\001\332A\017resource,policy\202\323\344\223\002\335\001\">/v1/{resourc" - + "e=projects/*/instances/*/databases/*}:se" - + "tIamPolicy:\001*ZA\"/v1/{resource=" - + "projects/*/instances/*/databases/*}:getI" - + "amPolicy:\001*ZA\"\n\025earl" + + "iest_version_time\030\007 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022\033\n\016default_leader\030\t \001(\t" + + "B\003\340A\003\022P\n\020database_dialect\030\n \001(\01621.google" + + ".spanner.admin.database.v1.DatabaseDiale" + + "ctB\003\340A\003\022\036\n\026enable_drop_protection\030\013 \001(\010\022" + + "\030\n\013reconciling\030\014 \001(\010B\003\340A\003\"M\n\005State\022\025\n\021ST" + + "ATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY" + + "\020\002\022\024\n\020READY_OPTIMIZING\020\003:b\352A_\n\037spanner.g" + + "oogleapis.com/Database\022.google.spanner.admin.databa" - + "se.v1.ListBackupOperationsResponse\"E\332A\006p" - + "arent\202\323\344\223\0026\0224/v1/{parent=projects/*/inst" - + "ances/*}/backupOperations\022\334\001\n\021ListDataba" - + "seRoles\022:.google.spanner.admin.database." - + "v1.ListDatabaseRolesRequest\032;.google.spa" - + "nner.admin.database.v1.ListDatabaseRoles" - + "Response\"N\332A\006parent\202\323\344\223\002?\022=/v1/{parent=p" - + "rojects/*/instances/*/databases/*}/datab" - + "aseRoles\022\216\002\n\024CreateBackupSchedule\022=.goog" - + "le.spanner.admin.database.v1.CreateBacku" - + "pScheduleRequest\0320.google.spanner.admin." - + "database.v1.BackupSchedule\"\204\001\332A)parent,b" - + "ackup_schedule,backup_schedule_id\202\323\344\223\002R\"" - + "?/v1/{parent=projects/*/instances/*/data" - + "bases/*}/backupSchedules:\017backup_schedul" - + "e\022\321\001\n\021GetBackupSchedule\022:.google.spanner" - + ".admin.database.v1.GetBackupScheduleRequ" - + "est\0320.google.spanner.admin.database.v1.B" - + "ackupSchedule\"N\332A\004name\202\323\344\223\002A\022?/v1/{name=" - + "projects/*/instances/*/databases/*/backu" - + "pSchedules/*}\022\220\002\n\024UpdateBackupSchedule\022=" - + ".google.spanner.admin.database.v1.Update" - + "BackupScheduleRequest\0320.google.spanner.a" - + "dmin.database.v1.BackupSchedule\"\206\001\332A\033bac" - + "kup_schedule,update_mask\202\323\344\223\002b2O/v1/{bac" - + "kup_schedule.name=projects/*/instances/*" - + "/databases/*/backupSchedules/*}:\017backup_" - + "schedule\022\275\001\n\024DeleteBackupSchedule\022=.goog" - + "le.spanner.admin.database.v1.DeleteBacku" - + "pScheduleRequest\032\026.google.protobuf.Empty" - + "\"N\332A\004name\202\323\344\223\002A*?/v1/{name=projects/*/in" - + "stances/*/databases/*/backupSchedules/*}" - + "\022\344\001\n\023ListBackupSchedules\022<.google.spanne" - + "r.admin.database.v1.ListBackupSchedulesR" - + "equest\032=.google.spanner.admin.database.v" - + "1.ListBackupSchedulesResponse\"P\332A\006parent" - + "\202\323\344\223\002A\022?/v1/{parent=projects/*/instances" - + "/*/databases/*}/backupSchedules\032x\312A\026span" - + "ner.googleapis.com\322A\\https://www.googlea" - + "pis.com/auth/cloud-platform,https://www." - + "googleapis.com/auth/spanner.adminB\330\002\n$co" - + "m.google.spanner.admin.database.v1B\031Span" - + "nerDatabaseAdminProtoP\001ZFcloud.google.co" - + "m/go/spanner/admin/database/apiv1/databa" - + "sepb;databasepb\252\002&Google.Cloud.Spanner.A" - + "dmin.Database.V1\312\002&Google\\Cloud\\Spanner\\" - + "Admin\\Database\\V1\352\002+Google::Cloud::Spann" - + "er::Admin::Database::V1\352AJ\n\037spanner.goog" - + "leapis.com/Instance\022\'projects/{project}/" - + "instances/{instance}b\006proto3" + + "tabasesRequest\0327.google.spanner.admin.da" + + "tabase.v1.ListDatabasesResponse\">\332A\006pare" + + "nt\202\323\344\223\002/\022-/v1/{parent=projects/*/instanc" + + "es/*}/databases\022\244\002\n\016CreateDatabase\0227.goo" + + "gle.spanner.admin.database.v1.CreateData" + + "baseRequest\032\035.google.longrunning.Operati" + + "on\"\271\001\312Ad\n)google.spanner.admin.database." + + "v1.Database\0227google.spanner.admin.databa" + + "se.v1.CreateDatabaseMetadata\332A\027parent,cr" + + "eate_statement\202\323\344\223\0022\"-/v1/{parent=projec" + + "ts/*/instances/*}/databases:\001*\022\255\001\n\013GetDa" + + "tabase\0224.google.spanner.admin.database.v" + + "1.GetDatabaseRequest\032*.google.spanner.ad" + + "min.database.v1.Database\"<\332A\004name\202\323\344\223\002/\022" + + "-/v1/{name=projects/*/instances/*/databa" + + "ses/*}\022\357\001\n\016UpdateDatabase\0227.google.spann" + + "er.admin.database.v1.UpdateDatabaseReque" + + "st\032\035.google.longrunning.Operation\"\204\001\312A\"\n" + + "\010Database\022\026UpdateDatabaseMetadata\332A\024data" + + "base,update_mask\202\323\344\223\002B26/v1/{database.na" + + "me=projects/*/instances/*/databases/*}:\010" + + "database\022\235\002\n\021UpdateDatabaseDdl\022:.google." + + "spanner.admin.database.v1.UpdateDatabase" + + "DdlRequest\032\035.google.longrunning.Operatio" + + "n\"\254\001\312AS\n\025google.protobuf.Empty\022:google.s" + + "panner.admin.database.v1.UpdateDatabaseD" + + "dlMetadata\332A\023database,statements\202\323\344\223\002:25" + + "/v1/{database=projects/*/instances/*/dat" + + "abases/*}/ddl:\001*\022\243\001\n\014DropDatabase\0225.goog" + + "le.spanner.admin.database.v1.DropDatabas" + + "eRequest\032\026.google.protobuf.Empty\"D\332A\010dat" + + "abase\202\323\344\223\0023*1/v1/{database=projects/*/in" + + "stances/*/databases/*}\022\315\001\n\016GetDatabaseDd" + + "l\0227.google.spanner.admin.database.v1.Get" + + "DatabaseDdlRequest\0328.google.spanner.admi" + + "n.database.v1.GetDatabaseDdlResponse\"H\332A" + + "\010database\202\323\344\223\0027\0225/v1/{database=projects/" + + "*/instances/*/databases/*}/ddl\022\302\002\n\014SetIa" + + "mPolicy\022\".google.iam.v1.SetIamPolicyRequ" + + "est\032\025.google.iam.v1.Policy\"\366\001\332A\017resource" + + ",policy\202\323\344\223\002\335\001\">/v1/{resource=projects/*" + + "/instances/*/databases/*}:setIamPolicy:\001" + + "*ZA\"/v1/{resource=projects/*/i" + + "nstances/*/databases/*}:getIamPolicy:\001*Z" + + "A\"" + + ".google.spanner.admin.database.v1.ListBa" + + "ckupOperationsResponse\"E\332A\006parent\202\323\344\223\0026\022" + + "4/v1/{parent=projects/*/instances/*}/bac" + + "kupOperations\022\334\001\n\021ListDatabaseRoles\022:.go" + + "ogle.spanner.admin.database.v1.ListDatab" + + "aseRolesRequest\032;.google.spanner.admin.d" + + "atabase.v1.ListDatabaseRolesResponse\"N\332A" + + "\006parent\202\323\344\223\002?\022=/v1/{parent=projects/*/in" + + "stances/*/databases/*}/databaseRoles\022\350\001\n" + + "\016AddSplitPoints\0227.google.spanner.admin.d" + + "atabase.v1.AddSplitPointsRequest\0328.googl" + + "e.spanner.admin.database.v1.AddSplitPoin" + + "tsResponse\"c\332A\025database,split_points\202\323\344\223" + + "\002E\"@/v1/{database=projects/*/instances/*" + + "/databases/*}:addSplitPoints:\001*\022\216\002\n\024Crea" + + "teBackupSchedule\022=.google.spanner.admin." + + "database.v1.CreateBackupScheduleRequest\032" + + "0.google.spanner.admin.database.v1.Backu" + + "pSchedule\"\204\001\332A)parent,backup_schedule,ba" + + "ckup_schedule_id\202\323\344\223\002R\"?/v1/{parent=proj" + + "ects/*/instances/*/databases/*}/backupSc" + + "hedules:\017backup_schedule\022\321\001\n\021GetBackupSc" + + "hedule\022:.google.spanner.admin.database.v" + + "1.GetBackupScheduleRequest\0320.google.span" + + "ner.admin.database.v1.BackupSchedule\"N\332A" + + "\004name\202\323\344\223\002A\022?/v1/{name=projects/*/instan" + + "ces/*/databases/*/backupSchedules/*}\022\220\002\n" + + "\024UpdateBackupSchedule\022=.google.spanner.a" + + "dmin.database.v1.UpdateBackupScheduleReq" + + "uest\0320.google.spanner.admin.database.v1." + + "BackupSchedule\"\206\001\332A\033backup_schedule,upda" + + "te_mask\202\323\344\223\002b2O/v1/{backup_schedule.name" + + "=projects/*/instances/*/databases/*/back" + + "upSchedules/*}:\017backup_schedule\022\275\001\n\024Dele" + + "teBackupSchedule\022=.google.spanner.admin." + + "database.v1.DeleteBackupScheduleRequest\032" + + "\026.google.protobuf.Empty\"N\332A\004name\202\323\344\223\002A*?" + + "/v1/{name=projects/*/instances/*/databas" + + "es/*/backupSchedules/*}\022\344\001\n\023ListBackupSc" + + "hedules\022<.google.spanner.admin.database." + + "v1.ListBackupSchedulesRequest\032=.google.s" + + "panner.admin.database.v1.ListBackupSched" + + "ulesResponse\"P\332A\006parent\202\323\344\223\002A\022?/v1/{pare" + + "nt=projects/*/instances/*/databases/*}/b" + + "ackupSchedules\032x\312A\026spanner.googleapis.co" + + "m\322A\\https://www.googleapis.com/auth/clou" + + "d-platform,https://www.googleapis.com/au" + + "th/spanner.adminB\330\002\n$com.google.spanner." + + "admin.database.v1B\031SpannerDatabaseAdminP" + + "rotoP\001ZFcloud.google.com/go/spanner/admi" + + "n/database/apiv1/databasepb;databasepb\252\002" + + "&Google.Cloud.Spanner.Admin.Database.V1\312" + + "\002&Google\\Cloud\\Spanner\\Admin\\Database\\V1" + + "\352\002+Google::Cloud::Spanner::Admin::Databa" + + "se::V1\352AJ\n\037spanner.googleapis.com/Instan" + + "ce\022\'projects/{project}/instances/{instan" + + "ce}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -451,6 +485,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.spanner.admin.database.v1.BackupProto.getDescriptor(), com.google.spanner.admin.database.v1.BackupScheduleProto.getDescriptor(), @@ -670,6 +705,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DatabaseRoles", "NextPageToken", }); + internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor, + new java.lang.String[] { + "Database", "SplitPoints", "Initiator", + }); + internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor, + new java.lang.String[] { + "Table", "Index", "Keys", "ExpireTime", + }); + internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor = + internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor, + new java.lang.String[] { + "KeyParts", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -692,6 +759,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.spanner.admin.database.v1.BackupProto.getDescriptor(); com.google.spanner.admin.database.v1.BackupScheduleProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java new file mode 100644 index 00000000000..bd01be8bf1e --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java @@ -0,0 +1,2437 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/admin/database/v1/spanner_database_admin.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.database.v1; + +/** + * + * + *
+ * The split points of a table/index.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints} + */ +public final class SplitPoints extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.SplitPoints) + SplitPointsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SplitPoints.newBuilder() to construct. + private SplitPoints(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SplitPoints() { + table_ = ""; + index_ = ""; + keys_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SplitPoints(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.SplitPoints.class, + com.google.spanner.admin.database.v1.SplitPoints.Builder.class); + } + + public interface KeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.SplitPoints.Key) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The column values making up the split key.
+     * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the keyParts field is set. + */ + boolean hasKeyParts(); + /** + * + * + *
+     * Required. The column values making up the split key.
+     * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The keyParts. + */ + com.google.protobuf.ListValue getKeyParts(); + /** + * + * + *
+     * Required. The column values making up the split key.
+     * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.ListValueOrBuilder getKeyPartsOrBuilder(); + } + /** + * + * + *
+   * A split key.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints.Key} + */ + public static final class Key extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.SplitPoints.Key) + KeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Key.newBuilder() to construct. + private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Key() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Key(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.SplitPoints.Key.class, + com.google.spanner.admin.database.v1.SplitPoints.Key.Builder.class); + } + + private int bitField0_; + public static final int KEY_PARTS_FIELD_NUMBER = 1; + private com.google.protobuf.ListValue keyParts_; + /** + * + * + *
+     * Required. The column values making up the split key.
+     * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the keyParts field is set. + */ + @java.lang.Override + public boolean hasKeyParts() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The column values making up the split key.
+     * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The keyParts. + */ + @java.lang.Override + public com.google.protobuf.ListValue getKeyParts() { + return keyParts_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : keyParts_; + } + /** + * + * + *
+     * Required. The column values making up the split key.
+     * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.ListValueOrBuilder getKeyPartsOrBuilder() { + return keyParts_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : keyParts_; + } + + 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, getKeyParts()); + } + 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, getKeyParts()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.admin.database.v1.SplitPoints.Key)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.SplitPoints.Key other = + (com.google.spanner.admin.database.v1.SplitPoints.Key) obj; + + if (hasKeyParts() != other.hasKeyParts()) return false; + if (hasKeyParts()) { + if (!getKeyParts().equals(other.getKeyParts())) 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 (hasKeyParts()) { + hash = (37 * hash) + KEY_PARTS_FIELD_NUMBER; + hash = (53 * hash) + getKeyParts().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.admin.database.v1.SplitPoints.Key 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; + } + /** + * + * + *
+     * A split key.
+     * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints.Key} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.SplitPoints.Key) + com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.SplitPoints.Key.class, + com.google.spanner.admin.database.v1.SplitPoints.Key.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.SplitPoints.Key.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getKeyPartsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyParts_ = null; + if (keyPartsBuilder_ != null) { + keyPartsBuilder_.dispose(); + keyPartsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints.Key getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.SplitPoints.Key.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints.Key build() { + com.google.spanner.admin.database.v1.SplitPoints.Key result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints.Key buildPartial() { + com.google.spanner.admin.database.v1.SplitPoints.Key result = + new com.google.spanner.admin.database.v1.SplitPoints.Key(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.admin.database.v1.SplitPoints.Key result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyParts_ = keyPartsBuilder_ == null ? keyParts_ : keyPartsBuilder_.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.database.v1.SplitPoints.Key) { + return mergeFrom((com.google.spanner.admin.database.v1.SplitPoints.Key) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.SplitPoints.Key other) { + if (other == com.google.spanner.admin.database.v1.SplitPoints.Key.getDefaultInstance()) + return this; + if (other.hasKeyParts()) { + mergeKeyParts(other.getKeyParts()); + } + 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(getKeyPartsFieldBuilder().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.protobuf.ListValue keyParts_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + keyPartsBuilder_; + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the keyParts field is set. + */ + public boolean hasKeyParts() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The keyParts. + */ + public com.google.protobuf.ListValue getKeyParts() { + if (keyPartsBuilder_ == null) { + return keyParts_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : keyParts_; + } else { + return keyPartsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setKeyParts(com.google.protobuf.ListValue value) { + if (keyPartsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyParts_ = value; + } else { + keyPartsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setKeyParts(com.google.protobuf.ListValue.Builder builderForValue) { + if (keyPartsBuilder_ == null) { + keyParts_ = builderForValue.build(); + } else { + keyPartsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeKeyParts(com.google.protobuf.ListValue value) { + if (keyPartsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && keyParts_ != null + && keyParts_ != com.google.protobuf.ListValue.getDefaultInstance()) { + getKeyPartsBuilder().mergeFrom(value); + } else { + keyParts_ = value; + } + } else { + keyPartsBuilder_.mergeFrom(value); + } + if (keyParts_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearKeyParts() { + bitField0_ = (bitField0_ & ~0x00000001); + keyParts_ = null; + if (keyPartsBuilder_ != null) { + keyPartsBuilder_.dispose(); + keyPartsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ListValue.Builder getKeyPartsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyPartsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ListValueOrBuilder getKeyPartsOrBuilder() { + if (keyPartsBuilder_ != null) { + return keyPartsBuilder_.getMessageOrBuilder(); + } else { + return keyParts_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : keyParts_; + } + } + /** + * + * + *
+       * Required. The column values making up the split key.
+       * 
+ * + * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + getKeyPartsFieldBuilder() { + if (keyPartsBuilder_ == null) { + keyPartsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder>( + getKeyParts(), getParentForChildren(), isClean()); + keyParts_ = null; + } + return keyPartsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.database.v1.SplitPoints.Key) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.SplitPoints.Key) + private static final com.google.spanner.admin.database.v1.SplitPoints.Key DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.SplitPoints.Key(); + } + + public static com.google.spanner.admin.database.v1.SplitPoints.Key getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Key parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints.Key getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+   * The table to split.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * The table to split.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * The index to split.
+   * If specified, the `table` field must refer to the index's base table.
+   * 
+ * + * string index = 2; + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * The index to split.
+   * If specified, the `table` field must refer to the index's base table.
+   * 
+ * + * string index = 2; + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEYS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List keys_; + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getKeysList() { + return keys_; + } + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getKeysOrBuilderList() { + return keys_; + } + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getKeysCount() { + return keys_.size(); + } + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints.Key getKeys(int index) { + return keys_.get(index); + } + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder getKeysOrBuilder(int index) { + return keys_.get(index); + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Optional. The expiration timestamp of the split points.
+   * A timestamp in the past means immediate expiration.
+   * The maximum value can be 30 days in the future.
+   * Defaults to 10 days in the future if not specified.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The expiration timestamp of the split points.
+   * A timestamp in the past means immediate expiration.
+   * The maximum value can be 30 days in the future.
+   * Defaults to 10 days in the future if not specified.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Optional. The expiration timestamp of the split points.
+   * A timestamp in the past means immediate expiration.
+   * The maximum value can be 30 days in the future.
+   * Defaults to 10 days in the future if not specified.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + 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(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + } + for (int i = 0; i < keys_.size(); i++) { + output.writeMessage(3, keys_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getExpireTime()); + } + 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(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + } + for (int i = 0; i < keys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, keys_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.admin.database.v1.SplitPoints)) { + return super.equals(obj); + } + com.google.spanner.admin.database.v1.SplitPoints other = + (com.google.spanner.admin.database.v1.SplitPoints) obj; + + if (!getTable().equals(other.getTable())) return false; + if (!getIndex().equals(other.getIndex())) return false; + if (!getKeysList().equals(other.getKeysList())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) 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) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + if (getKeysCount() > 0) { + hash = (37 * hash) + KEYS_FIELD_NUMBER; + hash = (53 * hash) + getKeysList().hashCode(); + } + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.admin.database.v1.SplitPoints 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 split points of a table/index.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.SplitPoints) + com.google.spanner.admin.database.v1.SplitPointsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.database.v1.SplitPoints.class, + com.google.spanner.admin.database.v1.SplitPoints.Builder.class); + } + + // Construct using com.google.spanner.admin.database.v1.SplitPoints.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getKeysFieldBuilder(); + getExpireTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + table_ = ""; + index_ = ""; + if (keysBuilder_ == null) { + keys_ = java.util.Collections.emptyList(); + } else { + keys_ = null; + keysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto + .internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints getDefaultInstanceForType() { + return com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints build() { + com.google.spanner.admin.database.v1.SplitPoints result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints buildPartial() { + com.google.spanner.admin.database.v1.SplitPoints result = + new com.google.spanner.admin.database.v1.SplitPoints(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.admin.database.v1.SplitPoints result) { + if (keysBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + keys_ = java.util.Collections.unmodifiableList(keys_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.keys_ = keys_; + } else { + result.keys_ = keysBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.admin.database.v1.SplitPoints result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.table_ = table_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.index_ = index_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.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.database.v1.SplitPoints) { + return mergeFrom((com.google.spanner.admin.database.v1.SplitPoints) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.database.v1.SplitPoints other) { + if (other == com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()) + return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (keysBuilder_ == null) { + if (!other.keys_.isEmpty()) { + if (keys_.isEmpty()) { + keys_ = other.keys_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureKeysIsMutable(); + keys_.addAll(other.keys_); + } + onChanged(); + } + } else { + if (!other.keys_.isEmpty()) { + if (keysBuilder_.isEmpty()) { + keysBuilder_.dispose(); + keysBuilder_ = null; + keys_ = other.keys_; + bitField0_ = (bitField0_ & ~0x00000004); + keysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getKeysFieldBuilder() + : null; + } else { + keysBuilder_.addAllMessages(other.keys_); + } + } + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + 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: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.spanner.admin.database.v1.SplitPoints.Key m = + input.readMessage( + com.google.spanner.admin.database.v1.SplitPoints.Key.parser(), + extensionRegistry); + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.add(m); + } else { + keysBuilder_.addMessage(m); + } + break; + } // case 26 + case 42: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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 table_ = ""; + /** + * + * + *
+     * The table to split.
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The table to split.
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The table to split.
+     * 
+ * + * string table = 1; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The table to split.
+     * 
+ * + * string table = 1; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The table to split.
+     * 
+ * + * string table = 1; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * The index to split.
+     * If specified, the `table` field must refer to the index's base table.
+     * 
+ * + * string index = 2; + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The index to split.
+     * If specified, the `table` field must refer to the index's base table.
+     * 
+ * + * string index = 2; + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The index to split.
+     * If specified, the `table` field must refer to the index's base table.
+     * 
+ * + * string index = 2; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The index to split.
+     * If specified, the `table` field must refer to the index's base table.
+     * 
+ * + * string index = 2; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The index to split.
+     * If specified, the `table` field must refer to the index's base table.
+     * 
+ * + * string index = 2; + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List keys_ = + java.util.Collections.emptyList(); + + private void ensureKeysIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + keys_ = + new java.util.ArrayList(keys_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.SplitPoints.Key, + com.google.spanner.admin.database.v1.SplitPoints.Key.Builder, + com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder> + keysBuilder_; + + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getKeysList() { + if (keysBuilder_ == null) { + return java.util.Collections.unmodifiableList(keys_); + } else { + return keysBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getKeysCount() { + if (keysBuilder_ == null) { + return keys_.size(); + } else { + return keysBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Key getKeys(int index) { + if (keysBuilder_ == null) { + return keys_.get(index); + } else { + return keysBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setKeys(int index, com.google.spanner.admin.database.v1.SplitPoints.Key value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.set(index, value); + onChanged(); + } else { + keysBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setKeys( + int index, com.google.spanner.admin.database.v1.SplitPoints.Key.Builder builderForValue) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.set(index, builderForValue.build()); + onChanged(); + } else { + keysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addKeys(com.google.spanner.admin.database.v1.SplitPoints.Key value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.add(value); + onChanged(); + } else { + keysBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addKeys(int index, com.google.spanner.admin.database.v1.SplitPoints.Key value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.add(index, value); + onChanged(); + } else { + keysBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addKeys( + com.google.spanner.admin.database.v1.SplitPoints.Key.Builder builderForValue) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.add(builderForValue.build()); + onChanged(); + } else { + keysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addKeys( + int index, com.google.spanner.admin.database.v1.SplitPoints.Key.Builder builderForValue) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.add(index, builderForValue.build()); + onChanged(); + } else { + keysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllKeys( + java.lang.Iterable values) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, keys_); + onChanged(); + } else { + keysBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearKeys() { + if (keysBuilder_ == null) { + keys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + keysBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeKeys(int index) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.remove(index); + onChanged(); + } else { + keysBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder getKeysBuilder(int index) { + return getKeysFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder getKeysOrBuilder( + int index) { + if (keysBuilder_ == null) { + return keys_.get(index); + } else { + return keysBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getKeysOrBuilderList() { + if (keysBuilder_ != null) { + return keysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(keys_); + } + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuilder() { + return getKeysFieldBuilder() + .addBuilder(com.google.spanner.admin.database.v1.SplitPoints.Key.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuilder(int index) { + return getKeysFieldBuilder() + .addBuilder( + index, com.google.spanner.admin.database.v1.SplitPoints.Key.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The list of split keys, i.e., the split boundaries.
+     * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getKeysBuilderList() { + return getKeysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.SplitPoints.Key, + com.google.spanner.admin.database.v1.SplitPoints.Key.Builder, + com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder> + getKeysFieldBuilder() { + if (keysBuilder_ == null) { + keysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.SplitPoints.Key, + com.google.spanner.admin.database.v1.SplitPoints.Key.Builder, + com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder>( + keys_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + keys_ = null; + } + return keysBuilder_; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + if (expireTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000008); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Optional. The expiration timestamp of the split points.
+     * A timestamp in the past means immediate expiration.
+     * The maximum value can be 30 days in the future.
+     * Defaults to 10 days in the future if not specified.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.database.v1.SplitPoints) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.database.v1.SplitPoints) + private static final com.google.spanner.admin.database.v1.SplitPoints DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.database.v1.SplitPoints(); + } + + public static com.google.spanner.admin.database.v1.SplitPoints getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SplitPoints parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java new file mode 100644 index 00000000000..5da2a9c837c --- /dev/null +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java @@ -0,0 +1,187 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/admin/database/v1/spanner_database_admin.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.database.v1; + +public interface SplitPointsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.SplitPoints) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The table to split.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * The table to split.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * The index to split.
+   * If specified, the `table` field must refer to the index's base table.
+   * 
+ * + * string index = 2; + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * The index to split.
+   * If specified, the `table` field must refer to the index's base table.
+   * 
+ * + * string index = 2; + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getKeysList(); + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.database.v1.SplitPoints.Key getKeys(int index); + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getKeysCount(); + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getKeysOrBuilderList(); + /** + * + * + *
+   * Required. The list of split keys, i.e., the split boundaries.
+   * 
+ * + * + * repeated .google.spanner.admin.database.v1.SplitPoints.Key keys = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder getKeysOrBuilder(int index); + + /** + * + * + *
+   * Optional. The expiration timestamp of the split points.
+   * A timestamp in the past means immediate expiration.
+   * The maximum value can be 30 days in the future.
+   * Defaults to 10 days in the future if not specified.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Optional. The expiration timestamp of the split points.
+   * A timestamp in the past means immediate expiration.
+   * The maximum value can be 30 days in the future.
+   * Defaults to 10 days in the future if not specified.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Optional. The expiration timestamp of the split points.
+   * A timestamp in the past means immediate expiration.
+   * The maximum value can be 30 days in the future.
+   * Defaults to 10 days in the future if not specified.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto index 5df142403e6..27e3206293e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/proto/google/spanner/admin/database/v1/spanner_database_admin.proto @@ -25,6 +25,7 @@ import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/spanner/admin/database/v1/backup.proto"; import "google/spanner/admin/database/v1/backup_schedule.proto"; @@ -425,6 +426,15 @@ service DatabaseAdmin { option (google.api.method_signature) = "parent"; } + // Adds split points to specified tables, indexes of a database. + rpc AddSplitPoints(AddSplitPointsRequest) returns (AddSplitPointsResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints" + body: "*" + }; + option (google.api.method_signature) = "database,split_points"; + } + // Creates a new backup schedule. rpc CreateBackupSchedule(CreateBackupScheduleRequest) returns (BackupSchedule) { @@ -1207,3 +1217,59 @@ message ListDatabaseRolesResponse { // call to fetch more of the matching roles. string next_page_token = 2; } + +// The request for +// [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints]. +message AddSplitPointsRequest { + // Required. The database on whose tables/indexes split points are to be + // added. Values are of the form + // `projects//instances//databases/`. + string database = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "spanner.googleapis.com/Database" + } + ]; + + // Required. The split points to add. + repeated SplitPoints split_points = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A user-supplied tag associated with the split points. + // For example, "intital_data_load", "special_event_1". + // Defaults to "CloudAddSplitPointsAPI" if not specified. + // The length of the tag must not exceed 50 characters,else will be trimmed. + // Only valid UTF8 characters are allowed. + string initiator = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for +// [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints]. +message AddSplitPointsResponse {} + +// The split points of a table/index. +message SplitPoints { + // A split key. + message Key { + // Required. The column values making up the split key. + google.protobuf.ListValue key_parts = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // The table to split. + string table = 1; + + // The index to split. + // If specified, the `table` field must refer to the index's base table. + string index = 2; + + // Required. The list of split keys, i.e., the split boundaries. + repeated Key keys = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The expiration timestamp of the split points. + // A timestamp in the past means immediate expiration. + // The maximum value can be 30 days in the future. + // Defaults to 10 days in the future if not specified. + google.protobuf.Timestamp expire_time = 5 + [(google.api.field_behavior) = OPTIONAL]; +}