diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml
index 88d3ac9bf..a0ba1f7d9 100644
--- a/.github/trusted-contribution.yml
+++ b/.github/trusted-contribution.yml
@@ -1,9 +1,3 @@
trustedContributors:
- renovate-bot
- gcf-owl-bot[bot]
-
-annotations:
-- type: comment
- text: "/gcbrun"
-- type: label
- text: "kokoro:force-run"
diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml
index 59f00b8eb..f5fc7d516 100644
--- a/.github/workflows/approve-readme.yaml
+++ b/.github/workflows/approve-readme.yaml
@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- - uses: actions/github-script@v7
+ - uses: actions/github-script@v6
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index b91fa381f..ae66b1973 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -27,8 +27,8 @@ jobs:
matrix:
java: [11, 17, 21]
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{matrix.java}}
@@ -41,8 +41,8 @@ jobs:
name: "units (8)"
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
@@ -51,7 +51,7 @@ jobs:
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
shell: bash
- - uses: actions/setup-java@v4
+ - uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
@@ -63,8 +63,8 @@ jobs:
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
@@ -78,8 +78,8 @@ jobs:
matrix:
java: [17]
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{matrix.java}}
@@ -88,8 +88,8 @@ jobs:
javadoc:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
@@ -100,8 +100,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
@@ -112,8 +112,8 @@ jobs:
clirr:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml
index 7c5ec7865..87d8eb2be 100644
--- a/.github/workflows/renovate_config_check.yaml
+++ b/.github/workflows/renovate_config_check.yaml
@@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v3
with:
node-version: '20'
diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml
index 03b293956..10d252d77 100644
--- a/.github/workflows/samples.yaml
+++ b/.github/workflows/samples.yaml
@@ -20,8 +20,8 @@ jobs:
checkstyle:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
diff --git a/.idx/.gitignore b/.idx/.gitignore
new file mode 100644
index 000000000..96be05fb6
--- /dev/null
+++ b/.idx/.gitignore
@@ -0,0 +1,2 @@
+
+gc/
diff --git a/.idx/dev.nix b/.idx/dev.nix
new file mode 100644
index 000000000..90de3c080
--- /dev/null
+++ b/.idx/dev.nix
@@ -0,0 +1,17 @@
+{ pkgs, ... }: {
+
+ # Which nixpkgs channel to use.
+ channel = "stable-23.11"; # or "unstable"
+
+ # Use https://search.nixos.org/packages to find packages
+ packages = [
+ pkgs.jdk11 # Or jdk8, jdk17, etc. - match your project's requirements
+ pkgs.maven
+ pkgs.kotlin
+ ];
+
+ # Sets environment variables in the workspace
+ env = {
+ SOME_ENV_VAR = "hello";
+ };
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 000000000..7b016a89f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "java.compile.nullAnalysis.mode": "automatic"
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 510e856cd..3a071ccfd 100644
--- a/README.md
+++ b/README.md
@@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.44.0')
+implementation platform('com.google.cloud:libraries-bom:26.66.0')
implementation 'com.google.cloud:google-cloud-firestore'
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-firestore:3.24.3'
+implementation 'com.google.cloud:google-cloud-firestore:3.32.1'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.24.3"
+libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.32.1"
```
@@ -220,7 +220,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-firestore/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-firestore.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.24.3
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.32.1
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java
index bca09fd69..9566e963e 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
@@ -38,11 +38,14 @@
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
+import com.google.firestore.admin.v1.CloneDatabaseMetadata;
+import com.google.firestore.admin.v1.CloneDatabaseRequest;
import com.google.firestore.admin.v1.CollectionGroupName;
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
import com.google.firestore.admin.v1.CreateDatabaseRequest;
import com.google.firestore.admin.v1.CreateIndexRequest;
+import com.google.firestore.admin.v1.CreateUserCredsRequest;
import com.google.firestore.admin.v1.Database;
import com.google.firestore.admin.v1.DatabaseName;
import com.google.firestore.admin.v1.DeleteBackupRequest;
@@ -50,6 +53,9 @@
import com.google.firestore.admin.v1.DeleteDatabaseMetadata;
import com.google.firestore.admin.v1.DeleteDatabaseRequest;
import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.DeleteUserCredsRequest;
+import com.google.firestore.admin.v1.DisableUserCredsRequest;
+import com.google.firestore.admin.v1.EnableUserCredsRequest;
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
import com.google.firestore.admin.v1.ExportDocumentsRequest;
import com.google.firestore.admin.v1.ExportDocumentsResponse;
@@ -61,6 +67,7 @@
import com.google.firestore.admin.v1.GetDatabaseRequest;
import com.google.firestore.admin.v1.GetFieldRequest;
import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.GetUserCredsRequest;
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
import com.google.firestore.admin.v1.ImportDocumentsRequest;
import com.google.firestore.admin.v1.Index;
@@ -76,14 +83,19 @@
import com.google.firestore.admin.v1.ListFieldsResponse;
import com.google.firestore.admin.v1.ListIndexesRequest;
import com.google.firestore.admin.v1.ListIndexesResponse;
+import com.google.firestore.admin.v1.ListUserCredsRequest;
+import com.google.firestore.admin.v1.ListUserCredsResponse;
import com.google.firestore.admin.v1.LocationName;
import com.google.firestore.admin.v1.ProjectName;
+import com.google.firestore.admin.v1.ResetUserPasswordRequest;
import com.google.firestore.admin.v1.RestoreDatabaseMetadata;
import com.google.firestore.admin.v1.RestoreDatabaseRequest;
import com.google.firestore.admin.v1.UpdateBackupScheduleRequest;
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
import com.google.firestore.admin.v1.UpdateFieldRequest;
+import com.google.firestore.admin.v1.UserCreds;
+import com.google.firestore.admin.v1.UserCredsName;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
@@ -445,6 +457,139 @@
*
*
*
+ * CreateUserCreds |
+ * Create a user creds. |
+ *
+ * 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.
+ *
+ * createUserCreds(DatabaseName parent, UserCreds userCreds, String userCredsId)
+ * createUserCreds(String parent, UserCreds userCreds, String userCredsId)
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * GetUserCreds |
+ * Gets a user creds resource. Note that the returned resource does not contain the secret value itself. |
+ *
+ * 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.
+ *
+ * |
+ *
+ *
+ * ListUserCreds |
+ * List all user creds in the database. Note that the returned resource does not contain the secret value itself. |
+ *
+ * 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.
+ *
+ * |
+ *
+ *
+ * EnableUserCreds |
+ * Enables a user creds. No-op if the user creds are already enabled. |
+ *
+ * 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.
+ *
+ * |
+ *
+ *
+ * DisableUserCreds |
+ * Disables a user creds. No-op if the user creds are already disabled. |
+ *
+ * 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.
+ *
+ * |
+ *
+ *
+ * ResetUserPassword |
+ * Resets the password of a user creds. |
+ *
+ * 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.
+ *
+ * |
+ *
+ *
+ * DeleteUserCreds |
+ * Deletes a user creds. |
+ *
+ * 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.
+ *
+ * |
+ *
+ *
* GetBackup |
* Gets information about a backup. |
*
@@ -612,6 +757,23 @@
*
* |
*
+ *
+ * CloneDatabase |
+ * Creates a new database by cloning an existing one.
+ * 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.
+ * 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. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
*
*
* See the individual methods for example code.
@@ -2350,7 +2512,7 @@ public final UnaryCallable bulkDeleteDocu
* This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first
* character a letter and the last a letter or a number. Must not be UUID-like
* /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
- *
"(default)" database id is also valid.
+ *
"(default)" database ID is also valid.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createDatabaseAsync(
@@ -2392,7 +2554,7 @@ public final OperationFuture createDatabaseAsy
* This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first
* character a letter and the last a letter or a number. Must not be UUID-like
* /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
- *
"(default)" database id is also valid.
+ *
"(default)" database ID is also valid.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createDatabaseAsync(
@@ -2983,7 +3145,7 @@ public final UnaryCallable deleteDatabaseCalla
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a backup.
+ * Create a user creds.
*
* Sample code:
*
@@ -2994,24 +3156,37 @@ public final UnaryCallable deleteDatabaseCalla
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
- * Backup response = firestoreAdminClient.getBackup(name);
+ * DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]");
+ * UserCreds userCreds = UserCreds.newBuilder().build();
+ * String userCredsId = "userCredsId726775445";
+ * UserCreds response = firestoreAdminClient.createUserCreds(parent, userCreds, userCredsId);
* }
* }
*
- * @param name Required. Name of the backup to fetch.
- * Format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @param parent Required. A parent name of the form
+ * `projects/{project_id}/databases/{database_id}`
+ * @param userCreds Required. The user creds to create.
+ * @param userCredsId Required. The ID to use for the user creds, which will become the final
+ * component of the user creds's resource name.
+ *
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first
+ * character a letter and the last a letter or a number. Must not be UUID-like
+ * /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Backup getBackup(BackupName name) {
- GetBackupRequest request =
- GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getBackup(request);
+ public final UserCreds createUserCreds(
+ DatabaseName parent, UserCreds userCreds, String userCredsId) {
+ CreateUserCredsRequest request =
+ CreateUserCredsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setUserCreds(userCreds)
+ .setUserCredsId(userCredsId)
+ .build();
+ return createUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a backup.
+ * Create a user creds.
*
*
Sample code:
*
@@ -3022,23 +3197,36 @@ public final Backup getBackup(BackupName name) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
- * Backup response = firestoreAdminClient.getBackup(name);
+ * String parent = DatabaseName.of("[PROJECT]", "[DATABASE]").toString();
+ * UserCreds userCreds = UserCreds.newBuilder().build();
+ * String userCredsId = "userCredsId726775445";
+ * UserCreds response = firestoreAdminClient.createUserCreds(parent, userCreds, userCredsId);
* }
* }
*
- * @param name Required. Name of the backup to fetch.
- *
Format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @param parent Required. A parent name of the form
+ * `projects/{project_id}/databases/{database_id}`
+ * @param userCreds Required. The user creds to create.
+ * @param userCredsId Required. The ID to use for the user creds, which will become the final
+ * component of the user creds's resource name.
+ *
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first
+ * character a letter and the last a letter or a number. Must not be UUID-like
+ * /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Backup getBackup(String name) {
- GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
- return getBackup(request);
+ public final UserCreds createUserCreds(String parent, UserCreds userCreds, String userCredsId) {
+ CreateUserCredsRequest request =
+ CreateUserCredsRequest.newBuilder()
+ .setParent(parent)
+ .setUserCreds(userCreds)
+ .setUserCredsId(userCredsId)
+ .build();
+ return createUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a backup.
+ * Create a user creds.
*
*
Sample code:
*
@@ -3049,24 +3237,26 @@ public final Backup getBackup(String name) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * GetBackupRequest request =
- * GetBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * CreateUserCredsRequest request =
+ * CreateUserCredsRequest.newBuilder()
+ * .setParent(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .setUserCreds(UserCreds.newBuilder().build())
+ * .setUserCredsId("userCredsId726775445")
* .build();
- * Backup response = firestoreAdminClient.getBackup(request);
+ * UserCreds response = firestoreAdminClient.createUserCreds(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 Backup getBackup(GetBackupRequest request) {
- return getBackupCallable().call(request);
+ public final UserCreds createUserCreds(CreateUserCredsRequest request) {
+ return createUserCredsCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a backup.
+ * Create a user creds.
*
*
Sample code:
*
@@ -3077,23 +3267,27 @@ public final Backup getBackup(GetBackupRequest request) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * GetBackupRequest request =
- * GetBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * CreateUserCredsRequest request =
+ * CreateUserCredsRequest.newBuilder()
+ * .setParent(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .setUserCreds(UserCreds.newBuilder().build())
+ * .setUserCredsId("userCredsId726775445")
* .build();
- * ApiFuture future = firestoreAdminClient.getBackupCallable().futureCall(request);
+ * ApiFuture future =
+ * firestoreAdminClient.createUserCredsCallable().futureCall(request);
* // Do something.
- * Backup response = future.get();
+ * UserCreds response = future.get();
* }
* }
*/
- public final UnaryCallable getBackupCallable() {
- return stub.getBackupCallable();
+ public final UnaryCallable createUserCredsCallable() {
+ return stub.createUserCredsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists all the backups.
+ * Gets a user creds resource. Note that the returned resource does not contain the secret value
+ * itself.
*
* Sample code:
*
@@ -3104,28 +3298,25 @@ public final UnaryCallable getBackupCallable() {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListBackupsResponse response = firestoreAdminClient.listBackups(parent);
+ * UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]");
+ * UserCreds response = firestoreAdminClient.getUserCreds(name);
* }
* }
*
- * @param parent Required. The location to list backups from.
- * Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list
- * backups from all locations for the given project. This allows listing backups from a single
- * location or from all locations.
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListBackupsResponse listBackups(LocationName parent) {
- ListBackupsRequest request =
- ListBackupsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listBackups(request);
+ public final UserCreds getUserCreds(UserCredsName name) {
+ GetUserCredsRequest request =
+ GetUserCredsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists all the backups.
+ * Gets a user creds resource. Note that the returned resource does not contain the secret value
+ * itself.
*
*
Sample code:
*
@@ -3136,25 +3327,24 @@ public final ListBackupsResponse listBackups(LocationName parent) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * ListBackupsResponse response = firestoreAdminClient.listBackups(parent);
+ * String name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString();
+ * UserCreds response = firestoreAdminClient.getUserCreds(name);
* }
* }
*
- * @param parent Required. The location to list backups from.
- *
Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list
- * backups from all locations for the given project. This allows listing backups from a single
- * location or from all locations.
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListBackupsResponse listBackups(String parent) {
- ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
- return listBackups(request);
+ public final UserCreds getUserCreds(String name) {
+ GetUserCredsRequest request = GetUserCredsRequest.newBuilder().setName(name).build();
+ return getUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists all the backups.
+ * Gets a user creds resource. Note that the returned resource does not contain the secret value
+ * itself.
*
*
Sample code:
*
@@ -3165,24 +3355,25 @@ public final ListBackupsResponse listBackups(String parent) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * GetUserCredsRequest request =
+ * GetUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
* .build();
- * ListBackupsResponse response = firestoreAdminClient.listBackups(request);
+ * UserCreds response = firestoreAdminClient.getUserCreds(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 ListBackupsResponse listBackups(ListBackupsRequest request) {
- return listBackupsCallable().call(request);
+ public final UserCreds getUserCreds(GetUserCredsRequest request) {
+ return getUserCredsCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists all the backups.
+ * Gets a user creds resource. Note that the returned resource does not contain the secret value
+ * itself.
*
*
Sample code:
*
@@ -3193,24 +3384,24 @@ public final ListBackupsResponse listBackups(ListBackupsRequest request) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * GetUserCredsRequest request =
+ * GetUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
* .build();
- * ApiFuture future =
- * firestoreAdminClient.listBackupsCallable().futureCall(request);
+ * ApiFuture future = firestoreAdminClient.getUserCredsCallable().futureCall(request);
* // Do something.
- * ListBackupsResponse response = future.get();
+ * UserCreds response = future.get();
* }
* }
*/
- public final UnaryCallable listBackupsCallable() {
- return stub.listBackupsCallable();
+ public final UnaryCallable getUserCredsCallable() {
+ return stub.getUserCredsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a backup.
+ * List all user creds in the database. Note that the returned resource does not contain the
+ * secret value itself.
*
* Sample code:
*
@@ -3221,24 +3412,27 @@ public final UnaryCallable listBackupsC
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
- * firestoreAdminClient.deleteBackup(name);
+ * DatabaseName parent = DatabaseName.of("[PROJECT]", "[DATABASE]");
+ * ListUserCredsResponse response = firestoreAdminClient.listUserCreds(parent);
* }
* }
*
- * @param name Required. Name of the backup to delete.
- * format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @param parent Required. A parent database name of the form
+ * `projects/{project_id}/databases/{database_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteBackup(BackupName name) {
- DeleteBackupRequest request =
- DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteBackup(request);
+ public final ListUserCredsResponse listUserCreds(DatabaseName parent) {
+ ListUserCredsRequest request =
+ ListUserCredsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a backup.
+ * List all user creds in the database. Note that the returned resource does not contain the
+ * secret value itself.
*
*
Sample code:
*
@@ -3249,23 +3443,24 @@ public final void deleteBackup(BackupName name) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
- * firestoreAdminClient.deleteBackup(name);
+ * String parent = DatabaseName.of("[PROJECT]", "[DATABASE]").toString();
+ * ListUserCredsResponse response = firestoreAdminClient.listUserCreds(parent);
* }
* }
*
- * @param name Required. Name of the backup to delete.
- *
format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @param parent Required. A parent database name of the form
+ * `projects/{project_id}/databases/{database_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteBackup(String name) {
- DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
- deleteBackup(request);
+ public final ListUserCredsResponse listUserCreds(String parent) {
+ ListUserCredsRequest request = ListUserCredsRequest.newBuilder().setParent(parent).build();
+ return listUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a backup.
+ * List all user creds in the database. Note that the returned resource does not contain the
+ * secret value itself.
*
*
Sample code:
*
@@ -3276,24 +3471,25 @@ public final void deleteBackup(String name) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DeleteBackupRequest request =
- * DeleteBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * ListUserCredsRequest request =
+ * ListUserCredsRequest.newBuilder()
+ * .setParent(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .build();
- * firestoreAdminClient.deleteBackup(request);
+ * ListUserCredsResponse response = firestoreAdminClient.listUserCreds(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 void deleteBackup(DeleteBackupRequest request) {
- deleteBackupCallable().call(request);
+ public final ListUserCredsResponse listUserCreds(ListUserCredsRequest request) {
+ return listUserCredsCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a backup.
+ * List all user creds in the database. Note that the returned resource does not contain the
+ * secret value itself.
*
*
Sample code:
*
@@ -3304,36 +3500,24 @@ public final void deleteBackup(DeleteBackupRequest request) {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DeleteBackupRequest request =
- * DeleteBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * ListUserCredsRequest request =
+ * ListUserCredsRequest.newBuilder()
+ * .setParent(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .build();
- * ApiFuture future = firestoreAdminClient.deleteBackupCallable().futureCall(request);
+ * ApiFuture future =
+ * firestoreAdminClient.listUserCredsCallable().futureCall(request);
* // Do something.
- * future.get();
+ * ListUserCredsResponse response = future.get();
* }
* }
*/
- public final UnaryCallable deleteBackupCallable() {
- return stub.deleteBackupCallable();
+ public final UnaryCallable listUserCredsCallable() {
+ return stub.listUserCredsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a new database by restoring from an existing backup.
- *
- * The new database must be in the same cloud region or multi-region location as the existing
- * backup. 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 backup.
- *
- *
The [long-running operation][google.longrunning.Operation] can be used to track the progress
- * of the restore, with the Operation's [metadata][google.longrunning.Operation.metadata] field
- * type being the [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata].
- * The [response][google.longrunning.Operation.response] type is the
- * [Database][google.firestore.admin.v1.Database] if the restore was successful. The new database
- * is not readable or writeable until the LRO has completed.
+ * Enables a user creds. No-op if the user creds are already enabled.
*
*
Sample code:
*
@@ -3344,29 +3528,828 @@ public final UnaryCallable deleteBackupCallable() {
* // - 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * RestoreDatabaseRequest request =
- * RestoreDatabaseRequest.newBuilder()
- * .setParent(ProjectName.of("[PROJECT]").toString())
- * .setDatabaseId("databaseId1688905718")
- * .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
- * .build();
- * Database response = firestoreAdminClient.restoreDatabaseAsync(request).get();
+ * UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]");
+ * UserCreds response = firestoreAdminClient.enableUserCreds(name);
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture restoreDatabaseAsync(
- RestoreDatabaseRequest request) {
- return restoreDatabaseOperationCallable().futureCall(request);
+ public final UserCreds enableUserCreds(UserCredsName name) {
+ EnableUserCredsRequest request =
+ EnableUserCredsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return enableUserCreds(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a new database by restoring from an existing backup.
+ * Enables a user creds. No-op if the user creds are already enabled.
*
- * The new database must be in the same cloud region or multi-region location as the existing
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString();
+ * UserCreds response = firestoreAdminClient.enableUserCreds(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserCreds enableUserCreds(String name) {
+ EnableUserCredsRequest request = EnableUserCredsRequest.newBuilder().setName(name).build();
+ return enableUserCreds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a user creds. No-op if the user creds are already enabled.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * EnableUserCredsRequest request =
+ * EnableUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * UserCreds response = firestoreAdminClient.enableUserCreds(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 UserCreds enableUserCreds(EnableUserCredsRequest request) {
+ return enableUserCredsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a user creds. No-op if the user creds are already enabled.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * EnableUserCredsRequest request =
+ * EnableUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.enableUserCredsCallable().futureCall(request);
+ * // Do something.
+ * UserCreds response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable enableUserCredsCallable() {
+ return stub.enableUserCredsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a user creds. No-op if the user creds are already disabled.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]");
+ * UserCreds response = firestoreAdminClient.disableUserCreds(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserCreds disableUserCreds(UserCredsName name) {
+ DisableUserCredsRequest request =
+ DisableUserCredsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return disableUserCreds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a user creds. No-op if the user creds are already disabled.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString();
+ * UserCreds response = firestoreAdminClient.disableUserCreds(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserCreds disableUserCreds(String name) {
+ DisableUserCredsRequest request = DisableUserCredsRequest.newBuilder().setName(name).build();
+ return disableUserCreds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a user creds. No-op if the user creds are already disabled.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DisableUserCredsRequest request =
+ * DisableUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * UserCreds response = firestoreAdminClient.disableUserCreds(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 UserCreds disableUserCreds(DisableUserCredsRequest request) {
+ return disableUserCredsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a user creds. No-op if the user creds are already disabled.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DisableUserCredsRequest request =
+ * DisableUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.disableUserCredsCallable().futureCall(request);
+ * // Do something.
+ * UserCreds response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable disableUserCredsCallable() {
+ return stub.disableUserCredsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the password of a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]");
+ * UserCreds response = firestoreAdminClient.resetUserPassword(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserCreds resetUserPassword(UserCredsName name) {
+ ResetUserPasswordRequest request =
+ ResetUserPasswordRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return resetUserPassword(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the password of a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString();
+ * UserCreds response = firestoreAdminClient.resetUserPassword(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserCreds resetUserPassword(String name) {
+ ResetUserPasswordRequest request = ResetUserPasswordRequest.newBuilder().setName(name).build();
+ return resetUserPassword(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the password of a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * ResetUserPasswordRequest request =
+ * ResetUserPasswordRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * UserCreds response = firestoreAdminClient.resetUserPassword(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 UserCreds resetUserPassword(ResetUserPasswordRequest request) {
+ return resetUserPasswordCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the password of a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * ResetUserPasswordRequest request =
+ * ResetUserPasswordRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.resetUserPasswordCallable().futureCall(request);
+ * // Do something.
+ * UserCreds response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable resetUserPasswordCallable() {
+ return stub.resetUserPasswordCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * UserCredsName name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]");
+ * firestoreAdminClient.deleteUserCreds(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUserCreds(UserCredsName name) {
+ DeleteUserCredsRequest request =
+ DeleteUserCredsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteUserCreds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString();
+ * firestoreAdminClient.deleteUserCreds(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUserCreds(String name) {
+ DeleteUserCredsRequest request = DeleteUserCredsRequest.newBuilder().setName(name).build();
+ deleteUserCreds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DeleteUserCredsRequest request =
+ * DeleteUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * firestoreAdminClient.deleteUserCreds(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 void deleteUserCreds(DeleteUserCredsRequest request) {
+ deleteUserCredsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user creds.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DeleteUserCredsRequest request =
+ * DeleteUserCredsRequest.newBuilder()
+ * .setName(UserCredsName.of("[PROJECT]", "[DATABASE]", "[USER_CREDS]").toString())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.deleteUserCredsCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteUserCredsCallable() {
+ return stub.deleteUserCredsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a backup.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
+ * Backup response = firestoreAdminClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the backup to fetch.
+ * Format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(BackupName name) {
+ GetBackupRequest request =
+ GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a backup.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
+ * Backup response = firestoreAdminClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the backup to fetch.
+ * Format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(String name) {
+ GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a backup.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * Backup response = firestoreAdminClient.getBackup(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 Backup getBackup(GetBackupRequest request) {
+ return getBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a backup.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.getBackupCallable().futureCall(request);
+ * // Do something.
+ * Backup response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getBackupCallable() {
+ return stub.getBackupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the backups.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ListBackupsResponse response = firestoreAdminClient.listBackups(parent);
+ * }
+ * }
+ *
+ * @param parent Required. The location to list backups from.
+ * Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list
+ * backups from all locations for the given project. This allows listing backups from a single
+ * location or from all locations.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsResponse listBackups(LocationName parent) {
+ ListBackupsRequest request =
+ ListBackupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the backups.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * ListBackupsResponse response = firestoreAdminClient.listBackups(parent);
+ * }
+ * }
+ *
+ * @param parent Required. The location to list backups from.
+ * Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list
+ * backups from all locations for the given project. This allows listing backups from a single
+ * location or from all locations.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsResponse listBackups(String parent) {
+ ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the backups.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ListBackupsResponse response = firestoreAdminClient.listBackups(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 ListBackupsResponse listBackups(ListBackupsRequest request) {
+ return listBackupsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the backups.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.listBackupsCallable().futureCall(request);
+ * // Do something.
+ * ListBackupsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable listBackupsCallable() {
+ return stub.listBackupsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a backup.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
+ * firestoreAdminClient.deleteBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the backup to delete.
+ * format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBackup(BackupName name) {
+ DeleteBackupRequest request =
+ DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a backup.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
+ * firestoreAdminClient.deleteBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the backup to delete.
+ * format is `projects/{project}/locations/{location}/backups/{backup}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBackup(String name) {
+ DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
+ deleteBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a backup.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * firestoreAdminClient.deleteBackup(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 void deleteBackup(DeleteBackupRequest request) {
+ deleteBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a backup.
+ *
+ * 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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.deleteBackupCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteBackupCallable() {
+ return stub.deleteBackupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new database by restoring from an existing backup.
+ *
+ * The new database must be in the same cloud region or multi-region location as the existing
+ * backup. 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 backup.
+ *
+ *
The [long-running operation][google.longrunning.Operation] can be used to track the progress
+ * of the restore, with the Operation's [metadata][google.longrunning.Operation.metadata] field
+ * type being the [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata].
+ * The [response][google.longrunning.Operation.response] type is the
+ * [Database][google.firestore.admin.v1.Database] if the restore was successful. The new database
+ * is not readable or writeable until the LRO has completed.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * RestoreDatabaseRequest request =
+ * RestoreDatabaseRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setDatabaseId("databaseId1688905718")
+ * .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
+ * .putAllTags(new HashMap())
+ * .build();
+ * Database response = firestoreAdminClient.restoreDatabaseAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFuture restoreDatabaseAsync(
+ RestoreDatabaseRequest request) {
+ return restoreDatabaseOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new database by restoring from an existing backup.
+ *
+ * The new database must be in the same cloud region or multi-region location as the existing
* backup. 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,
@@ -3393,6 +4376,8 @@ public final OperationFuture restoreDatabaseA
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setDatabaseId("databaseId1688905718")
* .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
+ * .putAllTags(new HashMap())
* .build();
* OperationFuture future =
* firestoreAdminClient.restoreDatabaseOperationCallable().futureCall(request);
@@ -3437,6 +4422,8 @@ public final OperationFuture restoreDatabaseA
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setDatabaseId("databaseId1688905718")
* .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
+ * .putAllTags(new HashMap())
* .build();
* ApiFuture future =
* firestoreAdminClient.restoreDatabaseCallable().futureCall(request);
@@ -4022,6 +5009,143 @@ public final UnaryCallable deleteBackupSched
return stub.deleteBackupScheduleCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new database by cloning an existing one.
+ *
+ * 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.
+ *
+ *
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.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * CloneDatabaseRequest request =
+ * CloneDatabaseRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setDatabaseId("databaseId1688905718")
+ * .setPitrSnapshot(PitrSnapshot.newBuilder().build())
+ * .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
+ * .putAllTags(new HashMap())
+ * .build();
+ * Database response = firestoreAdminClient.cloneDatabaseAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFuture cloneDatabaseAsync(
+ CloneDatabaseRequest request) {
+ return cloneDatabaseOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new database by cloning an existing one.
+ *
+ * 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.
+ *
+ *
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.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * CloneDatabaseRequest request =
+ * CloneDatabaseRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setDatabaseId("databaseId1688905718")
+ * .setPitrSnapshot(PitrSnapshot.newBuilder().build())
+ * .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
+ * .putAllTags(new HashMap())
+ * .build();
+ * OperationFuture future =
+ * firestoreAdminClient.cloneDatabaseOperationCallable().futureCall(request);
+ * // Do something.
+ * Database response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ cloneDatabaseOperationCallable() {
+ return stub.cloneDatabaseOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new database by cloning an existing one.
+ *
+ * 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.
+ *
+ *
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.
+ *
+ *
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 (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * CloneDatabaseRequest request =
+ * CloneDatabaseRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setDatabaseId("databaseId1688905718")
+ * .setPitrSnapshot(PitrSnapshot.newBuilder().build())
+ * .setEncryptionConfig(Database.EncryptionConfig.newBuilder().build())
+ * .putAllTags(new HashMap())
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.cloneDatabaseCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable cloneDatabaseCallable() {
+ return stub.cloneDatabaseCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java
index 69b43f0b8..d93c63875 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
@@ -38,16 +38,22 @@
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
+import com.google.firestore.admin.v1.CloneDatabaseMetadata;
+import com.google.firestore.admin.v1.CloneDatabaseRequest;
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
import com.google.firestore.admin.v1.CreateDatabaseRequest;
import com.google.firestore.admin.v1.CreateIndexRequest;
+import com.google.firestore.admin.v1.CreateUserCredsRequest;
import com.google.firestore.admin.v1.Database;
import com.google.firestore.admin.v1.DeleteBackupRequest;
import com.google.firestore.admin.v1.DeleteBackupScheduleRequest;
import com.google.firestore.admin.v1.DeleteDatabaseMetadata;
import com.google.firestore.admin.v1.DeleteDatabaseRequest;
import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.DeleteUserCredsRequest;
+import com.google.firestore.admin.v1.DisableUserCredsRequest;
+import com.google.firestore.admin.v1.EnableUserCredsRequest;
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
import com.google.firestore.admin.v1.ExportDocumentsRequest;
import com.google.firestore.admin.v1.ExportDocumentsResponse;
@@ -58,6 +64,7 @@
import com.google.firestore.admin.v1.GetDatabaseRequest;
import com.google.firestore.admin.v1.GetFieldRequest;
import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.GetUserCredsRequest;
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
import com.google.firestore.admin.v1.ImportDocumentsRequest;
import com.google.firestore.admin.v1.Index;
@@ -72,12 +79,16 @@
import com.google.firestore.admin.v1.ListFieldsResponse;
import com.google.firestore.admin.v1.ListIndexesRequest;
import com.google.firestore.admin.v1.ListIndexesResponse;
+import com.google.firestore.admin.v1.ListUserCredsRequest;
+import com.google.firestore.admin.v1.ListUserCredsResponse;
+import com.google.firestore.admin.v1.ResetUserPasswordRequest;
import com.google.firestore.admin.v1.RestoreDatabaseMetadata;
import com.google.firestore.admin.v1.RestoreDatabaseRequest;
import com.google.firestore.admin.v1.UpdateBackupScheduleRequest;
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
import com.google.firestore.admin.v1.UpdateFieldRequest;
+import com.google.firestore.admin.v1.UserCreds;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
@@ -99,7 +110,9 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of getIndex to 30 seconds:
+ *
For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getIndex:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -116,10 +129,47 @@
* .getIndexSettings()
* .getRetrySettings()
* .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* FirestoreAdminSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
* }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for createIndex:
+ *
+ *
{@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
+ * FirestoreAdminSettings.Builder firestoreAdminSettingsBuilder =
+ * FirestoreAdminSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * firestoreAdminSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
*/
@Generated("by gapic-generator-java")
public class FirestoreAdminSettings extends ClientSettings {
@@ -251,6 +301,41 @@ public UnaryCallSettings deleteDatabaseSetting
return ((FirestoreAdminStubSettings) getStubSettings()).deleteDatabaseOperationSettings();
}
+ /** Returns the object with the settings used for calls to createUserCreds. */
+ public UnaryCallSettings createUserCredsSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).createUserCredsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getUserCreds. */
+ public UnaryCallSettings getUserCredsSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).getUserCredsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listUserCreds. */
+ public UnaryCallSettings listUserCredsSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).listUserCredsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to enableUserCreds. */
+ public UnaryCallSettings enableUserCredsSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).enableUserCredsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to disableUserCreds. */
+ public UnaryCallSettings disableUserCredsSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).disableUserCredsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to resetUserPassword. */
+ public UnaryCallSettings resetUserPasswordSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).resetUserPasswordSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteUserCreds. */
+ public UnaryCallSettings deleteUserCredsSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).deleteUserCredsSettings();
+ }
+
/** Returns the object with the settings used for calls to getBackup. */
public UnaryCallSettings getBackupSettings() {
return ((FirestoreAdminStubSettings) getStubSettings()).getBackupSettings();
@@ -305,6 +390,17 @@ public UnaryCallSettings deleteBackupSchedul
return ((FirestoreAdminStubSettings) getStubSettings()).deleteBackupScheduleSettings();
}
+ /** Returns the object with the settings used for calls to cloneDatabase. */
+ public UnaryCallSettings cloneDatabaseSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).cloneDatabaseSettings();
+ }
+
+ /** Returns the object with the settings used for calls to cloneDatabase. */
+ public OperationCallSettings
+ cloneDatabaseOperationSettings() {
+ return ((FirestoreAdminStubSettings) getStubSettings()).cloneDatabaseOperationSettings();
+ }
+
public static final FirestoreAdminSettings create(FirestoreAdminStubSettings stub)
throws IOException {
return new FirestoreAdminSettings.Builder(stub.toBuilder()).build();
@@ -547,6 +643,44 @@ public UnaryCallSettings.Builder deleteDatabas
return getStubSettingsBuilder().deleteDatabaseOperationSettings();
}
+ /** Returns the builder for the settings used for calls to createUserCreds. */
+ public UnaryCallSettings.Builder createUserCredsSettings() {
+ return getStubSettingsBuilder().createUserCredsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getUserCreds. */
+ public UnaryCallSettings.Builder getUserCredsSettings() {
+ return getStubSettingsBuilder().getUserCredsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listUserCreds. */
+ public UnaryCallSettings.Builder
+ listUserCredsSettings() {
+ return getStubSettingsBuilder().listUserCredsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to enableUserCreds. */
+ public UnaryCallSettings.Builder enableUserCredsSettings() {
+ return getStubSettingsBuilder().enableUserCredsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to disableUserCreds. */
+ public UnaryCallSettings.Builder
+ disableUserCredsSettings() {
+ return getStubSettingsBuilder().disableUserCredsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to resetUserPassword. */
+ public UnaryCallSettings.Builder
+ resetUserPasswordSettings() {
+ return getStubSettingsBuilder().resetUserPasswordSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteUserCreds. */
+ public UnaryCallSettings.Builder deleteUserCredsSettings() {
+ return getStubSettingsBuilder().deleteUserCredsSettings();
+ }
+
/** Returns the builder for the settings used for calls to getBackup. */
public UnaryCallSettings.Builder getBackupSettings() {
return getStubSettingsBuilder().getBackupSettings();
@@ -604,6 +738,17 @@ public UnaryCallSettings.Builder restoreDatab
return getStubSettingsBuilder().deleteBackupScheduleSettings();
}
+ /** Returns the builder for the settings used for calls to cloneDatabase. */
+ public UnaryCallSettings.Builder cloneDatabaseSettings() {
+ return getStubSettingsBuilder().cloneDatabaseSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to cloneDatabase. */
+ public OperationCallSettings.Builder
+ cloneDatabaseOperationSettings() {
+ return getStubSettingsBuilder().cloneDatabaseOperationSettings();
+ }
+
@Override
public FirestoreAdminSettings build() throws IOException {
return new FirestoreAdminSettings(this);
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json
index cb2a1863d..da56c4232 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json
@@ -13,6 +13,9 @@
"BulkDeleteDocuments": {
"methods": ["bulkDeleteDocumentsAsync", "bulkDeleteDocumentsAsync", "bulkDeleteDocumentsAsync", "bulkDeleteDocumentsOperationCallable", "bulkDeleteDocumentsCallable"]
},
+ "CloneDatabase": {
+ "methods": ["cloneDatabaseAsync", "cloneDatabaseOperationCallable", "cloneDatabaseCallable"]
+ },
"CreateBackupSchedule": {
"methods": ["createBackupSchedule", "createBackupSchedule", "createBackupSchedule", "createBackupScheduleCallable"]
},
@@ -22,6 +25,9 @@
"CreateIndex": {
"methods": ["createIndexAsync", "createIndexAsync", "createIndexAsync", "createIndexOperationCallable", "createIndexCallable"]
},
+ "CreateUserCreds": {
+ "methods": ["createUserCreds", "createUserCreds", "createUserCreds", "createUserCredsCallable"]
+ },
"DeleteBackup": {
"methods": ["deleteBackup", "deleteBackup", "deleteBackup", "deleteBackupCallable"]
},
@@ -34,6 +40,15 @@
"DeleteIndex": {
"methods": ["deleteIndex", "deleteIndex", "deleteIndex", "deleteIndexCallable"]
},
+ "DeleteUserCreds": {
+ "methods": ["deleteUserCreds", "deleteUserCreds", "deleteUserCreds", "deleteUserCredsCallable"]
+ },
+ "DisableUserCreds": {
+ "methods": ["disableUserCreds", "disableUserCreds", "disableUserCreds", "disableUserCredsCallable"]
+ },
+ "EnableUserCreds": {
+ "methods": ["enableUserCreds", "enableUserCreds", "enableUserCreds", "enableUserCredsCallable"]
+ },
"ExportDocuments": {
"methods": ["exportDocumentsAsync", "exportDocumentsAsync", "exportDocumentsAsync", "exportDocumentsOperationCallable", "exportDocumentsCallable"]
},
@@ -52,6 +67,9 @@
"GetIndex": {
"methods": ["getIndex", "getIndex", "getIndex", "getIndexCallable"]
},
+ "GetUserCreds": {
+ "methods": ["getUserCreds", "getUserCreds", "getUserCreds", "getUserCredsCallable"]
+ },
"ImportDocuments": {
"methods": ["importDocumentsAsync", "importDocumentsAsync", "importDocumentsAsync", "importDocumentsOperationCallable", "importDocumentsCallable"]
},
@@ -70,6 +88,12 @@
"ListIndexes": {
"methods": ["listIndexes", "listIndexes", "listIndexes", "listIndexesPagedCallable", "listIndexesCallable"]
},
+ "ListUserCreds": {
+ "methods": ["listUserCreds", "listUserCreds", "listUserCreds", "listUserCredsCallable"]
+ },
+ "ResetUserPassword": {
+ "methods": ["resetUserPassword", "resetUserPassword", "resetUserPassword", "resetUserPasswordCallable"]
+ },
"RestoreDatabase": {
"methods": ["restoreDatabaseAsync", "restoreDatabaseOperationCallable", "restoreDatabaseCallable"]
},
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/package-info.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/package-info.java
index 8aa41ba08..2332f7867 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/package-info.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
index 4bd22e574..6b4d728db 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
@@ -27,16 +27,22 @@
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
+import com.google.firestore.admin.v1.CloneDatabaseMetadata;
+import com.google.firestore.admin.v1.CloneDatabaseRequest;
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
import com.google.firestore.admin.v1.CreateDatabaseRequest;
import com.google.firestore.admin.v1.CreateIndexRequest;
+import com.google.firestore.admin.v1.CreateUserCredsRequest;
import com.google.firestore.admin.v1.Database;
import com.google.firestore.admin.v1.DeleteBackupRequest;
import com.google.firestore.admin.v1.DeleteBackupScheduleRequest;
import com.google.firestore.admin.v1.DeleteDatabaseMetadata;
import com.google.firestore.admin.v1.DeleteDatabaseRequest;
import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.DeleteUserCredsRequest;
+import com.google.firestore.admin.v1.DisableUserCredsRequest;
+import com.google.firestore.admin.v1.EnableUserCredsRequest;
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
import com.google.firestore.admin.v1.ExportDocumentsRequest;
import com.google.firestore.admin.v1.ExportDocumentsResponse;
@@ -47,6 +53,7 @@
import com.google.firestore.admin.v1.GetDatabaseRequest;
import com.google.firestore.admin.v1.GetFieldRequest;
import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.GetUserCredsRequest;
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
import com.google.firestore.admin.v1.ImportDocumentsRequest;
import com.google.firestore.admin.v1.Index;
@@ -61,12 +68,16 @@
import com.google.firestore.admin.v1.ListFieldsResponse;
import com.google.firestore.admin.v1.ListIndexesRequest;
import com.google.firestore.admin.v1.ListIndexesResponse;
+import com.google.firestore.admin.v1.ListUserCredsRequest;
+import com.google.firestore.admin.v1.ListUserCredsResponse;
+import com.google.firestore.admin.v1.ResetUserPasswordRequest;
import com.google.firestore.admin.v1.RestoreDatabaseMetadata;
import com.google.firestore.admin.v1.RestoreDatabaseRequest;
import com.google.firestore.admin.v1.UpdateBackupScheduleRequest;
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
import com.google.firestore.admin.v1.UpdateFieldRequest;
+import com.google.firestore.admin.v1.UserCreds;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
@@ -199,6 +210,34 @@ public UnaryCallable deleteDatabaseCallable()
throw new UnsupportedOperationException("Not implemented: deleteDatabaseCallable()");
}
+ public UnaryCallable createUserCredsCallable() {
+ throw new UnsupportedOperationException("Not implemented: createUserCredsCallable()");
+ }
+
+ public UnaryCallable getUserCredsCallable() {
+ throw new UnsupportedOperationException("Not implemented: getUserCredsCallable()");
+ }
+
+ public UnaryCallable listUserCredsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listUserCredsCallable()");
+ }
+
+ public UnaryCallable enableUserCredsCallable() {
+ throw new UnsupportedOperationException("Not implemented: enableUserCredsCallable()");
+ }
+
+ public UnaryCallable disableUserCredsCallable() {
+ throw new UnsupportedOperationException("Not implemented: disableUserCredsCallable()");
+ }
+
+ public UnaryCallable resetUserPasswordCallable() {
+ throw new UnsupportedOperationException("Not implemented: resetUserPasswordCallable()");
+ }
+
+ public UnaryCallable deleteUserCredsCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteUserCredsCallable()");
+ }
+
public UnaryCallable getBackupCallable() {
throw new UnsupportedOperationException("Not implemented: getBackupCallable()");
}
@@ -241,6 +280,15 @@ public UnaryCallable deleteBackupScheduleCal
throw new UnsupportedOperationException("Not implemented: deleteBackupScheduleCallable()");
}
+ public OperationCallable
+ cloneDatabaseOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: cloneDatabaseOperationCallable()");
+ }
+
+ public UnaryCallable cloneDatabaseCallable() {
+ throw new UnsupportedOperationException("Not implemented: cloneDatabaseCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java
index 03c4060f4..a8ddabc23 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
@@ -58,16 +58,22 @@
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
+import com.google.firestore.admin.v1.CloneDatabaseMetadata;
+import com.google.firestore.admin.v1.CloneDatabaseRequest;
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
import com.google.firestore.admin.v1.CreateDatabaseRequest;
import com.google.firestore.admin.v1.CreateIndexRequest;
+import com.google.firestore.admin.v1.CreateUserCredsRequest;
import com.google.firestore.admin.v1.Database;
import com.google.firestore.admin.v1.DeleteBackupRequest;
import com.google.firestore.admin.v1.DeleteBackupScheduleRequest;
import com.google.firestore.admin.v1.DeleteDatabaseMetadata;
import com.google.firestore.admin.v1.DeleteDatabaseRequest;
import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.DeleteUserCredsRequest;
+import com.google.firestore.admin.v1.DisableUserCredsRequest;
+import com.google.firestore.admin.v1.EnableUserCredsRequest;
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
import com.google.firestore.admin.v1.ExportDocumentsRequest;
import com.google.firestore.admin.v1.ExportDocumentsResponse;
@@ -78,6 +84,7 @@
import com.google.firestore.admin.v1.GetDatabaseRequest;
import com.google.firestore.admin.v1.GetFieldRequest;
import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.GetUserCredsRequest;
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
import com.google.firestore.admin.v1.ImportDocumentsRequest;
import com.google.firestore.admin.v1.Index;
@@ -92,18 +99,22 @@
import com.google.firestore.admin.v1.ListFieldsResponse;
import com.google.firestore.admin.v1.ListIndexesRequest;
import com.google.firestore.admin.v1.ListIndexesResponse;
+import com.google.firestore.admin.v1.ListUserCredsRequest;
+import com.google.firestore.admin.v1.ListUserCredsResponse;
+import com.google.firestore.admin.v1.ResetUserPasswordRequest;
import com.google.firestore.admin.v1.RestoreDatabaseMetadata;
import com.google.firestore.admin.v1.RestoreDatabaseRequest;
import com.google.firestore.admin.v1.UpdateBackupScheduleRequest;
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
import com.google.firestore.admin.v1.UpdateFieldRequest;
+import com.google.firestore.admin.v1.UserCreds;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
+import java.time.Duration;
import java.util.List;
import javax.annotation.Generated;
-import org.threeten.bp.Duration;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
@@ -120,7 +131,9 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of getIndex to 30 seconds:
+ *
For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getIndex:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -137,10 +150,47 @@
* .getIndexSettings()
* .getRetrySettings()
* .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* FirestoreAdminStubSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
* }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for createIndex:
+ *
+ *
{@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
+ * FirestoreAdminStubSettings.Builder firestoreAdminSettingsBuilder =
+ * FirestoreAdminStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * firestoreAdminSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
*/
@Generated("by gapic-generator-java")
public class FirestoreAdminStubSettings extends StubSettings {
@@ -188,6 +238,14 @@ public class FirestoreAdminStubSettings extends StubSettings deleteDatabaseSettings;
private final OperationCallSettings
deleteDatabaseOperationSettings;
+ private final UnaryCallSettings createUserCredsSettings;
+ private final UnaryCallSettings getUserCredsSettings;
+ private final UnaryCallSettings
+ listUserCredsSettings;
+ private final UnaryCallSettings enableUserCredsSettings;
+ private final UnaryCallSettings disableUserCredsSettings;
+ private final UnaryCallSettings resetUserPasswordSettings;
+ private final UnaryCallSettings deleteUserCredsSettings;
private final UnaryCallSettings getBackupSettings;
private final UnaryCallSettings listBackupsSettings;
private final UnaryCallSettings deleteBackupSettings;
@@ -203,6 +261,9 @@ public class FirestoreAdminStubSettings extends StubSettings
updateBackupScheduleSettings;
private final UnaryCallSettings deleteBackupScheduleSettings;
+ private final UnaryCallSettings cloneDatabaseSettings;
+ private final OperationCallSettings
+ cloneDatabaseOperationSettings;
private static final PagedListDescriptor
LIST_INDEXES_PAGE_STR_DESC =
@@ -234,9 +295,7 @@ public String extractNextToken(ListIndexesResponse payload) {
@Override
public Iterable extractResources(ListIndexesResponse payload) {
- return payload.getIndexesList() == null
- ? ImmutableList.of()
- : payload.getIndexesList();
+ return payload.getIndexesList();
}
};
@@ -270,9 +329,7 @@ public String extractNextToken(ListFieldsResponse payload) {
@Override
public Iterable extractResources(ListFieldsResponse payload) {
- return payload.getFieldsList() == null
- ? ImmutableList.of()
- : payload.getFieldsList();
+ return payload.getFieldsList();
}
};
@@ -437,6 +494,41 @@ public UnaryCallSettings deleteDatabaseSetting
return deleteDatabaseOperationSettings;
}
+ /** Returns the object with the settings used for calls to createUserCreds. */
+ public UnaryCallSettings createUserCredsSettings() {
+ return createUserCredsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getUserCreds. */
+ public UnaryCallSettings getUserCredsSettings() {
+ return getUserCredsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listUserCreds. */
+ public UnaryCallSettings listUserCredsSettings() {
+ return listUserCredsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to enableUserCreds. */
+ public UnaryCallSettings enableUserCredsSettings() {
+ return enableUserCredsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to disableUserCreds. */
+ public UnaryCallSettings disableUserCredsSettings() {
+ return disableUserCredsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to resetUserPassword. */
+ public UnaryCallSettings resetUserPasswordSettings() {
+ return resetUserPasswordSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteUserCreds. */
+ public UnaryCallSettings deleteUserCredsSettings() {
+ return deleteUserCredsSettings;
+ }
+
/** Returns the object with the settings used for calls to getBackup. */
public UnaryCallSettings getBackupSettings() {
return getBackupSettings;
@@ -491,6 +583,17 @@ public UnaryCallSettings deleteBackupSchedul
return deleteBackupScheduleSettings;
}
+ /** Returns the object with the settings used for calls to cloneDatabase. */
+ public UnaryCallSettings cloneDatabaseSettings() {
+ return cloneDatabaseSettings;
+ }
+
+ /** Returns the object with the settings used for calls to cloneDatabase. */
+ public OperationCallSettings
+ cloneDatabaseOperationSettings() {
+ return cloneDatabaseOperationSettings;
+ }
+
public FirestoreAdminStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
@@ -626,6 +729,13 @@ protected FirestoreAdminStubSettings(Builder settingsBuilder) throws IOException
updateDatabaseOperationSettings = settingsBuilder.updateDatabaseOperationSettings().build();
deleteDatabaseSettings = settingsBuilder.deleteDatabaseSettings().build();
deleteDatabaseOperationSettings = settingsBuilder.deleteDatabaseOperationSettings().build();
+ createUserCredsSettings = settingsBuilder.createUserCredsSettings().build();
+ getUserCredsSettings = settingsBuilder.getUserCredsSettings().build();
+ listUserCredsSettings = settingsBuilder.listUserCredsSettings().build();
+ enableUserCredsSettings = settingsBuilder.enableUserCredsSettings().build();
+ disableUserCredsSettings = settingsBuilder.disableUserCredsSettings().build();
+ resetUserPasswordSettings = settingsBuilder.resetUserPasswordSettings().build();
+ deleteUserCredsSettings = settingsBuilder.deleteUserCredsSettings().build();
getBackupSettings = settingsBuilder.getBackupSettings().build();
listBackupsSettings = settingsBuilder.listBackupsSettings().build();
deleteBackupSettings = settingsBuilder.deleteBackupSettings().build();
@@ -636,6 +746,8 @@ protected FirestoreAdminStubSettings(Builder settingsBuilder) throws IOException
listBackupSchedulesSettings = settingsBuilder.listBackupSchedulesSettings().build();
updateBackupScheduleSettings = settingsBuilder.updateBackupScheduleSettings().build();
deleteBackupScheduleSettings = settingsBuilder.deleteBackupScheduleSettings().build();
+ cloneDatabaseSettings = settingsBuilder.cloneDatabaseSettings().build();
+ cloneDatabaseOperationSettings = settingsBuilder.cloneDatabaseOperationSettings().build();
}
/** Builder for FirestoreAdminStubSettings. */
@@ -689,6 +801,18 @@ public static class Builder extends StubSettings.Builder
deleteDatabaseOperationSettings;
+ private final UnaryCallSettings.Builder
+ createUserCredsSettings;
+ private final UnaryCallSettings.Builder getUserCredsSettings;
+ private final UnaryCallSettings.Builder
+ listUserCredsSettings;
+ private final UnaryCallSettings.Builder
+ enableUserCredsSettings;
+ private final UnaryCallSettings.Builder
+ disableUserCredsSettings;
+ private final UnaryCallSettings.Builder
+ resetUserPasswordSettings;
+ private final UnaryCallSettings.Builder deleteUserCredsSettings;
private final UnaryCallSettings.Builder getBackupSettings;
private final UnaryCallSettings.Builder
listBackupsSettings;
@@ -708,6 +832,10 @@ public static class Builder extends StubSettings.Builder
deleteBackupScheduleSettings;
+ private final UnaryCallSettings.Builder cloneDatabaseSettings;
+ private final OperationCallSettings.Builder<
+ CloneDatabaseRequest, Database, CloneDatabaseMetadata>
+ cloneDatabaseOperationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -723,6 +851,8 @@ public static class Builder extends StubSettings.BuildernewArrayList()));
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -734,23 +864,31 @@ public static class Builder extends StubSettings.Builder>of(
@@ -814,6 +961,13 @@ protected Builder(ClientContext clientContext) {
listDatabasesSettings,
updateDatabaseSettings,
deleteDatabaseSettings,
+ createUserCredsSettings,
+ getUserCredsSettings,
+ listUserCredsSettings,
+ enableUserCredsSettings,
+ disableUserCredsSettings,
+ resetUserPasswordSettings,
+ deleteUserCredsSettings,
getBackupSettings,
listBackupsSettings,
deleteBackupSettings,
@@ -822,7 +976,8 @@ protected Builder(ClientContext clientContext) {
getBackupScheduleSettings,
listBackupSchedulesSettings,
updateBackupScheduleSettings,
- deleteBackupScheduleSettings);
+ deleteBackupScheduleSettings,
+ cloneDatabaseSettings);
initDefaults(this);
}
@@ -853,6 +1008,13 @@ protected Builder(FirestoreAdminStubSettings settings) {
updateDatabaseOperationSettings = settings.updateDatabaseOperationSettings.toBuilder();
deleteDatabaseSettings = settings.deleteDatabaseSettings.toBuilder();
deleteDatabaseOperationSettings = settings.deleteDatabaseOperationSettings.toBuilder();
+ createUserCredsSettings = settings.createUserCredsSettings.toBuilder();
+ getUserCredsSettings = settings.getUserCredsSettings.toBuilder();
+ listUserCredsSettings = settings.listUserCredsSettings.toBuilder();
+ enableUserCredsSettings = settings.enableUserCredsSettings.toBuilder();
+ disableUserCredsSettings = settings.disableUserCredsSettings.toBuilder();
+ resetUserPasswordSettings = settings.resetUserPasswordSettings.toBuilder();
+ deleteUserCredsSettings = settings.deleteUserCredsSettings.toBuilder();
getBackupSettings = settings.getBackupSettings.toBuilder();
listBackupsSettings = settings.listBackupsSettings.toBuilder();
deleteBackupSettings = settings.deleteBackupSettings.toBuilder();
@@ -863,6 +1025,8 @@ protected Builder(FirestoreAdminStubSettings settings) {
listBackupSchedulesSettings = settings.listBackupSchedulesSettings.toBuilder();
updateBackupScheduleSettings = settings.updateBackupScheduleSettings.toBuilder();
deleteBackupScheduleSettings = settings.deleteBackupScheduleSettings.toBuilder();
+ cloneDatabaseSettings = settings.cloneDatabaseSettings.toBuilder();
+ cloneDatabaseOperationSettings = settings.cloneDatabaseOperationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -881,6 +1045,13 @@ protected Builder(FirestoreAdminStubSettings settings) {
listDatabasesSettings,
updateDatabaseSettings,
deleteDatabaseSettings,
+ createUserCredsSettings,
+ getUserCredsSettings,
+ listUserCredsSettings,
+ enableUserCredsSettings,
+ disableUserCredsSettings,
+ resetUserPasswordSettings,
+ deleteUserCredsSettings,
getBackupSettings,
listBackupsSettings,
deleteBackupSettings,
@@ -889,7 +1060,8 @@ protected Builder(FirestoreAdminStubSettings settings) {
getBackupScheduleSettings,
listBackupSchedulesSettings,
updateBackupScheduleSettings,
- deleteBackupScheduleSettings);
+ deleteBackupScheduleSettings,
+ cloneDatabaseSettings);
}
private static Builder createDefault() {
@@ -969,8 +1141,8 @@ private static Builder initDefaults(Builder builder) {
builder
.createDatabaseSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
builder
.getDatabaseSettings()
@@ -992,6 +1164,41 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ builder
+ .createUserCredsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getUserCredsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listUserCredsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .enableUserCredsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .disableUserCredsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .resetUserPasswordSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteUserCredsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.getBackupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
@@ -1009,8 +1216,8 @@ private static Builder initDefaults(Builder builder) {
builder
.restoreDatabaseSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
builder
.createBackupScheduleSettings()
@@ -1037,6 +1244,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ builder
+ .cloneDatabaseSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
+
builder
.createIndexOperationSettings()
.setInitialCallSettings(
@@ -1051,13 +1263,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1074,13 +1286,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1098,13 +1310,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1122,13 +1334,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1148,13 +1360,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1162,8 +1374,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Database.class))
@@ -1172,13 +1384,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1196,13 +1408,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1220,13 +1432,13 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
builder
@@ -1234,8 +1446,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Database.class))
@@ -1244,13 +1456,37 @@ private static Builder initDefaults(Builder builder) {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .cloneDatabaseOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Database.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(CloneDatabaseMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelayDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
- .setMaxRetryDelay(Duration.ofMillis(45000L))
- .setInitialRpcTimeout(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ofMillis(45000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ZERO)
- .setTotalTimeout(Duration.ofMillis(300000L))
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(300000L))
.build()));
return builder;
@@ -1401,6 +1637,44 @@ public UnaryCallSettings.Builder deleteDatabas
return deleteDatabaseOperationSettings;
}
+ /** Returns the builder for the settings used for calls to createUserCreds. */
+ public UnaryCallSettings.Builder createUserCredsSettings() {
+ return createUserCredsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getUserCreds. */
+ public UnaryCallSettings.Builder getUserCredsSettings() {
+ return getUserCredsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listUserCreds. */
+ public UnaryCallSettings.Builder
+ listUserCredsSettings() {
+ return listUserCredsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to enableUserCreds. */
+ public UnaryCallSettings.Builder enableUserCredsSettings() {
+ return enableUserCredsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to disableUserCreds. */
+ public UnaryCallSettings.Builder
+ disableUserCredsSettings() {
+ return disableUserCredsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to resetUserPassword. */
+ public UnaryCallSettings.Builder
+ resetUserPasswordSettings() {
+ return resetUserPasswordSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteUserCreds. */
+ public UnaryCallSettings.Builder deleteUserCredsSettings() {
+ return deleteUserCredsSettings;
+ }
+
/** Returns the builder for the settings used for calls to getBackup. */
public UnaryCallSettings.Builder getBackupSettings() {
return getBackupSettings;
@@ -1458,6 +1732,17 @@ public UnaryCallSettings.Builder restoreDatab
return deleteBackupScheduleSettings;
}
+ /** Returns the builder for the settings used for calls to cloneDatabase. */
+ public UnaryCallSettings.Builder cloneDatabaseSettings() {
+ return cloneDatabaseSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to cloneDatabase. */
+ public OperationCallSettings.Builder
+ cloneDatabaseOperationSettings() {
+ return cloneDatabaseOperationSettings;
+ }
+
@Override
public FirestoreAdminStubSettings build() throws IOException {
return new FirestoreAdminStubSettings(this);
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java
index e25d62192..bc559aaa4 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminCallableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java
index e1d414f60..71d6ecb37 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
@@ -27,21 +27,28 @@
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.api.pathtemplate.PathTemplate;
import com.google.firestore.admin.v1.Backup;
import com.google.firestore.admin.v1.BackupSchedule;
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
+import com.google.firestore.admin.v1.CloneDatabaseMetadata;
+import com.google.firestore.admin.v1.CloneDatabaseRequest;
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
import com.google.firestore.admin.v1.CreateDatabaseRequest;
import com.google.firestore.admin.v1.CreateIndexRequest;
+import com.google.firestore.admin.v1.CreateUserCredsRequest;
import com.google.firestore.admin.v1.Database;
import com.google.firestore.admin.v1.DeleteBackupRequest;
import com.google.firestore.admin.v1.DeleteBackupScheduleRequest;
import com.google.firestore.admin.v1.DeleteDatabaseMetadata;
import com.google.firestore.admin.v1.DeleteDatabaseRequest;
import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.DeleteUserCredsRequest;
+import com.google.firestore.admin.v1.DisableUserCredsRequest;
+import com.google.firestore.admin.v1.EnableUserCredsRequest;
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
import com.google.firestore.admin.v1.ExportDocumentsRequest;
import com.google.firestore.admin.v1.ExportDocumentsResponse;
@@ -52,6 +59,7 @@
import com.google.firestore.admin.v1.GetDatabaseRequest;
import com.google.firestore.admin.v1.GetFieldRequest;
import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.GetUserCredsRequest;
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
import com.google.firestore.admin.v1.ImportDocumentsRequest;
import com.google.firestore.admin.v1.Index;
@@ -66,12 +74,16 @@
import com.google.firestore.admin.v1.ListFieldsResponse;
import com.google.firestore.admin.v1.ListIndexesRequest;
import com.google.firestore.admin.v1.ListIndexesResponse;
+import com.google.firestore.admin.v1.ListUserCredsRequest;
+import com.google.firestore.admin.v1.ListUserCredsResponse;
+import com.google.firestore.admin.v1.ResetUserPasswordRequest;
import com.google.firestore.admin.v1.RestoreDatabaseMetadata;
import com.google.firestore.admin.v1.RestoreDatabaseRequest;
import com.google.firestore.admin.v1.UpdateBackupScheduleRequest;
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
import com.google.firestore.admin.v1.UpdateFieldRequest;
+import com.google.firestore.admin.v1.UserCreds;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
@@ -95,6 +107,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/CreateIndex")
.setRequestMarshaller(ProtoUtils.marshaller(CreateIndexRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -105,6 +118,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(ProtoUtils.marshaller(ListIndexesRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListIndexesResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getIndexMethodDescriptor =
@@ -113,6 +127,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetIndex")
.setRequestMarshaller(ProtoUtils.marshaller(GetIndexRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Index.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor deleteIndexMethodDescriptor =
@@ -121,6 +136,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteIndex")
.setRequestMarshaller(ProtoUtils.marshaller(DeleteIndexRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getFieldMethodDescriptor =
@@ -129,6 +145,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetField")
.setRequestMarshaller(ProtoUtils.marshaller(GetFieldRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Field.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor updateFieldMethodDescriptor =
@@ -137,6 +154,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/UpdateField")
.setRequestMarshaller(ProtoUtils.marshaller(UpdateFieldRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -146,6 +164,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ListFields")
.setRequestMarshaller(ProtoUtils.marshaller(ListFieldsRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(ListFieldsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -156,6 +175,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(ExportDocumentsRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -166,6 +186,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(ImportDocumentsRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -176,6 +197,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(BulkDeleteDocumentsRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -186,6 +208,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(CreateDatabaseRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getDatabaseMethodDescriptor =
@@ -194,6 +217,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetDatabase")
.setRequestMarshaller(ProtoUtils.marshaller(GetDatabaseRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Database.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -205,6 +229,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
ProtoUtils.marshaller(ListDatabasesRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListDatabasesResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -215,6 +240,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateDatabaseRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -225,6 +251,84 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(DeleteDatabaseRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ createUserCredsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/CreateUserCreds")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateUserCredsRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(UserCreds.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ getUserCredsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetUserCreds")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetUserCredsRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(UserCreds.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ listUserCredsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ListUserCreds")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListUserCredsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListUserCredsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ enableUserCredsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/EnableUserCreds")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(EnableUserCredsRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(UserCreds.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ disableUserCredsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DisableUserCreds")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DisableUserCredsRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(UserCreds.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ resetUserPasswordMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ResetUserPassword")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ResetUserPasswordRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(UserCreds.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ deleteUserCredsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteUserCreds")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteUserCredsRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor getBackupMethodDescriptor =
@@ -233,6 +337,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetBackup")
.setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -243,6 +348,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor deleteBackupMethodDescriptor =
@@ -251,6 +357,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteBackup")
.setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -261,6 +368,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(RestoreDatabaseRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -271,6 +379,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(CreateBackupScheduleRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(BackupSchedule.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -281,6 +390,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(GetBackupScheduleRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(BackupSchedule.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -292,6 +402,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
ProtoUtils.marshaller(ListBackupSchedulesRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListBackupSchedulesResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -302,6 +413,7 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateBackupScheduleRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(BackupSchedule.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private static final MethodDescriptor
@@ -312,6 +424,18 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
.setRequestMarshaller(
ProtoUtils.marshaller(DeleteBackupScheduleRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ cloneDatabaseMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/CloneDatabase")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CloneDatabaseRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
.build();
private final UnaryCallable createIndexCallable;
@@ -350,6 +474,13 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
private final UnaryCallable deleteDatabaseCallable;
private final OperationCallable
deleteDatabaseOperationCallable;
+ private final UnaryCallable createUserCredsCallable;
+ private final UnaryCallable getUserCredsCallable;
+ private final UnaryCallable listUserCredsCallable;
+ private final UnaryCallable enableUserCredsCallable;
+ private final UnaryCallable disableUserCredsCallable;
+ private final UnaryCallable resetUserPasswordCallable;
+ private final UnaryCallable deleteUserCredsCallable;
private final UnaryCallable getBackupCallable;
private final UnaryCallable listBackupsCallable;
private final UnaryCallable deleteBackupCallable;
@@ -364,11 +495,19 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
private final UnaryCallable
updateBackupScheduleCallable;
private final UnaryCallable deleteBackupScheduleCallable;
+ private final UnaryCallable cloneDatabaseCallable;
+ private final OperationCallable
+ cloneDatabaseOperationCallable;
private final BackgroundResource backgroundResources;
private final GrpcOperationsStub operationsStub;
private final GrpcStubCallableFactory callableFactory;
+ private static final PathTemplate CLONE_DATABASE_0_PATH_TEMPLATE =
+ PathTemplate.create("projects/{project_id=*}/**");
+ private static final PathTemplate CLONE_DATABASE_1_PATH_TEMPLATE =
+ PathTemplate.create("projects/*/databases/{database_id=*}/**");
+
public static final GrpcFirestoreAdminStub create(FirestoreAdminStubSettings settings)
throws IOException {
return new GrpcFirestoreAdminStub(settings, ClientContext.create(settings));
@@ -559,6 +698,76 @@ protected GrpcFirestoreAdminStub(
return builder.build();
})
.build();
+ GrpcCallSettings createUserCredsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createUserCredsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getUserCredsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getUserCredsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings listUserCredsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listUserCredsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings enableUserCredsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(enableUserCredsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings disableUserCredsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(disableUserCredsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings resetUserPasswordTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(resetUserPasswordMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings deleteUserCredsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteUserCredsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
GrpcCallSettings getBackupTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getBackupMethodDescriptor)
@@ -654,6 +863,27 @@ protected GrpcFirestoreAdminStub(
return builder.build();
})
.build();
+ GrpcCallSettings cloneDatabaseTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(cloneDatabaseMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ if (request.getPitrSnapshot() != null) {
+ builder.add(
+ request.getPitrSnapshot().getDatabase(),
+ "project_id",
+ CLONE_DATABASE_0_PATH_TEMPLATE);
+ }
+ if (request.getPitrSnapshot() != null) {
+ builder.add(
+ request.getPitrSnapshot().getDatabase(),
+ "database_id",
+ CLONE_DATABASE_1_PATH_TEMPLATE);
+ }
+ return builder.build();
+ })
+ .build();
this.createIndexCallable =
callableFactory.createUnaryCallable(
@@ -756,6 +986,29 @@ protected GrpcFirestoreAdminStub(
settings.deleteDatabaseOperationSettings(),
clientContext,
operationsStub);
+ this.createUserCredsCallable =
+ callableFactory.createUnaryCallable(
+ createUserCredsTransportSettings, settings.createUserCredsSettings(), clientContext);
+ this.getUserCredsCallable =
+ callableFactory.createUnaryCallable(
+ getUserCredsTransportSettings, settings.getUserCredsSettings(), clientContext);
+ this.listUserCredsCallable =
+ callableFactory.createUnaryCallable(
+ listUserCredsTransportSettings, settings.listUserCredsSettings(), clientContext);
+ this.enableUserCredsCallable =
+ callableFactory.createUnaryCallable(
+ enableUserCredsTransportSettings, settings.enableUserCredsSettings(), clientContext);
+ this.disableUserCredsCallable =
+ callableFactory.createUnaryCallable(
+ disableUserCredsTransportSettings, settings.disableUserCredsSettings(), clientContext);
+ this.resetUserPasswordCallable =
+ callableFactory.createUnaryCallable(
+ resetUserPasswordTransportSettings,
+ settings.resetUserPasswordSettings(),
+ clientContext);
+ this.deleteUserCredsCallable =
+ callableFactory.createUnaryCallable(
+ deleteUserCredsTransportSettings, settings.deleteUserCredsSettings(), clientContext);
this.getBackupCallable =
callableFactory.createUnaryCallable(
getBackupTransportSettings, settings.getBackupSettings(), clientContext);
@@ -799,6 +1052,15 @@ protected GrpcFirestoreAdminStub(
deleteBackupScheduleTransportSettings,
settings.deleteBackupScheduleSettings(),
clientContext);
+ this.cloneDatabaseCallable =
+ callableFactory.createUnaryCallable(
+ cloneDatabaseTransportSettings, settings.cloneDatabaseSettings(), clientContext);
+ this.cloneDatabaseOperationCallable =
+ callableFactory.createOperationCallable(
+ cloneDatabaseTransportSettings,
+ settings.cloneDatabaseOperationSettings(),
+ clientContext,
+ operationsStub);
this.backgroundResources =
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -942,6 +1204,41 @@ public UnaryCallable deleteDatabaseCallable()
return deleteDatabaseOperationCallable;
}
+ @Override
+ public UnaryCallable createUserCredsCallable() {
+ return createUserCredsCallable;
+ }
+
+ @Override
+ public UnaryCallable getUserCredsCallable() {
+ return getUserCredsCallable;
+ }
+
+ @Override
+ public UnaryCallable listUserCredsCallable() {
+ return listUserCredsCallable;
+ }
+
+ @Override
+ public UnaryCallable enableUserCredsCallable() {
+ return enableUserCredsCallable;
+ }
+
+ @Override
+ public UnaryCallable disableUserCredsCallable() {
+ return disableUserCredsCallable;
+ }
+
+ @Override
+ public UnaryCallable resetUserPasswordCallable() {
+ return resetUserPasswordCallable;
+ }
+
+ @Override
+ public UnaryCallable deleteUserCredsCallable() {
+ return deleteUserCredsCallable;
+ }
+
@Override
public UnaryCallable getBackupCallable() {
return getBackupCallable;
@@ -994,6 +1291,17 @@ public UnaryCallable deleteBackupScheduleCal
return deleteBackupScheduleCallable;
}
+ @Override
+ public UnaryCallable cloneDatabaseCallable() {
+ return cloneDatabaseCallable;
+ }
+
+ @Override
+ public OperationCallable
+ cloneDatabaseOperationCallable() {
+ return cloneDatabaseOperationCallable;
+ }
+
@Override
public final void close() {
try {
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java
index 1364aabb3..e725964f3 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java
index 3fa765bab..94cc5d5b6 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Google LLC
+ * 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.
@@ -35,22 +35,29 @@
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.api.pathtemplate.PathTemplate;
import com.google.common.collect.ImmutableMap;
import com.google.firestore.admin.v1.Backup;
import com.google.firestore.admin.v1.BackupSchedule;
import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;
import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest;
import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse;
+import com.google.firestore.admin.v1.CloneDatabaseMetadata;
+import com.google.firestore.admin.v1.CloneDatabaseRequest;
import com.google.firestore.admin.v1.CreateBackupScheduleRequest;
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
import com.google.firestore.admin.v1.CreateDatabaseRequest;
import com.google.firestore.admin.v1.CreateIndexRequest;
+import com.google.firestore.admin.v1.CreateUserCredsRequest;
import com.google.firestore.admin.v1.Database;
import com.google.firestore.admin.v1.DeleteBackupRequest;
import com.google.firestore.admin.v1.DeleteBackupScheduleRequest;
import com.google.firestore.admin.v1.DeleteDatabaseMetadata;
import com.google.firestore.admin.v1.DeleteDatabaseRequest;
import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.DeleteUserCredsRequest;
+import com.google.firestore.admin.v1.DisableUserCredsRequest;
+import com.google.firestore.admin.v1.EnableUserCredsRequest;
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
import com.google.firestore.admin.v1.ExportDocumentsRequest;
import com.google.firestore.admin.v1.ExportDocumentsResponse;
@@ -61,6 +68,7 @@
import com.google.firestore.admin.v1.GetDatabaseRequest;
import com.google.firestore.admin.v1.GetFieldRequest;
import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.GetUserCredsRequest;
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
import com.google.firestore.admin.v1.ImportDocumentsRequest;
import com.google.firestore.admin.v1.Index;
@@ -75,12 +83,16 @@
import com.google.firestore.admin.v1.ListFieldsResponse;
import com.google.firestore.admin.v1.ListIndexesRequest;
import com.google.firestore.admin.v1.ListIndexesResponse;
+import com.google.firestore.admin.v1.ListUserCredsRequest;
+import com.google.firestore.admin.v1.ListUserCredsResponse;
+import com.google.firestore.admin.v1.ResetUserPasswordRequest;
import com.google.firestore.admin.v1.RestoreDatabaseMetadata;
import com.google.firestore.admin.v1.RestoreDatabaseRequest;
import com.google.firestore.admin.v1.UpdateBackupScheduleRequest;
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
import com.google.firestore.admin.v1.UpdateFieldRequest;
+import com.google.firestore.admin.v1.UserCreds;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.TypeRegistry;
@@ -116,6 +128,7 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub {
.add(Index.getDescriptor())
.add(CreateDatabaseMetadata.getDescriptor())
.add(ExportDocumentsMetadata.getDescriptor())
+ .add(CloneDatabaseMetadata.getDescriptor())
.add(IndexOperationMetadata.getDescriptor())
.build();
@@ -685,6 +698,258 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub {
HttpJsonOperationSnapshot.create(response))
.build();
+ private static final ApiMethodDescriptor
+ createUserCredsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/CreateUserCreds")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/databases/*}/userCreds",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "userCredsId", request.getUserCredsId());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("userCreds", request.getUserCreds(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(UserCreds.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getUserCredsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/GetUserCreds")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/databases/*/userCreds/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map