Skip to content

Commit 1fa6ae8

Browse files
chore: Update generation configuration at Thu Sep 11 02:29:07 UTC 2025 (googleapis#2208)
This pull request is generated with proto changes between [googleapis/googleapis@fb0d8ac](https://togithub.com/googleapis/googleapis/commit/fb0d8ac09cd1c2d94e9da572f0ad4692c8781410) (exclusive) and [googleapis/googleapis@9978d43](https://togithub.com/googleapis/googleapis/commit/9978d435df71bb16ecadd1e4421640748d0bf533) (inclusive). BEGIN_COMMIT_OVERRIDE BEGIN_NESTED_COMMIT fix(deps): update the Java code generator (gapic-generator-java) to 2.62.1 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore: update the libraries_bom version to 26.67.0 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: add Firestore CloneDatabase support PiperOrigin-RevId: 789807783 Source Link: [googleapis/googleapis@3d37c58](https://togithub.com/googleapis/googleapis/commit/3d37c58ad2a4e72ff051aa329eb30d9f658e1b66) END_NESTED_COMMIT END_COMMIT_OVERRIDE
1 parent bc07b64 commit 1fa6ae8

File tree

29 files changed

+7233
-315
lines changed

29 files changed

+7233
-315
lines changed

.github/scripts/update_generation_config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -ex
33
# This script should be run at the root of the repository.
44
# This script is used to update googleapis_commitish, gapic_generator_version,
55
# and libraries_bom_version in generation configuration at the time of running

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If you are using Maven without the BOM, add this to your dependencies:
4949
If you are using Gradle 5.x or later, add this to your dependencies:
5050

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.64.0')
52+
implementation platform('com.google.cloud:libraries-bom:26.67.0')
5353
5454
implementation 'com.google.cloud:google-cloud-firestore'
5555
```

generation_config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
gapic_generator_version: 2.60.2
2-
googleapis_commitish: fb0d8ac09cd1c2d94e9da572f0ad4692c8781410
3-
libraries_bom_version: 26.64.0
1+
gapic_generator_version: 2.62.1
2+
googleapis_commitish: 9978d435df71bb16ecadd1e4421640748d0bf533
3+
libraries_bom_version: 26.67.0
44
libraries:
55
- api_shortname: firestore
66
name_pretty: Cloud Firestore

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
3939
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
4040
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
41+
import com.google.firestore.admin.v1.CloneDatabaseMetadata;
42+
import com.google.firestore.admin.v1.CloneDatabaseRequest;
4143
import com.google.firestore.admin.v1.CollectionGroupName;
4244
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
4345
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
@@ -755,6 +757,23 @@
755757
* </ul>
756758
* </td>
757759
* </tr>
760+
* <tr>
761+
* <td><p> CloneDatabase</td>
762+
* <td><p> Creates a new database by cloning an existing one.
763+
* <p> The new database must be in the same cloud region or multi-region location as the existing database. This behaves similar to [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing database.
764+
* <p> The [long-running operation][google.longrunning.Operation] can be used to track the progress of the clone, with the Operation's [metadata][google.longrunning.Operation.metadata] field type being the [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. The [response][google.longrunning.Operation.response] type is the [Database][google.firestore.admin.v1.Database] if the clone was successful. The new database is not readable or writeable until the LRO has completed.</td>
765+
* <td>
766+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
767+
* <ul>
768+
* <li><p> cloneDatabaseAsync(CloneDatabaseRequest request)
769+
* </ul>
770+
* <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>
771+
* <ul>
772+
* <li><p> cloneDatabaseOperationCallable()
773+
* <li><p> cloneDatabaseCallable()
774+
* </ul>
775+
* </td>
776+
* </tr>
758777
* </table>
759778
*
760779
* <p>See the individual methods for example code.
@@ -4990,6 +5009,143 @@ public final UnaryCallable<DeleteBackupScheduleRequest, Empty> deleteBackupSched
49905009
return stub.deleteBackupScheduleCallable();
49915010
}
49925011

5012+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5013+
/**
5014+
* Creates a new database by cloning an existing one.
5015+
*
5016+
* <p>The new database must be in the same cloud region or multi-region location as the existing
5017+
* database. This behaves similar to
5018+
* [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except
5019+
* instead of creating a new empty database, a new database is created with the database type,
5020+
* index configuration, and documents from an existing database.
5021+
*
5022+
* <p>The [long-running operation][google.longrunning.Operation] can be used to track the progress
5023+
* of the clone, with the Operation's [metadata][google.longrunning.Operation.metadata] field type
5024+
* being the [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. The
5025+
* [response][google.longrunning.Operation.response] type is the
5026+
* [Database][google.firestore.admin.v1.Database] if the clone was successful. The new database is
5027+
* not readable or writeable until the LRO has completed.
5028+
*
5029+
* <p>Sample code:
5030+
*
5031+
* <pre>{@code
5032+
* // This snippet has been automatically generated and should be regarded as a code template only.
5033+
* // It will require modifications to work:
5034+
* // - It may require correct/in-range values for request initialization.
5035+
* // - It may require specifying regional endpoints when creating the service client as shown in
5036+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5037+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
5038+
* CloneDatabaseRequest request =
5039+
* CloneDatabaseRequest.newBuilder()
5040+
* .setParent(ProjectName.of("[PROJECT]").toString())
5041+
* .setDatabaseId("databaseId1688905718")
5042+
* .setPitrSnapshot(PitrSnapshot.newBuilder().build())
5043+
* .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
5044+
* .putAllTags(new HashMap<String, String>())
5045+
* .build();
5046+
* Database response = firestoreAdminClient.cloneDatabaseAsync(request).get();
5047+
* }
5048+
* }</pre>
5049+
*
5050+
* @param request The request object containing all of the parameters for the API call.
5051+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
5052+
*/
5053+
public final OperationFuture<Database, CloneDatabaseMetadata> cloneDatabaseAsync(
5054+
CloneDatabaseRequest request) {
5055+
return cloneDatabaseOperationCallable().futureCall(request);
5056+
}
5057+
5058+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5059+
/**
5060+
* Creates a new database by cloning an existing one.
5061+
*
5062+
* <p>The new database must be in the same cloud region or multi-region location as the existing
5063+
* database. This behaves similar to
5064+
* [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except
5065+
* instead of creating a new empty database, a new database is created with the database type,
5066+
* index configuration, and documents from an existing database.
5067+
*
5068+
* <p>The [long-running operation][google.longrunning.Operation] can be used to track the progress
5069+
* of the clone, with the Operation's [metadata][google.longrunning.Operation.metadata] field type
5070+
* being the [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. The
5071+
* [response][google.longrunning.Operation.response] type is the
5072+
* [Database][google.firestore.admin.v1.Database] if the clone was successful. The new database is
5073+
* not readable or writeable until the LRO has completed.
5074+
*
5075+
* <p>Sample code:
5076+
*
5077+
* <pre>{@code
5078+
* // This snippet has been automatically generated and should be regarded as a code template only.
5079+
* // It will require modifications to work:
5080+
* // - It may require correct/in-range values for request initialization.
5081+
* // - It may require specifying regional endpoints when creating the service client as shown in
5082+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5083+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
5084+
* CloneDatabaseRequest request =
5085+
* CloneDatabaseRequest.newBuilder()
5086+
* .setParent(ProjectName.of("[PROJECT]").toString())
5087+
* .setDatabaseId("databaseId1688905718")
5088+
* .setPitrSnapshot(PitrSnapshot.newBuilder().build())
5089+
* .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
5090+
* .putAllTags(new HashMap<String, String>())
5091+
* .build();
5092+
* OperationFuture<Database, CloneDatabaseMetadata> future =
5093+
* firestoreAdminClient.cloneDatabaseOperationCallable().futureCall(request);
5094+
* // Do something.
5095+
* Database response = future.get();
5096+
* }
5097+
* }</pre>
5098+
*/
5099+
public final OperationCallable<CloneDatabaseRequest, Database, CloneDatabaseMetadata>
5100+
cloneDatabaseOperationCallable() {
5101+
return stub.cloneDatabaseOperationCallable();
5102+
}
5103+
5104+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5105+
/**
5106+
* Creates a new database by cloning an existing one.
5107+
*
5108+
* <p>The new database must be in the same cloud region or multi-region location as the existing
5109+
* database. This behaves similar to
5110+
* [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except
5111+
* instead of creating a new empty database, a new database is created with the database type,
5112+
* index configuration, and documents from an existing database.
5113+
*
5114+
* <p>The [long-running operation][google.longrunning.Operation] can be used to track the progress
5115+
* of the clone, with the Operation's [metadata][google.longrunning.Operation.metadata] field type
5116+
* being the [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. The
5117+
* [response][google.longrunning.Operation.response] type is the
5118+
* [Database][google.firestore.admin.v1.Database] if the clone was successful. The new database is
5119+
* not readable or writeable until the LRO has completed.
5120+
*
5121+
* <p>Sample code:
5122+
*
5123+
* <pre>{@code
5124+
* // This snippet has been automatically generated and should be regarded as a code template only.
5125+
* // It will require modifications to work:
5126+
* // - It may require correct/in-range values for request initialization.
5127+
* // - It may require specifying regional endpoints when creating the service client as shown in
5128+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5129+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
5130+
* CloneDatabaseRequest request =
5131+
* CloneDatabaseRequest.newBuilder()
5132+
* .setParent(ProjectName.of("[PROJECT]").toString())
5133+
* .setDatabaseId("databaseId1688905718")
5134+
* .setPitrSnapshot(PitrSnapshot.newBuilder().build())
5135+
* .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
5136+
* .putAllTags(new HashMap<String, String>())
5137+
* .build();
5138+
* ApiFuture<Operation> future =
5139+
* firestoreAdminClient.cloneDatabaseCallable().futureCall(request);
5140+
* // Do something.
5141+
* Operation response = future.get();
5142+
* }
5143+
* }</pre>
5144+
*/
5145+
public final UnaryCallable<CloneDatabaseRequest, Operation> cloneDatabaseCallable() {
5146+
return stub.cloneDatabaseCallable();
5147+
}
5148+
49935149
@Override
49945150
public final void close() {
49955151
stub.close();

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
3939
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
4040
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
41+
import com.google.firestore.admin.v1.CloneDatabaseMetadata;
42+
import com.google.firestore.admin.v1.CloneDatabaseRequest;
4143
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
4244
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
4345
import com.google.firestore.admin.v1.CreateDatabaseRequest;
@@ -388,6 +390,17 @@ public UnaryCallSettings<DeleteBackupScheduleRequest, Empty> deleteBackupSchedul
388390
return ((FirestoreAdminStubSettings) getStubSettings()).deleteBackupScheduleSettings();
389391
}
390392

393+
/** Returns the object with the settings used for calls to cloneDatabase. */
394+
public UnaryCallSettings<CloneDatabaseRequest, Operation> cloneDatabaseSettings() {
395+
return ((FirestoreAdminStubSettings) getStubSettings()).cloneDatabaseSettings();
396+
}
397+
398+
/** Returns the object with the settings used for calls to cloneDatabase. */
399+
public OperationCallSettings<CloneDatabaseRequest, Database, CloneDatabaseMetadata>
400+
cloneDatabaseOperationSettings() {
401+
return ((FirestoreAdminStubSettings) getStubSettings()).cloneDatabaseOperationSettings();
402+
}
403+
391404
public static final FirestoreAdminSettings create(FirestoreAdminStubSettings stub)
392405
throws IOException {
393406
return new FirestoreAdminSettings.Builder(stub.toBuilder()).build();
@@ -725,6 +738,17 @@ public UnaryCallSettings.Builder<RestoreDatabaseRequest, Operation> restoreDatab
725738
return getStubSettingsBuilder().deleteBackupScheduleSettings();
726739
}
727740

741+
/** Returns the builder for the settings used for calls to cloneDatabase. */
742+
public UnaryCallSettings.Builder<CloneDatabaseRequest, Operation> cloneDatabaseSettings() {
743+
return getStubSettingsBuilder().cloneDatabaseSettings();
744+
}
745+
746+
/** Returns the builder for the settings used for calls to cloneDatabase. */
747+
public OperationCallSettings.Builder<CloneDatabaseRequest, Database, CloneDatabaseMetadata>
748+
cloneDatabaseOperationSettings() {
749+
return getStubSettingsBuilder().cloneDatabaseOperationSettings();
750+
}
751+
728752
@Override
729753
public FirestoreAdminSettings build() throws IOException {
730754
return new FirestoreAdminSettings(this);

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"BulkDeleteDocuments": {
1414
"methods": ["bulkDeleteDocumentsAsync", "bulkDeleteDocumentsAsync", "bulkDeleteDocumentsAsync", "bulkDeleteDocumentsOperationCallable", "bulkDeleteDocumentsCallable"]
1515
},
16+
"CloneDatabase": {
17+
"methods": ["cloneDatabaseAsync", "cloneDatabaseOperationCallable", "cloneDatabaseCallable"]
18+
},
1619
"CreateBackupSchedule": {
1720
"methods": ["createBackupSchedule", "createBackupSchedule", "createBackupSchedule", "createBackupScheduleCallable"]
1821
},

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
2828
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
2929
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
30+
import com.google.firestore.admin.v1.CloneDatabaseMetadata;
31+
import com.google.firestore.admin.v1.CloneDatabaseRequest;
3032
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
3133
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
3234
import com.google.firestore.admin.v1.CreateDatabaseRequest;
@@ -278,6 +280,15 @@ public UnaryCallable<DeleteBackupScheduleRequest, Empty> deleteBackupScheduleCal
278280
throw new UnsupportedOperationException("Not implemented: deleteBackupScheduleCallable()");
279281
}
280282

283+
public OperationCallable<CloneDatabaseRequest, Database, CloneDatabaseMetadata>
284+
cloneDatabaseOperationCallable() {
285+
throw new UnsupportedOperationException("Not implemented: cloneDatabaseOperationCallable()");
286+
}
287+
288+
public UnaryCallable<CloneDatabaseRequest, Operation> cloneDatabaseCallable() {
289+
throw new UnsupportedOperationException("Not implemented: cloneDatabaseCallable()");
290+
}
291+
281292
@Override
282293
public abstract void close();
283294
}

0 commit comments

Comments
 (0)