Merged
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -77,9 +77,9 @@
/**
* Service Description: Cloud Spanner Database Admin API
*
* <p>The Cloud Spanner Database Admin API can be used to create, drop, and list databases. It also
* enables updating the schema of pre-existing databases. It can be also used to create, delete and
* list backups for a database and to restore from an existing backup.
* <p>The Cloud Spanner Database Admin API can be used to: &#42; create, drop, and list databases
* &#42; update the schema of pre-existing databases &#42; create, delete and list backups for a
* database &#42; restore a database from an existing backup
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand DownExpand Up@@ -438,6 +438,7 @@ public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsy
* .setCreateStatement("createStatement744686547")
* .addAllExtraStatements(new ArrayList<String>())
* .setEncryptionConfig(EncryptionConfig.newBuilder().build())
* .setDatabaseDialect(DatabaseDialect.forNumber(0))
* .build();
* Database response = databaseAdminClient.createDatabaseAsync(request).get();
* }
Expand DownExpand Up@@ -471,6 +472,7 @@ public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsy
* .setCreateStatement("createStatement744686547")
* .addAllExtraStatements(new ArrayList<String>())
* .setEncryptionConfig(EncryptionConfig.newBuilder().build())
* .setDatabaseDialect(DatabaseDialect.forNumber(0))
* .build();
* OperationFuture<Database, CreateDatabaseMetadata> future =
* databaseAdminClient.createDatabaseOperationCallable().futureCall(request);
Expand DownExpand Up@@ -504,6 +506,7 @@ public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsy
* .setCreateStatement("createStatement744686547")
* .addAllExtraStatements(new ArrayList<String>())
* .setEncryptionConfig(EncryptionConfig.newBuilder().build())
* .setDatabaseDialect(DatabaseDialect.forNumber(0))
* .build();
* ApiFuture<Operation> future =
* databaseAdminClient.createDatabaseCallable().futureCall(request);
Expand DownExpand Up@@ -772,7 +775,8 @@ public final UnaryCallable<UpdateDatabaseDdlRequest, Operation> updateDatabaseDd
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be
* retained according to their `expire_time`.
* retained according to their `expire_time`. Note: Cloud Spanner might continue to accept
* requests for a few seconds after the database has been deleted.
*
* <p>Sample code:
*
Expand All@@ -797,7 +801,8 @@ public final void dropDatabase(DatabaseName database) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be
* retained according to their `expire_time`.
* retained according to their `expire_time`. Note: Cloud Spanner might continue to accept
* requests for a few seconds after the database has been deleted.
*
* <p>Sample code:
*
Expand All@@ -819,7 +824,8 @@ public final void dropDatabase(String database) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be
* retained according to their `expire_time`.
* retained according to their `expire_time`. Note: Cloud Spanner might continue to accept
* requests for a few seconds after the database has been deleted.
*
* <p>Sample code:
*
Expand All@@ -843,7 +849,8 @@ public final void dropDatabase(DropDatabaseRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be
* retained according to their `expire_time`.
* retained according to their `expire_time`. Note: Cloud Spanner might continue to accept
* requests for a few seconds after the database has been deleted.
*
* <p>Sample code:
*
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
*
* <p>Service Description: Cloud Spanner Database Admin API
*
* <p>The Cloud Spanner Database Admin API can be used to create, drop, and list databases. It also
* enables updating the schema of pre-existing databases. It can be also used to create, delete and
* list backups for a database and to restore from an existing backup.
* <p>The Cloud Spanner Database Admin API can be used to: &#42; create, drop, and list databases
* &#42; update the schema of pre-existing databases &#42; create, delete and list backups for a
* database &#42; restore a database from an existing backup
*
* <p>Sample for DatabaseAdminClient:
*
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,7 @@
import com.google.spanner.admin.database.v1.CreateBackupRequest;
import com.google.spanner.admin.database.v1.CreateDatabaseRequest;
import com.google.spanner.admin.database.v1.Database;
import com.google.spanner.admin.database.v1.DatabaseDialect;
import com.google.spanner.admin.database.v1.DatabaseName;
import com.google.spanner.admin.database.v1.DeleteBackupRequest;
import com.google.spanner.admin.database.v1.DropDatabaseRequest;
Expand DownExpand Up@@ -224,6 +225,7 @@ public void createDatabaseTest() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -280,6 +282,7 @@ public void createDatabaseTest2() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -336,6 +339,7 @@ public void getDatabaseTest() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
mockDatabaseAdmin.addResponse(expectedResponse);

Expand DownExpand Up@@ -381,6 +385,7 @@ public void getDatabaseTest2() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
mockDatabaseAdmin.addResponse(expectedResponse);

Expand DownExpand Up@@ -900,6 +905,7 @@ public void createBackupTest() throws Exception {
.setSizeBytes(-1796325715)
.addAllReferencingDatabases(new ArrayList<String>())
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -959,6 +965,7 @@ public void createBackupTest2() throws Exception {
.setSizeBytes(-1796325715)
.addAllReferencingDatabases(new ArrayList<String>())
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -1018,6 +1025,7 @@ public void getBackupTest() throws Exception {
.setSizeBytes(-1796325715)
.addAllReferencingDatabases(new ArrayList<String>())
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
mockDatabaseAdmin.addResponse(expectedResponse);

Expand DownExpand Up@@ -1063,6 +1071,7 @@ public void getBackupTest2() throws Exception {
.setSizeBytes(-1796325715)
.addAllReferencingDatabases(new ArrayList<String>())
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
mockDatabaseAdmin.addResponse(expectedResponse);

Expand DownExpand Up@@ -1108,6 +1117,7 @@ public void updateBackupTest() throws Exception {
.setSizeBytes(-1796325715)
.addAllReferencingDatabases(new ArrayList<String>())
.setEncryptionInfo(EncryptionInfo.newBuilder().build())
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
mockDatabaseAdmin.addResponse(expectedResponse);

Expand DownExpand Up@@ -1312,6 +1322,7 @@ public void restoreDatabaseTest() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -1371,6 +1382,7 @@ public void restoreDatabaseTest2() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -1430,6 +1442,7 @@ public void restoreDatabaseTest3() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand DownExpand Up@@ -1489,6 +1502,7 @@ public void restoreDatabaseTest4() throws Exception {
.setVersionRetentionPeriod("versionRetentionPeriod-629783929")
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setDefaultLeader("defaultLeader759009962")
.setDatabaseDialect(DatabaseDialect.forNumber(0))
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,10 +22,11 @@
*
* <pre>
* Cloud Spanner Database Admin API
* The Cloud Spanner Database Admin API can be used to create, drop, and
* list databases. It also enables updating the schema of pre-existing
* databases. It can be also used to create, delete and list backups for a
* database and to restore from an existing backup.
* The Cloud Spanner Database Admin API can be used to:
* * create, drop, and list databases
* * update the schema of pre-existing databases
* * create, delete and list backups for a database
* * restore a database from an existing backup
* </pre>
*/
@javax.annotation.Generated(
Expand DownExpand Up@@ -851,10 +852,11 @@ public DatabaseAdminFutureStub newStub(
*
* <pre>
* Cloud Spanner Database Admin API
* The Cloud Spanner Database Admin API can be used to create, drop, and
* list databases. It also enables updating the schema of pre-existing
* databases. It can be also used to create, delete and list backups for a
* database and to restore from an existing backup.
* The Cloud Spanner Database Admin API can be used to:
* * create, drop, and list databases
* * update the schema of pre-existing databases
* * create, delete and list backups for a database
* * restore a database from an existing backup
* </pre>
*/
public abstract static class DatabaseAdminImplBase implements io.grpc.BindableService {
Expand DownExpand Up@@ -937,6 +939,8 @@ public void updateDatabaseDdl(
* Drops (aka deletes) a Cloud Spanner database.
* Completed backups for the database will be retained according to their
* `expire_time`.
* Note: Cloud Spanner might continue to accept requests for a few seconds
* after the database has been deleted.
* </pre>
*/
public void dropDatabase(
Expand DownExpand Up@@ -1306,10 +1310,11 @@ public final io.grpc.ServerServiceDefinition bindService() {
*
* <pre>
* Cloud Spanner Database Admin API
* The Cloud Spanner Database Admin API can be used to create, drop, and
* list databases. It also enables updating the schema of pre-existing
* databases. It can be also used to create, delete and list backups for a
* database and to restore from an existing backup.
* The Cloud Spanner Database Admin API can be used to:
* * create, drop, and list databases
* * update the schema of pre-existing databases
* * create, delete and list backups for a database
* * restore a database from an existing backup
* </pre>
*/
public static final class DatabaseAdminStub
Expand DownExpand Up@@ -1409,6 +1414,8 @@ public void updateDatabaseDdl(
* Drops (aka deletes) a Cloud Spanner database.
* Completed backups for the database will be retained according to their
* `expire_time`.
* Note: Cloud Spanner might continue to accept requests for a few seconds
* after the database has been deleted.
* </pre>
*/
public void dropDatabase(
Expand DownExpand Up@@ -1689,10 +1696,11 @@ public void listBackupOperations(
*
* <pre>
* Cloud Spanner Database Admin API
* The Cloud Spanner Database Admin API can be used to create, drop, and
* list databases. It also enables updating the schema of pre-existing
* databases. It can be also used to create, delete and list backups for a
* database and to restore from an existing backup.
* The Cloud Spanner Database Admin API can be used to:
* * create, drop, and list databases
* * update the schema of pre-existing databases
* * create, delete and list backups for a database
* * restore a database from an existing backup
* </pre>
*/
public static final class DatabaseAdminBlockingStub
Expand DownExpand Up@@ -1779,6 +1787,8 @@ public com.google.longrunning.Operation updateDatabaseDdl(
* Drops (aka deletes) a Cloud Spanner database.
* Completed backups for the database will be retained according to their
* `expire_time`.
* Note: Cloud Spanner might continue to accept requests for a few seconds
* after the database has been deleted.
* </pre>
*/
public com.google.protobuf.Empty dropDatabase(
Expand DownExpand Up@@ -2014,10 +2024,11 @@ public com.google.spanner.admin.database.v1.ListBackupOperationsResponse listBac
*
* <pre>
* Cloud Spanner Database Admin API
* The Cloud Spanner Database Admin API can be used to create, drop, and
* list databases. It also enables updating the schema of pre-existing
* databases. It can be also used to create, delete and list backups for a
* database and to restore from an existing backup.
* The Cloud Spanner Database Admin API can be used to:
* * create, drop, and list databases
* * update the schema of pre-existing databases
* * create, delete and list backups for a database
* * restore a database from an existing backup
* </pre>
*/
public static final class DatabaseAdminFutureStub
Expand DownExpand Up@@ -2106,6 +2117,8 @@ protected DatabaseAdminFutureStub build(
* Drops (aka deletes) a Cloud Spanner database.
* Completed backups for the database will be retained according to their
* `expire_time`.
* Note: Cloud Spanner might continue to accept requests for a few seconds
* after the database has been deleted.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
Expand Down
Loading