Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generation_config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -524,6 +527,25 @@
* </td>
* </tr>
* <tr>
* <td><p> AddSplitPoints</td>
* <td><p> Adds split points to specified tables, indexes of a database.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> addSplitPoints(AddSplitPointsRequest request)
* </ul>
* <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>
* <ul>
* <li><p> addSplitPoints(DatabaseName database, List&lt;SplitPoints&gt; splitPoints)
* <li><p> addSplitPoints(String database, List&lt;SplitPoints&gt; splitPoints)
* </ul>
* <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>
* <ul>
* <li><p> addSplitPointsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> CreateBackupSchedule</td>
* <td><p> Creates a new backup schedule.</td>
* <td>
Expand Down Expand Up @@ -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.
*
* <p>Sample code:
*
* <pre>{@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> splitPoints = new ArrayList<>();
* AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(database, splitPoints);
* }
* }</pre>
*
* @param database Required. The database on whose tables/indexes split points are to be added.
* Values are of the form
* `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
* @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> 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.
*
* <p>Sample code:
*
* <pre>{@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> splitPoints = new ArrayList<>();
* AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(database, splitPoints);
* }
* }</pre>
*
* @param database Required. The database on whose tables/indexes split points are to be added.
* Values are of the form
* `projects/&lt;project&gt;/instances/&lt;instance&gt;/databases/&lt;database&gt;`.
* @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> 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.
*
* <p>Sample code:
*
* <pre>{@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<SplitPoints>())
* .setInitiator("initiator-248987089")
* .build();
* AddSplitPointsResponse response = databaseAdminClient.addSplitPoints(request);
* }
* }</pre>
*
* @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.
*
* <p>Sample code:
*
* <pre>{@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<SplitPoints>())
* .setInitiator("initiator-248987089")
* .build();
* ApiFuture<AddSplitPointsResponse> future =
* databaseAdminClient.addSplitPointsCallable().futureCall(request);
* // Do something.
* AddSplitPointsResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<AddSplitPointsRequest, AddSplitPointsResponse>
addSplitPointsCallable() {
return stub.addSplitPointsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new backup schedule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -312,6 +314,11 @@ public UnaryCallSettings<RestoreDatabaseRequest, Operation> restoreDatabaseSetti
return ((DatabaseAdminStubSettings) getStubSettings()).listDatabaseRolesSettings();
}

/** Returns the object with the settings used for calls to addSplitPoints. */
public UnaryCallSettings<AddSplitPointsRequest, AddSplitPointsResponse> addSplitPointsSettings() {
return ((DatabaseAdminStubSettings) getStubSettings()).addSplitPointsSettings();
}

/** Returns the object with the settings used for calls to createBackupSchedule. */
public UnaryCallSettings<CreateBackupScheduleRequest, BackupSchedule>
createBackupScheduleSettings() {
Expand Down Expand Up @@ -606,6 +613,12 @@ public UnaryCallSettings.Builder<RestoreDatabaseRequest, Operation> restoreDatab
return getStubSettingsBuilder().listDatabaseRolesSettings();
}

/** Returns the builder for the settings used for calls to addSplitPoints. */
public UnaryCallSettings.Builder<AddSplitPointsRequest, AddSplitPointsResponse>
addSplitPointsSettings() {
return getStubSettingsBuilder().addSplitPointsSettings();
}

/** Returns the builder for the settings used for calls to createBackupSchedule. */
public UnaryCallSettings.Builder<CreateBackupScheduleRequest, BackupSchedule>
createBackupScheduleSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"grpc": {
"libraryClient": "DatabaseAdminClient",
"rpcs": {
"AddSplitPoints": {
"methods": ["addSplitPoints", "addSplitPoints", "addSplitPoints", "addSplitPointsCallable"]
},
"CopyBackup": {
"methods": ["copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupOperationCallable", "copyBackupCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -231,6 +233,10 @@ public UnaryCallable<RestoreDatabaseRequest, Operation> restoreDatabaseCallable(
throw new UnsupportedOperationException("Not implemented: listDatabaseRolesCallable()");
}

public UnaryCallable<AddSplitPointsRequest, AddSplitPointsResponse> addSplitPointsCallable() {
throw new UnsupportedOperationException("Not implemented: addSplitPointsCallable()");
}

public UnaryCallable<CreateBackupScheduleRequest, BackupSchedule> createBackupScheduleCallable() {
throw new UnsupportedOperationException("Not implemented: createBackupScheduleCallable()");
}
Expand Down
Loading
Loading