|
41 | 41 | import com.google.protobuf.Empty;
|
42 | 42 | import com.google.protobuf.FieldMask;
|
43 | 43 | import com.google.protobuf.Timestamp;
|
| 44 | +import com.google.spanner.admin.database.v1.AddSplitPointsRequest; |
| 45 | +import com.google.spanner.admin.database.v1.AddSplitPointsResponse; |
44 | 46 | import com.google.spanner.admin.database.v1.Backup;
|
45 | 47 | import com.google.spanner.admin.database.v1.BackupName;
|
46 | 48 | import com.google.spanner.admin.database.v1.BackupSchedule;
|
|
78 | 80 | import com.google.spanner.admin.database.v1.ListDatabasesResponse;
|
79 | 81 | import com.google.spanner.admin.database.v1.RestoreDatabaseMetadata;
|
80 | 82 | import com.google.spanner.admin.database.v1.RestoreDatabaseRequest;
|
| 83 | +import com.google.spanner.admin.database.v1.SplitPoints; |
81 | 84 | import com.google.spanner.admin.database.v1.UpdateBackupRequest;
|
82 | 85 | import com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest;
|
83 | 86 | import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata;
|
|
524 | 527 | * </td>
|
525 | 528 | * </tr>
|
526 | 529 | * <tr>
|
| 530 | + * <td><p> AddSplitPoints</td> |
| 531 | + * <td><p> Adds split points to specified tables, indexes of a database.</td> |
| 532 | + * <td> |
| 533 | + * <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p> |
| 534 | + * <ul> |
| 535 | + * <li><p> addSplitPoints(AddSplitPointsRequest request) |
| 536 | + * </ul> |
| 537 | + * <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p> |
| 538 | + * <ul> |
| 539 | + * <li><p> addSplitPoints(DatabaseName database, List<SplitPoints> splitPoints) |
| 540 | + * <li><p> addSplitPoints(String database, List<SplitPoints> splitPoints) |
| 541 | + * </ul> |
| 542 | + * <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p> |
| 543 | + * <ul> |
| 544 | + * <li><p> addSplitPointsCallable() |
| 545 | + * </ul> |
| 546 | + * </td> |
| 547 | + * </tr> |
| 548 | + * <tr> |
527 | 549 | * <td><p> CreateBackupSchedule</td>
|
528 | 550 | * <td><p> Creates a new backup schedule.</td>
|
529 | 551 | * <td>
|
@@ -4318,6 +4340,137 @@ public final ListDatabaseRolesPagedResponse listDatabaseRoles(ListDatabaseRolesR
|
4318 | 4340 | return stub.listDatabaseRolesCallable();
|
4319 | 4341 | }
|
4320 | 4342 |
|
| 4343 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 4344 | + /** |
| 4345 | + * Adds split points to specified tables, indexes of a database. |
| 4346 | + * |
| 4347 | + * <p>Sample code: |
| 4348 | + * |
| 4349 | + * <pre>{@code |
| 4350 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 4351 | + * // It will require modifications to work: |
| 4352 | + * // - It may require correct/in-range values for request initialization. |
| 4353 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 4354 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 4355 | + * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { |
| 4356 | + * DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); |
| 4357 | + * List<SplitPoints> splitPoints = new ArrayList<>(); |
| 4358 | + * AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(database, splitPoints); |
| 4359 | + * } |
| 4360 | + * }</pre> |
| 4361 | + * |
| 4362 | + * @param database Required. The database on whose tables/indexes split points are to be added. |
| 4363 | + * Values are of the form |
| 4364 | + * `projects/<project>/instances/<instance>/databases/<database>`. |
| 4365 | + * @param splitPoints Required. The split points to add. |
| 4366 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 4367 | + */ |
| 4368 | + public final AddSplitPointsResponse addSplitPoints( |
| 4369 | + DatabaseName database, List<SplitPoints> splitPoints) { |
| 4370 | + AddSplitPointsRequest request = |
| 4371 | + AddSplitPointsRequest.newBuilder() |
| 4372 | + .setDatabase(database == null ? null : database.toString()) |
| 4373 | + .addAllSplitPoints(splitPoints) |
| 4374 | + .build(); |
| 4375 | + return addSplitPoints(request); |
| 4376 | + } |
| 4377 | + |
| 4378 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 4379 | + /** |
| 4380 | + * Adds split points to specified tables, indexes of a database. |
| 4381 | + * |
| 4382 | + * <p>Sample code: |
| 4383 | + * |
| 4384 | + * <pre>{@code |
| 4385 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 4386 | + * // It will require modifications to work: |
| 4387 | + * // - It may require correct/in-range values for request initialization. |
| 4388 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 4389 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 4390 | + * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { |
| 4391 | + * String database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString(); |
| 4392 | + * List<SplitPoints> splitPoints = new ArrayList<>(); |
| 4393 | + * AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(database, splitPoints); |
| 4394 | + * } |
| 4395 | + * }</pre> |
| 4396 | + * |
| 4397 | + * @param database Required. The database on whose tables/indexes split points are to be added. |
| 4398 | + * Values are of the form |
| 4399 | + * `projects/<project>/instances/<instance>/databases/<database>`. |
| 4400 | + * @param splitPoints Required. The split points to add. |
| 4401 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 4402 | + */ |
| 4403 | + public final AddSplitPointsResponse addSplitPoints( |
| 4404 | + String database, List<SplitPoints> splitPoints) { |
| 4405 | + AddSplitPointsRequest request = |
| 4406 | + AddSplitPointsRequest.newBuilder() |
| 4407 | + .setDatabase(database) |
| 4408 | + .addAllSplitPoints(splitPoints) |
| 4409 | + .build(); |
| 4410 | + return addSplitPoints(request); |
| 4411 | + } |
| 4412 | + |
| 4413 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 4414 | + /** |
| 4415 | + * Adds split points to specified tables, indexes of a database. |
| 4416 | + * |
| 4417 | + * <p>Sample code: |
| 4418 | + * |
| 4419 | + * <pre>{@code |
| 4420 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 4421 | + * // It will require modifications to work: |
| 4422 | + * // - It may require correct/in-range values for request initialization. |
| 4423 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 4424 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 4425 | + * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { |
| 4426 | + * AddSplitPointsRequest request = |
| 4427 | + * AddSplitPointsRequest.newBuilder() |
| 4428 | + * .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) |
| 4429 | + * .addAllSplitPoints(new ArrayList<SplitPoints>()) |
| 4430 | + * .setInitiator("initiator-248987089") |
| 4431 | + * .build(); |
| 4432 | + * AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(request); |
| 4433 | + * } |
| 4434 | + * }</pre> |
| 4435 | + * |
| 4436 | + * @param request The request object containing all of the parameters for the API call. |
| 4437 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 4438 | + */ |
| 4439 | + public final AddSplitPointsResponse addSplitPoints(AddSplitPointsRequest request) { |
| 4440 | + return addSplitPointsCallable().call(request); |
| 4441 | + } |
| 4442 | + |
| 4443 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 4444 | + /** |
| 4445 | + * Adds split points to specified tables, indexes of a database. |
| 4446 | + * |
| 4447 | + * <p>Sample code: |
| 4448 | + * |
| 4449 | + * <pre>{@code |
| 4450 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 4451 | + * // It will require modifications to work: |
| 4452 | + * // - It may require correct/in-range values for request initialization. |
| 4453 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 4454 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 4455 | + * try (DatabaseAdminClient databaseAdminClient = DatabaseAdminClient.create()) { |
| 4456 | + * AddSplitPointsRequest request = |
| 4457 | + * AddSplitPointsRequest.newBuilder() |
| 4458 | + * .setDatabase(DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]").toString()) |
| 4459 | + * .addAllSplitPoints(new ArrayList<SplitPoints>()) |
| 4460 | + * .setInitiator("initiator-248987089") |
| 4461 | + * .build(); |
| 4462 | + * ApiFuture<AddSplitPointsResponse> future = |
| 4463 | + * databaseAdminClient.addSplitPointsCallable().futureCall(request); |
| 4464 | + * // Do something. |
| 4465 | + * AddSplitPointsResponse response = future.get(); |
| 4466 | + * } |
| 4467 | + * }</pre> |
| 4468 | + */ |
| 4469 | + public final UnaryCallable<AddSplitPointsRequest, AddSplitPointsResponse> |
| 4470 | + addSplitPointsCallable() { |
| 4471 | + return stub.addSplitPointsCallable(); |
| 4472 | + } |
| 4473 | + |
4321 | 4474 | // AUTO-GENERATED DOCUMENTATION AND METHOD.
|
4322 | 4475 | /**
|
4323 | 4476 | * Creates a new backup schedule.
|
|
0 commit comments